
Seeing Claude Code denied by auto mode means a second model, called the classifier, reviewed a command before it ran and judged it too risky. It is not a crash or a login problem. Claude Code shows a short notice such as bash blocked by auto mode · /permissions · Auto mode: [Data Exfiltration], and the name in square brackets tells you which rule the command matched.
The quick fix: run /permissions, open the Recently blocked tab, read the exact command, and press r if you really meant it. For a one-off action, you can also tell Claude to do it and name the target, like “run git reset –hard in this folder”. For a command you run every day, add a narrow allow rule such as Bash(npm test) or a plain-sentence autoMode.allow entry in ~/.claude/settings.json.
If the classifier keeps refusing, or the rule is a hard deny, leave auto mode with Shift+Tab and approve the normal permission prompt yourself. If the line under the command says “Not run” or “could not evaluate”, nothing was judged unsafe at all: the check simply failed, and a retry usually works.
Browse all our Claude Code tutorials for more fixes and how-tos.
Tested with Claude Code v2.1.332 on macOS on November 30, 2026. We used a throwaway folder called build-notes and started Claude Code with project and local settings only, so our real setup stayed untouched. We did not trigger a real block on purpose, because the commands that cause one are risky by design; the blocking behavior comes from Anthropic’s official docs, and the screens below are real captures of the tools you use to fix it.
Quick Summary
| What you see | What it means | What to do |
|---|---|---|
Blocked by auto mode with a [Rule name] | The classifier judged the command unsafe | Check it in /permissions, then approve, allow or skip |
| Same command blocked again after you approved it | Approval covers one retry, not future runs | Add an allow rule for routine commands |
| Prompts suddenly come back | 3 blocks in a row or 20 in a session | Approve the prompt; auto mode resumes |
Not run · auto mode's check had no usable answer | The classifier gave no verdict | Wait a few seconds and retry |
Auto mode could not evaluate this action | The classifier’s reply didn’t parse, or a separate safety check refused it | Retry; run claude --debug if it repeats |
| Push to your company’s Git host blocked | Only the starting repo and its remotes are trusted | Add the host to autoMode.environment |
Your Bash(*) rule stopped working | Broad allow rules are dropped in auto mode | Use narrow rules like Bash(npm test) |
Why Claude Code Denied a Command in Auto Mode
Auto mode lets Claude work without routine permission prompts. Instead of asking you, Claude Code sends risky actions to a classifier model, which blocks the ones that go beyond your request, target infrastructure it doesn’t recognize, or seem to follow hostile content Claude read. The permission modes docs describe this as a second gate, not a guarantee of safety.
Not every action reaches the classifier. Your own allow, ask and deny rules are checked first, and reads or file edits inside your working directory are approved without a review. Everything else, like most shell commands, web requests and pushes, goes to the classifier.
The classifier trusts your working folder and the Git remotes that existed when the session started. Everything else counts as external until you tell it otherwise, which is why a push to a new remote or a write to a company bucket can be blocked even though it feels routine to you.

What the classifier blocks by default
The docs list dozens of default block categories. These are the ones everyday users hit most often:
- Downloading and running code, like
curl | bash - Sending sensitive data to outside endpoints, or printing a live token into the transcript
- Force pushes, and Git commands that would throw away uncommitted work, such as
git reset --hard,git checkout -- .orgit clean -fd git commit --amendon a commit that Claude didn’t create in this session- Irreversibly deleting files that existed before the session
- A recursive forced delete like
rm -rf "$VAR"when the variable was never set where the classifier can see it - Production deploys, migrations,
terraform destroyand similar infrastructure changes - Commands with a flag that turns off a safety guard, like
--insecure
Plenty is allowed by default too: local file work in your folder, installing dependencies already in your lock files, read-only HTTP requests, and pushing to the repository you’re working in.

Soft blocks versus hard blocks
Rules come in two strengths. A soft deny rule blocks an action unless an allow exception covers it or your message directly and specifically describes that exact action. A hard deny rule blocks no matter what you say.
The docs give a simple example: asking Claude to “clean up the repo” does not authorize a force push, but asking it to “force-push this branch” does. Vague requests don’t count; specific ones do.
A block is the classifier saying “you didn’t clearly ask for this”, not “this is never allowed”.
Step 1: Find Out What Was Blocked
Start by reading the exact command, not Claude’s description of it. Run /permissions and move to the Recently blocked tab with the arrow keys. Each blocked action gets a row there, and the full command shows below the list when you highlight it.

