# How Claude Code auto mode works and how to tune it

> What Claude Code’s auto mode approves, what it blocks, why it stops and asks again, and how to tune it with ask rules, autoMode.environment and /permissions.

Updated November 15, 2026 · https://usecoral.app/guides/claude-code-auto-mode

Auto mode is the Claude Code permission mode where a second model checks each risky action instead of asking you. Reads and file edits in your project go through with no check. Shell commands and network calls go to a classifier that blocks anything beyond what you asked for, like a force push, `curl | bash`, a production deploy or deleting files that existed before the session. Since v2.1.283 it’s where interactive sessions start. Press Shift+Tab to leave it, and add `ask` or `deny` rules for anything that must never run without you.

As of November 2026, from Anthropic’s [permission modes](https://code.claude.com/docs/en/permission-modes) and [configure auto mode](https://code.claude.com/docs/en/auto-mode-config) docs. Part of [Keep coding agents safe](https://usecoral.app/guides/agent-safety).

<p data-cta="guide_top">Auto mode still stops and waits for you sometimes. Coral shows every waiting agent in your Mac’s notch and on your iPhone, so you answer in a second. <a href="/download">Download Coral for free</a></p>

## How auto mode decides

Every tool call goes through four steps, in order:

1. **Your rules first.** `allow`, `ask` and `deny` rules from your settings resolve right away. A `deny` rule blocks in every mode, and an `ask` rule still prompts you.
2. **Safe work runs.** Reads and file edits inside the working directory are approved without a check, except writes to protected paths like `.git`, `.claude`, `.bashrc` or `.npmrc`.
3. **Everything else goes to the classifier.** It sees part of the transcript and the pending action, and decides whether the action goes beyond your request.
4. **If it blocks, Claude is told why** and usually tries another way.

One surprise: when you enter auto mode, Claude Code drops your broad allow rules, the ones that grant arbitrary code execution, like `Bash(*)`, `Bash(python*)` or package-manager run commands. Narrow ones like `Bash(npm test)` stay. The dropped rules come back when you leave auto mode.

## What it blocks and what it allows

A sample of Anthropic’s default rules:

| Blocked by default | Allowed by default |
|---|---|
| Downloading and running code, like `curl \| bash` | Local file operations in your working directory |
| Force push, `git reset --hard`, `git clean -fd`, `git stash drop` | Installing dependencies declared in your lock files or manifests |
| Production deploys and migrations | Read-only HTTP requests |
| Deleting files that existed before the session | Pushing to any branch of the repo you’re in, including `main` |
| Sending sensitive data to outside endpoints | Reading `.env` and sending credentials to their matching API |
| `terraform destroy` and similar | Deleting jobs Claude created earlier in the same session |
| Merging a PR no human approved, or disabling CI checks | Sending data to domains and buckets you list as trusted |
| Starting another agent with `--dangerously-skip-permissions` | |

Note the row people miss: **auto mode lets Claude push to `main`**. If you want a checkpoint before pushes, add an `ask` rule (below).

To see every rule, run:

```bash
claude auto-mode defaults
```

## Turn it on, off, or make it the default

- **Switch in a session:** press **Shift+Tab**. From auto, the first press goes to Manual (`default`), then `acceptEdits`, then `plan`. Cycling back to auto doesn’t ask for confirmation.
- **Start in auto mode:** `claude --permission-mode auto`.
- **Headless runs:** `claude -p` and Agent SDK runs start in Manual since v2.1.302. Pass `--permission-mode auto` to use it.
- **Make it the default, or turn it off by default:** set `defaultMode` in your user settings, `~/.claude/settings.json`. Use `"auto"` to start in auto mode, or `"default"` to start in Manual:

```json
{
  "permissions": {
    "defaultMode": "default"
  }
}
```

Setting `"auto"` in a project’s `.claude/settings.json` or `.claude/settings.local.json` does nothing, with no error. A repo can’t turn auto mode on for you.

- **Turn it off for a whole team:** admins set `"disableAutoMode": "disable"` under `permissions` in managed settings. It removes auto from the Shift+Tab cycle. More on managed settings in [Claude Code managed settings](https://usecoral.app/guides/claude-code-managed-settings).
- **VS Code:** the `claudeCode.initialPermissionMode` setting doesn’t accept `auto`. Leave it unset and pick **Auto** from the mode indicator once.

## When auto mode stops and asks you

Auto mode cuts prompts, but it doesn’t remove them. Claude Code still waits for you when:

- **An `ask` rule matches.** The classifier can’t approve it.
- **A critical path is being removed.** `rm -rf ~` and similar still prompt, in every mode.
- **The classifier keeps blocking.** After 3 blocks in a row, or 20 in one session, auto mode pauses and Claude Code goes back to prompting for each action. Approving the prompted action turns auto mode back on. You can’t change these limits.
- **Claude asks you a question,** or finishes a plan and wants approval. Approving a plan with “Yes, and use auto mode” is a common way into auto mode; see [Claude Code plan mode](https://usecoral.app/guides/claude-code-plan-mode).

A single block doesn’t stop the session. You see a notice like `bash blocked by auto mode · /permissions · Auto mode: [Data Exfiltration]`, and Claude keeps working. If you did want that action, open `/permissions`, go to the **Recently blocked** tab, check the command, and press `r` to let Claude retry it.

In `claude -p` runs there’s no one to prompt, so a blocked action just doesn’t run, and Claude carries on without it. That’s the trade-off at the heart of a [software factory](https://usecoral.app/glossary/software-factory): every prompt becomes a rule you wrote in advance or a step that gets skipped. Take away the last human review too and it’s a [dark factory](https://usecoral.app/glossary/dark-factory).

The practical effect: a long auto-mode task can still end up sitting on a prompt while you’re in another window. That’s the wait Coral is built for (see [Where Coral fits](#where-coral-fits)).

## Tune it: pick the right fix for each block

| You want | Use | Where |
|---|---|---|
| A prompt before every push or PR | `permissions.ask` | Any settings file |
| An action to never run, whatever anyone says | `permissions.deny` | Any settings file; managed settings for a team |
| Auto mode to stop blocking your company’s repos, buckets or internal domains | `autoMode.environment` | `~/.claude/settings.json` or managed settings |
| A routine action it keeps flagging to go through | `autoMode.allow` | `~/.claude/settings.json` or managed settings |
| One blocked action, this once | Say it in your next message, naming the specifics | The conversation |

A checkpoint before pushes and PRs, keeping auto mode on for everything else:

```json
{
  "permissions": {
    "ask": ["Bash(git push *)", "Bash(gh pr create *)"]
  }
}
```

These match commands as written, so `git -C dir push` slips past. For a check that reads the whole command, use a hook: see [Claude Code hooks](https://usecoral.app/guides/claude-code-hooks).

Telling it what you trust, in plain sentences:

```json
{
  "autoMode": {
    "environment": [
      "$defaults",
      "Source control: github.com/your-org and all repos under it",
      "Trusted cloud buckets: s3://your-org-build-artifacts",
      "Trusted internal domains: *.internal.your-org.com"
    ]
  }
}
```

Three things to know before you edit this:

- **Keep `"$defaults"`.** Setting `environment`, `allow`, `soft_deny` or `hard_deny` without it replaces Anthropic’s whole list for that section. A `soft_deny` without it throws away the built-in blocks on force push, `curl | bash` and production deploys.
- **Project settings are ignored.** The classifier reads `autoMode` from your user settings, managed settings or the `--settings` flag, never from `.claude/settings.json` in a repo. That stops a cloned repo from writing its own allow rules.
- **One-off approvals must be specific.** “Force-push `feature/login` to origin” clears that action. “You can force-push” clears nothing.

Helpers worth knowing:

- `/auto-mode-setup` drafts `environment` entries from your project and recent sessions, and writes them to `~/.claude/settings.json` if you accept.
- `/permissions`, **Auto mode** tab, edits the rules without opening a file.
- `claude auto-mode config` prints the rules in effect, `claude auto-mode critique` reviews your custom ones, and `claude auto-mode reset` removes your `autoMode` block.

## If auto mode isn’t available

Work down this list:

1. **Version.** Run `claude --version`. Auto mode as the default needs v2.1.228 or later on macOS, Linux and WSL, v2.1.233 on native Windows.
2. **Model.** On the Anthropic API it needs Claude Opus 4.6 or later, Sonnet 4.6 or later, Haiku 5.5, or a Fable model. On Bedrock, Google Cloud’s Agent Platform and Microsoft Foundry it needs Sonnet 5 or later, Opus 4.7 or later, Haiku 5.5, or Fable. Older models like Sonnet 4.5 don’t support it anywhere.
3. **Your admin.** On Team and Enterprise, `permissions.disableAutoMode` in managed settings turns it off.
4. **Anthropic’s side.** Run `/status` and check **Auto mode server**. Anthropic can turn auto mode off for an account, and the session then keeps it off until it ends.

## What it costs

Each check sends part of the transcript and the pending action to the classifier, which adds a round trip before shell commands and network calls. Reads and edits in your project skip it. On Enterprise plans and on API, Bedrock, Agent Platform and Foundry accounts, classifier calls count toward your token usage.

## Auto mode, Manual or bypass?

| | Manual (`default`) | `acceptEdits` | Auto | `bypassPermissions` |
|---|---|---|---|---|
| File edits in the project | Asks | Runs | Runs | Runs |
| Shell commands | Asks, except read-only ones | Asks | Classifier checks | Runs |
| Protection against prompt injection | You review each step | You review commands | The classifier looks for actions driven by content Claude read | None |
| Good for | Sensitive work | Reviewing diffs | Most daily work | Throwaway containers |

Anthropic’s own warning: auto mode “reduces permission prompts but does not guarantee safety.” For what bypass mode really skips, see [Is --dangerously-skip-permissions safe?](https://usecoral.app/guides/claude-code-dangerously-skip-permissions). To fence off the filesystem and network on top of auto mode, see [Claude Code sandbox: what it covers](https://usecoral.app/guides/claude-code-sandbox). For every way to cut prompts, see [Stop babysitting Claude Code permission prompts](https://usecoral.app/guides/claude-code-permission-prompts).

## Where Coral fits

Auto mode handles the routine approvals. What’s left are the moments that should reach you: `ask` rules, the pause after repeated blocks, questions and finished plans. [Coral](https://usecoral.app/features) puts those in your Mac’s notch the moment they happen, for every Claude Code, Codex, Copilot CLI, OpenCode and Grok session in any terminal. You see what the agent wants in full and answer with one key.

When Claude Code finishes a plan, Coral’s card asks “Ready to code?”. Press 1 to approve and switch to auto mode, or 2 to approve and review each edit. On your iPhone, answering needs Face ID. Alerts are Free, and answering from the phone straight to the agent is [Pro](https://usecoral.app/pricing). If you run several agents at once, [Run multiple Claude Code agents](https://usecoral.app/guides/run-multiple-claude-code-agents) covers the setup.

## Questions

### Is Claude Code auto mode safe?

Safer than skipping permissions, not a guarantee. A classifier checks every shell command and network call and blocks the riskiest ones, but Anthropic says it can miss some. Add `deny` rules for anything that must never happen, and an `ask` rule for `git push` if you want to review pushes.

### How do I turn off auto mode in Claude Code?

Press Shift+Tab once to switch to Manual for the session. To start in Manual every time, set `"defaultMode": "default"` under `permissions` in `~/.claude/settings.json`. Admins can remove auto mode for everyone with `"disableAutoMode": "disable"` in managed settings.

### Why did auto mode stop and start asking me again?

The classifier blocked 3 actions in a row or 20 in the session, so auto mode paused and went back to prompts. Approve the next prompted action to turn it back on. If the blocks keep hitting the same repo, bucket or domain, add it to `autoMode.environment`.

### Can auto mode push to main?

Yes. By default it can push to any branch of the repo you’re working in, including the default branch. Add `"ask": ["Bash(git push *)"]` under `permissions` to get a prompt first.

### Does auto mode use more tokens?

On Enterprise plans and API, Bedrock, Agent Platform or Foundry accounts, the classifier’s calls count toward your token usage. Reads and edits in your project skip the classifier, so the extra usage comes mostly from shell commands and network calls.
