Claude Codeās auto mode hands approval of Claudeās actions to a second model, the classifier. Reads and file edits inside your working directory go through directly. Everything else goes to the classifier, which blocks destructive actions and anything aimed outside your environment. Since v2.1.284, itās the mode interactive terminal and VS Code sessions start in, on every plan and every provider.
The classifier reads your CLAUDE.md file and also checks the work of subagents. For a guardrail that reads the full command, hooks are still the right tool.
What changes when Claude Code starts in auto mode?
Before, only Pro, Max, and Team plans started in auto mode. v2.1.283 extended that to third-party providers and sessions with telemetry off, and v2.1.284 to everyone. The first session that starts this way shows a notice, and the status bar reads āµāµ auto mode on.
claude -p and the Agent SDK follow a different rule. With no mode set, they start in default, the mode shown as āManualā, on every provider since v2.1.302. Calls that need approval get denied there, so a script that should run in auto mode has to ask for it.
claude -p "Run the test suite and fix any failures" --permission-mode auto
How does auto mode decide on an action?
Every action goes through a fixed order, and the first step that applies wins.
- Your
allow, ask, and deny rules come first.
- Reads and file edits inside your working directory are approved, except on protected paths.
- Everything else goes to the classifier.
When you enter auto mode, Claude Code sets aside broad allow rules such as Bash(*) or Bash(python*). Narrow rules like Bash(npm test) stay active.
The classifier sees your messages, tool calls, and CLAUDE.md, but not tool results, so a booby-trapped file or web page canāt manipulate it directly. If it blocks 3 times in a row or 20 times in a session, auto mode pauses and Claude Code goes back to prompting you.
What does the classifier block by default?
It only trusts your working directory and the repo remotes configured when the session started. Here is an excerpt from the lists in the docs:
| Blocked by default | Allowed by default |
|---|
| Downloading code and running it | File operations inside the working directory |
Force push, git reset --hard, git clean -fd | Pushing to any branch of the current repo |
| Production deploys and migrations | Installing dependencies declared in the project |
| Sending sensitive data to external endpoints | Read-only HTTP requests |
A branch whose name marks it as a deploy target, such as production or gh-pages, gets judged on its own terms, and the content of every push is still checked.
The first time Claude reads a file outside your working directories, Claude Code asks you first. Since v2.1.284, the āYes, but ask again next timeā answer allows that one read without saving anything.
How do you describe your environment to the classifier?
If the classifier keeps blocking routine work, like a push to your companyās GitHub org, it usually doesnāt know about that org. Run /auto-mode-setup. Claude Code reads the projectās CLAUDE.md, README, config files, and git remotes, plus the hosts and commands from your recent sessions, then drafts autoMode.environment entries. If you accept, it writes them to ~/.claude/settings.json. Since v2.1.304, the command also works on Bedrock, Vertex, and Foundry.
You can also write entries by hand, as plain sentences.
{
"autoMode": {
"environment": [
"$defaults",
"Source control: github.example.com/acme-corp and all repos under it",
"Trusted internal domains: *.corp.example.com"
]
}
}
"$defaults" keeps the built-in entries. Leave it out and you replace the whole list. The classifier ignores autoMode in project settings (.claude/settings.json and .claude/settings.local.json), so a repo canāt grant itself extra trust. Then check what applies.
claude auto-mode config # effective rules, with your settings
claude auto-mode defaults # built-in rules
Denied actions are listed in /permissions under the Recently denied tab, where pressing r retries one.
How do you keep a human checkpoint before a push?
By default, auto mode pushes and opens pull requests without asking. To stay in the loop, add ask rules. Theyāre evaluated before the classifier and force a permission prompt, even in auto mode.
{
"permissions": {
"ask": [
"Bash(git push *)",
"Bash(gh pr create *)"
]
}
}
These rules only match commands that start this way, so git -C <dir> push slips past them. To inspect the full command text, add a PreToolUse hook. To forbid an action outright, permissions.deny blocks it before the classifier runs.
How do you switch back to Manual mode?
During a session, one press of Shift+Tab takes you from auto to Manual. For a single session, run claude --permission-mode default. For every terminal session on your machine, set the mode in ~/.claude/settings.json.
{
"permissions": {
"defaultMode": "default"
}
}
A project can also set default in its .claude/settings.json, but "auto" is ignored there. The VS Code extension doesnāt read that file for the starting mode, so set claudeCode.initialPermissionMode to default in your VS Code user settings instead.
For organizations, permissions.disableAutoMode: "disable" in managed settings removes auto mode from the Shift+Tab cycle, and a session that would have started in it starts in Manual.
Which models does auto mode need, and what does it cost?
On the Anthropic API, you need Claude Opus 4.6 or later, Sonnet 4.6 or later, Haiku 5.5, or a Fable model. Since v2.1.328, the same list applies on Bedrock, Vertex, and Foundry. Before that, Opus 4.6 and Sonnet 4.6 werenāt supported there. On any other model, the session starts in Manual.
On Enterprise plans, API accounts, and cloud providers, the classifier requests Claude Code sends itself count toward your token usage. Since reads and working-directory edits skip the classifier, that overhead comes mostly from shell commands and network operations. Since v2.1.278, those accounts default to server-side review, done inside the model requests, and then thereās no separate classifier call to pay for. The Auto mode server row in /status tells you whether your session uses it.
Module 3, Advanced configuration, covers the settings scopes and the allow, ask, and deny lists auto mode builds on. To lock down permission modes for a whole team with managed settings, see module 11, Security and compliance.