Our demo session had no blocks yet, so the tab reads “No recent blocks. Commands auto mode blocks will appear here.” In a real session, you’d see one row per blocked action.
You can also find the call in the conversation. If it’s folded into a summary line, press Ctrl+O to open the transcript viewer and read the text under the tool call.
Read the rule name in the brackets
The name in square brackets is the rule the classifier matched. If it’s a built-in rule, you can print its full wording from your shell. We ran this for one of the Git rules:
claude auto-mode defaults --label 'Git Destructive'
The --label match is a case-insensitive prefix, so the start of the name is enough. Reading the rule tells you exactly what the classifier needs to see before it lets the action through; for Git Destructive, it wants the operation and its target named.
Some names are broad policies instead, such as [Destructive or Unwanted Actions] or [Sensitive Information Leakage]. Those come from server-side review, and claude auto-mode defaults doesn’t list their wording, so read the blocked command itself.
Step 2: Pick the Right Fix
Every fix depends on one question: do you want this action once, every time, or never? The official auto mode docs map each answer to a different step.


Fix 1: Approve a one-off action
If the blocked command is something you really meant, approve it from the Recently blocked tab:
- Run
/permissionsand open Recently blocked. - Highlight the row and read the command below the list.
- Press
rto approve it and let Claude retry. - Press
Escto close the dialog. If Claude was busy, send a message when it finishes so it retries.
Two catches are worth knowing. Approving doesn’t create a permission rule, and the retried action goes through the check again, so it can still be blocked. In the desktop app, /permissions has no Recently blocked tab, so you approve by naming the action in your next message instead.
Fix 2: Say exactly what you want
Your own words count as approval when they’re specific. Name the action and the thing that makes it risky, like the branch for a force push or the file for an overwrite. “You can force-push” may not be enough; “force-push the feature-login branch” usually is.
An approval like this covers that one action. The next similar action is checked again unless you made the approval standing, and some blocks, the hard denies, stay in place whatever you say.
Fix 3: Allow a routine command with a permission rule
For something safe you run all the time, a normal permission rule is the cleanest fix. Narrow rules like Bash(npm test) stay active in auto mode and are resolved before the classifier ever sees the command. Add them in .claude/settings.json or your user settings:
{
"permissions": {
"allow": [
"Bash(npm test)",
"Bash(npm run build)"
]
}
}Broad rules don’t survive. On entering auto mode, Claude Code drops rules that grant arbitrary code execution, such as Bash(*), wildcarded interpreters like Bash(python*), and package-manager run commands. It restores them when you leave auto mode.

Our auto mode session showed this directly: the Allow tab reads “Rules off in auto mode aren’t listed.” If a rule you wrote seems to be ignored, this is the first place to look. Our guide to permission rules covers the syntax in depth.
Fix 4: Teach the classifier with autoMode.allow
Auto mode has its own rule lists, written as plain sentences rather than patterns. Use autoMode.allow for routine actions the classifier keeps flagging, and always keep "$defaults" in the list so you don’t lose the built-in rules:
{
"autoMode": {
"allow": [
"$defaults",
"Deleting files inside the dist/ folder is allowed: it is rebuilt by npm run build"
]
}
}Put this in ~/.claude/settings.json. The classifier doesn’t read autoMode from project files like .claude/settings.json or .claude/settings.local.json, so a checked-in repo can’t sneak in its own allow rules. You can also add entries without editing files from the Auto mode tab in /permissions.

Fix 5: Trust a host or repo with autoMode.environment
If blocks keep hitting the same destination, such as your company’s Git host, an internal package registry or a team bucket, the classifier is missing context. Describe that infrastructure in autoMode.environment:
{
"autoMode": {
"environment": [
"$defaults",
"Source control: github.example.com/acme-corp and all repos under it"
]
}
}The docs also offer /auto-mode-setup, which drafts environment entries for you to review. After any change, run claude auto-mode config to confirm your entries took effect, then ask Claude to retry.
Fix 6: Leave auto mode and run it yourself
When a block won’t clear, or you simply want to review the step, press Shift+Tab to switch out of auto mode. From auto, the first press goes to Manual mode, where Claude Code asks you before running the command. Approve the prompt, then switch back.
Our permission modes guide explains each mode in the cycle.
Inspect Auto Mode’s Rules From Your Terminal
The claude auto-mode command lets you see what the classifier works from. It has four useful subcommands: defaults, config, critique and reset.

We counted the built-in rules with a quick jq call:
claude auto-mode defaults | jq 'map_values(length)'
claude auto-mode defaults | jq -r '.hard_deny[] | split(":")[0]'
On our version, the defaults held 16 allow rules, 72 soft deny rules, 1 hard deny rule and 21 environment entries. The only hard deny was Data Exfiltration, so nearly every block you meet is a soft one that a specific request or an allow rule can clear. These counts may change in later versions.
Two more commands help. claude auto-mode critique reviews your custom rules and flags vague or risky ones, and claude auto-mode reset removes your autoMode section from user settings after asking for confirmation.
When Auto Mode Gives No Verdict
Some denials aren’t judgments at all. If the line under a tool call reads Not run · auto mode's check had no usable answer, the classifier model was unavailable, rate-limited, overloaded or timed out. The docs say to retry after a few seconds; Claude often retries by itself.
The message Auto mode could not evaluate this action and is blocking it for safety means the classifier’s reply didn’t parse, or a separate safety check refused the classifier request because of earlier conversation content. Retry first, and run claude --debug if it keeps happening. The error reference lists each variant, and our roundup of common Claude Code errors covers related messages.

