skip to content

In Claude Code's auto mode, what does the background classifier review, what still prompts or is blocked, and when does auto mode fall back to prompting?

level: seniorimportance: should knowfreq 16%

answer

  1. a second model in place of you
  2. rules first, reads and local edits skip
  3. broad code-execution allows are set aside
  4. chat boundaries live only in the transcript
  5. 3 in a row or 20 total

basics

~20 s

A separate classifier model reviews actions other than reads and working-directory edits, blocking escalation and unrecognised infrastructure. Ask rules still prompt, deny rules still block, and 3 blocks in a row or 20 in total revert to prompting.

solid answer

~50 s

Each action follows a fixed order: allow, ask and deny rules resolve first; reads and file edits in the working directory are auto-approved; everything else goes to a **classifier**, a separate model that blocks actions that escalate beyond your request, target unrecognised infrastructure or look driven by hostile content. By default it blocks things like `curl | bash`, force pushes, `git reset --hard`, production deploys and IAM grants. Explicit ask rules still prompt, deny rules still block, protected-path writes go to the classifier even when an allow rule matches, and broad allow rules such as `Bash(*)` are dropped while you are in auto. Boundaries you state in chat count but are re-read from the transcript, so compaction can lose them; use a deny rule for a guarantee. After 3 blocks in a row or 20 in a session, auto mode pauses and Claude Code resumes prompting.

go deeper

for a junior

Recall that auto mode swaps your prompts for a second model's review, and that it still asks when an ask rule matches.

for a middle

Walk the decision order: rules, then reads and local edits, then the classifier, and name typical default blocks such as force push.

for a senior

Explain the dropped broad allows, stripped tool results, boundaries lost to compaction and the 3-or-20 fallback, and when to reach for a deny rule.

for a principal

Decide which teams get auto mode, how trusted infrastructure is described centrally, and when disabling it beats tuning it.

## What auto mode is **Auto mode** (config value `auto`) lets Claude work without routine permission prompts. Instead of you, a **classifier**, a second model, reviews actions before they run. It needs a supported model (older ones such as Haiku and Sonnet 4.5 are not supported) and can be turned off by an administrator with `disableAutoMode`; if it is unavailable, a session asked to start in auto starts in Manual. The docs are explicit that it reduces prompts but does not guarantee safety. ## The decision order Each action goes through a fixed order, and the first matching step wins: 1. **Your allow, ask and deny rules** resolve it, with exceptions: writes to protected paths still go to the classifier even if an allow rule matches, no allow rule approves `rm` or `rmdir` aimed at a critical path, and ask rules that match a command's content fall back to a prompt. 2. **Read-only actions and file edits in the working directory** are auto-approved, except protected-path writes and the first read outside the working directories, which asks you. 3. **Everything else goes to the classifier**, apart from critical-path removals under their default handling. 4. If the classifier blocks, Claude receives the reason, usually the name of the matched rule, such as `[Data Exfiltration]`. On entering auto mode, allow rules that grant arbitrary code execution are **dropped**: blanket `Bash(*)` or `PowerShell(*)`, wildcarded interpreters like `Bash(python*)`, package-manager run commands, `Agent` allow rules and `Monitor` allow rules. Narrow rules such as `Bash(npm test)` stay. The dropped rules come back when you leave auto. ## What it blocks and allows by default The classifier trusts your working directory and the remotes configured when the session started; everything else is external until an administrator lists it in `autoMode.environment`. | Blocked by default (examples) | Allowed by default (examples) | | :- | :- | | Downloading and executing code, like `curl \| bash` | Local file operations in the working directory | | Sending sensitive data to external endpoints | Installing dependencies declared in lock files or manifests | | Production deploys and migrations | Read-only HTTP requests | | Force push, `git reset --hard`, `git clean -fd` | Pushing to a branch of the repository you're working in | | Granting IAM or repo permissions | Reading `.env` and sending credentials to their matching API | | `terraform destroy` and similar teardown | Deleting jobs Claude created earlier in the session | `claude auto-mode defaults` prints the full lists as JSON. ## What the classifier sees, and what you say in chat In the classifier requests Claude Code sends itself, the classifier sees your messages, Claude's tool calls and your CLAUDE.md content, but **tool results are stripped**, so hostile text in a file or web page cannot argue with it directly. Prompt-injection defence as a general discipline is a separate subject. - **Boundaries** you state, such as "don't push", act as a block signal until you lift them. They are not stored as rules: the classifier re-reads them from the transcript, so context compaction can remove them. For a hard guarantee, write a deny rule. - **Approvals** you state can clear a block, but only if you name the action and the specific thing that makes it dangerous; "you can force-push" alone clears nothing, and an approval covers one action unless you make it standing. ## When auto mode falls back - **A blocked action** shows a notification and appears under **Recently denied** in `/permissions`, where `r` retries it with manual approval. - **Repeated blocks**: 3 in a row or 20 in total pause auto mode and Claude Code resumes prompting; approving the prompted action resumes auto. The thresholds are not configurable. A `-p` run with no prompt tool has nothing to fall back to, so the action simply does not run. - **No verdict**: if the classifier's own request is refused or unparseable, the action is denied. - **Explicit ask rules** prompt you in auto mode, which is how you keep a human checkpoint before, say, `git push`. Repeated blocks usually mean the classifier lacks context about your infrastructure; the fix is trusted-infrastructure entries, not a more permissive mode.

  • Why does a Bash(*) allow rule stop approving commands when you switch to auto mode?
    On entering auto mode, Claude Code drops allow rules that grant arbitrary code execution, including blanket `Bash(*)`, wildcarded interpreters, package-manager run commands and `Agent` rules, so those commands reach the classifier instead of bypassing it. Narrow rules like `Bash(npm test)` stay, and the dropped rules are restored when you leave auto.
  • How do you keep a human checkpoint before every git push while staying in auto mode?
    Add a `permissions.ask` rule such as `Bash(git push *)`. Explicit ask rules still prompt in auto mode, matching the command as written. A boundary stated in chat is weaker because compaction can remove it.
  • The classifier keeps blocking pushes to your organisation's internal remote. What is the right fix?
    Teach it your infrastructure: an administrator lists trusted repos, buckets and domains in `autoMode.environment`, after which `claude auto-mode config` shows the effective rules. Switching to `bypassPermissions` would remove the classifier entirely rather than fix its missing context.

Auto mode is a front-desk guard who waves staff through with their own work but stops anyone carrying equipment out or heading for the roof. The guard judges by the visitor log of what you asked for, not by the contents of the boxes, and a locked door (a deny rule) stays locked whatever the guard thinks. If a page of the log goes missing, the guard forgets what you forbade.

  • Auto mode runs everything unchecked, just like bypassPermissions.
  • Telling Claude not to push in chat is as strong as a deny rule.
  • The classifier reads tool results, so a poisoned file can talk it round.
  • A Bash(*) allow rule keeps approving commands while in auto mode.
  • Ask rules are skipped in auto mode because the classifier decides.
  • Auto mode works with any model, Haiku included.