How Claude Code auto mode works and how to tune it
What Claude Code’s auto mode approves, what it blocks, why it stops and asks again, and how to tune it with ask rules, autoMode.environment and /permissions.
Updated
Auto mode is the Claude Code permission mode where a second model checks each risky action instead of asking you. Reads and file edits in your project go through with no check. Shell commands and network calls go to a classifier that blocks anything beyond what you asked for, like a force push, curl | bash, a production deploy or deleting files that existed before the session. Since v2.1.283 it’s where interactive sessions start. Press Shift+Tab to leave it, and add ask or deny rules for anything that must never run without you.
As of November 2026, from Anthropic’s permission modes and configure auto mode docs. Part of Keep coding agents safe.
Auto mode still stops and waits for you sometimes. Coral shows every waiting agent in your Mac’s notch and on your iPhone, so you answer in a second. Download Coral for free
How auto mode decides
Every tool call goes through four steps, in order:
- Your rules first.
allow,askanddenyrules from your settings resolve right away. Adenyrule blocks in every mode, and anaskrule still prompts you. - Safe work runs. Reads and file edits inside the working directory are approved without a check, except writes to protected paths like
.git,.claude,.bashrcor.npmrc. - Everything else goes to the classifier. It sees part of the transcript and the pending action, and decides whether the action goes beyond your request.
- If it blocks, Claude is told why and usually tries another way.
One surprise: when you enter auto mode, Claude Code drops your broad allow rules, the ones that grant arbitrary code execution, like Bash(*), Bash(python*) or package-manager run commands. Narrow ones like Bash(npm test) stay. The dropped rules come back when you leave auto mode.
What it blocks and what it allows
A sample of Anthropic’s default rules:
| Blocked by default | Allowed by default |
|---|---|
Downloading and running code, like curl | bash | Local file operations in your working directory |
Force push, git reset --hard, git clean -fd, git stash drop | Installing dependencies declared in your lock files or manifests |
| Production deploys and migrations | Read-only HTTP requests |
| Deleting files that existed before the session | Pushing to any branch of the repo you’re in, including main |
| Sending sensitive data to outside endpoints | Reading .env and sending credentials to their matching API |
terraform destroy and similar | Deleting jobs Claude created earlier in the same session |
| Merging a PR no human approved, or disabling CI checks | Sending data to domains and buckets you list as trusted |
Starting another agent with --dangerously-skip-permissions |
Note the row people miss: auto mode lets Claude push to main. If you want a checkpoint before pushes, add an ask rule (below).
To see every rule, run:
claude auto-mode defaults
Turn it on, off, or make it the default
- Switch in a session: press Shift+Tab. From auto, the first press goes to Manual (
default), thenacceptEdits, thenplan. Cycling back to auto doesn’t ask for confirmation. - Start in auto mode:
claude --permission-mode auto. - Headless runs:
claude -pand Agent SDK runs start in Manual since v2.1.302. Pass--permission-mode autoto use it. - Make it the default, or turn it off by default: set
defaultModein your user settings,~/.claude/settings.json. Use"auto"to start in auto mode, or"default"to start in Manual:
{
"permissions": {
"defaultMode": "default"
}
}
Setting "auto" in a project’s .claude/settings.json or .claude/settings.local.json does nothing, with no error. A repo can’t turn auto mode on for you.
- Turn it off for a whole team: admins set
"disableAutoMode": "disable"underpermissionsin managed settings. It removes auto from the Shift+Tab cycle. More on managed settings in Claude Code managed settings. - VS Code: the
claudeCode.initialPermissionModesetting doesn’t acceptauto. Leave it unset and pick Auto from the mode indicator once.
When auto mode stops and asks you
Auto mode cuts prompts, but it doesn’t remove them. Claude Code still waits for you when:
- An
askrule matches. The classifier can’t approve it. - A critical path is being removed.
rm -rf ~and similar still prompt, in every mode. - The classifier keeps blocking. After 3 blocks in a row, or 20 in one session, auto mode pauses and Claude Code goes back to prompting for each action. Approving the prompted action turns auto mode back on. You can’t change these limits.
- Claude asks you a question, or finishes a plan and wants approval. Approving a plan with “Yes, and use auto mode” is a common way into auto mode; see Claude Code plan mode.
A single block doesn’t stop the session. You see a notice like bash blocked by auto mode · /permissions · Auto mode: [Data Exfiltration], and Claude keeps working. If you did want that action, open /permissions, go to the Recently blocked tab, check the command, and press r to let Claude retry it.
In claude -p runs there’s no one to prompt, so a blocked action just doesn’t run, and Claude carries on without it. That’s the trade-off at the heart of a software factory: every prompt becomes a rule you wrote in advance or a step that gets skipped. Take away the last human review too and it’s a dark factory.
The practical effect: a long auto-mode task can still end up sitting on a prompt while you’re in another window. That’s the wait Coral is built for (see Where Coral fits).
Tune it: pick the right fix for each block
| You want | Use | Where |
|---|---|---|
| A prompt before every push or PR | permissions.ask | Any settings file |
| An action to never run, whatever anyone says | permissions.deny | Any settings file; managed settings for a team |
| Auto mode to stop blocking your company’s repos, buckets or internal domains | autoMode.environment | ~/.claude/settings.json or managed settings |
| A routine action it keeps flagging to go through | autoMode.allow | ~/.claude/settings.json or managed settings |
| One blocked action, this once | Say it in your next message, naming the specifics | The conversation |
A checkpoint before pushes and PRs, keeping auto mode on for everything else:
{
"permissions": {
"ask": ["Bash(git push *)", "Bash(gh pr create *)"]
}
}
These match commands as written, so git -C dir push slips past. For a check that reads the whole command, use a hook: see Claude Code hooks.
Telling it what you trust, in plain sentences:
{
"autoMode": {
"environment": [
"$defaults",
"Source control: github.com/your-org and all repos under it",
"Trusted cloud buckets: s3://your-org-build-artifacts",
"Trusted internal domains: *.internal.your-org.com"
]
}
}
Three things to know before you edit this:
- Keep
"$defaults". Settingenvironment,allow,soft_denyorhard_denywithout it replaces Anthropic’s whole list for that section. Asoft_denywithout it throws away the built-in blocks on force push,curl | bashand production deploys. - Project settings are ignored. The classifier reads
autoModefrom your user settings, managed settings or the--settingsflag, never from.claude/settings.jsonin a repo. That stops a cloned repo from writing its own allow rules. - One-off approvals must be specific. “Force-push
feature/loginto origin” clears that action. “You can force-push” clears nothing.
Helpers worth knowing:
/auto-mode-setupdraftsenvironmententries from your project and recent sessions, and writes them to~/.claude/settings.jsonif you accept./permissions, Auto mode tab, edits the rules without opening a file.claude auto-mode configprints the rules in effect,claude auto-mode critiquereviews your custom ones, andclaude auto-mode resetremoves yourautoModeblock.
If auto mode isn’t available
Work down this list:
- Version. Run
claude --version. Auto mode as the default needs v2.1.228 or later on macOS, Linux and WSL, v2.1.233 on native Windows. - Model. On the Anthropic API it needs Claude Opus 4.6 or later, Sonnet 4.6 or later, Haiku 5.5, or a Fable model. On Bedrock, Google Cloud’s Agent Platform and Microsoft Foundry it needs Sonnet 5 or later, Opus 4.7 or later, Haiku 5.5, or Fable. Older models like Sonnet 4.5 don’t support it anywhere.
- Your admin. On Team and Enterprise,
permissions.disableAutoModein managed settings turns it off. - Anthropic’s side. Run
/statusand check Auto mode server. Anthropic can turn auto mode off for an account, and the session then keeps it off until it ends.
What it costs
Each check sends part of the transcript and the pending action to the classifier, which adds a round trip before shell commands and network calls. Reads and edits in your project skip it. On Enterprise plans and on API, Bedrock, Agent Platform and Foundry accounts, classifier calls count toward your token usage.
Auto mode, Manual or bypass?
Manual (default) | acceptEdits | Auto | bypassPermissions | |
|---|---|---|---|---|
| File edits in the project | Asks | Runs | Runs | Runs |
| Shell commands | Asks, except read-only ones | Asks | Classifier checks | Runs |
| Protection against prompt injection | You review each step | You review commands | The classifier looks for actions driven by content Claude read | None |
| Good for | Sensitive work | Reviewing diffs | Most daily work | Throwaway containers |
Anthropic’s own warning: auto mode “reduces permission prompts but does not guarantee safety.” For what bypass mode really skips, see Is --dangerously-skip-permissions safe?. To fence off the filesystem and network on top of auto mode, see Claude Code sandbox: what it covers. For every way to cut prompts, see Stop babysitting Claude Code permission prompts.
Where Coral fits
Auto mode handles the routine approvals. What’s left are the moments that should reach you: ask rules, the pause after repeated blocks, questions and finished plans. Coral puts those in your Mac’s notch the moment they happen, for every Claude Code, Codex, Copilot CLI, OpenCode and Grok session in any terminal. You see what the agent wants in full and answer with one key.
When Claude Code finishes a plan, Coral’s card asks “Ready to code?”. Press 1 to approve and switch to auto mode, or 2 to approve and review each edit. On your iPhone, answering needs Face ID. Alerts are Free, and answering from the phone straight to the agent is Pro. If you run several agents at once, Run multiple Claude Code agents covers the setup.
Questions
Is Claude Code auto mode safe?
Safer than skipping permissions, not a guarantee. A classifier checks every shell command and network call and blocks the riskiest ones, but Anthropic says it can miss some. Add deny rules for anything that must never happen, and an ask rule for git push if you want to review pushes.
How do I turn off auto mode in Claude Code?
Press Shift+Tab once to switch to Manual for the session. To start in Manual every time, set "defaultMode": "default" under permissions in ~/.claude/settings.json. Admins can remove auto mode for everyone with "disableAutoMode": "disable" in managed settings.
Why did auto mode stop and start asking me again?
The classifier blocked 3 actions in a row or 20 in the session, so auto mode paused and went back to prompts. Approve the next prompted action to turn it back on. If the blocks keep hitting the same repo, bucket or domain, add it to autoMode.environment.
Can auto mode push to main?
Yes. By default it can push to any branch of the repo you’re working in, including the default branch. Add "ask": ["Bash(git push *)"] under permissions to get a prompt first.
Does auto mode use more tokens?
On Enterprise plans and API, Bedrock, Agent Platform or Foundry accounts, the classifier’s calls count toward your token usage. Reads and edits in your project skip the classifier, so the extra usage comes mostly from shell commands and network calls.