How to configure Claude Code auto mode for your organization
You configure Claude Code auto mode for your organization with the autoMode settings block, delivered through managed settings. Auto mode lets Claude work without routine permission prompts by sending tool calls to a second model, the classifier, which blocks anything irreversible, destructive or aimed outside your environment. The autoMode block tells that classifier what your environment is: which repos, buckets, domains and services you trust, and which extra actions to allow or block.
This matters more now that auto mode is the starting mode. From Claude Code v2.1.283, interactive terminal and VS Code sessions start in auto mode on every plan and provider unless a setting says otherwise. If you have not described your infrastructure, your developers meet a classifier that treats your own GitHub org and your own build bucket as strangers.
I call the rollout the CCC Trust Map: decide whether auto mode is on, map your environment, keep the defaults, add your own rules, put the hard lines in permissions, then verify. Each step is one or two settings keys.
Step 1: Decide whether auto mode is on at all
On Team and Enterprise plans, auto mode is available by default. You have three positions to choose from, and all of them live in managed settings.
Three organization positions on auto mode
| Position | Managed setting | What developers see |
|---|---|---|
| On, as the starting mode | Nothing extra on v2.1.283 or later, or permissions.defaultMode set to "auto" | Sessions start in auto mode. They can switch modes |
| Available, but not the start | permissions.defaultMode set to "default" | Sessions start in Manual. They can still switch to auto mode |
| Off | permissions.disableAutoMode set to "disable" | Auto mode leaves the Shift+Tab cycle, and --permission-mode auto starts in Manual |
Turning it off reaches running sessions too. From v2.1.251, a session already in auto mode leaves it when the setting arrives from an admin-deployed source and shows "auto mode disabled by settings". If your organization has the HIPAA configuration applied, eligible sessions start in Manual anyway and auto mode stays available to switch to. The HIPAA setup guide covers that case.
Check your models before you rely on it. On Amazon Bedrock, Google Cloud's Agent Platform, Microsoft Foundry and signed-in Claude apps gateway sessions, auto mode supports only Claude Sonnet 5 or later, Opus 4.7 or later, Haiku 5.5 and the Fable models. On an unsupported model the session starts in Manual instead.
Step 2: Map your environment in autoMode.environment
For most organizations, autoMode.environment is the only field you need. It defines what "external" means to the classifier, so any destination you do not list is treated as a possible place to leak data. Entries are plain-English prose, not regular expressions or tool patterns. Write them the way you would brief a new engineer.
- "$defaults" (the literal string, so the built-in entries stay)
- Organization: Acme Corp. Primary use: software development and infrastructure automation
- Source control: github.example.com/acme-corp and all repos under it
- Trusted cloud buckets: s3://acme-build-artifacts, gs://acme-ml-datasets
- Trusted internal domains: *.corp.example.com, api.internal.example.com
- Key internal services: Jenkins at ci.example.com, Artifactory at artifacts.example.com
- Internal package registry: the private npm registry at npm.example.com
Roll it out in that order. Source control and key internal services first, because pushes to your own repos are the most common false block. Domains and buckets next. Fill the rest as blocks come up. The full list of slots also covers cloud providers, secrets management, deploy targets, network posture and host containment, plus three sensitivity slots: sensitive data locations, sensitive remote targets and protected infrastructure-as-code scopes.
Step 3: Keep "$defaults" in every list
Four lists make up the autoMode block: environment, allow, soft_deny and hard_deny. Each is evaluated on its own, so setting environment alone leaves the built-in allow, soft_deny and hard_deny lists in place. But setting any list without the literal string "$defaults" replaces the whole built-in list for that section.
Only leave "$defaults" out when you mean to own the full list. If you do, run claude auto-mode defaults to print the built-in rules, copy them into your settings and review each one against your own pipeline first.
Step 4: Add your own allow, soft_deny and hard_deny rules
Inside the classifier, rules apply in four tiers. hard_deny blocks no matter what, even when the user asks. soft_deny blocks next, but an allow rule or explicit user intent can clear it. allow rules are exceptions to soft_deny. Explicit intent means the user's message directly names the exact action: "clean up the repo" does not authorize a force push, but "force-push this branch" does.
Which list to use
| You want to | List | Example rule |
|---|---|---|
| Stop a routine action being flagged | allow | Deploying to the staging namespace is allowed: staging is isolated from production and resets nightly |
| Block a risky action unless someone asks for it | soft_deny | Running terraform apply in infra/terraform/prod/ needs an explicit request: production changes go through review |
| Block an action even when someone asks | hard_deny | Never send repository contents to third-party code-review APIs |
Two more keys for tighter shops. autoMode.classifyAllShell set to true suspends narrow Bash and PowerShell allow rules such as Bash(npm test) while auto mode is active, so the classifier sees every shell command, at the cost of slower approvals. And if you want a human checkpoint on pushes and pull requests, add permissions.ask rules for "Bash(git push *)" and "Bash(gh pr create *)". Those are prefix matches, so a push written as git -C dir push slips past them. Use a PreToolUse hook if you need to inspect the full command, as the hooks guide shows.
Step 5: Put the hard lines in permissions.deny
Here is the part security teams miss. The classifier reads autoMode from three places: a developer's ~/.claude/settings.json, managed settings, and the --settings flag or Agent SDK. Entries from all of them combine. Developers cannot remove your managed entries, but they can add their own, and a developer's allow entry can override your organization's soft_deny. The combination is additive. It is not a policy boundary.
So anything that must never run goes in permissions.deny in managed settings. Deny rules are checked before the classifier is consulted, and neither the classifier nor the user can override them. Treat autoMode as guidance that cuts false blocks, and permissions.deny as the wall. The sandbox guide covers the third layer, limiting what a command can reach even when it runs.
One protection is built in. The classifier ignores autoMode in a project's .claude/settings.json and .claude/settings.local.json, because a checked-in repo or a build step could otherwise inject its own allow rules. Tell developers to keep personal autoMode entries in ~/.claude/settings.json.
Step 6: Verify the effective config
- claude auto-mode config prints the four lists the classifier actually uses, with your settings applied and defaults elsewhere. Your environment entries should appear in it.
- claude auto-mode critique reviews your custom rules and flags entries that are ambiguous, redundant or likely to cause false positives. Run it before you ship to the fleet.
- claude auto-mode defaults prints the built-in rules. Add --label with the start of a rule's name, such as 'Git Destructive', to read one rule in full.
- claude auto-mode reset removes autoMode from a developer's own settings file only. Your managed rules still apply.
In the terminal, /permissions has an Auto mode tab (v2.1.246 or later) that shows managed entries as read-only and saves personal changes to ~/.claude/settings.json. The desktop app has no Auto mode tab, so desktop users edit the autoMode block in ~/.claude/settings.json on the machine where the session runs. The managed policy reaches them either way.
How to read an auto mode denial
A block looks like this: bash blocked by auto mode · /permissions · Auto mode: [Data Exfiltration]. The name in brackets is the rule that matched. Read the command behind it in the Recently blocked tab of /permissions in the terminal, or press Ctrl+O to open the transcript viewer. Then pick the fix that matches what Claude was trying to do.
Three fixes for a denial
| What was blocked | Fix |
|---|---|
| A destination needed throughout the work, such as a registry, internal domain or repo host | Add it to autoMode.environment |
| A command you want to run without review from now on | Add an allow rule |
| A one-off action you did intend | Name the action in your next message and let Claude retry |
Repeated blocks for the same destination usually mean the classifier is missing context, which is an environment entry, not a rule. To collect denials across the fleet, add a PermissionDenied hook, which receives the blocked input as tool_input. A "Not run" row is different: it means the classifier gave no verdict and Claude Code denied the call rather than run it unreviewed.
Should you let developers run /auto-mode-setup?
/auto-mode-setup drafts environment entries, and sometimes rules, from a project's CLAUDE.md, README, config files and git remotes plus the hosts and commands from recent sessions. If the developer accepts, it writes to their ~/.claude/settings.json. On Enterprise plans it needs v2.1.283 or later.
My recommendation: let them. It only adds personal entries on top of your managed policy, and it is a fast way to find the destinations your environment list is missing. Ask a few developers to share their drafts and fold the common entries into the managed list. If you would rather a developer does not run it, the switch is a skillOverrides entry, "auto-mode-setup": "off", in ~/.claude/settings.json, which turns off both the command and the prompt that offers it. The alternative is to ship only the managed list and wait for denials, which is slower but keeps every trusted destination under your review.
Plan the order with the rest of your rollout. Ship the environment list in the same policy that turns auto mode on, not a week later, or your first impression is a wall of blocks. The rollout plan covers sequencing, and managed plugins and managed MCP cover the other policy blocks that ship alongside it.
Short, practical drops on skills, MCP, agents, prompts, and more. No spam, unsubscribe anytime.
Frequently asked questions
How do I configure Claude Code auto mode for my whole organization?
Put an autoMode block in managed settings. List your source control, buckets, domains and internal services in autoMode.environment, keep "$defaults" in every list you set, and check the result with claude auto-mode config.
Why does auto mode block pushes to my company's other repos?
By default the classifier trusts only the working directory and the current repo's configured remotes. Add your source control org to autoMode.environment, for example "Source control: github.example.com/acme-corp and all repos under it".
How do I turn off Claude Code auto mode for everyone?
Set permissions.disableAutoMode to "disable" in managed settings. Auto mode leaves the Shift+Tab cycle, --permission-mode auto starts in Manual, and from v2.1.251 running sessions leave auto mode when the setting arrives.
Can developers override my organization's auto mode rules?
They cannot remove managed entries, but they can add their own, and a personal allow entry can override an organization soft_deny. For actions that must never run, use permissions.deny in managed settings, which is checked before the classifier.
What happens if I leave out "$defaults"?
That list replaces the built-in one. Without it, soft_deny loses the built-in blocks on force push, curl piped to bash, production deploys and auto mode bypass, and hard_deny loses the built-in data exfiltration rule.
Does auto mode read autoMode from a project's .claude/settings.json?
No. The classifier ignores autoMode in project settings and settings.local.json so a checked-in repo cannot add its own allow rules. Use ~/.claude/settings.json, managed settings or the --settings flag.
Last reviewed by David Iya on November 14, 2026


