Text of code.claude.com › docs › en › auto-mode-config as Styx crawled it on Nov 20, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

Configure auto mode - Claude Code Docs

Documentation Index Fetch the complete documentation index at: /docs/llms.txt Use this file to discover all available pages before exploring further. Skip to main content Assistant Responses are generated using AI and may contain mistakes. Auto mode lets Claude Code run without routine permission prompts by routing tool calls through a classifier that blocks anything irreversible, destructive, or aimed outside your environment.

Deny and explicit ask rules are evaluated before the classifier and still block or prompt. Use the autoMode settings block to tell that classifier which repos, buckets, and domains your organization trusts, so it stops blocking routine internal operations. This page is the configuration reference. Turning auto mode on and off is covered on the Permission modes page: Switch to auto mode mid-session, or back out of it : see Switch permission modes Start a session in auto mode : see Start in a different permission mode Auto mode is available to all users on every provider, including the Anthropic API, Claude Platform on AWS , Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in Claude apps gateway sessions.

If Claude Code reports auto mode as unavailable for your account, check the full requirements , which also cover the supported models and the organization-level control on Team and Enterprise plans. By default, the classifier trusts only the working directory and the current repo’s configured remotes. Actions like pushing to your company’s source-control org or writing to a team cloud bucket are blocked until you add them to autoMode.environment .

This page covers how to: Add a human checkpoint for pushes and pull requests with permissions.ask Define trusted infrastructure with autoMode.environment Generate environment entries with /auto-mode-setup Review denials so you know what to add next Common boundaries By default in auto mode, Claude can push to the repository you’re working in, including its default branch, without a prompt. It can also open pull requests there when your task asks for one.

Some pushes and pull requests are blocked , such as a push with a secret or a pull request to another repository. If you want a human checkpoint before Claude’s push and pull request commands, add permission rules: the recipes below keep auto mode on for everything else. Add a human checkpoint The most direct mechanism is permissions.ask . The ask rules below are evaluated before the classifier, so by default you see a prompt.

Add the rules in your settings : { "permissions" : { "ask" : [ "Bash(git push *)" , "Bash(gh pr create *)" ] } } These rules match commands that begin with git push or gh pr create . A push Claude writes another way, such as git -C <dir> push or git -c <key>=<value> push , doesn’t match the rule , so it isn’t checkpointed. For a checkpoint that inspects the full command text, add a PreToolUse hook . Pick the mechanism that matches how firm the boundary needs to be: Boundary Mechanism Behavior in auto mode Prompt before the action permissions.ask By default, prompts for a command that matches a content-scoped rule like the recipe above.

The classifier cannot auto-approve a matching action. Never run the action permissions.deny Blocks before the classifier is consulted. Neither the classifier nor user intent can override it. One-off boundary for this session State it in conversation, like “don’t push until I review” The classifier blocks matching actions, but the boundary can be lost if context compaction removes the message that stated it. Use an ask or deny rule for a durable guarantee.

Where the classifier reads configuration The classifier reads the same CLAUDE.md content Claude itself loads, so an instruction like “never force push” in your project’s CLAUDE.md steers both Claude and the classifier at the same time. Start there for project conventions and behavioral rules. For rules that apply across projects, such as trusted infrastructure or organization-wide deny rules, use the autoMode settings block.

The classifier reads autoMode from the following scopes: Scope File Use for One developer ~/.claude/settings.json Personal trusted infrastructure Organization-wide Managed settings Trusted infrastructure distributed to all developers --settings flag or Agent SDK Inline JSON Per-invocation overrides for automation The classifier doesn’t read autoMode from project settings in .claude/settings.json or .claude/settings.local.json .

Both files live in the repo directory, so a checked-in repo or a build step could otherwise inject its own allow rules. Move any autoMode block in .claude/settings.local.json to ~/.claude/settings.json . Entries from each scope are combined. A developer can extend environment , allow , soft_deny , and hard_deny with personal entries but can’t remove entries that managed settings provide. Because allow rules act as exceptions to soft block rules inside the classifier, a developer-added allow entry can override an organization soft_deny entry: the combination is additive, not a hard policy boundary.

The classifier is a second gate that runs after the permissions system . To block Claude’s matching calls before the classifier runs, use permissions.deny in managed settings. Define trusted infrastructure For most organizations, autoMode.environment is the only field you need to set. It tells the classifier which repos, buckets, and domains are trusted: the classifier uses it to decide what “external” means, so any destination not listed is a potential exfiltration target. claude auto-mode defaults prints three kinds of environment entry.

Context slots : describe your organization, stack, and security posture so the classifier reads the other rules in your context. Each defaults to None configured or to the conservative assumption named next to it: Organization Primary use of Claude Code : defaults to software development Cloud provider(s) Repository visibility : a repository is assumed private unless its remote host and name indicate otherwise, or the classifier reads a visibility check earlier in the conversation showing it is public.

In the classifier requests sent by Claude Code itself, the classifier reads your messages and the commands Claude runs, not their output. The evidence has to be something the classifier can read, such as your own message naming the repository as public; the output of a gh repo view on its own doesn’t reach it. Internal sharing / snippet hosting : public paste and gist services are treated as outside the trust boundary until you name one Org-specific CLIs Secrets management CI/CD deploy targets Network posture Host containment : defaults to an ordinary developer machine or CI runner with open internet.

If Claude Code runs in a container, VM, or pod with an egress allow-list or neighbors it must not touch, name the allowed hosts, whether the cloud metadata endpoint should be reachable, and which cloud project, cluster, or registry the task uses and under what identity. Until this entry names that identity, the classifier blocks requests for the host’s own credentials. Requires Claude Code v2.1.257 or later Protected deployment namespaces / environments : falls back to the Sensitive remote targets default until you name them Data retention / declassification Trust slots : name what the classifier treats as inside your boundary.

The slots are Trusted repo, Source control, Trusted internal domains, Trusted cloud buckets, Key internal services, and Internal package registry. The repo and source-control entries default to the working repository and its configured remotes. Every other trust slot defaults to None configured , so nothing else is trusted until you add it. A repository’s visibility scopes only confidential material: a private repository is an acceptable destination for confidential material, but making a repository private never clears secrets or personal or entrusted data into it, a

The rest of this page is on the live site.