Claude Code auto mode: what it allows, what it blocks, how to set it
Claude Code auto mode is a permission mode in which a second model, the classifier, reviews Claude's risky actions before they run, so you are not asked to approve every shell command. Reads and file edits in your working directory run straight away. Shell commands, network calls and anything outside the project go to the classifier, which blocks actions such as curl | bash, force pushes, production deploys and sending secrets to unknown hosts. Since Claude Code 2.1.284 (28 September 2026), auto mode is the starting mode for interactive terminal and VS Code sessions when nothing else sets one. Start it with claude --permission-mode auto, or press Shift+Tab until the status bar reads auto mode on.
Anthropic says auto mode "reduces risk compared to --dangerously-skip-permissions but doesn't eliminate it entirely" and still recommends isolated environments (announcement). For long or unattended runs, give Claude its own machine. Lizard Sandboxes are Firecracker microVMs, each with its own kernel, and the claude template has Claude Code installed: lizard sandbox create -t claude -s small. A Small sandbox costs $0.0162 an hour (pricing).
This guide covers auto mode itself. For the flag that skips every check, read our post on claude --dangerously-skip-permissions. We checked Anthropic's documentation and changelog on 12 November 2026, when the latest release was Claude Code 2.1.322.
What is Claude Code auto mode?
Auto mode is the middle ground between Manual mode, where Claude asks before most actions, and bypassPermissions, where it asks about almost nothing. Each action goes through a fixed order (permission modes docs):
- Your own
allow,askanddenyrules decide first. A deny rule blocks the action and the classifier never sees it. - Reads and file edits inside the working directory are approved, except writes to protected paths such as
.gitand.claude. - Everything else goes to the classifier. By default it runs on Claude Sonnet 5; on a direct Anthropic API connection the server can do the review as part of the model request.
- If the classifier blocks an action, Claude gets the reason and tries another approach.
In the classifier requests Claude Code sends itself, the classifier sees your messages, Claude's tool calls and your CLAUDE.md. Tool results are stripped from those requests, so a hostile web page or file cannot talk to the classifier directly. Auto mode also drops broad allow rules when it starts, such as Bash(*), Bash(python*) and package-manager run commands. Narrow rules like Bash(npm test) stay.
Anthropic announced auto mode as a research preview on 24 March 2026 and made it generally available to all users on 10 July 2026 (announcement). It needs a supported model. On the Anthropic API that means Claude Opus 4.6 or later, Sonnet 4.6 or later, Haiku 5.5 or a Fable model. Sonnet 4.5, Opus 4.5 and Haiku 4.5 are not supported on any provider.
Is auto mode now the default in Claude Code?
Yes, for interactive sessions. Anthropic's docs say: "With Claude Code v2.1.283 or later, auto mode is the built-in starting permission mode for interactive terminal and VS Code sessions." The changelog lists the change for every plan and provider under 2.1.284, released 28 September 2026. Version 2.1.283 (25 September) made the switch for third-party providers and sessions with telemetry off (changelog).
Short posts that say "auto mode is now the default" leave out the conditions. A session starts in another mode in these cases:
| Situation | Starting mode |
|---|---|
You pass --permission-mode or --dangerously-skip-permissions | The mode you asked for |
A settings file sets permissions.defaultMode | That mode (with exceptions, see the settings section) |
Any settings file sets disableAutoMode to "disable" | Manual (default) |
claude -p or the Agent SDK with no mode set | Manual (default), since 2.1.302 |
| Your organization has the HIPAA configuration | Manual, with auto mode still available to switch to |
| The model or provider does not support auto mode | Manual |
| Claude Code older than 2.1.283 | Auto only on Pro, Max, Ultra and Team plans, Manual otherwise |
The first time a session starts in auto mode by default, Claude Code shows a notice in the terminal, or a card on the new-conversation screen in VS Code. If you set a different defaultMode in ~/.claude/settings.json before the change, your sessions keep starting in that mode.
How do the Claude Code permission modes compare?
Claude Code has six permission modes. The CLI calls the first one Manual, and its config value is default; claude --permission-mode manual also works. The --permission-mode choices printed by claude --help in Claude Code 2.1.286 are acceptEdits, auto, bypassPermissions, manual, dontAsk and plan.
| Mode (config value) | VS Code label | What runs without asking | Use it for |
|---|---|---|---|
default (Manual) | Manual | Reads only | Sensitive work, unfamiliar code |
acceptEdits | Edit automatically | Reads, file edits and mkdir, touch, rm, rmdir, mv, cp, sed inside the working directory | Iterating on code you review in git diff |
plan | Plan | Reads, plus classifier-approved commands when auto mode is available; no source edits until you approve the plan | Exploring before changing anything |
auto | Auto | Everything, after the classifier's checks | Long tasks with fewer prompts |
dontAsk | Not in the indicator | Reads and pre-approved tools; anything that would prompt is denied | CI jobs with an exact allowlist |
bypassPermissions | Bypass permissions | Everything, apart from a few documented exceptions | Isolated containers and VMs only |
Source: Choose a permission mode. Deny rules apply in every mode, including bypassPermissions. Explicit ask rules prompt in every mode that can prompt.
The difference that matters most is between acceptEdits and auto. In acceptEdits, every shell command outside a short list still waits for you. In auto, the same commands run unless the classifier objects, so you can leave a task running and come back to a result.
How do you turn on auto mode in the CLI?
On Claude Code 2.1.284 or later with no mode configured, a new terminal session is already in auto mode. The status bar shows ⏵⏵ auto mode on. To start in it explicitly:
claude --permission-mode autoTo switch during a session, press Shift+Tab. From auto, the first press goes to Manual, and the cycle then runs Manual, acceptEdits, plan and back to auto. A Bash permission prompt in Manual or acceptEdits mode also offers Yes, and switch to auto mode (Claude Code 2.1.247 or later).
For a non-interactive run, pass the mode yourself, because claude -p starts in Manual and denies calls that would need approval:
claude -p "Run the test suite and fix any failures" --permission-mode autoIn a -p run there is nobody to ask. When the classifier blocks an action, that action does not run and Claude keeps working; the run does not stop. Our Claude Code headless guide covers collecting the output of such runs.
Older guides tell you to run claude --enable-auto-mode first. That flag stopped being required in Claude Code 2.1.111 (16 April 2026), and it does not appear in the 2.1.286 help output.
How do you use auto mode in VS Code?
In the Claude Code extension for VS Code, click the mode indicator at the bottom of the prompt box and pick Auto. With Claude Code 2.1.283 or later, Auto is the starting mode for new conversations unless something below overrides it (VS Code docs).
The extension picks the starting mode from the first of these that is set:
claudeCode.initialPermissionModein your VS Code user settings. It acceptsdefault,manual,acceptEdits,planandbypassPermissions, and does not acceptauto.- The mode you last picked in the indicator, if it was Manual, Edit automatically or Auto.
permissions.defaultModefrom managed settings or~/.claude/settings.json.- The built-in default, which is auto.
So to keep VS Code in auto mode, leave claudeCode.initialPermissionMode unset and pick Auto once. The extension never reads a project's .claude/settings.json for the starting mode. Auto appears in the indicator only when your model and organization allow it.
How do you set auto mode in settings.json?
Put defaultMode in your user settings file, ~/.claude/settings.json:
{
"permissions": {
"defaultMode": "auto"
}
}This value is ignored in a project's .claude/settings.json and .claude/settings.local.json. Anthropic blocks it there so that a cloned repository cannot switch your session into auto mode. If a terminal session starts in Manual with no error, check whether "auto" sits in one of those project files and move it to ~/.claude/settings.json.
The autoMode block that tunes the classifier follows the same rule: Claude Code reads it from ~/.claude/settings.json, managed settings or --settings, and never from project files (Configure auto mode). Use it to tell the classifier which infrastructure you trust:
{
"autoMode": {
"environment": [
"$defaults",
"Source control: github.com/your-org and all repos under it",
"Trusted internal domains: *.internal.example.com"
]
}
}Entries are plain sentences, and "$defaults" keeps the built-in entries. Run claude auto-mode config to print the rules in effect, and /auto-mode-setup inside a session to have Claude Code draft entries from your project.
To keep a human checkpoint for pushes while staying in auto mode, add ask rules. They are checked before the classifier and always prompt:
{
"permissions": {
"ask": ["Bash(git push *)", "Bash(gh pr create *)"]
}
}These rules match commands as written. A push written as git -C dir push does not match.
What does auto mode block or ask about?
The classifier trusts your working directory and the git remotes configured when the session started. Everything else counts as external. Its default block list includes (permission modes docs):
- downloading and running code, like
curl | bash; - sending sensitive data to outside endpoints, and printing a live credential or token into the transcript or a file;
- production deploys and migrations,
terraform destroyand similar; - force push,
git reset --hard,git clean -fdand other commands that discard uncommitted work; - irreversibly destroying files that existed before the session;
- granting IAM or repository permissions, writing to a secret manager, changing DNS records or TLS certificates;
- merging a pull request no human approved, or disabling CI checks;
- launching another agent loop with no approval and no sandbox, for example one started with
--dangerously-skip-permissions; - requesting credentials from the cloud metadata endpoint
169.254.169.254(Claude Code 2.1.257 or later).
It allows by default: local file operations in the working directory, installing dependencies declared in your lock files, reading .env and sending credentials to their matching API, read-only HTTP requests, and pushing to any branch of the repository you are working in, including the default branch.
In the claude template of Lizard Sandboxes, Claude Code 2.1.286 printed its built-in rules with claude auto-mode defaults: 17 allow rules, 72 soft-deny rules, 1 hard-deny rule (data exfiltration) and 21 environment entries. The counts change between releases.
Auto mode still stops and asks in a few cases:
- a command matches one of your
askrules; - Claude reads a file outside the working directories for the first time in a session;
- a critical-path removal such as
rm -rf ~orrm -rf /. In the terminal, this prompt has a two-minute countdown, and the command is denied if nobody answers. In VS Code, the desktop app and-pruns it is denied outright.
If the classifier blocks actions 3 times in a row or 20 times in a session, auto mode pauses and Claude Code goes back to prompting. Blocked actions are listed in /permissions under Recently blocked, where you can approve a retry. A boundary you state in the chat, such as "don't push", also counts as a block signal, but it can be lost when the conversation is compacted. Use a deny rule when the boundary must hold.
How do you turn auto mode off?
Press Shift+Tab once in the terminal to go from auto to Manual for the current session. To start every terminal session in Manual, set this in ~/.claude/settings.json:
{
"permissions": {
"defaultMode": "default"
}
}The next session shows ⏸ manual mode on. Unlike "auto", the "default" value also works from a project's .claude/settings.json. In VS Code, set claudeCode.initialPermissionMode to default.
To remove auto mode completely, so that nobody can switch to it, an administrator sets "disableAutoMode": "disable" in managed settings. A session started with --permission-mode auto then starts in Manual.
When should you use a sandbox instead of auto mode?
Use a separate machine when the run is unattended, when the session can reach credentials you would not hand to a new contractor, or when the task installs and runs code you have not read. Auto mode judges intent. It does not limit what the process can reach. On a laptop, Claude still runs as your user, with your SSH agent, cloud logins and browser profile on the same disk. Several defaults also assume a trusted machine: reading .env and calling the matching API is allowed, and so is pushing to your default branch.
Anthropic's docs list auto mode with "None" in the isolation column and add that "a sandbox or container adds defense in depth". The announcement goes further: "we continue to recommend using it in isolated environments" (announcement). The built-in Bash sandbox (/sandbox) helps with shell commands, but file tools, MCP servers and hooks run outside it. Our Claude Code sandbox guide compares /sandbox, Docker and cloud VMs.
| Setup | Who approves actions | What limits the damage |
|---|---|---|
| Auto mode on your laptop | The classifier | Your user account and its credentials |
| Auto mode in a Lizard Sandbox | The classifier | A separate microVM holding only the repository and keys you copy in |
bypassPermissions in a Lizard Sandbox | Nobody, apart from a few exceptions | The microVM alone |
To run auto mode in a Lizard Sandbox, install Lizard CLI, then create a sandbox and open a shell in it:
lizard sandbox create -t claude -s small --timeout 3600000 --json
lizard sandbox ssh <sandbox-id>Inside the VM, Claude Code is installed but not signed in. When we ran it there, it answered Not logged in · Please run /login. Run /login or set ANTHROPIC_API_KEY in that shell, then start the session with claude --permission-mode auto. Copy in only the repository and the keys the task needs. To limit outbound traffic, create the sandbox with --allow-host <host> for each host the job needs, including the model API; the flag turns off all other internet access for the sandbox's whole life.
Lizard also starts Claude for you with lizard sandbox prompt <sandbox-id> --agent claude "...". That runner uses claude -p with --dangerously-skip-permissions, so the microVM is the only boundary there, and auto mode does not apply.
Three limits to know before a long run:
- The
--timeoutabove is one hour, in milliseconds. A new sandbox gets 5 minutes when you pass none. - On the 7-day trial, every sandbox is deleted at most 1 hour after it starts, and a longer timeout is refused. Longer runs need a paid Lizard Pro plan ($19 a month with $19 of usage included).
- Pausing a sandbox keeps its files but ends running processes, so a paused Claude session does not resume where it stopped. Save the work, for example by pushing a branch, before the sandbox ends.
What we checked
On 12 November 2026 we created a Small sandbox from the claude template. It shipped Claude Code 2.1.286. We ran claude --version, claude --help, claude auto-mode --help and claude auto-mode defaults in it, then deleted the sandbox. The flag names and rule counts above come from that output. We did not run a coding task in auto mode, because Claude Code in the sandbox was not signed in. The behavior of the classifier in this article comes from Anthropic's documentation, not from our tests.
Frequently asked questions
Does auto mode cost more tokens? It can. On Enterprise plans and Claude API, Bedrock, Agent Platform and Foundry accounts, the classifier's own requests count toward token usage. Where the server reviews actions inside the model request, there are no separate classifier calls. Reads and edits in the working directory skip the classifier, so most of the overhead comes from shell commands and network calls.
Why is auto mode missing from my Shift+Tab cycle? Check your model first: Sonnet 4.5, Opus 4.5 and Haiku 4.5 do not support it. Then look for disableAutoMode in any settings file. Anthropic can also switch auto mode off server-side; a session that receives that answer keeps auto mode off until it ends.
Is auto mode the same as --dangerously-skip-permissions? No. Bypass mode skips the classifier and runs almost everything; auto mode blocks the actions on its list. See our guide to the bypass flag for what bypass still refuses.
Can a repository turn on auto mode for me? No. defaultMode: "auto" and the autoMode block are ignored in .claude/settings.json and .claude/settings.local.json. A repository's CLAUDE.md does reach the classifier, so read it before you start an auto mode session in someone else's code.
Build with AI. Ship with Lizard
You don't need a platform team to go live. Your whole cloud, one CLI command away.
- Services
- —
- Add-ons
- —
- Deployments
- —
- Sandbox starts
- —