Why prompts suddenly come back
If the classifier blocks 3 actions in a row or 20 in total, auto mode pauses and Claude Code starts asking you again. Approving the prompted action turns auto mode back on. These thresholds can’t be changed, and the docs suggest using /feedback to report false positives.
Real Examples of Auto Mode Blocks
| Request | Likely result | Better approach |
|---|---|---|
| “Clean up the repo” | A git clean -fd or force push is blocked | Name the exact command and folder |
| “Install the tool from their site” | curl | bash is blocked | Run the installer yourself after reading it |
| “Push to our internal Git server” | Blocked as an untrusted destination | Add the host to autoMode.environment |
| “Fix the last commit message” | --amend on your older commit is blocked | Say “amend the last commit message to …” |
| “Run the tests” | Usually fine; faster with Bash(npm test) | Add a narrow allow rule |
If you’d rather never see a command run, even when you ask, a deny rule is the firmer choice. Our post on broken deny rules explains how to write one that actually matches.
Try It Yourself
Practice in a throwaway folder, never a real project. Start Claude Code in auto mode, then paste this prompt to see how it handles a cleanup request without a named target:
Create a folder called dist with two small text files in it.
Then tell me which command you would use to delete dist,
and explain whether auto mode would review that command.Afterward, run /permissions and check the Recently blocked and Auto mode tabs. If anything was blocked, read the command, then try the fix that matches: approve with r, name the target in a message, or add an allow sentence.
Common Mistakes
- Approving from the row description instead of reading the actual command below the list.
- Expecting one approval to cover every future run of the same command.
- Putting an
autoModeblock in.claude/settings.json, where the classifier ignores it. - Leaving out
"$defaults"when you set an auto mode list, which drops the built-in rules. - Relying on
Bash(*)orBash(python*), which are dropped in auto mode. - Treating a “Not run” row as a real block and rewriting settings when a retry would do.
- Telling Claude “don’t push” in chat and expecting it to last forever; compaction can remove that message, so use a deny rule for firm limits.
Pro Tips
- Use
claude auto-mode defaults --labelwith the bracketed name to see exactly what the classifier wants named. - Add a
PermissionDeniedhook to log every blocked command with its full input; see our hooks guide for the setup basics. - Put project conventions like “never force push” in CLAUDE.md; the classifier reads the same file Claude does.
- For pushes you want to approve by hand, add
permissions.askrules likeBash(git push *)and keep auto mode on for everything else. - If auto mode isn’t in your cycle at all, that’s a different problem: see our missing auto mode fix.
Cheat Sheet

Frequently Asked Questions
What does “blocked by auto mode” mean in Claude Code?
The auto mode classifier reviewed a command and judged it risky, so it didn’t run. The bracketed name in the notice is the rule it matched, and the command is listed under Recently blocked in /permissions.
How do I allow a command that auto mode keeps blocking?
Add a narrow permission rule like Bash(npm test), or a plain-sentence autoMode.allow entry in ~/.claude/settings.json. Approving once in /permissions only covers that single retry.
Can I turn off the classifier for one command?
Not inside auto mode. Press Shift+Tab to switch to Manual mode, approve the prompt for that command, then switch back.
Why did my Bash(*) rule stop working in auto mode?
Claude Code drops broad allow rules that allow any code, such as Bash(*) and wildcarded interpreters, while auto mode is on. They come back when you leave auto mode.
Is “Not run · auto mode’s check had no usable answer” a block?
No. It means the classifier couldn’t give a verdict, often because it was busy or timed out. Retry after a few seconds; you don’t need to change any settings.
Conclusion
When Claude Code is denied by auto mode, the classifier is asking for clarity, not refusing forever. Read the real command in the Recently blocked tab, check the bracketed rule with claude auto-mode defaults --label, and then pick the matching fix: approve once with r, name the exact action in your message, add a narrow allow rule or an autoMode.allow sentence for routine work, or trust your own infrastructure with autoMode.environment. On our v2.1.332 setup, 72 of the 73 built-in block rules were soft, so a clear request clears most blocks, and for the rest you can always switch to Manual mode and approve the step yourself. For more on the models behind Claude Code, see our Claude AI overview.


