Learning resourcesReviewed · Anthropic

Configure auto mode in Claude Code

This Claude Code documentation page shows developers and administrators how to configure auto mode, which lets Claude Code run tool calls without routine permission prompts by routing them through a classifier that blocks irreversible, destructive or out-of-environment actions. It explains trusted infrastructure, classifier rules, configuration inspection and troubleshooting.

Researched 14 Nov 2026

In short.

This guide helps developers and administrators configure Claude Code's automatic tool approvals, but default settings can permit pushes to the working repository's default branch without a human checkpoint. It explains how to define trusted destinations, retain built-in safeguards, add approval requirements and inspect effective rules. Its most consequential distinctions are between ordinary permissions and classifier rules, and between adding to defaults and replacing them. Prices, measured classifier reliability and actual behavior in a particular installation are not established; nothing was executed.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage includes the complete documentation page at [https://code.claude.com/docs/en/auto-mode-config.md], including its configuration examples, caution notices, platform differences, version requirements and troubleshooting guidance. Linked pages are excluded, including the full model requirements and instructions for enabling or switching modes. No implementation, runtime behavior, safety effectiveness, pricing or independent benchmark was assessed.

The overview

Identity

Configure auto mode is a Claude Code documentation reference at [https://code.claude.com/docs/en/auto-mode-config.md]. It teaches users to configure the classifier that reviews actions when auto mode is active.

The page covers trusted infrastructure, permission checkpoints, rule precedence, configuration scopes, setup assistance and blocked-action review. Instructions for starting or switching permission modes are delegated to linked documentation.

Assessment

The guide is useful when Claude Code repeatedly blocks legitimate work involving internal repositories, services or cloud storage. It explains how to supply missing environment context and distinguish a recurring trust issue from a one-off action requiring specific authorization.

Its strongest practical contribution is explaining approval gaps. Auto mode can allow a push to the current repository's default branch without prompting, and a simple push approval rule can miss alternative command forms. Teams requiring review before publishing code need to configure that boundary explicitly.

Users

Individual developers can use the guide to configure personal trusted infrastructure. Platform and security administrators can use it to understand organization-wide settings and enforce mandatory restrictions. Automation developers can apply configuration through the --settings flag or Agent SDK.

Beginners need familiarity with settings files and shell commands. Experienced developers will find the details about configuration merging, shell permission matching, classifier context and Code Mode especially relevant.

Capabilities

The autoMode.environment array describes trusted repositories, source-control organizations, internal domains, cloud buckets, package registries and services. It can also describe sensitive data, production targets, protected infrastructure resources and host containment. Entries are natural-language descriptions rather than regular expressions or tool patterns.

Additional settings customize hard_deny, soft_deny and allow rules. The classifyAllShell setting suspends Bash and PowerShell allow rules so commands otherwise approved by those rules receive classifier review.

The page documents commands to inspect built-in and effective configuration, request AI feedback on custom rules and reset personal configuration. It also covers /auto-mode-setup, rule editing through /permissions and reviewing recently blocked actions.

Using it

Requirements

The page states that auto mode is available across providers, including the Anthropic API, Claude Platform on AWS, Amazon Bedrock, Google Cloud's Agent Platform, Microsoft Foundry and signed-in Claude apps gateway sessions. Supported models and organization-level availability controls are documented elsewhere; their full requirements are not established here.

The /permissions Auto mode tab requires Claude Code v2.1.246 or later and an eligible session. Host containment context requires v2.1.257 or later. The desktop app lacks both the Auto mode and Recently blocked tabs.

The page lists /auto-mode-setup for Pro, Max, Ultra, Team and Enterprise plans and Claude Console API-key use. Pro, Max, Ultra and Team require v2.1.228 or later, or v2.1.233 or later on native Windows. Enterprise and Console API-key use require v2.1.283 or later. Sessions with feature-flag fetching disabled, including the third-party-provider and gateway cases described, require v2.1.304 or later for this command. The setup command is unavailable in cloud sessions and must run in an interactive terminal session.

Mechanism

The permissions system operates before the classifier. Deny rules block actions, matching content-scoped ask rules normally require a prompt, and applicable narrow shell allow rules can approve commands without classifier review. Within the classifier, hard_deny rules block regardless of user intent or allow exceptions. Soft blocks can be overridden by allow entries or a direct, specific user request for the action.

The classifier reads autoMode from personal settings, managed settings and inline invocation settings. It ignores autoMode in repository-level .claude/settings.json and .claude/settings.local.json. Entries combine across supported scopes: personal entries cannot remove managed entries, but a personal allow entry can override a managed soft_deny entry. Managed permissions.deny provides the stronger mandatory boundary described by the page.

The classifier also reads loaded CLAUDE.md content. In requests generated by Claude Code itself, it sees user messages and commands, but not command output. Consequently, output from a repository-visibility check alone does not establish visibility for the classifier.

Setup

Inspect the built-in lists with claude auto-mode defaults. Put personal autoMode entries in ~/.claude/settings.json, or use the supported managed or invocation scopes. Include the literal "$defaults" in each customized environment, allow, soft_deny or hard_deny array when retaining that section's built-ins. Omitting it replaces that entire section; other sections remain independent.

After editing, claude auto-mode config prints the effective lists. The /permissions Auto mode tab provides another editing route where supported, saving changes to personal settings while displaying managed and invocation entries as read-only. The claude auto-mode critique command offers AI feedback about ambiguous, redundant or overly restrictive entries.

Alternatively, /auto-mode-setup drafts configuration from project files, remotes, existing settings and command information from recent project sessions. Optional scans cover command names from shell history and repository hosts and names under the home directory. The draft is accepted or discarded as a whole. Replacing an existing environment list removes its "$defaults" entry, so retaining defaults requires checking the saved result.

Example

For developers requiring approval before publishing code, the page supplies a permissions.ask array containing "Bash(git push *)" and "Bash(gh pr create *)". According to the documentation, matching commands prompt before classifier approval can occur.

The example has a specific matching limit: git -C <dir> push and git -c <key>=<value> push do not begin with git push and therefore do not match that push rule. The page recommends a PreToolUse hook when the checkpoint must inspect the full command text. This is a documented example; it was not executed.

Assessment & evidence

Limitations

Omitting "$defaults" can remove significant protections: replacing soft_deny discards built-in soft blocks, and replacing hard_deny discards the built-in data-exfiltration rule. Conversely, retaining defaults does not guarantee a human checkpoint for every consequential action.

Conversation-only restrictions can disappear during context compaction. Narrow shell allow rules may admit destructive arguments without classifier review unless suspended. In Code Mode, classifier hard and soft rules review the code that makes calls, while permissions.deny applies to each call.

Default production-target recognition depends on prod or production appearing as a whole word, so prod-db qualifies while webprod01 does not. Private-repository status does not authorize placing secrets or personal or entrusted data there. The page provides no measured classifier accuracy, failure rate or security evaluation.

Reasoning

The guide's practical value follows from separating three decisions: which destinations belong inside the environment, which actions require human approval and which actions must always be blocked. Clear environment entries can address missing context without introducing broad action exceptions.

For mandatory organizational restrictions, the documented merging behavior supports using managed permissions.deny: personal allow entries can override managed soft blocks. For publishing checkpoints, command-matching coverage matters because a rule covering one shell spelling does not cover every equivalent operation.

These conclusions follow from the documented precedence and examples. They do not establish that a particular configuration will enforce an organization's requirements in practice.

Alternatives

The page describes several mechanisms within Claude Code: permissions.ask for approval prompts, permissions.deny for mandatory blocks, PreToolUse hooks for full-command inspection and CLAUDE.md for project conventions. Their documented roles differ, so the appropriate choice depends on the required boundary.

It does not compare other coding assistants or competing approval systems. Relative safety, usability and cost across products are not assessed.

Evidence

The evidence consists of the complete Configure auto mode documentation page at [https://code.claude.com/docs/en/auto-mode-config.md]. It is a primary product reference containing settings examples, version requirements, caveats and troubleshooting instructions.

The captured source revision is sha256:b1e091cb1a6c8041d92ec15a2bf756677037bc237193906f4b6fbb14baa27dd5. Linked documentation, implementation code and independent evaluations are outside this evidence.

Nothing was executed. No settings were applied, commands run, provider connections exercised or approval behavior observed. The report describes documented behavior rather than demonstrated results.

Access & freshness

Costs

The page provides no subscription prices, classifier usage rates, token charges or total-cost examples. The cost of using auto mode and its configuration assistance is unknown from this evidence. Listed plan names establish documented eligibility, not pricing.

Enabling classifyAllShell makes commands that previously relied on shell allow rules wait for classifier decisions. The page supplies no measured delay or monetary impact.

Rights

The page contains no explicit licence, redistribution grant or documentation reuse terms. Permission to redistribute the captured documentation is therefore unknown from this source.

The page also does not establish Claude Code's software licence or service terms.

Freshness

The page was captured on 2026-11-14 at 23:31:38.889 UTC. The supplied page does not state a publication or last-update date, so capture time should not be treated as its release date.

Feature availability and behavior are version-dependent. The page says configurations retaining "$defaults" inherit changes to built-in lists across releases. Availability, defaults and behavior after this capture are unknown.

Actions

Confirm that your installed version, model and organization settings support the features you need. Inspect built-in and effective configuration, then describe the specific internal destinations and sensitive targets relevant to your work. Retain "$defaults" wherever you intend to preserve built-in behavior.

Add durable approval rules for actions requiring review and managed deny rules for mandatory prohibitions. Check whether the command forms you use actually match those rules; use the documented hook approach when full-command inspection is required.

When an action is blocked, inspect its actual command or input rather than relying on its description. Add environment context for a recurring destination, consider a narrowly described allow exception for a recurring permitted action, or state specific intent for a one-off retry. A missing classifier verdict is a different problem and is not evidence that another allow rule will resolve it.

Evidence for this report

selected-page.txtselected · checked 2026-11-14