Auto Mode
Auto mode lets Claude Code run without routine prompts.
A classifier model reads each action and blocks what is risky, such as a deploy to production or a push of secrets.
You tune it with the autoMode setting.
Pick auto as the permission mode. permissions.disableAutoMode: "disable" turns it off, and permissions.defaultMode: "auto" starts in it. User settings, --settings, and managed settings set autoMode. Project and local settings do not.
Example
{
"autoMode": {
"environment": [
"$defaults",
"Trusted repo: github.com/acme/app",
"Trusted cloud buckets: s3://acme-build-cache"
],
"soft_deny": ["$defaults", "Never run migrations against the shared staging database."]
}
}
$defaults keeps the built-in entries at that place. A list without $defaults replaces them.
Run claude auto-mode config to see the result.
How the Classifier Decides
- The classifier is a model call. It reads the transcript, with your rules as its system prompt.
- By default it allows an action. It blocks an action that matches a
hard_denyrule. It also blocks one that matches asoft_denyrule when noallowrule and no clear request from you clears it. soft_denyrules cover destructive or irreversible actions that your intent can clear.hard_denyrules are security boundaries that your intent does not clear. Source: theautoModeschema text.- If the classifier cannot answer, the call is blocked or goes to a person. Program texts:
Classifier unavailable, andAuto mode classifier transcript exceeded context window - falling back to manual approval. - Repeated denials trip a circuit breaker.
- A server-side classifier can review actions instead. See
CLAUDE_CODE_AUTO_MODE_SERVER. Server lists can add rules, and the program ignores server entries that are not strings, are blank, or hold control characters.
The default rule lists are on Auto Mode Default Rules.
The autoMode Setting
Official pages: Choose a Permission Mode and Configure Auto Mode.
| Key | Status | What it does | How it works | Scope |
|---|---|---|---|---|
auto | Documented | Exceptions to the soft deny rules | List of strings. $defaults inherits the built-in rules at that place | User, --, managed |
auto | Documented | Block rules that user intent can clear | Same list rules | Same |
auto | Documented | Block rules that no intent clears | Same list rules | Same |
auto | Documented | Facts about your setup and trusted resources | Same list rules | Same |
auto | Documented | Suspends every Bash and Power allow rule in auto mode | All shell commands go to the classifier. Default false. true from ~/. or -- wins over a managed false | User, -- |
permissions. | Documented | Turns auto mode off | Value disable | Settings |
skip | Documented | The user accepted the opt-in dialog | Boolean | Settings |
use | Documented | Plan mode uses auto semantics | Default true | Settings |
permissions. | Documented | Start in auto mode | Not from project or local settings | User, managed |
The plugin settings.json does not accept autoMode.
The program lists trusted sources for the rules and logs an untrusted_source event.
The old notes say only policy, user, and flag settings can set the rules.
The official docs confirm this only for classifyAllShell (user and --settings).
The claude auto-mode Commands
| Command | Status | What it does | How it works | Scope |
|---|---|---|---|---|
claude auto- | Documented | Prints the default environment, allow, soft_, and hard_ as JSON | Option -- shows only rules whose label starts with the prefix, without case | CLI |
claude auto- | Documented | Prints the effective config as JSON | Your settings where set, defaults elsewhere | CLI |
claude auto- | Documented | Asks a model to review your custom rules | Option --. It checks clarity, completeness, conflicts, and actionability | CLI |
claude auto- | Documented | Removes auto from the user settings file | Option - skips the prompt | CLI |
/ | Documented | Scans the project and recent sessions, and proposes auto rules | Shows Auto-. Since 2. it is also on Bedrock, Vertex, Foundry, a Claude apps gateway, and with telemetry off. skill turns it off (the program). | Interactive |
The config output tags custom rules as (custom rules added alongside the defaults) or (custom rules replacing defaults).
Environment Variables
| Variable | Status | What it does | How it works | Scope |
|---|---|---|---|---|
CLAUDE_ | Documented | Server-side review of auto mode actions | 0 uses own classifier requests. Needs 2. | Env |
CLAUDE_ | Documented | Removes the time limit of critical-path rm prompts | In auto mode these go to the classifier | Launch env only |
CLAUDE_ | Undocumented | Model of the classifier | A server-configured classifier model wins, and the bundle logs ignoring CLAUDE_ | Env |
CLAUDE_ | Undocumented | Classifier model for background sessions | Listed with the model env vars | Env |
CLAUDE_ | Undocumented | Any value sets the tier to strict | Source env | Env |
CLAUDE_ | Undocumented | Chooses llm or heuristic summaries | Boolean parse, a hidden server-side flag picks the default | Env |
CLAUDE_ | Undocumented | Two-stage classifier | Use unknown | Env |
CLAUDE_ | Undocumented | Unknown | Use unknown | Env |
CLAUDE_, CLAUDE_ | Undocumented | Chrome extension permission input | Use unknown | Env |
CLAUDE_ | Undocumented | JSON with allow, deny, add for a background session | Read when CLAUDE_ is bg. Removed from child env | Env |
CLAUDE_ | Undocumented | Wait for a parked permission | Default 2000 | Env |
CLAUDE_ | Undocumented | Own skills and commands cannot pre-approve tools | Personal hooks need existing rules | Env |
How It Works
Permission Flow shows where the classifier sits: after the rules and hooks, only for calls that would otherwise ask.