Choose a permission mode
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -234,7 +234,7 @@
## Eliminate permission prompts with auto mode
-Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run and blocks the ones it judges risky. It looks for actions that go beyond your request, target unrecognized infrastructure, or follow hostile content Claude read. With Claude Code v2.1.283 or later, auto mode is the built-in starting permission mode for interactive terminal and VS Code sessions on every plan and provider. On earlier versions, it’s the built-in starting permission mode only on Pro, Max, Ultra, and Team plans. By default, the classifier doesn’t review recognized `rm` and `rmdir` critical-path removals, such as `rm -rf /` or `rm -rf ~`. Critical paths covers what happens to them in each permission mode. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior in a mode that still prompts you, set the [Proactive output style](</docs/en/output-styles>) instead.
+Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run and blocks the ones it judges risky. It looks for actions that go beyond your request, target unrecognized infrastructure, or follow hostile content Claude read. With Claude Code v2.1.283 or later, auto mode is the built-in starting permission mode for interactive terminal and VS Code sessions on every plan and provider. By default, the classifier doesn’t review recognized `rm` and `rmdir` critical-path removals, such as `rm -rf /` or `rm -rf ~`. Critical paths covers what happens to them in each permission mode. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior in a mode that still prompts you, set the [Proactive output style](</docs/en/output-styles>) instead.
Auto mode reduces permission prompts but does not guarantee safety. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations.
@@ -273,7 +273,7 @@
Where the server reviews the actions, its verdicts decide them. Two other outcomes are possible:
- * **The server doesn’t review the session** : a response completes with no review results, or the server answers that it doesn’t review this session. The most common causes are an LLM gateway or proxy that drops the request for review or the results, and a platform, region, or credential that doesn’t have server-side checks yet. Claude Code falls back to its own classifier requests. Once that fallback holds for the rest of the session, it shows a [notice about classifier request charges](</docs/en/auto-mode-classifier-billing>) on accounts where those requests are billed.
+ * **The server doesn’t review the session** : a response completes with no review results, or the server answers that it doesn’t review this session. The most common causes are an LLM gateway or proxy that drops the request for review or the results, and a platform, region, or credential without server-side checks yet. Claude Code can fall back to its own classifier requests. On accounts where those requests are billed, see [Auto mode classifier request charges](</docs/en/auto-mode-classifier-billing>).
* **The server gives no verdict for an action** : Claude Code denies the action rather than run it unreviewed. On any connection, this happens when the response ends before the review results arrive or the results arrive in a form Claude Code can’t read. An LLM gateway or proxy that cuts responses short or rewrites the results can cause either. On a direct connection to the Anthropic API, it also happens when the server’s check fails for the action, for example by timing out. [The server returned no safety verdict](</docs/en/errors#the-server-returned-no-safety-verdict>) covers the denial message, what happens when denials repeat, and what to do. If a [hook](</docs/en/hooks#pretooluse-updatedinput-in-auto-mode>) or [mod](</docs/en/plugins/mods/overview>) changes an action’s input after the server’s review, Claude Code can deny the action with no verdict. In interactive terminal and VS Code sessions on a direct connection to the Anthropic API, the denial’s text includes `a hook changed this call's input after auto mode reviewed it`. [Its error entry](</docs/en/errors#hook-changed-input-after-review>) covers what to do.
To skip asking the server and always use Claude Code’s own classifier requests, set [`CLAUDE_CODE_AUTO_MODE_SERVER=0`](</docs/en/env-vars>). On a direct connection to the Anthropic API, the variable requires Claude Code v2.1.281 or later. Setting it to `1` there turns server review on in a session that doesn’t have it yet, unless you’ve also set `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1`. If you set `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1` and leave `CLAUDE_CODE_AUTO_MODE_SERVER` unset, Claude Code also stops asking the server, except as [Disable pre-release capabilities](</docs/en/llm-gateway-protocol#disable-pre-release-capabilities>) describes.
@@ -431,6 +431,15 @@
The thresholds of 3 blocks in a row and 20 blocks total are not configurable. The total counter persists for the session and resets only when its own limit triggers a fallback. Claude Code doesn’t count a denial toward either threshold when a safety check separate from auto mode refuses the classifier’s own request. A [non-interactive](</docs/en/headless>) `-p` run without a [`--permission-prompt-tool`](</docs/en/cli-reference#cli-flags>) has no prompt to fall back to. When repeated blocks reach a threshold, the action doesn’t run and Claude keeps working. Claude Code doesn’t stop the run. Repeated blocks usually mean the classifier is missing context about your infrastructure. Use `/feedback` to report false positives, or have an administrator [configure trusted infrastructure](</docs/en/auto-mode-config>).
+#### Countdown after three blocks in a row
+
+If you see `Claude Code will automatically block this request` after three blocks in a row, you have two minutes to answer.
+
+ * **To keep the prompt waiting** : press the Up or Down arrow key
+ * **If the time runs out** : Claude Code blocks the action and Claude keeps working. To let Claude retry, [approve the action](</docs/en/auto-mode-config#review-denials>) on the **Recently blocked** tab in `/permissions`. Outside [Code Mode](</docs/en/code-mode>), the next prompt in that run of blocks waits until you answer
+
+In terminal sessions with the countdown, blocks count as in a row even when Claude reads files or runs a command your allow rules cover in between.
+
### How auto mode evaluates actions
The following sections cover the order Claude Code evaluates an action in, how the classifier reviews subagent work, and what classifier calls add in cost and latency.
@@ -439,7 +448,7 @@
Each action goes through a fixed decision order. The first matching step wins:
- 1. Actions matching your [allow, ask, or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately, with these exceptions:
+ 1. Actions matching your [allow, ask, or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately apart from cases such as these:
* Writes to protected paths route to the classifier even when an allow rule matches. When the protected path is the file that a symlinked settings file points to, the write can prompt you instead, as the protected paths list describes
* No allow rule approves recognized `rm` and `rmdir` critical-path removals
* MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>) prompt you directly even when an allow rule matches, and so do connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code
@@ -469,7 +478,7 @@
* `Agent` allow rules
* [`Monitor`](</docs/en/tools-reference#monitor-tool>) allow rules, because Claude Code runs Monitor commands through the shell
-Narrow rules like `Bash(npm test)` stay in effect. Claude Code restores the dropped rules when you leave auto mode. Before v2.1.236, Claude Code left `Monitor` allow rules in effect in auto mode, so a rule that matched the whole tool approved Monitor commands without classifier review.Claude Code can also run `git status` itself before a command that would discard uncommitted work, such as `git reset --hard` or `rm -rf`, and show the classifier whether staged, modified, or untracked work is present. Claude Code reports untracked files in that check even when the repository’s git configuration sets `status.showUntrackedFiles=no`.Under server-side classifier review, `git reset --hard` can be blocked on a clean working tree. After the block, the classifier can see the clean status and allow Claude’s retry.In the classifier requests sent by Claude Code itself, the classifier sees user messages, tool calls other than read-only lookups such as file reads and searches, and your CLAUDE.md content. Tool results are stripped from those requests, so hostile content in a file or web page can’t manipulate the classifier directly.You can annotate a call’s result with a [PostToolUse hook’s `classifierContext` field](</docs/en/hooks#annotate-a-result-for-the-auto-mode-classifier>), which the classifier reads as application-provided context. The field requires Claude Code v2.1.236 or later.A separate server-side probe scans incoming tool results and flags suspicious content before Claude reads it. For more on how these layers work together, see the [auto mode announcement](<https://claude.com/blog/auto-mode>) and the [engineering deep dive](<https://www.anthropic.com/engineering/claude-code-auto-mode>).
+Narrow rules like `Bash(npm test)` stay in effect. Claude Code restores the dropped rules when you leave auto mode. Before v2.1.236, Claude Code left `Monitor` allow rules in effect in auto mode, so a rule that matched the whole tool approved Monitor commands without classifier review.Claude Code can also run `git status` itself before a command that would discard uncommitted work, such as `git reset --hard` or `rm -rf`, and show the classifier whether staged, modified, or untracked work is present. Claude Code reports untracked files in that check even when the repository’s git configuration sets `status.showUntrackedFiles=no`.Under server-side classifier review, `git reset --hard` can be blocked on a clean working tree. After the block, the classifier can see the clean status and allow Claude’s retry.In Claude Code’s own classifier requests, the classifier sees inputs that include user messages, your CLAUDE.md content, and tool calls other than some read-only lookups such as file reads.You can annotate a call’s result with a [PostToolUse hook’s `classifierContext` field](</docs/en/hooks#annotate-a-result-for-the-auto-mode-classifier>), which the classifier reads as application-provided context. The field requires Claude Code v2.1.236 or later.A separate server-side probe scans incoming tool results and flags suspicious content before Claude reads it. For more on how these layers work together, see the [auto mode announcement](<https://claude.com/blog/auto-mode>) and the [engineering deep dive](<https://www.anthropic.com/engineering/claude-code-auto-mode>).
How auto mode handles subagents
@@ -483,7 +492,7 @@
Cost and latency
-Claude Code’s classifier requests can run on a model other than your `/model` selection. See which model they run on.Classifier calls count toward your token usage on Enterprise plans. They also count on accounts that use the Claude API, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution.Where the server reviews the actions as part of the session’s model requests, there are no separate classifier calls to count. See Server-side classifier review.Sandboxed network access adds no per-connection classifier requests. The classifier judges [the hosts a command names](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) together with the command in one review, and Claude Code checks each connection against the approved list without calling the classifier again.
+Claude Code’s classifier requests can run on a model other than your `/model` selection. See which model they run on.Claude Code’s own classifier requests count toward your token usage on Enterprise plans. They also count on accounts that use the Claude API, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry. Each request sends a portion of the transcript plus the pending action, adding a round-trip before execution.Sandboxed network access adds no per-connection classifier requests. The classifier judges [the hosts a command names](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) together with the command in one review, and Claude Code checks each connection against the approved list without calling the classifier again.
## Allow only pre-approved tools with dontAsk mode
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -222,7 +222,7 @@
When the plan is ready, Claude presents it and asks how to proceed. From that prompt you can choose:
- * **Yes, and use auto mode** : approve and start in auto mode. If auto mode isn’t available to your session, for example because your organization turned it off, this option reads **Yes, auto-accept edits**. If you started the session with bypass permissions enabled, the option reads **Yes, and switch to BYPASS PERMISSIONS (no further prompts) for this session** instead.
+ * **Yes, and use auto mode** : approve and start in auto mode. If auto mode isn’t available to your session, this option reads **Yes, auto-accept edits**. If you started the session with bypass permissions enabled, the option reads **Yes, and switch to BYPASS PERMISSIONS (no further prompts) for this session** instead.
* **Yes, manually approve edits** : approve and review each edit individually.
* **No, keep planning** : stay in plan mode and tell Claude what to change.
@@ -288,7 +288,7 @@
Runs on Claude Sonnet 4.6| Sonnet 4.6
Has [`ANTHROPIC_DEFAULT_SONNET_MODEL`](</docs/en/model-config#environment-variables>) set| Its value, or Sonnet 5 if its value is Claude Sonnet 5.5 or Claude Opus 5.5
-If Sonnet 5 or the model in `ANTHROPIC_DEFAULT_SONNET_MODEL` is unavailable from your provider or excluded by your organization’s [model policy](</docs/en/model-config#restrict-model-selection>), Claude Code uses a fallback model. That’s your session’s model, or an Opus model in a [Fable session](</docs/en/model-config#work-with-fable>).
+If Sonnet 5 or the model in `ANTHROPIC_DEFAULT_SONNET_MODEL` is unavailable from your provider or excluded by a [model policy](</docs/en/model-config#restrict-model-selection>), Claude Code uses a fallback model. That’s your session’s model, or an Opus model in a [Fable session](</docs/en/model-config#work-with-fable>).
### Choose the classifier model
@@ -305,7 +305,7 @@
Situation| What happens| What to do
---|---|---
The debug log reports an Anthropic-configured classifier model| That model reviews| None needed
-You set Claude Opus 5, Sonnet 5.5, Opus 5.5 or one your organization’s [model policy](</docs/en/model-config#restrict-model-selection>) excludes| The default classifier model reviews| Set another model
+You set Claude Opus 5, Sonnet 5.5, Opus 5.5, or one that a [model policy](</docs/en/model-config#restrict-model-selection>) excludes| The default classifier model reviews| Set another model
Your provider can’t serve the model| Classifier checks fail, so Claude Code [denies each action it checks](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>)| Set a model it serves, or remove the variable
In a session, `/status` shows `Auto mode server` as `Enabled`| The server reviews without your model| None needed
@@ -505,7 +505,7 @@
## Skip all checks with bypassPermissions mode
-`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. Even in `bypassPermissions` mode, each of the actions no mode auto-approves gets a prompt or a denial, though you can turn off the prompt for dangerous `rm` commands. Reading [another organization’s public artifact](</docs/en/artifacts#read-an-artifact-shared-with-you>) needs your approval, and this mode doesn’t ask for it, so Claude can’t read one. The Remove-Item in PowerShell denies also apply in this mode. Two [cross-session messaging](</docs/en/cross-session-messaging>) safeguards still apply in this mode, and in interactive terminal plan-mode sessions where bypass permissions are available:
+`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. Even in `bypassPermissions` mode, each of the actions no mode auto-approves ends in a prompt or a denial, though you can turn off the prompt for dangerous `rm` commands. The Artifact tool can’t read [another organization’s public artifact](</docs/en/artifacts#read-an-artifact-shared-with-you>) that you haven’t approved in this conversation. The Remove-Item in PowerShell denies also apply in this mode. Two [cross-session messaging](</docs/en/cross-session-messaging>) safeguards still apply in this mode, and in interactive terminal plan-mode sessions where bypass permissions are available:
* The [`isolatePeerMachines`](</docs/en/settings-reference#isolatepeermachines>) approval prompt for messages to your sessions beyond this machine still appears.
* When no [`crossSessionInbound`](</docs/en/cross-session-messaging#control-inbound-messages>) value applies, Claude Code holds an inbound message from another of your sessions for your approval, and delivers without asking only when the sending session identifies itself as also bypassing permission prompts. If you leave the permission mode while messages are held, Claude Code re-applies the inbound rules and delivers any held message they now accept.
@@ -520,7 +520,7 @@
The `--dangerously-skip-permissions` flag is equivalent. The first time you start an interactive session with this mode enabled, Claude Code shows a warning dialog asking you to accept responsibility for actions taken without permission checks:
- * **If you accept** : Claude Code sets `skipDangerousModePermissionPrompt` to `true` in `~/.claude/settings.json`, so later sessions skip the dialog. To see the dialog again, remove the key from that file or set it to `false`. The [`skipDangerousModePermissionPrompt` reference](</docs/en/settings-reference#skipdangerousmodepermissionprompt>) lists the other settings files where you or your organization can set it.
+ * **If you accept** : Claude Code sets `skipDangerousModePermissionPrompt` to `true` in `~/.claude/settings.json`, so later sessions skip the dialog. To see the dialog again, remove the key from that file or set it to `false`. If the dialog still doesn’t appear, check the other settings files that the [`skipDangerousModePermissionPrompt` reference](</docs/en/settings-reference#skipdangerousmodepermissionprompt>) lists.
* **If you decline** : Claude Code exits.
If you pass [`--setting-sources`](</docs/en/cli-reference#cli-flags>) without `user`, the dialog can appear again although you accepted it earlier. To skip it, add `user`, as in `--setting-sources user,project`. In [non-interactive mode](</docs/en/headless>) no dialog is shown. A [background session](</docs/en/agent-view>) honors your acceptance when it’s recorded in user or managed settings:
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -208,7 +208,7 @@
Plan mode tells Claude to research and propose changes without making them. Claude reads files, runs shell commands to explore, and writes a plan, but does not edit your source. Except in interactive terminal sessions with bypass permissions available, edits stay blocked until you approve the plan. What happens to a shell command during planning depends on the session, and the first of these cases that matches applies:
- * **Interactive terminal sessions with bypass permissions available** : neither the classifier nor a prompt applies to planning commands. Skip all checks with bypassPermissions mode covers the few things that still prompt there.
+ * **Interactive terminal sessions with bypass permissions available** : planning commands can run with neither the classifier nor a prompt. Skip all checks with bypassPermissions mode covers what still prompts there.
* **[Auto mode](</docs/en/auto-mode-config>) available and the `useAutoModeDuringPlan` setting on**, which it is by default: the classifier reviews shell commands other than critical-path removals instead of prompting you. Approved commands run, and rejected ones are blocked.
* **Auto mode not available, or`useAutoModeDuringPlan` off**: commands outside the [built-in read-only set](</docs/en/permissions#read-only-commands>) prompt for approval, including when the sandbox’s [auto-allow mode](</docs/en/sandboxing#sandbox-modes>) is enabled.
@@ -234,7 +234,7 @@
## Eliminate permission prompts with auto mode
-Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt. With Claude Code v2.1.283 or later, auto mode is the built-in starting permission mode for interactive terminal and VS Code sessions on every plan and provider. On earlier versions, it’s the built-in starting permission mode only on Pro, Max, Ultra, and Team plans. By default, the classifier doesn’t review recognized `rm` and `rmdir` critical-path removals, such as `rm -rf /` or `rm -rf ~`. Critical paths covers what happens to them in each permission mode. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior in a mode that still prompts you, set the [Proactive output style](</docs/en/output-styles>) instead.
+Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run and blocks the ones it judges risky. It looks for actions that go beyond your request, target unrecognized infrastructure, or follow hostile content Claude read. With Claude Code v2.1.283 or later, auto mode is the built-in starting permission mode for interactive terminal and VS Code sessions on every plan and provider. On earlier versions, it’s the built-in starting permission mode only on Pro, Max, Ultra, and Team plans. By default, the classifier doesn’t review recognized `rm` and `rmdir` critical-path removals, such as `rm -rf /` or `rm -rf ~`. Critical paths covers what happens to them in each permission mode. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior in a mode that still prompts you, set the [Proactive output style](</docs/en/output-styles>) instead.
Auto mode reduces permission prompts but does not guarantee safety. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations.
@@ -407,7 +407,7 @@
### Boundaries you state in conversation
-The classifier treats boundaries you state in the conversation as a block signal. If you tell Claude “don’t push” or “wait until I review before deploying”, the classifier blocks matching actions it reviews even when the default rules would allow them. A boundary stays in force until you lift it in a later message. Claude’s own judgment that a condition was met does not lift it. Boundaries are not stored as rules. The classifier re-reads them from the transcript on each check, so a boundary can be lost if [context compaction](</docs/en/costs#reduce-token-usage>) removes the message that stated it. For a hard guarantee, add a [deny rule](</docs/en/permissions#permission-rule-syntax>) instead.
+The classifier treats boundaries you state in the conversation as a block signal. If you tell Claude “don’t push” or “wait until I review before deploying”, the classifier blocks matching actions it reviews even when the default rules would allow them. A boundary stays in force until you lift it in a later message. Claude’s own judgment that a condition was met does not lift it. Boundaries are not stored as rules. The classifier re-reads them from the transcript on each check, so a boundary can be lost if [context compaction](</docs/en/costs#reduce-token-usage>) removes the message that stated it. To keep the boundary from being lost, add a [deny rule](</docs/en/permissions#permission-rule-syntax>) instead.
### Approvals you state in conversation
@@ -510,7 +510,7 @@
* The [`isolatePeerMachines`](</docs/en/settings-reference#isolatepeermachines>) approval prompt for messages to your sessions beyond this machine still appears.
* When no [`crossSessionInbound`](</docs/en/cross-session-messaging#control-inbound-messages>) value applies, Claude Code holds an inbound message from another of your sessions for your approval, and delivers without asking only when the sending session identifies itself as also bypassing permission prompts. If you leave the permission mode while messages are held, Claude Code re-applies the inbound rules and delivers any held message they now accept.
-In interactive terminal sessions with bypass permissions available, Claude Code also doesn’t enforce plan mode’s blocks. Claude is still instructed to plan without editing, but a file edit or shell command it attempts during planning runs without prompting. Explicit [ask rules](</docs/en/permissions#manage-permissions>) and recognized `rm` and `rmdir` critical-path removals still prompt. Plan mode keeps its blocks wherever Claude Code runs without an interactive terminal, including [non-interactive runs](</docs/en/headless>) with `-p`, [Agent SDK](</docs/en/agent-sdk/permissions#plan-mode-plan>) sessions, and conversations in the [VS Code extension](</docs/en/vs-code>)’s chat panel. There, `--allow-dangerously-skip-permissions` makes `bypassPermissions` selectable later.
+In interactive terminal sessions with bypass permissions available, don’t rely on plan mode’s blocks. A file edit or shell command Claude attempts during planning can run without prompting. Explicit [ask rules](</docs/en/permissions#manage-permissions>) and recognized `rm` and `rmdir` critical-path removals still prompt. Plan mode keeps its blocks wherever Claude Code runs without an interactive terminal, including [non-interactive runs](</docs/en/headless>) with `-p`, [Agent SDK](</docs/en/agent-sdk/permissions#plan-mode-plan>) sessions, and conversations in the [VS Code extension](</docs/en/vs-code>)’s chat panel. There, `--allow-dangerously-skip-permissions` makes `bypassPermissions` selectable later.
Only use this mode in isolated environments like containers, VMs, or dev containers without internet access, where Claude Code cannot damage your host system.
@@ -562,7 +562,7 @@
Mode| Protected-path writes
---|---
`default`, `acceptEdits`| Prompted
-`plan`| Allowed in interactive terminal sessions with bypass permissions available. Otherwise, routed to the classifier when auto mode is available during planning, and prompted when it isn’t
+`plan`| Can be allowed in interactive terminal sessions with bypass permissions available. Otherwise, routed to the classifier when auto mode is available during planning, and prompted when it isn’t
`auto`| Routed to the classifier, which decides
`dontAsk`| Denied
`bypassPermissions`| Allowed
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -444,6 +444,7 @@
* No allow rule approves recognized `rm` and `rmdir` critical-path removals
* MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>) prompt you directly even when an allow rule matches, and so do connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code
* A shell command that carries [per-command allowed domains](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) also routes to the classifier even when an allow rule matches, because a rule approves the command, not its hosts
+ * Even in Manual, `acceptEdits`, and `dontAsk` modes, the classifier can review a [Claude in Chrome](</docs/en/chrome>) action that an allow rule matches
* Ask rules that match on a command’s content, such as `Bash(git push *)`, fall back to a permission prompt
* A write that the [symlink check](</docs/en/permissions#symlinks>) resolves to a protected path prompts you when the path Claude requested isn’t itself protected
* A read from a [network path](</docs/en/permissions#network-paths>) prompts you even when an allow rule matches
@@ -486,7 +487,7 @@
## Allow only pre-approved tools with dontAsk mode
-If you set `dontAsk` mode, Claude Code auto-denies every tool call that would otherwise prompt you, though a [mod](</docs/en/plugins/mods/overview>) you installed can still approve some of those calls. To check which calls a mod can approve, see [Extend permissions with hooks](</docs/en/permissions#precedence-among-rules-hooks-and-mods>). Don’t rely on `dontAsk` to stop a [tool call a mod makes itself](</docs/en/plugins/mods/reference#mods-api-methods>). Claude still runs actions that need no approval in Manual mode, such as file reads inside your working directories and [read-only Bash commands](</docs/en/permissions#read-only-commands>). Actions matching your `permissions.allow` rules and calls approved by a [PreToolUse hook](</docs/en/permissions#extend-permissions-with-hooks>) run too. Use this mode for CI pipelines or restricted environments where you pre-define what Claude may do. The status bar shows `⏵⏵ don't ask on` in this mode. These calls are denied where you’d otherwise see a prompt:
+If you set `dontAsk` mode, Claude Code auto-denies every tool call that would otherwise prompt you, though a [mod](</docs/en/plugins/mods/overview>) you installed can still approve some of those calls. To check which calls a mod can approve, see [Extend permissions with hooks](</docs/en/permissions#precedence-among-rules-hooks-and-mods>). Don’t rely on `dontAsk` to stop a [tool call a mod makes itself](</docs/en/plugins/mods/reference#mods-api-methods>). Claude still runs actions that need no approval in Manual mode, such as file reads inside your working directories and [read-only Bash commands](</docs/en/permissions#read-only-commands>). Most calls that your `permissions.allow` rules or a [PreToolUse hook](</docs/en/permissions#extend-permissions-with-hooks>) approve run too. Use this mode for CI pipelines or restricted environments where you pre-define what Claude may do. The status bar shows `⏵⏵ don't ask on` in this mode. These calls are denied where you’d otherwise see a prompt:
* **Your`ask` rules**: Claude Code denies calls matching your explicit [`ask` rules](</docs/en/permissions#manage-permissions>).
* **`AskUserQuestion`** : Claude Code denies this built-in tool even if your allow rules match it.
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -472,11 +472,13 @@
How auto mode handles subagents
-The classifier checks [subagent](</docs/en/sub-agents>) work at three points:
+When Claude starts a [subagent](</docs/en/sub-agents>) with the Agent tool, the classifier checks the subagent’s work at three points:
1. Before a subagent starts, the delegated task description is evaluated, so a dangerous-looking task is blocked at spawn time.
2. While the subagent runs, each of its actions goes through the same decision order as in the parent session, with the same block and allow rules. Any `permissionMode` in the subagent’s frontmatter is ignored.
- 3. When the subagent finishes, the classifier reviews its work and its final report before the parent reads the report. When the classifier flags the subagent’s work or report, or a separate API safety check refuses the review, the report is still delivered, prepended with a security warning. When the classifier is unavailable for the review, the report arrives with a note to verify the subagent’s work before acting on it.
+ 3. When a subagent other than an [agent team](</docs/en/agent-teams>) teammate finishes, the classifier reviews its work and its final report before the parent reads the report. When the classifier flags the subagent’s work or report, or a separate API safety check refuses the review, the report is still delivered, prepended with a security warning. When the classifier is unavailable for the review, the report arrives with a note to verify the subagent’s work before acting on it.
+
+For the [`web-fetch` subagent](</docs/en/tools-reference#web-fetch-subagent>), Claude Code can skip the first two checks when your `WebFetch(domain:...)` allow rules or the [preapproved domains](</docs/en/tools-reference#webfetch-tool-behavior>) cover every URL in its task. The subagent then starts in `dontAsk` mode, so any other fetch that needs approval is denied. The third check still runs.
Cost and latency
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -6,14 +6,14 @@
Mode| What runs without asking| Best for
---|---|---
-`default`| Reads only| Reviewing every action yourself, sensitive work
+`default`| File reads inside your working directories and other [actions that need no approval](</docs/en/tools-reference>), such as starting a subagent| Sensitive work, unfamiliar code
`acceptEdits`| Reads, file edits, and common filesystem commands (`mkdir`, `touch`, `mv`, `cp`, etc.)| Iterating on code you’re reviewing
`plan`| Reads, plus classifier-approved commands when auto mode is available| Exploring a codebase before changing it
`auto`| Everything, with background safety checks| Long tasks, reducing prompt fatigue
`dontAsk`| File reads inside your working directories and pre-approved tools; anything that would prompt is denied, though a [mod](</docs/en/plugins/mods/overview>) you installed can still approve some of those calls| Locked-down CI and scripts
`bypassPermissions`| Everything| Isolated containers and VMs only
-The mode that reviews every action is named **Manual** in the CLI, in `claude --help`, in the VS Code and JetBrains extensions, and in the desktop app. Its config value is `default`, which is what hooks and SDK integrations use. The CLI accepts `manual` as an alias wherever you type the value, for example `claude --permission-mode manual` or `"defaultMode": "manual"`. Each mode has its own rule for writes to protected paths. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. Deny rules block in every mode, including `bypassPermissions`. Deny and ask rules don’t apply to [`EndConversation`](</docs/en/tools-reference#endconversation-tool-behavior>) as long as Claude still has at least one other tool it can call. Allow rules have no effect in `bypassPermissions`.
+The CLI accepts `manual` as an alias for `default` wherever you type the value, for example `claude --permission-mode manual` or `"defaultMode": "manual"`. Each mode has its own rule for writes to protected paths. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. Deny rules block in every mode, including `bypassPermissions`. Deny and ask rules don’t apply to [`EndConversation`](</docs/en/tools-reference#endconversation-tool-behavior>) as long as Claude still has at least one other tool it can call. Allow rules have no effect in `bypassPermissions`.
### Actions no mode auto-approves
@@ -35,7 +35,7 @@
You want to| Start with| Isolation needed| Notes
---|---|---|---
-Review every action yourself| Manual mode: `claude --permission-mode default`| None| Sensitive work, unfamiliar code
+Answer permission prompts yourself| Manual mode: `claude --permission-mode default`| None| Sensitive work, unfamiliar code
Iterate locally with fewer prompts, without a classifier| Manual mode plus the Bash sandbox in [auto-allow mode](</docs/en/sandboxing#sandbox-modes>): `claude --permission-mode default`, then run `/sandbox` and select auto-allow| The built-in Bash sandbox, on macOS, Linux, and WSL2| Deny rules still apply, and ask rules that name a command, such as `Bash(git push *)`, still prompt. [Auto-allow mode](</docs/en/sandboxing#auto-allow-mode>) covers other commands that can prompt. To turn the sandbox on from a settings file instead, set [`sandbox.enabled`](</docs/en/settings-reference#sandbox-enabled>) and [`sandbox.autoAllowBashIfSandboxed`](</docs/en/settings-reference#sandbox-autoallowbashifsandboxed>) to `true`
Explore before changing anything| `claude --permission-mode plan`| None| Claude Code blocks edits until you approve a plan
Work hands-off in auto mode| `claude --permission-mode auto`, the built-in starting permission mode with v2.1.283 or later| None; a sandbox or container adds defense in depth| Requires a supported model, and your organization can turn auto mode off
@@ -398,7 +398,7 @@
### The first read outside the working directories
-While [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) is off, file reads other than [reads from network paths](</docs/en/permissions#network-paths>) run without a prompt in auto mode, including reads outside the [working directories](</docs/en/permissions#working-directories>). The first time Claude uses the Read, Grep, or Glob tool on a path outside them, Claude Code asks whether to allow that read. The prompt doesn’t appear in non-interactive `-p` runs or background sessions; reads there run as before. Whatever you answer, Claude keeps working:
+While [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) is off, file reads other than [reads from network paths](</docs/en/permissions#network-paths>) run without a prompt in auto mode, including reads outside the [working directories](</docs/en/permissions#working-directories>). The first time Claude uses the Read, Grep, or Glob tool on a path outside them, Claude Code asks whether to allow that read. The prompt doesn’t appear in `-p` runs, Agent SDK sessions, background sessions, the VS Code chat panel, or the desktop app. There, the read runs. Whatever you answer, Claude keeps working:
* **Yes, and keep allowing any reads outside the working directories** : the read runs, later reads outside the working directories run as before, and Claude Code records your answer so the prompt doesn’t appear again
* **No, and block reads outside the working directories from now on** : the read is refused, and Claude Code sets [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) to `true` in your user settings, which makes the file tools refuse such reads in this and every later session and every permission mode. To lift the block, remove the setting from every [settings file](</docs/en/settings#settings-files-and-who-they-affect>) that sets it, then restart each running session. For one directory this session, use `/add-dir`.
@@ -407,7 +407,7 @@
### Boundaries you state in conversation
-The classifier treats boundaries you state in the conversation as a block signal. If you tell Claude “don’t push” or “wait until I review before deploying”, the classifier blocks matching actions even when the default rules would allow them. A boundary stays in force until you lift it in a later message. Claude’s own judgment that a condition was met does not lift it. Boundaries are not stored as rules. The classifier re-reads them from the transcript on each check, so a boundary can be lost if [context compaction](</docs/en/costs#reduce-token-usage>) removes the message that stated it. For a hard guarantee, add a [deny rule](</docs/en/permissions#permission-rule-syntax>) instead.
+The classifier treats boundaries you state in the conversation as a block signal. If you tell Claude “don’t push” or “wait until I review before deploying”, the classifier blocks matching actions it reviews even when the default rules would allow them. A boundary stays in force until you lift it in a later message. Claude’s own judgment that a condition was met does not lift it. Boundaries are not stored as rules. The classifier re-reads them from the transcript on each check, so a boundary can be lost if [context compaction](</docs/en/costs#reduce-token-usage>) removes the message that stated it. For a hard guarantee, add a [deny rule](</docs/en/permissions#permission-rule-syntax>) instead.
### Approvals you state in conversation
@@ -447,7 +447,7 @@
* Ask rules that match on a command’s content, such as `Bash(git push *)`, fall back to a permission prompt
* A write that the [symlink check](</docs/en/permissions#symlinks>) resolves to a protected path prompts you when the path Claude requested isn’t itself protected
* A read from a [network path](</docs/en/permissions#network-paths>) prompts you even when an allow rule matches
- 2. Read-only actions and file edits in your working directory are auto-approved, except writes to protected paths and the first read outside the working directories, which prompts you
+ 2. Read-only actions and file edits in your working directory are auto-approved, except writes to protected paths and a read that shows the first-read prompt.
* In a session with server-side classifier review, file edits, read-only shell commands, and [sandboxed](</docs/en/sandboxing#sandbox-modes>) shell commands wait for that review and are blocked if it flags them
* A write inside your working directory that the [symlink check](</docs/en/permissions#symlinks>) resolves to a location outside it prompts you
* When Claude reads an [artifact someone else made](</docs/en/artifacts#read-an-artifact-shared-with-you>), the approval cases listed in that section apply
@@ -468,7 +468,7 @@
* `Agent` allow rules
* [`Monitor`](</docs/en/tools-reference#monitor-tool>) allow rules, because Claude Code runs Monitor commands through the shell
-Narrow rules like `Bash(npm test)` stay in effect. Claude Code restores the dropped rules when you leave auto mode. Before v2.1.236, Claude Code left `Monitor` allow rules in effect in auto mode, so a rule that matched the whole tool approved Monitor commands without classifier review.Claude Code can also run `git status` itself before a command that would discard uncommitted work, such as `git reset --hard` or `rm -rf`, and show the classifier whether staged, modified, or untracked work is present. Claude Code reports untracked files in that check even when the repository’s git configuration sets `status.showUntrackedFiles=no`.Under server-side classifier review, `git reset --hard` can be blocked on a clean working tree, because Claude Code can skip `git status` unless auto mode recently blocked an action. After the block, the classifier can see the clean status and allow Claude’s retry.In the classifier requests sent by Claude Code itself, the classifier sees user messages, tool calls other than read-only lookups such as file reads and searches, and your CLAUDE.md content. Tool results are stripped from those requests, so hostile content in a file or web page can’t manipulate the classifier directly.You can annotate a call’s result with a [PostToolUse hook’s `classifierContext` field](</docs/en/hooks#annotate-a-result-for-the-auto-mode-classifier>), which the classifier reads as application-provided context. The field requires Claude Code v2.1.236 or later.A separate server-side probe scans incoming tool results and flags suspicious content before Claude reads it. For more on how these layers work together, see the [auto mode announcement](<https://claude.com/blog/auto-mode>) and the [engineering deep dive](<https://www.anthropic.com/engineering/claude-code-auto-mode>).
+Narrow rules like `Bash(npm test)` stay in effect. Claude Code restores the dropped rules when you leave auto mode. Before v2.1.236, Claude Code left `Monitor` allow rules in effect in auto mode, so a rule that matched the whole tool approved Monitor commands without classifier review.Claude Code can also run `git status` itself before a command that would discard uncommitted work, such as `git reset --hard` or `rm -rf`, and show the classifier whether staged, modified, or untracked work is present. Claude Code reports untracked files in that check even when the repository’s git configuration sets `status.showUntrackedFiles=no`.Under server-side classifier review, `git reset --hard` can be blocked on a clean working tree. After the block, the classifier can see the clean status and allow Claude’s retry.In the classifier requests sent by Claude Code itself, the classifier sees user messages, tool calls other than read-only lookups such as file reads and searches, and your CLAUDE.md content. Tool results are stripped from those requests, so hostile content in a file or web page can’t manipulate the classifier directly.You can annotate a call’s result with a [PostToolUse hook’s `classifierContext` field](</docs/en/hooks#annotate-a-result-for-the-auto-mode-classifier>), which the classifier reads as application-provided context. The field requires Claude Code v2.1.236 or later.A separate server-side probe scans incoming tool results and flags suspicious content before Claude reads it. For more on how these layers work together, see the [auto mode announcement](<https://claude.com/blog/auto-mode>) and the [engineering deep dive](<https://www.anthropic.com/engineering/claude-code-auto-mode>).
How auto mode handles subagents
@@ -484,12 +484,19 @@
## Allow only pre-approved tools with dontAsk mode
-If you set `dontAsk` mode, Claude Code auto-denies every tool call that would otherwise prompt you, though a [mod](</docs/en/plugins/mods/overview>) you installed can still approve some of those calls. To check which calls a mod can approve, see [Extend permissions with hooks](</docs/en/permissions#precedence-among-rules-hooks-and-mods>). Claude still runs actions that need no approval in Manual mode, such as file reads inside your working directories and [read-only Bash commands](</docs/en/permissions#read-only-commands>). Actions matching your `permissions.allow` rules and calls approved by a [PreToolUse hook](</docs/en/permissions#extend-permissions-with-hooks>) run too. Use this mode for CI pipelines or restricted environments where you pre-define what Claude may do; the session never waits for input. The status bar shows `⏵⏵ don't ask on` in this mode. Claude Code denies calls matching your explicit [`ask` rules](</docs/en/permissions#manage-permissions>) rather than prompting. It also denies the built-in `AskUserQuestion` tool even if your allow rules match it, and does the same to connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code. It denies MCP tools marked [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) the same way, because their approval card needs an answer this mode never collects. An allow rule or `PreToolUse` hook can’t approve these:
+If you set `dontAsk` mode, Claude Code auto-denies every tool call that would otherwise prompt you, though a [mod](</docs/en/plugins/mods/overview>) you installed can still approve some of those calls. To check which calls a mod can approve, see [Extend permissions with hooks](</docs/en/permissions#precedence-among-rules-hooks-and-mods>). Don’t rely on `dontAsk` to stop a [tool call a mod makes itself](</docs/en/plugins/mods/reference#mods-api-methods>). Claude still runs actions that need no approval in Manual mode, such as file reads inside your working directories and [read-only Bash commands](</docs/en/permissions#read-only-commands>). Actions matching your `permissions.allow` rules and calls approved by a [PreToolUse hook](</docs/en/permissions#extend-permissions-with-hooks>) run too. Use this mode for CI pipelines or restricted environments where you pre-define what Claude may do. The status bar shows `⏵⏵ don't ask on` in this mode. These calls are denied where you’d otherwise see a prompt:
+
+ * **Your`ask` rules**: Claude Code denies calls matching your explicit [`ask` rules](</docs/en/permissions#manage-permissions>).
+ * **`AskUserQuestion`** : Claude Code denies this built-in tool even if your allow rules match it.
+ * **Connector tools[your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>)**: these are denied in sessions where that setting reaches Claude Code.
+ * **MCP tools marked[`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>)**: these are denied because their approval card needs an answer this mode can’t collect.
+
+An allow rule or `PreToolUse` hook can’t approve these:
* Recognized `rm` and `rmdir` critical-path removals, such as `rm -rf /` and `rm -rf ~`
* Reads from a [network path](</docs/en/permissions#network-paths>)
-[Cloud sessions](</docs/en/claude-code-on-the-web>) ignore `defaultMode: "dontAsk"`; see bypassPermissions for details. Set it at startup with the flag:
+[Cloud sessions](</docs/en/claude-code-on-the-web>) ignore `defaultMode: "dontAsk"`. See bypassPermissions for details. Set it at startup with the flag:
claude --permission-mode dontAsk
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -468,7 +468,7 @@
* `Agent` allow rules
* [`Monitor`](</docs/en/tools-reference#monitor-tool>) allow rules, because Claude Code runs Monitor commands through the shell
-Narrow rules like `Bash(npm test)` stay in effect. Claude Code restores the dropped rules when you leave auto mode. Before v2.1.236, Claude Code left `Monitor` allow rules in effect in auto mode, so a rule that matched the whole tool approved Monitor commands without classifier review.Claude Code also runs `git status` itself before a command that would discard uncommitted work, such as `git reset --hard` or `rm -rf`, and shows the classifier whether staged, modified, or untracked work is present. Claude Code reports untracked files in that check even when the repository’s git configuration sets `status.showUntrackedFiles=no`.In the classifier requests sent by Claude Code itself, the classifier sees user messages, tool calls other than read-only lookups such as file reads and searches, and your CLAUDE.md content. Tool results are stripped from those requests, so hostile content in a file or web page can’t manipulate the classifier directly.You can annotate a call’s result with a [PostToolUse hook’s `classifierContext` field](</docs/en/hooks#annotate-a-result-for-the-auto-mode-classifier>), which the classifier reads as application-provided context. The field requires Claude Code v2.1.236 or later.A separate server-side probe scans incoming tool results and flags suspicious content before Claude reads it. For more on how these layers work together, see the [auto mode announcement](<https://claude.com/blog/auto-mode>) and the [engineering deep dive](<https://www.anthropic.com/engineering/claude-code-auto-mode>).
+Narrow rules like `Bash(npm test)` stay in effect. Claude Code restores the dropped rules when you leave auto mode. Before v2.1.236, Claude Code left `Monitor` allow rules in effect in auto mode, so a rule that matched the whole tool approved Monitor commands without classifier review.Claude Code can also run `git status` itself before a command that would discard uncommitted work, such as `git reset --hard` or `rm -rf`, and show the classifier whether staged, modified, or untracked work is present. Claude Code reports untracked files in that check even when the repository’s git configuration sets `status.showUntrackedFiles=no`.Under server-side classifier review, `git reset --hard` can be blocked on a clean working tree, because Claude Code can skip `git status` unless auto mode recently blocked an action. After the block, the classifier can see the clean status and allow Claude’s retry.In the classifier requests sent by Claude Code itself, the classifier sees user messages, tool calls other than read-only lookups such as file reads and searches, and your CLAUDE.md content. Tool results are stripped from those requests, so hostile content in a file or web page can’t manipulate the classifier directly.You can annotate a call’s result with a [PostToolUse hook’s `classifierContext` field](</docs/en/hooks#annotate-a-result-for-the-auto-mode-classifier>), which the classifier reads as application-provided context. The field requires Claude Code v2.1.236 or later.A separate server-side probe scans incoming tool results and flags suspicious content before Claude reads it. For more on how these layers work together, see the [auto mode announcement](<https://claude.com/blog/auto-mode>) and the [engineering deep dive](<https://www.anthropic.com/engineering/claude-code-auto-mode>).
How auto mode handles subagents
@@ -508,7 +508,7 @@
claude --permission-mode bypassPermissions
-The `--dangerously-skip-permissions` flag is equivalent. Claude Code refuses `bypassPermissions` in a session you start with [`--restricted`](</docs/en/cli-reference#cli-flags>). `--restricted` requires Claude Code v2.1.248 or later. The first time you start an interactive session with this mode enabled, Claude Code shows a warning dialog asking you to accept responsibility for actions taken without permission checks:
+The `--dangerously-skip-permissions` flag is equivalent. The first time you start an interactive session with this mode enabled, Claude Code shows a warning dialog asking you to accept responsibility for actions taken without permission checks:
* **If you accept** : Claude Code sets `skipDangerousModePermissionPrompt` to `true` in `~/.claude/settings.json`, so later sessions skip the dialog. To see the dialog again, remove the key from that file or set it to `false`. The [`skipDangerousModePermissionPrompt` reference](</docs/en/settings-reference#skipdangerousmodepermissionprompt>) lists the other settings files where you or your organization can set it.
* **If you decline** : Claude Code exits.
@@ -528,6 +528,10 @@
The check is skipped automatically inside a recognized sandbox. To run autonomously in a container, use the [dev container](</docs/en/devcontainer>) configuration, which runs Claude Code as a non-root user. [Cloud sessions](</docs/en/claude-code-on-the-web>) don’t honor `defaultMode: "bypassPermissions"` or `"dontAsk"` from your settings files, so a repository’s checked-in settings can’t start a cloud session in bypass-permissions mode. The setting is ignored silently and the session starts in the permission mode shown in the mode dropdown instead. See Switch permission modes for which modes cloud sessions offer.
`bypassPermissions` offers no protection against prompt injection or unintended actions. For background safety checks with far fewer permission prompts, use auto mode instead. Administrators can block this mode by setting `permissions.disableBypassPermissionsMode` to `"disable"` in [managed settings](</docs/en/managed-settings>).
+
+### Restricted mode refuses bypassPermissions
+
+Claude Code refuses `bypassPermissions` in a session you start with [`--restricted`](</docs/en/cli-reference#cli-flags>). `--restricted` requires Claude Code v2.1.248 or later. If you see `Error: bypassPermissions not supported in restricted mode`, remove the flag or setting that enables `bypassPermissions`, such as `--dangerously-skip-permissions`. To keep `bypassPermissions`, start without `--restricted` or [`CLAUDE_CODE_RESTRICTED`](</docs/en/env-vars#variables>) instead.
### Bypass permissions ignored in a background session
@@ -646,6 +650,7 @@
* **Inline scripts** : a script passed to `sh`, `bash`, `zsh`, or a similar POSIX shell with `-c`, as in `bash -c 'rm -rf ~'`.
* When the script is double-quoted, the invoking shell expands its variables before the inner shell receives the script. In `find . -name '*.tmp' -exec sh -c "rm -rf \"$1\"/*" _ {} \;`, the command expands to a removal from the filesystem root once per match, and Claude Code treats it as a critical-path removal.
* A single-quoted script that binds `$1` to a real value, as `sh -c 'rm -rf "$1"/*' _ {}` does, isn’t flagged.
+ * If you see `This shell -c script runs rm and could not be checked`, read the script before you approve it. The command counts as a critical-path removal.
To turn off the check on a critical path typed directly in a `-c` script, such as `~`, set [`CLAUDE_CODE_DISABLE_INLINE_SHELL_RM_PROMPT=1`](</docs/en/env-vars#variables>) in the environment that launches Claude Code.
Show diff (105 lines)
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -27,6 +27,8 @@
* Reads outside the working directories while [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) is on: recognized file-reading Bash commands prompt even in auto mode and `bypassPermissions` mode, and so does any [unsandboxed retry](</docs/en/sandboxing#the-unsandboxed-retry-escape-hatch>) that needs approval to run outside the sandbox. Requires Claude Code v2.1.257 or later. A command the shell parser can’t trace, such as one that changes directory more than once or runs a subshell, prompts the same way even when it names no outside path. This prompt doesn’t apply when the command runs in the [sandbox](</docs/en/sandboxing>) and the sandbox enforces the block.
* Writes outside the working directories while [`permissions.blockWritesOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockwritesoutsideworkingdirectories>) is on: Claude Code refuses `Write`, `Edit`, and `NotebookEdit` calls there, apart from [some of its own files](</docs/en/settings-reference#what-the-write-block-refuses-and-what-stays-writable>). The key doesn’t limit shell commands, MCP tools, or the programs hooks run, so use [sandboxing](</docs/en/sandboxing>) to limit where shell commands write. Requires Claude Code v2.1.314 or later.
+Claude Code doesn’t auto-approve PowerShell commands flagged `could not fully check your permission rules` either. Approve the prompt if you trust the command. If Claude Code denies the command, ask Claude to reword it.
+
## Common setups
Permission modes decide whether Claude asks before an action, and the [Bash sandbox](</docs/en/sandboxing>) and outer [isolation boundaries](</docs/en/sandbox-environments>) decide what an action can reach once it runs. Each row below pairs a goal with the flags or settings that get you there and the isolation it needs, as a starting point. Available modes lists what runs without a prompt in each mode.
@@ -56,7 +58,7 @@
---|---
Any settings file sets `disableAutoMode` to `"disable"`| `default`
`claude -p` or the [Agent SDK](</docs/en/agent-sdk/permissions#permission-modes>)| `default`
-Your organization has the HIPAA configuration applied and the session is [eligible for it](</docs/en/hipaa-setup#check-how-developers-sign-in-and-connect>)| `default` with Claude Code v2.1.285 or later; auto mode stays available to switch to
+Your organization has the HIPAA configuration applied and the session is [eligible for it](</docs/en/hipaa-setup#check-how-developers-sign-in-and-connect>)| `default` on v2.1.285 through v2.1.325. Other versions follow the next row
In a terminal or through the [VS Code extension](</docs/en/vs-code>)| `auto` with Claude Code v2.1.283 or later; on earlier versions, `auto` on Pro, Max, Ultra, or Team plans in sessions that [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), and `default` otherwise
When the flag, a settings file, or the built-in default selects `auto` but auto mode isn’t available to the session, Claude Code starts the session in Manual instead. Auto mode is unavailable when the session doesn’t meet the availability requirements, such as a settings file turning it off or a model that doesn’t support it, or when Anthropic has temporarily turned it off server-side. The first time the built-in default starts one of your sessions in auto mode, Claude Code shows a notice that links to this page:
@@ -102,7 +104,7 @@
One session you’re about to start| Pass the permission mode as a flag, for example `claude --permission-mode default`
Every terminal session you start on this machine| Set `permissions.defaultMode` in `~/.claude/settings.json`. For what the VS Code extension reads, see Switch permission modes
Every terminal session you start in one project| Set `permissions.defaultMode` in the project’s `.claude/settings.json`. Sessions you start in a terminal honor every value except `auto` and `bypassPermissions`; sessions the VS Code extension starts don’t read project settings for the starting permission mode
-Every terminal session in your organization| Set `permissions.defaultMode` in [managed settings](</docs/en/managed-settings>). Terminal sessions start in that mode and people can still switch to auto mode; for what the VS Code extension reads, see Switch permission modes. To remove auto mode so nobody can select it, set `permissions.disableAutoMode` to `"disable"` instead
+Every terminal session in your organization| Set `permissions.defaultMode` in [managed settings](</docs/en/managed-settings>). People can still switch to auto mode; for what the VS Code extension reads, see Switch permission modes. To remove auto mode so nobody can select it, set `permissions.disableAutoMode` to `"disable"` instead
This example makes every terminal session on your machine start in Manual mode, whose config value is `default`. Save it in `~/.claude/settings.json`:
@@ -116,10 +118,8 @@
### Permission modes with the HIPAA configuration
-In an organization with the [HIPAA configuration](</docs/en/hipaa-setup>) applied, the built-in `auto` default doesn’t apply. A terminal or VS Code session starts in Manual mode when nothing else chooses its starting permission mode. A terminal session also shows `Auto mode isn't the default for your organization · Shift+Tab to switch`, and the VS Code extension shows no notice. [Check how developers sign in and connect](</docs/en/hipaa-setup#check-how-developers-sign-in-and-connect>) lists the sessions this applies to. Auto mode and `bypassPermissions` stay available:
-
- * **Switch to auto mode** : press `Shift+Tab`, or use your interface’s control
- * **Start in auto mode** : pass `--permission-mode auto`, or set `permissions.defaultMode` to `auto` in your user settings, or in managed settings for your whole organization. See Start in a different permission mode
+If your organization has the [HIPAA configuration](</docs/en/hipaa-setup>) applied, terminal and VS Code sessions on Claude Code v2.1.326 or later start in auto mode by default. On v2.1.285 through v2.1.325, an [eligible session](</docs/en/hipaa-setup#check-how-developers-sign-in-and-connect>) starts in Manual mode by default. To keep starting in Manual mode, see Start in a different permission mode. To turn off auto mode or `bypassPermissions` for your organization:
+
* **Remove auto mode** : set [`permissions.disableAutoMode`](</docs/en/settings-reference#disableautomode>) to `"disable"` in managed settings
* **Block`bypassPermissions`**: set [`permissions.disableBypassPermissionsMode`](</docs/en/settings-reference#permissions-disablebypasspermissionsmode>) to `"disable"` in managed settings
@@ -234,7 +234,7 @@
## Eliminate permission prompts with auto mode
-Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt. With Claude Code v2.1.283 or later, auto mode is the built-in starting permission mode for interactive terminal and VS Code sessions on every plan and provider. On earlier versions, it’s the built-in starting permission mode only on Pro, Max, Ultra, and Team plans. The classifier also reviews each message Claude sends to another agent with [`SendMessage`](</docs/en/tools-reference>), whether plain text or a structured [agent team](</docs/en/agent-teams>) message, before Claude Code delivers it, both in auto mode and in plan mode while the classifier reviews commands; the send review requires Claude Code v2.1.222 or later. By default, the classifier doesn’t review recognized `rm` and `rmdir` critical-path removals, such as `rm -rf /` or `rm -rf ~`. Critical paths covers what happens to them in each permission mode. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior in a mode that still prompts you, set the [Proactive output style](</docs/en/output-styles>) instead.
+Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt. With Claude Code v2.1.283 or later, auto mode is the built-in starting permission mode for interactive terminal and VS Code sessions on every plan and provider. On earlier versions, it’s the built-in starting permission mode only on Pro, Max, Ultra, and Team plans. By default, the classifier doesn’t review recognized `rm` and `rmdir` critical-path removals, such as `rm -rf /` or `rm -rf ~`. Critical paths covers what happens to them in each permission mode. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior in a mode that still prompts you, set the [Proactive output style](</docs/en/output-styles>) instead.
Auto mode reduces permission prompts but does not guarantee safety. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations.
@@ -394,7 +394,7 @@
* Sending data to the trusted domains, buckets, and services you list in [`environment`](</docs/en/auto-mode-config#define-trusted-infrastructure>). This covers data flow only, not destructive or credential operations on the same infrastructure
* [Claude in Chrome](</docs/en/chrome>) navigation to a trusted internal domain, localhost, or a URL you named
-Sandboxed commands don’t get network access by default. Claude names the hosts a command needs on the command itself, the classifier reviews them with the command, and an approved list opens those hosts for that one command alone. [Per-command allowed domains](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) covers what a list can and can’t open and what happens when a command reaches for an unlisted host. Run `claude auto-mode defaults` to print the full rule lists as JSON. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure auto mode](</docs/en/auto-mode-config>). Pushing to any branch of the repository you’re working in and creating a pull request that matches your request run without a prompt, unless the push or pull request falls under the blocked list, such as secrets or sensitive data leaving the repository, or a pull request that targets a different repository or organization. To require a human checkpoint before these commands while staying in auto mode, add `permissions.ask` rules, which match the command [as written](</docs/en/permissions#bash-rule-limits>): see [Common boundaries](</docs/en/auto-mode-config#common-boundaries>).
+Sandboxed commands don’t get network access by default. Claude names the hosts a command needs on the command itself, the classifier reviews them with the command, and an approved list opens those hosts for that one command alone. [Per-command allowed domains](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) covers what a list can and can’t open and what happens when a command reaches for an unlisted host. Run `claude auto-mode defaults` to print the rule lists built into Claude Code as JSON. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure auto mode](</docs/en/auto-mode-config>). Pushing to any branch of the repository you’re working in and creating a pull request that matches your request run without a prompt, unless the push or pull request falls under the blocked list, such as secrets or sensitive data leaving the repository, or a pull request that targets a different repository or organization. To require a human checkpoint before these commands while staying in auto mode, add `permissions.ask` rules, which match the command [as written](</docs/en/permissions#bash-rule-limits>): see [Common boundaries](</docs/en/auto-mode-config#common-boundaries>).
### The first read outside the working directories
@@ -413,7 +413,7 @@
If you tell Claude that a blocked action is allowed, the classifier reads that as your approval and can clear the block. How you worded it decides whether the action runs, and how far the approval reaches:
- * **Name the action and its specifics** : your message has to name the action and the specific thing that makes it dangerous, such as the branch of a force push. Naming the verb alone clears nothing, so “you can force-push” leaves the block in place.
+ * **Name the action and its specifics** : include the specific thing that makes it dangerous, such as the branch of a force push. If you name only the verb, as in “you can force-push”, the block can stay in place.
* **Expect it to cover one action** : an approval covers the destructive action you named, so a later action is blocked again unless you granted the approval as standing. To stop approving a routine pattern one action at a time, add it to [`autoMode.allow`](</docs/en/auto-mode-config#override-the-block-and-allow-rules>).
* **Some blocks stay in place** : [the classifier’s precedence order](</docs/en/auto-mode-config#override-the-block-and-allow-rules>) sets out which blocks your approval can reach. To run a step it won’t clear, leave auto mode and answer the permission prompt.
@@ -448,18 +448,22 @@
* A write that the [symlink check](</docs/en/permissions#symlinks>) resolves to a protected path prompts you when the path Claude requested isn’t itself protected
* A read from a [network path](</docs/en/permissions#network-paths>) prompts you even when an allow rule matches
2. Read-only actions and file edits in your working directory are auto-approved, except writes to protected paths and the first read outside the working directories, which prompts you
- * In a session with server-side classifier review, read-only and [sandboxed](</docs/en/sandboxing#sandbox-modes>) shell commands wait for that review and are blocked if it flags them
+ * In a session with server-side classifier review, file edits, read-only shell commands, and [sandboxed](</docs/en/sandboxing#sandbox-modes>) shell commands wait for that review and are blocked if it flags them
* A write inside your working directory that the [symlink check](</docs/en/permissions#symlinks>) resolves to a location outside it prompts you
* When Claude reads an [artifact someone else made](</docs/en/artifacts#read-an-artifact-shared-with-you>), the approval cases listed in that section apply
* A read from a [network path](</docs/en/permissions#network-paths>) prompts you
3. Everything else goes to the classifier, apart from critical-path removals under their default handling. The connector tools and `requiresUserInteraction` MCP tools that prompt you directly in step 1 never reach the classifier either, so neither an org-required approval nor a consent step is auto-approved
* With [Code Mode](</docs/en/code-mode#permission-checks>) on, the code that Claude writes goes to the classifier once before it runs, and the tool calls inside it don’t. You can still block a call with a `deny` rule or require a prompt with an `ask` rule, but Claude can run Bash commands in [forms the rules don’t match](</docs/en/permissions#bash-rule-limits>)
- 4. If the classifier blocks, Claude receives the reason. In most sessions the reason names the rule the classifier matched, such as `[Data Exfiltration]`, rather than giving a written explanation; see [Review denials](</docs/en/auto-mode-config#review-denials>)
-
-A [mod](</docs/en/plugins/mods/overview>) you install that handles `tool.check` can also approve an action. For the cases where its approval doesn’t get past your rules and hooks, see [Extend permissions with hooks](</docs/en/permissions#precedence-among-rules-hooks-and-mods>).For how [Claude in Chrome](</docs/en/chrome>) browser actions get approved in the VS Code extension, see [Permission prompts in VS Code sessions](</docs/en/chrome#permission-prompts-in-vs-code-sessions>).On entering auto mode, broad allow rules that grant arbitrary code execution are dropped:
+ * Outside Code Mode, the classifier reviews messages Claude sends to another agent with [`SendMessage`](</docs/en/tools-reference>) before Claude Code delivers them. If an allow rule matches `SendMessage` or a `PreToolUse` hook returns `"allow"`, a message can skip this review. The review also runs in plan mode while the classifier reviews commands. Requires Claude Code v2.1.222 or later.
+ 4. If the classifier blocks, Claude receives the reason. In most sessions the reason is the name of the [policy](</docs/en/auto-mode-config#fix-a-policy-denial>) or rule the classifier matched, such as `[Destructive or Unwanted Actions]`; see [Review denials](</docs/en/auto-mode-config#review-denials>)
+
+A [mod](</docs/en/plugins/mods/overview>) you install can also approve an action. For the cases where its approval doesn’t override your rules and hooks, see [Extend permissions with hooks](</docs/en/permissions#precedence-among-rules-hooks-and-mods>).For how [Claude in Chrome](</docs/en/chrome>) browser actions get approved in the VS Code extension, see [Permission prompts in VS Code sessions](</docs/en/chrome#permission-prompts-in-vs-code-sessions>).On entering auto mode, broad allow rules that grant arbitrary code execution are dropped, including:
* Blanket `Bash(*)` or `PowerShell(*)`
* Wildcarded interpreters like `Bash(python*)`
+ * A [wrapper](</docs/en/permissions#process-wrappers>) followed only by a wildcard, like `Bash(timeout *)`
+ * Shell rules that start with a wildcard, like `Bash(* --version)`
+ * Some wildcarded paths, like `Bash($HOME/bin/*)` or `PowerShell(C:\tools\x.exe *)`
* Package-manager run commands
* `Agent` allow rules
* [`Monitor`](</docs/en/tools-reference#monitor-tool>) allow rules, because Claude Code runs Monitor commands through the shell
@@ -476,7 +480,7 @@
Cost and latency
-Claude Code’s classifier requests can run on a model other than your `/model` selection. See which model they run on.On Enterprise plans and on accounts that use the Claude API, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations. Where the server reviews the actions as part of the session’s model requests, there are no separate classifier calls to count; see Server-side classifier review.Sandboxed network access adds no per-connection classifier requests. The classifier judges [the hosts a command names](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) together with the command in one review, and Claude Code checks each connection against the approved list without calling the classifier again.
+Claude Code’s classifier requests can run on a model other than your `/model` selection. See which model they run on.Classifier calls count toward your token usage on Enterprise plans. They also count on accounts that use the Claude API, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution.Where the server reviews the actions as part of the session’s model requests, there are no separate classifier calls to count. See Server-side classifier review.Sandboxed network access adds no per-connection classifier requests. The classifier judges [the hosts a command names](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) together with the command in one review, and Claude Code checks each connection against the approved list without calling the classifier again.
## Allow only pre-approved tools with dontAsk mode
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -453,7 +453,7 @@
* When Claude reads an [artifact someone else made](</docs/en/artifacts#read-an-artifact-shared-with-you>), the approval cases listed in that section apply
* A read from a [network path](</docs/en/permissions#network-paths>) prompts you
3. Everything else goes to the classifier, apart from critical-path removals under their default handling. The connector tools and `requiresUserInteraction` MCP tools that prompt you directly in step 1 never reach the classifier either, so neither an org-required approval nor a consent step is auto-approved
- * With [Code Mode](</docs/en/code-mode#permission-checks>) on, Claude’s code goes to the classifier once before it runs, and the tool calls inside it don’t. You can still block a call with a `deny` rule or require a prompt with an `ask` rule, but Claude can run Bash commands in [forms the rules don’t match](</docs/en/permissions#bash-rule-limits>)
+ * With [Code Mode](</docs/en/code-mode#permission-checks>) on, the code that Claude writes goes to the classifier once before it runs, and the tool calls inside it don’t. You can still block a call with a `deny` rule or require a prompt with an `ask` rule, but Claude can run Bash commands in [forms the rules don’t match](</docs/en/permissions#bash-rule-limits>)
4. If the classifier blocks, Claude receives the reason. In most sessions the reason names the rule the classifier matched, such as `[Data Exfiltration]`, rather than giving a written explanation; see [Review denials](</docs/en/auto-mode-config#review-denials>)
A [mod](</docs/en/plugins/mods/overview>) you install that handles `tool.check` can also approve an action. For the cases where its approval doesn’t get past your rules and hooks, see [Extend permissions with hooks](</docs/en/permissions#precedence-among-rules-hooks-and-mods>).For how [Claude in Chrome](</docs/en/chrome>) browser actions get approved in the VS Code extension, see [Permission prompts in VS Code sessions](</docs/en/chrome#permission-prompts-in-vs-code-sessions>).On entering auto mode, broad allow rules that grant arbitrary code execution are dropped:
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -243,7 +243,7 @@
* **Plan** : All plans.
* **Organization** : on Team and Enterprise, auto mode is available by default. Administrators can turn it off for the organization by setting `permissions.disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>).
* **Provider and model** : available by default on these providers, with these models:
- * **Anthropic API,[Claude Platform on AWS](</docs/en/claude-platform-on-aws>), and [Claude Models on Google Cloud (Anthropic managed)](</docs/en/feature-availability#availability-by-model-provider>)**: Claude Opus 4.6 or later, Sonnet 4.6 or later, Haiku 5.5, or a [Fable model](</docs/en/model-config#work-with-fable>)
+ * **Anthropic API,[Claude Platform on AWS](</docs/en/claude-platform-on-aws>), and [Claude Models on Google Cloud (Anthropic managed)](</docs/en/claude-models-on-google-cloud-anthropic-managed>)**: Claude Opus 4.6 or later, Sonnet 4.6 or later, Haiku 5.5, or a [Fable model](</docs/en/model-config#work-with-fable>)
* **Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in[Claude apps gateway](</docs/en/claude-apps-gateway>) sessions**: only Claude Sonnet 5 or later, Opus 4.7 or later, Haiku 5.5, and the Fable models
Older models, including Sonnet 4.5, Opus 4.5, Haiku 4.5, and claude-3 models, are not supported on any provider.
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -34,7 +34,7 @@
You want to| Start with| Isolation needed| Notes
---|---|---|---
Review every action yourself| Manual mode: `claude --permission-mode default`| None| Sensitive work, unfamiliar code
-Iterate locally with fewer prompts, without a classifier| Manual mode plus the Bash sandbox in [auto-allow mode](</docs/en/sandboxing#sandbox-modes>): `claude --permission-mode default`, then run `/sandbox` and select auto-allow| The built-in Bash sandbox, on macOS, Linux, and WSL2| Deny rules still apply, and ask rules that name a command, such as `Bash(git push *)`, still prompt. [Auto-allow mode](</docs/en/sandboxing#auto-allow-mode>) covers other commands that can prompt. To turn the sandbox on from a settings file instead, set [`sandbox.enabled`](</docs/en/settings-reference#sandbox-enabled>) to `true`
+Iterate locally with fewer prompts, without a classifier| Manual mode plus the Bash sandbox in [auto-allow mode](</docs/en/sandboxing#sandbox-modes>): `claude --permission-mode default`, then run `/sandbox` and select auto-allow| The built-in Bash sandbox, on macOS, Linux, and WSL2| Deny rules still apply, and ask rules that name a command, such as `Bash(git push *)`, still prompt. [Auto-allow mode](</docs/en/sandboxing#auto-allow-mode>) covers other commands that can prompt. To turn the sandbox on from a settings file instead, set [`sandbox.enabled`](</docs/en/settings-reference#sandbox-enabled>) and [`sandbox.autoAllowBashIfSandboxed`](</docs/en/settings-reference#sandbox-autoallowbashifsandboxed>) to `true`
Explore before changing anything| `claude --permission-mode plan`| None| Claude Code blocks edits until you approve a plan
Work hands-off in auto mode| `claude --permission-mode auto`, the built-in starting permission mode with v2.1.283 or later| None; a sandbox or container adds defense in depth| Requires a supported model, and your organization can turn auto mode off
Run in CI with an exact allowlist| `claude -p "run the test suite" --permission-mode dontAsk --allowedTools "Bash(npm test)" "Read"`| None beyond what your CI runner provides| [Cloud sessions](</docs/en/claude-code-on-the-web>) ignore `dontAsk` from settings files
@@ -242,8 +242,10 @@
* **Plan** : All plans.
* **Organization** : on Team and Enterprise, auto mode is available by default. Administrators can turn it off for the organization by setting `permissions.disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>).
- * **Model** : on the Anthropic API and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Claude Opus 4.6 or later, Sonnet 4.6 or later, Haiku 5.5, or a [Fable model](</docs/en/model-config#work-with-fable>). On Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, only Claude Sonnet 5 or later, Opus 4.7 or later, Haiku 5.5, and the Fable models. Older models, including Sonnet 4.5, Opus 4.5, Haiku 4.5, and claude-3 models, are not supported on any provider.
- * **Provider** : available by default on the Anthropic API, Claude Platform on AWS, Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in Claude apps gateway sessions.
+ * **Provider and model** : available by default on these providers, with these models:
+ * **Anthropic API,[Claude Platform on AWS](</docs/en/claude-platform-on-aws>), and [Claude Models on Google Cloud (Anthropic managed)](</docs/en/feature-availability#availability-by-model-provider>)**: Claude Opus 4.6 or later, Sonnet 4.6 or later, Haiku 5.5, or a [Fable model](</docs/en/model-config#work-with-fable>)
+ * **Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in[Claude apps gateway](</docs/en/claude-apps-gateway>) sessions**: only Claude Sonnet 5 or later, Opus 4.7 or later, Haiku 5.5, and the Fable models
+Older models, including Sonnet 4.5, Opus 4.5, Haiku 4.5, and claude-3 models, are not supported on any provider.
If Claude Code reports auto mode as unavailable, first check these requirements and whether any settings file sets [`disableAutoMode`](</docs/en/settings-reference#disableautomode>). Anthropic may also have turned auto mode off server-side, or the server may have rejected auto mode for your account. A session that received either answer keeps auto mode off until the session ends, so start a new session later. A separate message that names a model and says auto mode “cannot determine the safety” of an action means a classifier request failed. That failure is usually transient, but on Amazon Bedrock it can repeat until your account can invoke the named model. See the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>) for the causes and what to do. If you set `defaultMode: "auto"` in [settings](</docs/en/settings-reference#all-settings>) and a terminal session starts in Manual mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. `auto` doesn’t take effect from those files. Move it to `~/.claude/settings.json`. For a conversation the VS Code extension started, check the extension’s own list in Switch permission modes instead.
@@ -451,6 +453,7 @@
* When Claude reads an [artifact someone else made](</docs/en/artifacts#read-an-artifact-shared-with-you>), the approval cases listed in that section apply
* A read from a [network path](</docs/en/permissions#network-paths>) prompts you
3. Everything else goes to the classifier, apart from critical-path removals under their default handling. The connector tools and `requiresUserInteraction` MCP tools that prompt you directly in step 1 never reach the classifier either, so neither an org-required approval nor a consent step is auto-approved
+ * With [Code Mode](</docs/en/code-mode#permission-checks>) on, Claude’s code goes to the classifier once before it runs, and the tool calls inside it don’t. You can still block a call with a `deny` rule or require a prompt with an `ask` rule, but Claude can run Bash commands in [forms the rules don’t match](</docs/en/permissions#bash-rule-limits>)
4. If the classifier blocks, Claude receives the reason. In most sessions the reason names the rule the classifier matched, such as `[Data Exfiltration]`, rather than giving a written explanation; see [Review denials](</docs/en/auto-mode-config#review-denials>)
A [mod](</docs/en/plugins/mods/overview>) you install that handles `tool.check` can also approve an action. For the cases where its approval doesn’t get past your rules and hooks, see [Extend permissions with hooks](</docs/en/permissions#precedence-among-rules-hooks-and-mods>).For how [Claude in Chrome](</docs/en/chrome>) browser actions get approved in the VS Code extension, see [Permission prompts in VS Code sessions](</docs/en/chrome#permission-prompts-in-vs-code-sessions>).On entering auto mode, broad allow rules that grant arbitrary code execution are dropped:
Show diff (609 lines)
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -1,10 +1,6 @@
A permission mode sets which actions Claude can take in a session without asking you first. In Manual mode, Claude Code stops and asks you before most actions that edit files, run shell commands, or reach the network. In auto mode, a second model, the classifier, reviews actions instead of you; how the classifier evaluates actions lists which actions it reviews and which skip it. With Claude Code v2.1.283 or later, auto mode is the built-in starting permission mode for interactive terminal and VS Code sessions. On earlier versions, it’s the built-in starting permission mode only on Pro, Max, Ultra, and Team plans. Which mode a session starts in covers the surfaces and settings that change the starting permission mode. You can also change a running session’s permission mode at any time.
-##
-
-
-
-Available modes
+## Available modes
Each mode makes a different tradeoff between convenience and oversight. The table below shows what Claude can do without a permission prompt in each mode. Manual mode appears under its config value, `default`.
@@ -19,11 +15,7 @@
The mode that reviews every action is named **Manual** in the CLI, in `claude --help`, in the VS Code and JetBrains extensions, and in the desktop app. Its config value is `default`, which is what hooks and SDK integrations use. The CLI accepts `manual` as an alias wherever you type the value, for example `claude --permission-mode manual` or `"defaultMode": "manual"`. Each mode has its own rule for writes to protected paths. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. Deny rules block in every mode, including `bypassPermissions`. Deny and ask rules don’t apply to [`EndConversation`](</docs/en/tools-reference#endconversation-tool-behavior>) as long as Claude still has at least one other tool it can call. Allow rules have no effect in `bypassPermissions`.
-###
-
-
-
-Actions no mode auto-approves
+### Actions no mode auto-approves
Claude Code doesn’t auto-approve the following in any mode, including `bypassPermissions`, though you can turn off the prompt for dangerous `rm` commands in `bypassPermissions` mode. Each bullet links to the section that says what happens instead in each mode:
@@ -35,11 +27,7 @@
* Reads outside the working directories while [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) is on: recognized file-reading Bash commands prompt even in auto mode and `bypassPermissions` mode, and so does any [unsandboxed retry](</docs/en/sandboxing#the-unsandboxed-retry-escape-hatch>) that needs approval to run outside the sandbox. Requires Claude Code v2.1.257 or later. A command the shell parser can’t trace, such as one that changes directory more than once or runs a subshell, prompts the same way even when it names no outside path. This prompt doesn’t apply when the command runs in the [sandbox](</docs/en/sandboxing>) and the sandbox enforces the block.
* Writes outside the working directories while [`permissions.blockWritesOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockwritesoutsideworkingdirectories>) is on: Claude Code refuses `Write`, `Edit`, and `NotebookEdit` calls there, apart from [some of its own files](</docs/en/settings-reference#what-the-write-block-refuses-and-what-stays-writable>). The key doesn’t limit shell commands, MCP tools, or the programs hooks run, so use [sandboxing](</docs/en/sandboxing>) to limit where shell commands write. Requires Claude Code v2.1.314 or later.
-##
-
-
-
-Common setups
+## Common setups
Permission modes decide whether Claude asks before an action, and the [Bash sandbox](</docs/en/sandboxing>) and outer [isolation boundaries](</docs/en/sandbox-environments>) decide what an action can reach once it runs. Each row below pairs a goal with the flags or settings that get you there and the isolation it needs, as a starting point. Available modes lists what runs without a prompt in each mode.
@@ -54,11 +42,7 @@
The Bash sandbox and auto mode work independently and combine, with the exceptions listed under [Sandbox modes](</docs/en/sandboxing#sandbox-modes>). For the full interaction, see [How sandboxing relates to permissions and permission modes](</docs/en/sandboxing#how-sandboxing-relates-to-permissions-and-permission-modes>) and [How isolation relates to permission modes](</docs/en/sandbox-environments#how-isolation-relates-to-permission-modes>).
-##
-
-
-
-Which mode a session starts in
+## Which mode a session starts in
When you start a new session in a terminal, Claude Code takes the permission mode from the first of these that applies:
@@ -82,11 +66,7 @@
If your `~/.claude/settings.json` sets a `defaultMode` other than `auto` and no other settings file sets one, your sessions keep starting in that mode. On Pro, Max, Ultra, and Team plans, and in sessions that [don’t fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), Claude Code asks once whether to change the setting to auto mode. The question appears in the terminal or in the VS Code extension, and if you decline, your setting stays as it is.
-###
-
-
-
-Tool calls denied in `claude -p` and Agent SDK runs
+### Tool calls denied in `claude -p` and Agent SDK runs
In Claude Code v2.1.302 or later, `claude -p` and [Agent SDK](</docs/en/agent-sdk/permissions#permission-modes>) runs with no permission mode set start in Manual mode. This mode appears as `default` in SDK options and settings. Calls needing approval are denied unless you approve them with an allow rule, hook, `canUseTool` callback, or `--permission-prompt-tool`. To get these calls approved, add allow rules or start in auto mode:
@@ -113,11 +93,7 @@
Before v2.1.302, these runs could start in auto mode if they didn’t [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), for example on a [third-party provider](</docs/en/third-party-integrations>) or with `DISABLE_TELEMETRY`.
-###
-
-
-
-Start in a different permission mode
+### Start in a different permission mode
You can set the starting permission mode for one session, or as a default for every session on a machine, in a project, or in an organization. When more than one settings file sets `permissions.defaultMode`, [settings precedence](</docs/en/settings#settings-precedence>) decides, so a project or managed value outranks `~/.claude/settings.json`. To change the permission mode of a session that’s already running, see Switch permission modes.
@@ -138,11 +114,7 @@
The next session you start shows `⏸ manual mode on` in the status bar.
-###
-
-
-
-Permission modes with the HIPAA configuration
+### Permission modes with the HIPAA configuration
In an organization with the [HIPAA configuration](</docs/en/hipaa-setup>) applied, the built-in `auto` default doesn’t apply. A terminal or VS Code session starts in Manual mode when nothing else chooses its starting permission mode. A terminal session also shows `Auto mode isn't the default for your organization · Shift+Tab to switch`, and the VS Code extension shows no notice. [Check how developers sign in and connect](</docs/en/hipaa-setup#check-how-developers-sign-in-and-connect>) lists the sessions this applies to. Auto mode and `bypassPermissions` stay available:
@@ -151,11 +123,7 @@
* **Remove auto mode** : set [`permissions.disableAutoMode`](</docs/en/settings-reference#disableautomode>) to `"disable"` in managed settings
* **Block`bypassPermissions`**: set [`permissions.disableBypassPermissionsMode`](</docs/en/settings-reference#permissions-disablebypasspermissionsmode>) to `"disable"` in managed settings
-##
-
-
-
-Switch permission modes
+## Switch permission modes
Each interface has its own control for switching permission modes during a session and its own way of choosing the permission mode new sessions start in. Select your interface to see its controls.
@@ -222,11 +190,7 @@
claude remote-control --permission-mode acceptEdits
-##
-
-
-
-Auto-approve file edits with acceptEdits mode
+## Auto-approve file edits with acceptEdits mode
`acceptEdits` mode lets Claude create and edit files in your working directory without prompting. The status bar shows `⏵⏵ accept edits on` while this mode is active. In addition to file edits, `acceptEdits` mode auto-approves common filesystem Bash commands: `mkdir`, `touch`, `rm`, `rmdir`, `mv`, `cp`, and `sed`. Except for `touch`, these commands are also auto-approved when prefixed with safe environment variables such as `LANG=C` or `NO_COLOR=1`, or process wrappers such as `timeout`, `nice`, or `nohup`. Like file edits, auto-approval applies only to paths inside your working directory or `additionalDirectories`. These still prompt:
@@ -240,11 +204,7 @@
claude --permission-mode acceptEdits
-##
-
-
-
-Analyze before you edit with plan mode
+## Analyze before you edit with plan mode
Plan mode tells Claude to research and propose changes without making them. Claude reads files, runs shell commands to explore, and writes a plan, but does not edit your source. Except in interactive terminal sessions with bypass permissions available, edits stay blocked until you approve the plan. What happens to a shell command during planning depends on the session, and the first of these cases that matches applies:
@@ -256,13 +216,9 @@
claude --permission-mode plan
-Press `Shift+Tab` again to leave plan mode without approving a plan.
-
-###
-
-
-
-Review and approve a plan
+With no approval prompt open, press `Shift+Tab` again to leave plan mode. At the approval prompt, press `Esc` first, since pressing `Shift+Tab` there approves the plan.
+
+### Review and approve a plan
When the plan is ready, Claude presents it and asks how to proceed. From that prompt you can choose:
@@ -272,19 +228,11 @@
Approving a plan exits plan mode and switches the session to the permission mode each approve option describes, so Claude starts editing. To plan again, cycle back to plan mode with `Shift+Tab`, or prefix your next prompt with `/plan`. Press `Ctrl+G` to open the proposed plan in your default text editor and edit it directly before Claude proceeds. When [`showClearContextOnPlanAccept`](</docs/en/settings-reference#showclearcontextonplanaccept>) is enabled, the list gains a first option that approves the plan and clears the planning context. Accepting a plan also gives the session a [generated title](</docs/en/sessions#name-your-sessions>) based on the plan, unless you’ve already named the session.
-###
-
-
-
-Set plan mode as the default
+### Set plan mode as the default
To make plan mode the default for a project’s terminal sessions, set `defaultMode` to `plan` in `.claude/settings.json`, placed as the example under Start in a different permission mode shows. Conversations the [VS Code extension](</docs/en/vs-code>) starts don’t read project settings for the starting permission mode. There, set `claudeCode.initialPermissionMode` to `plan` in your VS Code user settings instead.
-##
-
-
-
-Eliminate permission prompts with auto mode
+## Eliminate permission prompts with auto mode
Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt. With Claude Code v2.1.283 or later, auto mode is the built-in starting permission mode for interactive terminal and VS Code sessions on every plan and provider. On earlier versions, it’s the built-in starting permission mode only on Pro, Max, Ultra, and Team plans. The classifier also reviews each message Claude sends to another agent with [`SendMessage`](</docs/en/tools-reference>), whether plain text or a structured [agent team](</docs/en/agent-teams>) message, before Claude Code delivers it, both in auto mode and in plan mode while the classifier reviews commands; the send review requires Claude Code v2.1.222 or later. By default, the classifier doesn’t review recognized `rm` and `rmdir` critical-path removals, such as `rm -rf /` or `rm -rf ~`. Critical paths covers what happens to them in each permission mode. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior in a mode that still prompts you, set the [Proactive output style](</docs/en/output-styles>) instead.
@@ -299,11 +247,7 @@
If Claude Code reports auto mode as unavailable, first check these requirements and whether any settings file sets [`disableAutoMode`](</docs/en/settings-reference#disableautomode>). Anthropic may also have turned auto mode off server-side, or the server may have rejected auto mode for your account. A session that received either answer keeps auto mode off until the session ends, so start a new session later. A separate message that names a model and says auto mode “cannot determine the safety” of an action means a classifier request failed. That failure is usually transient, but on Amazon Bedrock it can repeat until your account can invoke the named model. See the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>) for the causes and what to do. If you set `defaultMode: "auto"` in [settings](</docs/en/settings-reference#all-settings>) and a terminal session starts in Manual mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. `auto` doesn’t take effect from those files. Move it to `~/.claude/settings.json`. For a conversation the VS Code extension started, check the extension’s own list in Switch permission modes instead.
-###
-
-
-
-Auto mode on Bedrock, Agent Platform, or Foundry
+### Auto mode on Bedrock, Agent Platform, or Foundry
On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode is available by default. If you don’t set a permission mode there, interactive sessions start in auto mode, and `claude -p` or Agent SDK runs start in Manual mode, whose config value is `default`:
@@ -312,11 +256,7 @@
Only Claude Sonnet 5 or later, Opus 4.7 or later, Haiku 5.5, and the Fable models are supported on these providers. On any other model, the session starts in Manual instead. Auto mode with Haiku 5.5 on these providers requires Claude Code v2.1.293 or later. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. A session already running in auto mode leaves it when the setting reaches that session from an [admin-deployed source](</docs/en/managed-settings#which-managed-source-claude-code-uses>), and shows `auto mode disabled by settings`. Before v2.1.251, a running session kept auto mode until it ended.
-###
-
-
-
-Server-side classifier review
+### Server-side classifier review
In auto mode, Claude Code can ask the server to check the actions that the decision order sends for review, as part of the session’s model requests, in place of sending its own classifier requests. These sessions ask:
@@ -336,11 +276,7 @@
To skip asking the server and always use Claude Code’s own classifier requests, set [`CLAUDE_CODE_AUTO_MODE_SERVER=0`](</docs/en/env-vars>). On a direct connection to the Anthropic API, the variable requires Claude Code v2.1.281 or later. Setting it to `1` there turns server review on in a session that doesn’t have it yet, unless you’ve also set `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1`. If you set `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1` and leave `CLAUDE_CODE_AUTO_MODE_SERVER` unset, Claude Code also stops asking the server, except as [Disable pre-release capabilities](</docs/en/llm-gateway-protocol#disable-pre-release-capabilities>) describes.
-###
-
-
-
-Default classifier model
+### Default classifier model
By default, classifier requests go to Claude Sonnet 5. If `/status` shows `Auto mode server` as `Enabled`, they’re sent only for calls outside the server’s review. Find the first row in this table that matches your session. You get that row’s model in place of Sonnet 5.
@@ -352,11 +288,7 @@
If Sonnet 5 or the model in `ANTHROPIC_DEFAULT_SONNET_MODEL` is unavailable from your provider or excluded by your organization’s [model policy](</docs/en/model-config#restrict-model-selection>), Claude Code uses a fallback model. That’s your session’s model, or an Opus model in a [Fable session](</docs/en/model-config#work-with-fable>).
-###
-
-
-
-Choose the classifier model
+### Choose the classifier model
With Claude Code v2.1.302 or later, set [`CLAUDE_CODE_AUTO_MODE_MODEL`](</docs/en/env-vars>) to a full model ID to run the classifier on a model other than the default. Your cloud provider’s own full model IDs work too. This `~/.claude/settings.json` example sets Claude Sonnet 4.6:
@@ -366,11 +298,7 @@
}
}
-####
-
-
-
-When your model doesn’t review
+#### When your model doesn’t review
Situation| What happens| What to do
---|---|---
@@ -381,11 +309,7 @@
If several situations apply, go by the first listed.
-####
-
-
-
-Check which model the classifier used
+#### Check which model the classifier used
From your shell, start an auto mode session with [`--debug-file`](</docs/en/cli-reference#cli-flags>):
@@ -399,11 +323,7 @@
* **`Enabled`** : the server is set to review this session’s calls.
* **`Disabled`** : this check hasn’t tested your model yet. Make sure the permission mode is auto and no [permission rule](</docs/en/permissions#manage-permissions>) matches `curl`, then run the check again with the [sandbox](</docs/en/sandboxing>) off.
-###
-
-
-
-What the classifier blocks by default
+### What the classifier blocks by default
The classifier trusts your working directory and the remotes that were configured for it when the session started. A remote added or repointed during the session with `git remote add` or `git remote set-url` isn’t trusted, and everything else is treated as external until you [configure trusted infrastructure](</docs/en/auto-mode-config>). **Blocked by default** :
@@ -474,11 +394,7 @@
Sandboxed commands don’t get network access by default. Claude names the hosts a command needs on the command itself, the classifier reviews them with the command, and an approved list opens those hosts for that one command alone. [Per-command allowed domains](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) covers what a list can and can’t open and what happens when a command reaches for an unlisted host. Run `claude auto-mode defaults` to print the full rule lists as JSON. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure auto mode](</docs/en/auto-mode-config>). Pushing to any branch of the repository you’re working in and creating a pull request that matches your request run without a prompt, unless the push or pull request falls under the blocked list, such as secrets or sensitive data leaving the repository, or a pull request that targets a different repository or organization. To require a human checkpoint before these commands while staying in auto mode, add `permissions.ask` rules, which match the command [as written](</docs/en/permissions#bash-rule-limits>): see [Common boundaries](</docs/en/auto-mode-config#common-boundaries>).
-###
-
-
-
-The first read outside the working directories
+### The first read outside the working directories
While [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) is off, file reads other than [reads from network paths](</docs/en/permissions#network-paths>) run without a prompt in auto mode, including reads outside the [working directories](</docs/en/permissions#working-directories>). The first time Claude uses the Read, Grep, or Glob tool on a path outside them, Claude Code asks whether to allow that read. The prompt doesn’t appear in non-interactive `-p` runs or background sessions; reads there run as before. Whatever you answer, Claude keeps working:
@@ -487,19 +403,11 @@
* **No, and ask again next time** : the read is refused, and the next read outside the working directories prompts again
* **Yes, but ask again next time** : the read runs, nothing is saved, and the next read outside the working directories prompts again
-###
-
-
-
-Boundaries you state in conversation
+### Boundaries you state in conversation
The classifier treats boundaries you state in the conversation as a block signal. If you tell Claude “don’t push” or “wait until I review before deploying”, the classifier blocks matching actions even when the default rules would allow them. A boundary stays in force until you lift it in a later message. Claude’s own judgment that a condition was met does not lift it. Boundaries are not stored as rules. The classifier re-reads them from the transcript on each check, so a boundary can be lost if [context compaction](</docs/en/costs#reduce-token-usage>) removes the message that stated it. For a hard guarantee, add a [deny rule](</docs/en/permissions#permission-rule-syntax>) instead.
-###
-
-
-
-Approvals you state in conversation
+### Approvals you state in conversation
If you tell Claude that a blocked action is allowed, the classifier reads that as your approval and can clear the block. How you worded it decides whether the action runs, and how far the approval reaches:
@@ -507,11 +415,7 @@
* **Expect it to cover one action** : an approval covers the destructive action you named, so a later action is blocked again unless you granted the approval as standing. To stop approving a routine pattern one action at a time, add it to [`autoMode.allow`](</docs/en/auto-mode-config#override-the-block-and-allow-rules>).
* **Some blocks stay in place** : [the classifier’s precedence order](</docs/en/auto-mode-config#override-the-block-and-allow-rules>) sets out which blocks your approval can reach. To run a step it won’t clear, leave auto mode and answer the permission prompt.
-###
-
-
-
-When auto mode falls back
+### When auto mode falls back
When auto mode can’t approve your session’s actions, what happens depends on the case:
@@ -521,19 +425,11 @@
* **No verdict from the server** : under server-side classifier review, Claude Code denies an action the server gives no verdict for, and can stop the turn after ten responses in a row with no verdict. See [The server returned no safety verdict](</docs/en/errors#the-server-returned-no-safety-verdict>).
* **A mode switch during a check** : if you switch permission modes while a classifier check is pending, Claude Code discards a verdict the new mode wouldn’t have requested. You’re prompted for approval instead, or the action is auto-denied in `dontAsk` mode.
-####
-
-
-
-Repeated-block thresholds
+#### Repeated-block thresholds
The thresholds of 3 blocks in a row and 20 blocks total are not configurable. The total counter persists for the session and resets only when its own limit triggers a fallback. Claude Code doesn’t count a denial toward either threshold when a safety check separate from auto mode refuses the classifier’s own request. A [non-interactive](</docs/en/headless>) `-p` run without a [`--permission-prompt-tool`](</docs/en/cli-reference#cli-flags>) has no prompt to fall back to. When repeated blocks reach a threshold, the action doesn’t run and Claude keeps working. Claude Code doesn’t stop the run. Repeated blocks usually mean the classifier is missing context about your infrastructure. Use `/feedback` to report false positives, or have an administrator [configure trusted infrastructure](</docs/en/auto-mode-config>).
-###
-
-
-
-How auto mode evaluates actions
+### How auto mode evaluates actions
The following sections cover the order Claude Code evaluates an action in, how the classifier reviews subagent work, and what classifier calls add in cost and latency.
@@ -579,11 +475,7 @@
Claude Code’s classifier requests can run on a model other than your `/model` selection. See which model they run on.On Enterprise plans and on accounts that use the Claude API, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations. Where the server reviews the actions as part of the session’s model requests, there are no separate classifier calls to count; see Server-side classifier review.Sandboxed network access adds no per-connection classifier requests. The classifier judges [the hosts a command names](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) together with the command in one review, and Claude Code checks each connection against the approved list without calling the classifier again.
-##
-
-
-
-Allow only pre-approved tools with dontAsk mode
+## Allow only pre-approved tools with dontAsk mode
If you set `dontAsk` mode, Claude Code auto-denies every tool call that would otherwise prompt you, though a [mod](</docs/en/plugins/mods/overview>) you installed can still approve some of those calls. To check which calls a mod can approve, see [Extend permissions with hooks](</docs/en/permissions#precedence-among-rules-hooks-and-mods>). Claude still runs actions that need no approval in Manual mode, such as file reads inside your working directories and [read-only Bash commands](</docs/en/permissions#read-only-commands>). Actions matching your `permissions.allow` rules and calls approved by a [PreToolUse hook](</docs/en/permissions#extend-permissions-with-hooks>) run too. Use this mode for CI pipelines or restricted environments where you pre-define what Claude may do; the session never waits for input. The status bar shows `⏵⏵ don't ask on` in this mode. Claude Code denies calls matching your explicit [`ask` rules](</docs/en/permissions#manage-permissions>) rather than prompting. It also denies the built-in `AskUserQuestion` tool even if your allow rules match it, and does the same to connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code. It denies MCP tools marked [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) the same way, because their approval card needs an answer this mode never collects. An allow rule or `PreToolUse` hook can’t approve these:
@@ -594,11 +486,7 @@
claude --permission-mode dontAsk
-##
-
-
-
-Skip all checks with bypassPermissions mode
+## Skip all checks with bypassPermissions mode
`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. Even in `bypassPermissions` mode, each of the actions no mode auto-approves gets a prompt or a denial, though you can turn off the prompt for dangerous `rm` commands. Reading [another organization’s public artifact](</docs/en/artifacts#read-an-artifact-shared-with-you>) needs your approval, and this mode doesn’t ask for it, so Claude can’t read one. The Remove-Item in PowerShell denies also apply in this mode. Two [cross-session messaging](</docs/en/cross-session-messaging>) safeguards still apply in this mode, and in interactive terminal plan-mode sessions where bypass permissions are available:
@@ -634,11 +522,7 @@
`bypassPermissions` offers no protection against prompt injection or unintended actions. For background safety checks with far fewer permission prompts, use auto mode instead. Administrators can block this mode by setting `permissions.disableBypassPermissionsMode` to `"disable"` in [managed settings](</docs/en/managed-settings>).
-###
-
-
-
-Bypass permissions ignored in a background session
+### Bypass permissions ignored in a background session
This notice means the [background session](</docs/en/agent-view>) didn’t find your acceptance of the bypass permissions warning in user or managed settings, so it ignored the bypass request made at launch:
@@ -646,19 +530,11 @@
Add `"skipDangerousModePermissionPrompt": true` to `~/.claude/settings.json`, then start a new background session.
-###
-
-
-
-`claude agents` shows the bypass permissions warning that interactive sessions skip
+### `claude agents` shows the bypass permissions warning that interactive sessions skip
If [`claude agents`](</docs/en/agent-view#dispatch-defaults>) shows the bypass permissions warning although your interactive sessions skip it, check whether `skipDangerousModePermissionPrompt` is set in `.claude/settings.local.json` or a `--settings` file. Interactive sessions count the key there as your acceptance of the warning, and `claude agents` doesn’t. Whether or not you find it there, accept the warning to add the key to `~/.claude/settings.json`, where `claude agents` looks for it.
-##
-
-
-
-Protected paths
+## Protected paths
A small set of paths holds repository state and Claude’s own configuration, so each mode has its own rule for writes to them:
@@ -710,11 +586,7 @@
* A file you passed to [`--settings`](</docs/en/cli-reference#cli-flags>), `--mcp-config`, or `--agents` when you started the session
* The file that your user, project, or local [settings file](</docs/en/settings#settings-files-and-who-they-affect>) points to when the settings file is itself a symbolic link, for example into a dotfiles repository. In the modes that route protected-path writes to the classifier, a write to this file prompts you instead, even when an allow rule matches. If the file’s own path is also that of a settings file, such as `.claude/settings.json` in another folder, the write goes to the classifier as other protected-path writes do
-##
-
-
-
-Critical paths
+## Critical paths
Critical paths are the directories Claude Code protects from `rm` and `rmdir` commands, such as the filesystem root, your home directory, and your working directory. Claude Code checks these commands before they run, and no [allow rule](</docs/en/permissions#manage-permissions>) approves one whose target it recognizes as a critical path. The check can miss some commands, so it doesn’t replace an operating-system control such as [sandboxing](</docs/en/sandboxing>). A critical-path removal is an `rm` or `rmdir` command whose target Claude Code recognizes as a critical path. No [`PreToolUse` hook](</docs/en/permissions#extend-permissions-with-hooks>) that returns `"allow"` approves one either. An allow rule or `PreToolUse` hook can’t approve one even in the permission modes that skip other prompts.
@@ -728,11 +600,7 @@
What happens to a removal that Claude Code recognizes depends on your permission mode. `Remove-Item` and the `cmd` removal built-ins have their own checks, covered in Remove-Item in PowerShell.
-###
-
-
-
-Which paths are critical
+### Which paths are critical
Claude Code treats an `rm` or `rmdir` target as a critical path when it is any of the following:
@@ -745,11 +613,7 @@
For mounted drive paths such as `/mnt/c` or `/Volumes/USB`, see The mounted drive prompt. The checks on the home directory’s 8.3 short name and on the `\\?\C:\` and `\\localhost\C$` spellings require Claude Code v2.1.292 or later.
-###
-
-
-
-Other targets that count as critical paths
+### Other targets that count as critical paths
Claude Code also treats the following `rm` and `rmdir` targets as critical paths. The last column says why each one counts.
@@ -767,11 +631,7 @@
To turn off the check on a target that is only command substitution output, set [`CLAUDE_CODE_DISABLE_SUBSTITUTION_RM_PROMPT=1`](</docs/en/env-vars#variables>) in the environment that launches Claude Code.
-###
-
-
-
-Removals inside nested commands and inline scripts
+### Removals inside nested commands and inline scripts
Claude Code also looks inside these constructs:
@@ -782,11 +642,7 @@
To turn off the check on a critical path typed directly in a `-c` script, such as `~`, set [`CLAUDE_CODE_DISABLE_INLINE_SHELL_RM_PROMPT=1`](</docs/en/env-vars#variables>) in the environment that launches Claude Code.
-###
-
-
-
-Rewrite a flagged command
+### Rewrite a flagged command
How to rewrite a command so it passes the check depends on which of the other targets it uses:
@@ -797,11 +653,7 @@
For a glob or trailing slash under a variable, the prompt names the flagged `rm` and says how to rewrite it so the check passes.
-###
-
-
-
-The `Dangerous rm operation not ruled out` prompt
+### The `Dangerous rm operation not ruled out` prompt
The full reason reads:
@@ -813,19 +665,11 @@
You get the prompt or denial a critical-path removal gets in your permission mode, `bypassPermissions` included, though you can turn off that prompt in `bypassPermissions` mode. You can’t approve the command with a `Bash` or `Bash(*)` allow rule, sandbox [auto-allow mode](</docs/en/sandboxing#auto-allow-mode>), or a `PreToolUse` hook returning `"allow"`. Read the command, then approve the prompt or, after a denial, run it in your shell.
-###
-
-
-
-The mounted drive prompt
+### The mounted drive prompt
The mounted drive prompt appears on macOS, Linux, and WSL when a recursive `rm` targets a listed mounted drive path, such as `/mnt/c` or `/Volumes/USB/build`. Its reason reads `Dangerous rm operation on mounted drive path: <path>`. A `/*` target gets the prompt without the recursive flag, since Claude Code reads `rm /Volumes/USB/build/*` as a removal of `/Volumes/USB/build`. Even with an allow rule for `rm`, Claude Code handles the command as a critical-path removal: a prompt or a denial depending on your permission mode. Approve the prompt to let the `rm` run, or turn the prompt off.
-####
-
-
-
-Paths that get the mounted drive prompt
+#### Paths that get the mounted drive prompt
Match the target of your recursive `rm` or `/*` removal against these path shapes, where each placeholder such as `<drive>` or `<name>` stands for exactly one path segment:
@@ -839,11 +683,7 @@
For a recursive or non-recursive `rm` on `/Volumes`, `/media`, or `/mnt` itself, you see the critical path reason `Dangerous rm operation on critical path: <path>` instead. A relative target counts from your working directory, so `rm -rf build` while you work in `/Volumes/USB` targets `/Volumes/USB/build` and gets the prompt.
-####
-
-
-
-Turn off the mounted drive prompt
+#### Turn off the mounted drive prompt
To stop getting the mounted drive prompt while prompts from other causes stay, start Claude Code with [`CLAUDE_CODE_DISABLE_MOUNTED_DRIVE_RM_PROMPT=1`](</docs/en/env-vars#variables>) in its environment. For example, set the variable in [your shell](</docs/en/env-vars#set-variables-in-your-shell>) and start `claude` from it:
@@ -855,11 +695,7 @@
* **Variable in a settings file** : Claude Code [ignores the variable in a settings file’s `env` block](</docs/en/settings-reference#variables-claude-code-ignores-in-env>), whichever kind of settings file, so set the variable where you start `claude` instead
* **Session started without the variable** : start `claude` again from an environment where the variable is set, since a running session doesn’t pick it up
-####
-
-
-
-Removals that still prompt with the mounted drive prompt off
+#### Removals that still prompt with the mounted drive prompt off
In Manual mode with an allow rule for `rm`, an `rm` on a mounted drive path can still prompt, without the `Dangerous rm operation on mounted drive path` reason:
@@ -867,11 +703,7 @@
* **Target with a`*`**: `rm -rf build/*` gets a prompt. Approve that prompt to run the command, or ask Claude to name each target without a `*`
* **Target that is a critical path** : `/mnt` itself and your working directory itself stay critical paths, so `rm -rf` on either gets a prompt. Approve that prompt to let the `rm` run
-###
-
-
-
-Critical-path removals in each permission mode
+### Critical-path removals in each permission mode
What Claude Code does with a critical-path removal depends on your permission mode:
@@ -885,11 +717,7 @@
If an explicit [ask rule](</docs/en/permissions#manage-permissions>) matches the command, Claude Code asks you instead, even in `auto` mode and without a time limit. In modes that ask, a [`PermissionRequest` hook](</docs/en/hooks#permissionrequest>) can answer the prompt. To run these removals with no prompt in `bypassPermissions` mode, see Turn off the critical-path removal prompt.
-###
-
-
-
-Time limits and denials in auto and bypassPermissions modes
+### Time limits and denials in auto and bypassPermissions modes
In `auto` and `bypassPermissions` modes, the terminal prompt for a critical-path removal shows a two-minute countdown:
@@ -918,11 +746,7 @@
]
}
-###
-
-
-
-Turn off the critical-path removal prompt in bypassPermissions mode
+### Turn off the critical-path removal prompt in bypassPermissions mode
To run Bash `rm` and `rmdir` commands that target critical paths with no prompt in `bypassPermissions` mode, start Claude Code with [`CLAUDE_CODE_EVEN_MORE_DANGEROUSLY_SKIP_PERMISSIONS=1`](</docs/en/env-vars#variables>) in its environment. This requires Claude Code v2.1.311 or later. Claude Code reads the variable from the launch environment only and [ignores it in a settings file’s `env` block](</docs/en/settings-reference#variables-claude-code-ignores-in-env>). For example, set it in [your shell](</docs/en/env-vars#set-variables-in-your-shell>) and start `claude` from there:
@@ -945,11 +769,7 @@
Removals run with no prompt only in `bypassPermissions` mode itself, not in plan mode, and only for what the critical-path check flags in the Bash and [Monitor](</docs/en/tools-reference#monitor-tool>) tools. That includes commands Claude Code can’t fully parse, which also run with no prompt.
-####
-
-
-
-Startup notices about the critical-path removal prompt
+#### Startup notices about the critical-path removal prompt
To check whether `CLAUDE_CODE_EVEN_MORE_DANGEROUSLY_SKIP_PERMISSIONS` is working, read the line Claude Code prints at startup. In a `-p` run, it’s on stderr. In an Agent SDK app, pass the [`stderr` option](</docs/en/agent-sdk/typescript#options>) to read it. The line says one of these:
@@ -959,11 +779,7 @@
A missing line doesn’t mean the prompt is on: an Agent SDK app with no `stderr` option sees no line, and removals can still run with no prompt. Otherwise, check that you set the variable in the launch environment, that the session can enter `bypassPermissions` mode, and that `claude` isn’t inside another session. Some sessions start without the variable. If you see one of these lines and didn’t set the variable, find where it’s set, such as your shell profile, and remove it.
-####
-
-
-
-Why the critical-path removal prompt stays on
+#### Why the critical-path removal prompt stays on
If `CLAUDE_CODE_EVEN_MORE_DANGEROUSLY_SKIP_PERMISSIONS` has no effect and removals keep their usual prompt or denial, check for causes such as these:
@@ -977,11 +793,7 @@
* **Managed settings can’t be read** : Claude Code hasn’t successfully read your [managed settings](</docs/en/managed-settings>) sources. If server-managed settings keep failing to load, see [Remote managed settings failed to load](</docs/en/errors#remote-managed-settings-failed-to-load>). For any other failure that isn’t a registry query, ask whoever manages that source to fix it
* **The Windows registry can’t be queried** : on Windows and in WSL, the variable needs an answer from the registry, even when [WSL doesn’t use it for settings](</docs/en/settings-reference#wslinheritswindowssettings>). The query can fail all session on a non-English Windows, in WSL with interop off, or in a container on a WSL2 kernel. If interop is off, turn it on. Otherwise, run those removals yourself
-###
-
-
-
-Remove-Item in PowerShell
+### Remove-Item in PowerShell
When you enable the [PowerShell tool](</docs/en/tools-reference#powershell-tool>), Claude Code gives `Remove-Item` and the `cmd` built-ins `rd`, `rmdir`, `del`, and `erase` their own checks, separate from the `rm` critical-path list. For `Remove-Item`, the outcome depends on the target, and the first matching case applies:
@@ -991,11 +803,7 @@
The system-paths case also applies to `rd`, `rmdir`, `del`, and `erase` when Claude runs them through `cmd`, as in `cmd /c rd /s /q C:\Users`. By default, Claude Code denies such a command in every mode, without asking you. This `cmd` check requires Claude Code v2.1.283 or later. When judging a `cmd` target, Claude Code treats a PowerShell variable that follows literal text as empty. That makes `cmd /c rd /s /q "C:\$name"` a removal of `C:\`, so it is denied too. A trailing wildcard counts as the folder it empties, so `cmd /c del /q C:\*` is denied and `cmd /c del /q dist\*` in your project is not. To turn the `cmd` check off, set [`CLAUDE_CODE_DISABLE_POWERSHELL_CMD_RM_DENY=1`](</docs/en/env-vars#variables>) in the environment that launches Claude Code. Claude Code ignores this variable in a settings file’s `env` block. `Remove-Item` on a system path stays denied either way.
-##
-
-
-
-See also
+## See also
* [Permissions](</docs/en/permissions>): allow, ask, and deny rules; managed policies
* [Configure auto mode](</docs/en/auto-mode-config>): tell the classifier which infrastructure your organization trusts
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -446,7 +446,7 @@
* Opening a pull request against a different repository or organization, forking with `gh repo fork`, or pushing to a third-party repository, unless you named that external target
* Content from a sensitive local store, or from a file whose name, path, or type marks it as sensitive, entering a commit, a push, PR or issue text, a gist or paste, or a package publish, unless you named both the source and the destination. Session transcripts and conversation logs, credential and configuration dot-folders such as SSH keys, cloud credentials, browser profiles, and shell history, and user-data exports all count, and the repository being private doesn’t clear it
* Writing to Claude Code session transcripts, the `.jsonl` history files under `~/.claude/projects/` or your configured config directory, whether directly or through a shell command. The rule also covers the metadata lines Claude Code appends to each transcript entry for its own checks. Reading a transcript isn’t blocked
- * A recursive forced delete such as `rm -rf "$VAR"` or `Remove-Item -Recurse -Force $dir` whose target is a shell variable that isn’t assigned anywhere in the conversation the classifier sees, or a glob rooted at such a variable. The value came only from earlier command output, which the classifier never receives, so the classifier can’t verify the deletion target against the other deletion rules. The block clears when you name the exact path being deleted, or when Claude re-runs the delete with the resolved literal path written into the command. Deletes whose target the classifier can resolve aren’t affected. A glob directly under the variable, as in `rm -rf "$VAR"/*`, is a critical path instead. `Remove-Item` targets that are a bare `*` or end in `/*` or `\*` never reach the classifier: Claude Code denies them outright.
+ * A recursive forced delete such as `rm -rf "$VAR"` or `Remove-Item -Recurse -Force $dir` whose target is a shell variable that isn’t assigned in the conversation the classifier sees, or a glob rooted at such a variable. Without that assignment, the classifier can’t tell what the command would delete. The block clears when you name the exact path being deleted, or when Claude re-runs the delete with the resolved literal path written into the command. Deletes whose target the classifier can resolve aren’t affected. A glob directly under the variable, as in `rm -rf "$VAR"/*`, is a critical path instead. For a `Remove-Item` target that is a bare `*` or ends in `/*` or `\*`, see Remove-Item in PowerShell: Claude Code denies that command outright.
Several of these categories depend on [environment](</docs/en/auto-mode-config#define-trusted-infrastructure>) entries, such as sensitive remote targets and protected IaC scopes, that you can narrow to concrete names. Claude Code v2.1.257 and later also block these by default:
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -17,7 +17,7 @@
`dontAsk`| File reads inside your working directories and pre-approved tools; anything that would prompt is denied, though a [mod](</docs/en/plugins/mods/overview>) you installed can still approve some of those calls| Locked-down CI and scripts
`bypassPermissions`| Everything| Isolated containers and VMs only
-The mode that reviews every action is named **Manual** in the CLI, in `claude --help`, in the VS Code and JetBrains extensions, and in the desktop app. Its config value is `default`, which is what hooks and SDK integrations use. The CLI accepts `manual` as an alias wherever you type the value, for example `claude --permission-mode manual` or `"defaultMode": "manual"`. Writes to protected paths are never auto-approved except in `bypassPermissions` mode and in plan-mode sessions where bypass permissions are available, meaning interactive terminal sessions started in a way that puts `bypassPermissions` in the mode cycle. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. Deny rules block in every mode, including `bypassPermissions`. Deny and ask rules don’t apply to [`EndConversation`](</docs/en/tools-reference#endconversation-tool-behavior>) as long as Claude still has at least one other tool it can call. Allow rules have no effect in `bypassPermissions`.
+The mode that reviews every action is named **Manual** in the CLI, in `claude --help`, in the VS Code and JetBrains extensions, and in the desktop app. Its config value is `default`, which is what hooks and SDK integrations use. The CLI accepts `manual` as an alias wherever you type the value, for example `claude --permission-mode manual` or `"defaultMode": "manual"`. Each mode has its own rule for writes to protected paths. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. Deny rules block in every mode, including `bypassPermissions`. Deny and ask rules don’t apply to [`EndConversation`](</docs/en/tools-reference#endconversation-tool-behavior>) as long as Claude still has at least one other tool it can call. Allow rules have no effect in `bypassPermissions`.
###
@@ -618,7 +618,7 @@
* **If you accept** : Claude Code sets `skipDangerousModePermissionPrompt` to `true` in `~/.claude/settings.json`, so later sessions skip the dialog. To see the dialog again, remove the key from that file or set it to `false`. The [`skipDangerousModePermissionPrompt` reference](</docs/en/settings-reference#skipdangerousmodepermissionprompt>) lists the other settings files where you or your organization can set it.
* **If you decline** : Claude Code exits.
-In [non-interactive mode](</docs/en/headless>) no dialog is shown. A [background session](</docs/en/agent-view>) honors your acceptance when it’s recorded in user or managed settings:
+If you pass [`--setting-sources`](</docs/en/cli-reference#cli-flags>) without `user`, the dialog can appear again although you accepted it earlier. To skip it, add `user`, as in `--setting-sources user,project`. In [non-interactive mode](</docs/en/headless>) no dialog is shown. A [background session](</docs/en/agent-view>) honors your acceptance when it’s recorded in user or managed settings:
* With no acceptance recorded, `claude --bg --permission-mode bypassPermissions` is refused. Accept the dialog in an interactive session first.
* With `skipDangerousModePermissionPrompt` set only in `.claude/settings.local.json`, the background session starts with the bypass request ignored:
@@ -660,13 +660,13 @@
Protected paths
-Writes to a small set of paths are never auto-approved, except in `bypassPermissions` mode and in interactive terminal sessions in plan mode with bypass permissions available. This prevents accidental corruption of repository state and Claude’s own configuration.
+A small set of paths holds repository state and Claude’s own configuration, so each mode has its own rule for writes to them:
Mode| Protected-path writes
---|---
`default`, `acceptEdits`| Prompted
`plan`| Allowed in interactive terminal sessions with bypass permissions available. Otherwise, routed to the classifier when auto mode is available during planning, and prompted when it isn’t
-`auto`| Routed to the classifier
+`auto`| Routed to the classifier, which decides
`dontAsk`| Denied
`bypassPermissions`| Allowed
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -151,8 +151,6 @@
* **Remove auto mode** : set [`permissions.disableAutoMode`](</docs/en/settings-reference#disableautomode>) to `"disable"` in managed settings
* **Block`bypassPermissions`**: set [`permissions.disableBypassPermissionsMode`](</docs/en/settings-reference#permissions-disablebypasspermissionsmode>) to `"disable"` in managed settings
-Requires Claude Code v2.1.285 or later, the [minimum version for the HIPAA configuration](</docs/en/hipaa-setup#update-claude-code-and-claude-desktop>).
-
##
@@ -393,13 +391,13 @@
claude --permission-mode auto --debug-file classifier-debug.log
-Have Claude run a shell command that isn’t read-only, then search the log for `classifier_request_started`:
+To give the classifier a command to review, have Claude run `curl https://example.com`, then search the log for `classifier_request_started`:
* **Your model after`model=`**: the variable took effect
* **A different model after`model=`**: search the log for `ignoring CLAUDE_CODE_AUTO_MODE_MODEL`, which gives the reason and any step to take
* **No such line** : read `Auto mode server` in `/status` at the Claude Code prompt:
* **`Enabled`** : the server is set to review this session’s calls.
- * **`Disabled`** : make sure the permission mode is auto, then have Claude run another command that isn’t read-only.
+ * **`Disabled`** : this check hasn’t tested your model yet. Make sure the permission mode is auto and no [permission rule](</docs/en/permissions#manage-permissions>) matches `curl`, then run the check again with the [sandbox](</docs/en/sandboxing>) off.
###
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -215,7 +215,7 @@
On [claude.ai/code](<https://claude.ai/code>), use the mode dropdown in the row under the prompt box. In the mobile app, tap the **+** button in the prompt box, then **Permission**. Cloud sessions and Remote Control sessions offer different permission modes:
- * **[Cloud sessions](</docs/en/claude-code-on-the-web>)** : Accept edits, Plan, and Auto. Accept edits corresponds to `default` mode: cloud sessions pre-approve file edits regardless of mode, so the dropdown shows Accept edits instead of Manual. Cloud sessions still honor `defaultMode: "acceptEdits"` from settings. Auto mode appears only when your organization allows it and the selected model supports it. Bypass permissions isn’t available.
+ * **[Cloud sessions](</docs/en/claude-code-on-the-web>)** : Accept edits, Plan, and Auto. Accept edits corresponds to `default` mode: cloud sessions pre-approve file edits regardless of mode, so the dropdown shows Accept edits instead of Manual. Cloud sessions still honor `defaultMode: "acceptEdits"` from settings. Auto mode appears unless your organization turns it off, and on claude.ai/code it’s grayed out if the selected model doesn’t support it. Bypass permissions isn’t available.
* **[Remote Control](</docs/en/remote-control>) sessions** on your local machine: Manual, Accept edits, Plan, and Auto for a session you started yourself, and you can’t select Bypass permissions from the app. To use Auto, the session has to meet the auto mode availability requirements. For a project thread running on your computer, see [Run a thread on your own computer](</docs/en/claude-projects#run-a-thread-on-your-own-computer>).
* Except for Bypass permissions, the dropdown shows the permission mode the local session is in, including one set from the terminal. It updates when the permission mode changes in the app or in the terminal.
* Sessions hosted by the [desktop app](</docs/en/desktop>) or the [VS Code extension](</docs/en/vs-code>) report permission mode changes to claude.ai as they happen, the same as sessions hosted in a terminal.
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -211,7 +211,7 @@
* **Auto** : appears when auto mode is available
* **Bypass permissions** : requires the **Allow bypass permissions mode** toggle in Desktop settings on Pro, Max, and Ultra plans; on Team and Enterprise plans, organization policy controls it instead
-Cowork doesn’t use these modes. It has its own permission modes, enabled separately, and shows no mode selector at all until a mode beyond its default is enabled for your account. See the [Cowork docs](<https://claude.com/docs/cowork/overview>).For desktop-specific details, see [Choose a permission mode](</docs/en/desktop#choose-a-permission-mode>) in the Desktop guide.**As a default** : set `defaultMode` in [settings](</docs/en/settings#where-settings-live>). The desktop app reads the same settings files as the CLI and applies the permission mode to new local sessions.A mode you pick in the mode selector is remembered per folder and takes precedence over `defaultMode` for that folder. Plan is the exception: picking it applies to the current session only.For where `defaultMode` goes in a settings file, see the example under Start in a different permission mode.
+Cowork doesn’t use these modes. It has its own permission modes, enabled separately, and shows no mode selector at all until a mode beyond its default is enabled for your account. See the [Cowork docs](<https://claude.com/docs/cowork/overview>).For desktop-specific details, see [Choose a permission mode](</docs/en/desktop#choose-a-permission-mode>) in the Desktop guide.**As a default** : set `defaultMode` in [settings](</docs/en/settings#where-settings-live>). The desktop app reads the same settings files as the CLI and applies the permission mode to new local sessions.A mode you pick in the mode selector in a local session is remembered per folder and outranks a `defaultMode` in the project’s `.claude/` settings. A new local session can still start in a `defaultMode` from `~/.claude/settings.json` or managed settings, so check the selector before your first message. If you pick Plan, it applies to this session only.For where `defaultMode` goes in a settings file, see the example under Start in a different permission mode.
On [claude.ai/code](<https://claude.ai/code>), use the mode dropdown in the row under the prompt box. In the mobile app, tap the **+** button in the prompt box, then **Permission**. Cloud sessions and Remote Control sessions offer different permission modes:
@@ -324,7 +324,8 @@
* **A direct connection to the Anthropic API** : in interactive terminal sessions and in `-p`, Agent SDK, [VS Code extension](</docs/en/vs-code>), and [desktop app](</docs/en/desktop>) sessions, whatever your plan or account type, as Anthropic rolls it out. Check your session type against these minimum Claude Code versions:
* In interactive terminal sessions, asking the server requires Claude Code v2.1.271 or later on Pro, Max, Ultra, and Team plans. On Enterprise plans and Claude API accounts, those sessions require v2.1.278 or later.
- * In `-p`, Agent SDK, VS Code extension, and desktop app sessions, asking the server requires Claude Code v2.1.281 or later
+ * In `-p` and VS Code extension sessions, asking the server requires Claude Code v2.1.278 or later
+ * In Agent SDK and desktop app sessions, asking the server requires Claude Code v2.1.281 or later
* From v2.1.282, a session that [doesn’t fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), for example because you turned telemetry off, asks the server by default in any kind of session
* **A cloud provider, or an LLM gateway or proxy** : on [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry, and whenever you point `ANTHROPIC_BASE_URL` at an [LLM gateway or proxy](</docs/en/llm-gateway>), whatever your plan. Asking by default requires Claude Code v2.1.278 or later.
* **A signed-in[Claude apps gateway](</docs/en/claude-apps-gateway>) session**: requires Claude Code v2.1.280 or later
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -333,7 +333,7 @@
Where the server reviews the actions, its verdicts decide them. Two other outcomes are possible:
* **The server doesn’t review the session** : a response completes with no review results, or the server answers that it doesn’t review this session. The most common causes are an LLM gateway or proxy that drops the request for review or the results, and a platform, region, or credential that doesn’t have server-side checks yet. Claude Code falls back to its own classifier requests. Once that fallback holds for the rest of the session, it shows a [notice about classifier request charges](</docs/en/auto-mode-classifier-billing>) on accounts where those requests are billed.
- * **The server gives no verdict for an action** : Claude Code denies the action rather than run it unreviewed. On any connection, this happens when the response ends before the review results arrive or the results arrive in a form Claude Code can’t read. An LLM gateway or proxy that cuts responses short or rewrites the results can cause either. On a direct connection to the Anthropic API, it also happens when the server’s check fails for the action, for example by timing out. [The server returned no safety verdict](</docs/en/errors#the-server-returned-no-safety-verdict>) covers the denial message, what happens when denials repeat, and what to do.
+ * **The server gives no verdict for an action** : Claude Code denies the action rather than run it unreviewed. On any connection, this happens when the response ends before the review results arrive or the results arrive in a form Claude Code can’t read. An LLM gateway or proxy that cuts responses short or rewrites the results can cause either. On a direct connection to the Anthropic API, it also happens when the server’s check fails for the action, for example by timing out. [The server returned no safety verdict](</docs/en/errors#the-server-returned-no-safety-verdict>) covers the denial message, what happens when denials repeat, and what to do. If a [hook](</docs/en/hooks#pretooluse-updatedinput-in-auto-mode>) or [mod](</docs/en/plugins/mods/overview>) changes an action’s input after the server’s review, Claude Code can deny the action with no verdict. In interactive terminal and VS Code sessions on a direct connection to the Anthropic API, the denial’s text includes `a hook changed this call's input after auto mode reviewed it`. [Its error entry](</docs/en/errors#hook-changed-input-after-review>) covers what to do.
To skip asking the server and always use Claude Code’s own classifier requests, set [`CLAUDE_CODE_AUTO_MODE_SERVER=0`](</docs/en/env-vars>). On a direct connection to the Anthropic API, the variable requires Claude Code v2.1.281 or later. Setting it to `1` there turns server review on in a session that doesn’t have it yet, unless you’ve also set `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1`. If you set `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1` and leave `CLAUDE_CODE_AUTO_MODE_SERVER` unset, Claude Code also stops asking the server, except as [Disable pre-release capabilities](</docs/en/llm-gateway-protocol#disable-pre-release-capabilities>) describes.
@@ -519,7 +519,7 @@
* **A blocked action** : Claude Code shows a notification and lists the action in `/permissions` under the **Recently blocked** tab, where you can [approve the action so Claude may retry](</docs/en/auto-mode-config#review-denials>).
* **Repeated blocks** : if the classifier blocks an action 3 times in a row or 20 times total, auto mode pauses and Claude Code resumes prompting. Approving the prompted action resumes auto mode. See Repeated-block thresholds for how the blocks are counted.
* **No verdict from the classifier** : when a safety check separate from auto mode refuses the classifier’s own request, or the classifier’s response doesn’t parse, Claude Code blocks the action without the notification or the **Recently blocked** entry. See [Auto mode cannot determine the safety of an action](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>) for the message each case shows and what to do.
- * **No verdict from the server** : under server-side classifier review, Claude Code denies an action the server gives no verdict for, and stops the turn after ten responses in a row with no verdict. See [The server returned no safety verdict](</docs/en/errors#the-server-returned-no-safety-verdict>).
+ * **No verdict from the server** : under server-side classifier review, Claude Code denies an action the server gives no verdict for, and can stop the turn after ten responses in a row with no verdict. See [The server returned no safety verdict](</docs/en/errors#the-server-returned-no-safety-verdict>).
* **A mode switch during a check** : if you switch permission modes while a classifier check is pending, Claude Code discards a verdict the new mode wouldn’t have requested. You’re prompted for approval instead, or the action is auto-denied in `dontAsk` mode.
####
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -484,7 +484,7 @@
While [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) is off, file reads other than [reads from network paths](</docs/en/permissions#network-paths>) run without a prompt in auto mode, including reads outside the [working directories](</docs/en/permissions#working-directories>). The first time Claude uses the Read, Grep, or Glob tool on a path outside them, Claude Code asks whether to allow that read. The prompt doesn’t appear in non-interactive `-p` runs or background sessions; reads there run as before. Whatever you answer, Claude keeps working:
* **Yes, and keep allowing any reads outside the working directories** : the read runs, later reads outside the working directories run as before, and Claude Code records your answer so the prompt doesn’t appear again
- * **No, and block reads outside the working directories from now on** : the read is refused, and Claude Code sets [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) to `true` in your user settings, which makes the file tools refuse such reads in every later session and every permission mode. To let Claude read such a path later, add its directory with `/add-dir` or remove the setting.
+ * **No, and block reads outside the working directories from now on** : the read is refused, and Claude Code sets [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) to `true` in your user settings, which makes the file tools refuse such reads in this and every later session and every permission mode. To lift the block, remove the setting from every [settings file](</docs/en/settings#settings-files-and-who-they-affect>) that sets it, then restart each running session. For one directory this session, use `/add-dir`.
* **No, and ask again next time** : the read is refused, and the next read outside the working directories prompts again
* **Yes, but ask again next time** : the read runs, nothing is saved, and the next read outside the working directories prompts again
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -33,6 +33,7 @@
* Recognized `rm` and `rmdir` critical-path removals, which no allow rule or `PreToolUse` hook `"allow"` approves, and Bash commands flagged `Dangerous rm operation not ruled out`
* The cross-session messaging safeguards
* Reads outside the working directories while [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) is on: recognized file-reading Bash commands prompt even in auto mode and `bypassPermissions` mode, and so does any [unsandboxed retry](</docs/en/sandboxing#the-unsandboxed-retry-escape-hatch>) that needs approval to run outside the sandbox. Requires Claude Code v2.1.257 or later. A command the shell parser can’t trace, such as one that changes directory more than once or runs a subshell, prompts the same way even when it names no outside path. This prompt doesn’t apply when the command runs in the [sandbox](</docs/en/sandboxing>) and the sandbox enforces the block.
+ * Writes outside the working directories while [`permissions.blockWritesOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockwritesoutsideworkingdirectories>) is on: Claude Code refuses `Write`, `Edit`, and `NotebookEdit` calls there, apart from [some of its own files](</docs/en/settings-reference#what-the-write-block-refuses-and-what-stays-writable>). The key doesn’t limit shell commands, MCP tools, or the programs hooks run, so use [sandboxing](</docs/en/sandboxing>) to limit where shell commands write. Requires Claude Code v2.1.314 or later.
##
@@ -515,9 +516,9 @@
When auto mode can’t approve your session’s actions, what happens depends on the case:
- * **A blocked action** : Claude Code shows a notification and lists the action in `/permissions` under the **Recently denied** tab, where you can press `r` to retry it with a manual approval.
+ * **A blocked action** : Claude Code shows a notification and lists the action in `/permissions` under the **Recently blocked** tab, where you can [approve the action so Claude may retry](</docs/en/auto-mode-config#review-denials>).
* **Repeated blocks** : if the classifier blocks an action 3 times in a row or 20 times total, auto mode pauses and Claude Code resumes prompting. Approving the prompted action resumes auto mode. See Repeated-block thresholds for how the blocks are counted.
- * **No verdict from the classifier** : when a safety check separate from auto mode refuses the classifier’s own request, or the classifier’s response doesn’t parse, Claude Code denies the action without the notification or the **Recently denied** entry. See [Auto mode cannot determine the safety of an action](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>) for the message each case shows and what to do.
+ * **No verdict from the classifier** : when a safety check separate from auto mode refuses the classifier’s own request, or the classifier’s response doesn’t parse, Claude Code blocks the action without the notification or the **Recently blocked** entry. See [Auto mode cannot determine the safety of an action](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>) for the message each case shows and what to do.
* **No verdict from the server** : under server-side classifier review, Claude Code denies an action the server gives no verdict for, and stops the turn after ten responses in a row with no verdict. See [The server returned no safety verdict](</docs/en/errors#the-server-returned-no-safety-verdict>).
* **A mode switch during a check** : if you switch permission modes while a classifier check is pending, Claude Code discards a verdict the new mode wouldn’t have requested. You’re prompted for approval instead, or the action is auto-denied in `dontAsk` mode.
@@ -670,7 +671,7 @@
`dontAsk`| Denied
`bypassPermissions`| Allowed
-In a session started with [`--restricted`](</docs/en/cli-reference#cli-flags>), which requires Claude Code v2.1.248 or later, the classifier can’t approve protected-path writes. In the modes that route protected-path writes to the classifier, a write that the [symlink check](</docs/en/permissions#symlinks>) resolves to a protected path prompts you instead when the path Claude requested isn’t itself protected. [`permissions.allow`](</docs/en/permissions#manage-permissions>) rules in settings files do not pre-approve protected-path writes. The safety check runs before Claude Code evaluates allow rules from settings, so an entry such as `Edit(.claude/**)` in `~/.claude/settings.json` or `.claude/settings.json` does not change the per-mode outcome in the table above. In permission modes that prompt, the prompt for a write to the project’s `.claude/` folder or to `~/.claude/` can offer one of these session-scoped options:
+In a session started with [`--restricted`](</docs/en/cli-reference#cli-flags>), which requires Claude Code v2.1.248 or later, the classifier can’t approve protected-path writes. While [`permissions.blockWritesOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockwritesoutsideworkingdirectories>) is on, Claude Code refuses `Write`, `Edit`, and `NotebookEdit` writes to settings files in every permission mode. In the modes that route protected-path writes to the classifier, a write that the [symlink check](</docs/en/permissions#symlinks>) resolves to a protected path prompts you instead when the path Claude requested isn’t itself protected. [`permissions.allow`](</docs/en/permissions#manage-permissions>) rules in settings files do not pre-approve protected-path writes. The safety check runs before Claude Code evaluates allow rules from settings, so an entry such as `Edit(.claude/**)` in `~/.claude/settings.json` or `.claude/settings.json` does not change the per-mode outcome in the table above. In permission modes that prompt, the prompt for a write to the project’s `.claude/` folder or to `~/.claude/` can offer one of these session-scoped options:
* For the project’s `.claude/` folder: **Yes, and allow Claude to edit files in this project’s .claude folder for this session**
* For `~/.claude/`: **Yes, and allow Claude to edit files in its ~/.claude folder for this session**
@@ -706,6 +707,7 @@
* `.devcontainer.json`
* `.ripgreprc`, `pyrightconfig.json`
* `.mcp.json`, `.claude.json`
+ * `remote-settings.json`, the stored copy of your organization’s [server-managed settings](</docs/en/server-managed-settings>), and the signature, sync, and consent files Claude Code keeps with it, in `~/.claude` or the directory [`CLAUDE_CONFIG_DIR`](</docs/en/env-vars>) points to
* A file you passed to [`--settings`](</docs/en/cli-reference#cli-flags>), `--mcp-config`, or `--agents` when you started the session
* The file that your user, project, or local [settings file](</docs/en/settings#settings-files-and-who-they-affect>) points to when the settings file is itself a symbolic link, for example into a dotfiles repository. In the modes that route protected-path writes to the classifier, a write to this file prompts you instead, even when an allow rule matches. If the file’s own path is also that of a settings file, such as `.claude/settings.json` in another folder, the write goes to the classifier as other protected-path writes do
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -1,4 +1,4 @@
-A permission mode sets which actions Claude can take in a session without asking you first. In Manual mode, Claude Code stops and asks you before most actions that edit files, run shell commands, or reach the network. In auto mode, a second model, the classifier, reviews actions instead of you; how the classifier evaluates actions lists which actions it reviews and which skip it. With Claude Code v2.1.283 or later, auto mode is the built-in starting permission mode for interactive terminal and VS Code sessions. On earlier versions, it’s the built-in starting permission mode only on Pro, Max, and Team plans. Which mode a session starts in covers the surfaces and settings that change the starting permission mode. You can also change a running session’s permission mode at any time.
+A permission mode sets which actions Claude can take in a session without asking you first. In Manual mode, Claude Code stops and asks you before most actions that edit files, run shell commands, or reach the network. In auto mode, a second model, the classifier, reviews actions instead of you; how the classifier evaluates actions lists which actions it reviews and which skip it. With Claude Code v2.1.283 or later, auto mode is the built-in starting permission mode for interactive terminal and VS Code sessions. On earlier versions, it’s the built-in starting permission mode only on Pro, Max, Ultra, and Team plans. Which mode a session starts in covers the surfaces and settings that change the starting permission mode. You can also change a running session’s permission mode at any time.
##
@@ -72,14 +72,14 @@
Any settings file sets `disableAutoMode` to `"disable"`| `default`
`claude -p` or the [Agent SDK](</docs/en/agent-sdk/permissions#permission-modes>)| `default`
Your organization has the HIPAA configuration applied and the session is [eligible for it](</docs/en/hipaa-setup#check-how-developers-sign-in-and-connect>)| `default` with Claude Code v2.1.285 or later; auto mode stays available to switch to
-In a terminal or through the [VS Code extension](</docs/en/vs-code>)| `auto` with Claude Code v2.1.283 or later; on earlier versions, `auto` on Pro, Max, or Team plans in sessions that [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), and `default` otherwise
+In a terminal or through the [VS Code extension](</docs/en/vs-code>)| `auto` with Claude Code v2.1.283 or later; on earlier versions, `auto` on Pro, Max, Ultra, or Team plans in sessions that [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), and `default` otherwise
When the flag, a settings file, or the built-in default selects `auto` but auto mode isn’t available to the session, Claude Code starts the session in Manual instead. Auto mode is unavailable when the session doesn’t meet the availability requirements, such as a settings file turning it off or a model that doesn’t support it, or when Anthropic has temporarily turned it off server-side. The first time the built-in default starts one of your sessions in auto mode, Claude Code shows a notice that links to this page:
* In a terminal, once, at the top of the session
* In the VS Code extension, as a card on the new-conversation screen that stays until you dismiss it
-If your `~/.claude/settings.json` sets a `defaultMode` other than `auto` and no other settings file sets one, your sessions keep starting in that mode. On Pro, Max, and Team plans, and in sessions that [don’t fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), Claude Code asks once, in the terminal or in the VS Code extension, whether to change the setting to auto mode. If you decline, your setting stays as it is.
+If your `~/.claude/settings.json` sets a `defaultMode` other than `auto` and no other settings file sets one, your sessions keep starting in that mode. On Pro, Max, Ultra, and Team plans, and in sessions that [don’t fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), Claude Code asks once whether to change the setting to auto mode. The question appears in the terminal or in the VS Code extension, and if you decline, your setting stays as it is.
###
@@ -201,14 +201,14 @@
3. `permissions.defaultMode` from [managed settings](</docs/en/managed-settings>) or `~/.claude/settings.json`
4. The built-in default for your plan, provider, and organization settings
-The extension never reads a project’s `.claude/settings.json` or `.claude/settings.local.json` for the starting permission mode. When `claudeCode.claudeProcessWrapper` is set, items 3 and 4 don’t apply: those conversations start in Manual unless item 1 or item 2 sets a permission mode.Before v2.1.283, item 3 applied only on Pro, Max, and Team plans in sessions that [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>).Auto appears in the mode indicator when auto mode is available.Bypass permissions requires the **Allow dangerously skip permissions** toggle in the extension settings. Without it, the permission mode doesn’t appear in the indicator, and a `bypassPermissions` value from item 1 or item 3 starts the conversation in Manual instead. Auto from any item likewise starts the conversation in Manual when auto mode isn’t available.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
+The extension never reads a project’s `.claude/settings.json` or `.claude/settings.local.json` for the starting permission mode. When `claudeCode.claudeProcessWrapper` is set, items 3 and 4 don’t apply: those conversations start in Manual unless item 1 or item 2 sets a permission mode.Before v2.1.283, item 3 applied only on Pro, Max, Ultra, and Team plans in sessions that [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>).Auto appears in the mode indicator when auto mode is available.Bypass permissions requires the **Allow dangerously skip permissions** toggle in the extension settings. Without it, the permission mode doesn’t appear in the indicator, and a `bypassPermissions` value from item 1 or item 3 starts the conversation in Manual instead. Auto from any item likewise starts the conversation in Manual when auto mode isn’t available.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
The JetBrains plugin runs Claude Code in the IDE terminal, so switching permission modes works the same as in the CLI: press `Shift+Tab` to cycle, or pass `--permission-mode` when launching.
**During a session** : in the Code tab, use the mode selector in the row under the prompt box. Not every mode appears in the selector:
* **Auto** : appears when auto mode is available
- * **Bypass permissions** : requires the **Allow bypass permissions mode** toggle in Desktop settings on Pro and Max plans; on Team and Enterprise plans, organization policy controls it instead
+ * **Bypass permissions** : requires the **Allow bypass permissions mode** toggle in Desktop settings on Pro, Max, and Ultra plans; on Team and Enterprise plans, organization policy controls it instead
Cowork doesn’t use these modes. It has its own permission modes, enabled separately, and shows no mode selector at all until a mode beyond its default is enabled for your account. See the [Cowork docs](<https://claude.com/docs/cowork/overview>).For desktop-specific details, see [Choose a permission mode](</docs/en/desktop#choose-a-permission-mode>) in the Desktop guide.**As a default** : set `defaultMode` in [settings](</docs/en/settings#where-settings-live>). The desktop app reads the same settings files as the CLI and applies the permission mode to new local sessions.A mode you pick in the mode selector is remembered per folder and takes precedence over `defaultMode` for that folder. Plan is the exception: picking it applies to the current session only.For where `defaultMode` goes in a settings file, see the example under Start in a different permission mode.
@@ -287,7 +287,7 @@
Eliminate permission prompts with auto mode
-Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt. With Claude Code v2.1.283 or later, auto mode is the built-in starting permission mode for interactive terminal and VS Code sessions on every plan and provider. On earlier versions, it’s the built-in starting permission mode only on Pro, Max, and Team plans. The classifier also reviews each message Claude sends to another agent with [`SendMessage`](</docs/en/tools-reference>), whether plain text or a structured [agent team](</docs/en/agent-teams>) message, before Claude Code delivers it, both in auto mode and in plan mode while the classifier reviews commands; the send review requires Claude Code v2.1.222 or later. By default, the classifier doesn’t review recognized `rm` and `rmdir` critical-path removals, such as `rm -rf /` or `rm -rf ~`. Critical paths covers what happens to them in each permission mode. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior in a mode that still prompts you, set the [Proactive output style](</docs/en/output-styles>) instead.
+Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt. With Claude Code v2.1.283 or later, auto mode is the built-in starting permission mode for interactive terminal and VS Code sessions on every plan and provider. On earlier versions, it’s the built-in starting permission mode only on Pro, Max, Ultra, and Team plans. The classifier also reviews each message Claude sends to another agent with [`SendMessage`](</docs/en/tools-reference>), whether plain text or a structured [agent team](</docs/en/agent-teams>) message, before Claude Code delivers it, both in auto mode and in plan mode while the classifier reviews commands; the send review requires Claude Code v2.1.222 or later. By default, the classifier doesn’t review recognized `rm` and `rmdir` critical-path removals, such as `rm -rf /` or `rm -rf ~`. Critical paths covers what happens to them in each permission mode. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior in a mode that still prompts you, set the [Proactive output style](</docs/en/output-styles>) instead.
Auto mode reduces permission prompts but does not guarantee safety. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations.
@@ -321,7 +321,10 @@
In auto mode, Claude Code can ask the server to check the actions that the decision order sends for review, as part of the session’s model requests, in place of sending its own classifier requests. These sessions ask:
- * **A direct connection to the Anthropic API** : in interactive terminal sessions and in `-p`, Agent SDK, [VS Code extension](</docs/en/vs-code>), and [desktop app](</docs/en/desktop>) sessions, whatever your plan or account type, as Anthropic rolls it out. In interactive terminal sessions, this requires Claude Code v2.1.271 or later on Pro, Max, and Team plans, and v2.1.278 or later on Enterprise plans and Claude API accounts. In `-p`, Agent SDK, VS Code extension, and desktop app sessions, this requires Claude Code v2.1.281 or later. From v2.1.282, a session that [doesn’t fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), for example because you turned telemetry off, asks the server by default in any kind of session.
+ * **A direct connection to the Anthropic API** : in interactive terminal sessions and in `-p`, Agent SDK, [VS Code extension](</docs/en/vs-code>), and [desktop app](</docs/en/desktop>) sessions, whatever your plan or account type, as Anthropic rolls it out. Check your session type against these minimum Claude Code versions:
+ * In interactive terminal sessions, asking the server requires Claude Code v2.1.271 or later on Pro, Max, Ultra, and Team plans. On Enterprise plans and Claude API accounts, those sessions require v2.1.278 or later.
+ * In `-p`, Agent SDK, VS Code extension, and desktop app sessions, asking the server requires Claude Code v2.1.281 or later
+ * From v2.1.282, a session that [doesn’t fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), for example because you turned telemetry off, asks the server by default in any kind of session
* **A cloud provider, or an LLM gateway or proxy** : on [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry, and whenever you point `ANTHROPIC_BASE_URL` at an [LLM gateway or proxy](</docs/en/llm-gateway>), whatever your plan. Asking by default requires Claude Code v2.1.278 or later.
* **A signed-in[Claude apps gateway](</docs/en/claude-apps-gateway>) session**: requires Claude Code v2.1.280 or later
* **A[cloud session](</docs/en/claude-code-on-the-web>) in an Anthropic-hosted environment**: whatever your plan, when you start it from the web, the mobile app, or the desktop app with **Cloud** selected. Sessions started by a [cloud scheduled task](</docs/en/routines>) ask the server as Anthropic rolls it out.
Show diff (122 lines)
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -25,7 +25,7 @@
Actions no mode auto-approves
-Claude Code doesn’t auto-approve the following in any mode, including `bypassPermissions`. Each bullet links to the section that says what happens instead in each mode:
+Claude Code doesn’t auto-approve the following in any mode, including `bypassPermissions`, though you can turn off the prompt for dangerous `rm` commands in `bypassPermissions` mode. Each bullet links to the section that says what happens instead in each mode:
* Tools matched by an explicit [ask rule](</docs/en/permissions#manage-permissions>)
* Connector tools your organization [set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>), in sessions where that setting reaches Claude Code
@@ -462,7 +462,7 @@
* Installing dependencies declared in your lock files or manifests
* Reading `.env` and sending credentials to their matching API
* Read-only HTTP requests
- * Pushing to any branch of the repository you’re working in, including the default branch. A non-default branch whose name marks it as a deploy or publication target, such as `production` or `gh-pages`, isn’t covered: the classifier judges a push there on its own terms. A push’s content is still checked against the classifier’s other rules, and [`permissions.deny` rules](</docs/en/permissions#manage-permissions>) can still block push commands [as written](</docs/en/permissions#bash-rule-limits>) in every mode. The remote’s own branch protection still applies. From v2.1.203 until v2.1.211, only routine default-branch pushes and pushes to the branch you started on or to branches Claude created were allowed by default.
+ * Pushing to any branch of the repository you’re working in, including the default branch. A non-default branch whose name marks it as a deploy or publication target, such as `production` or `gh-pages`, isn’t covered: the classifier judges a push there on its own terms. A push’s content is still checked against the classifier’s other rules, and [`permissions.deny` rules](</docs/en/permissions#manage-permissions>) can still block push commands [as written](</docs/en/permissions#bash-rule-limits>) in every mode. The remote’s own branch protection still applies.
* Deleting the exact jobs Claude created earlier in the same session
* Reading, reviewing, or writing security-related code, configs, and threat models as part of your task
* Messages between agents working together in the same multi-agent session
@@ -597,7 +597,7 @@
Skip all checks with bypassPermissions mode
-`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. Even in `bypassPermissions` mode, each of the actions no mode auto-approves gets a prompt or a denial instead of running on its own. Reading [another organization’s public artifact](</docs/en/artifacts#read-an-artifact-shared-with-you>) needs your approval, and this mode doesn’t ask for it, so Claude can’t read one. The Remove-Item in PowerShell denies also apply in this mode. Two [cross-session messaging](</docs/en/cross-session-messaging>) safeguards still apply in this mode, and in interactive terminal plan-mode sessions where bypass permissions are available:
+`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. Even in `bypassPermissions` mode, each of the actions no mode auto-approves gets a prompt or a denial, though you can turn off the prompt for dangerous `rm` commands. Reading [another organization’s public artifact](</docs/en/artifacts#read-an-artifact-shared-with-you>) needs your approval, and this mode doesn’t ask for it, so Claude can’t read one. The Remove-Item in PowerShell denies also apply in this mode. Two [cross-session messaging](</docs/en/cross-session-messaging>) safeguards still apply in this mode, and in interactive terminal plan-mode sessions where bypass permissions are available:
* The [`isolatePeerMachines`](</docs/en/settings-reference#isolatepeermachines>) approval prompt for messages to your sessions beyond this machine still appears.
* When no [`crossSessionInbound`](</docs/en/cross-session-messaging#control-inbound-messages>) value applies, Claude Code holds an inbound message from another of your sessions for your approval, and delivers without asking only when the sending session identifies itself as also bypassing permission prompts. If you leave the permission mode while messages are held, Claude Code re-applies the inbound rules and delivers any held message they now accept.
@@ -807,7 +807,7 @@
This command could not be checked for dangerous rm operations: the shell may read it differently than it was parsed.
-You get the prompt or denial a critical-path removal gets in your permission mode, `bypassPermissions` included. You can’t approve the command with a `Bash` or `Bash(*)` allow rule, sandbox [auto-allow mode](</docs/en/sandboxing#auto-allow-mode>), or a `PreToolUse` hook returning `"allow"`. Read the command, then approve the prompt or, after a denial, run it in your shell.
+You get the prompt or denial a critical-path removal gets in your permission mode, `bypassPermissions` included, though you can turn off that prompt in `bypassPermissions` mode. You can’t approve the command with a `Bash` or `Bash(*)` allow rule, sandbox [auto-allow mode](</docs/en/sandboxing#auto-allow-mode>), or a `PreToolUse` hook returning `"allow"`. Read the command, then approve the prompt or, after a denial, run it in your shell.
###
@@ -879,7 +879,7 @@
`dontAsk`| Denies it
`bypassPermissions`| In the terminal, asks you to approve it before a time limit runs out. Elsewhere, see what happens in each place
-If an explicit [ask rule](</docs/en/permissions#manage-permissions>) matches the command, Claude Code asks you instead, even in `auto` mode and without a time limit. In modes that ask, a [`PermissionRequest` hook](</docs/en/hooks#permissionrequest>) can answer the prompt.
+If an explicit [ask rule](</docs/en/permissions#manage-permissions>) matches the command, Claude Code asks you instead, even in `auto` mode and without a time limit. In modes that ask, a [`PermissionRequest` hook](</docs/en/hooks#permissionrequest>) can answer the prompt. To run these removals with no prompt in `bypassPermissions` mode, see Turn off the critical-path removal prompt.
###
@@ -899,7 +899,7 @@
---|---|---
[VS Code extension](</docs/en/vs-code>)’s chat panel| Denies it| Denies it unless a [`PermissionRequest` hook](</docs/en/hooks#permissionrequest>) allows it
[Desktop app](</docs/en/desktop>)| Denies it| Denies it unless a `PermissionRequest` hook allows it
-[`-p` run](</docs/en/headless>) or [Agent SDK session](</docs/en/agent-sdk/permissions>)| Denies it| Your [`--permission-prompt-tool`](</docs/en/cli-reference#cli-flags>) or [`canUseTool` callback](</docs/en/agent-sdk/user-input#handle-tool-approval-requests>) decides. With neither, or under [`--permission-prompts none`](</docs/en/headless#turn-off-permission-prompts-in-unattended-runs>), denies it unless a `PermissionRequest` hook allows it
+[`-p` run](</docs/en/headless>) or [Agent SDK session](</docs/en/agent-sdk/permissions>)| Denies it| Your [`--permission-prompt-tool`](</docs/en/cli-reference#cli-flags>) or [`canUseTool` callback](</docs/en/agent-sdk/user-input#handle-tool-approval-requests>) decides. With neither, or under [`--permission-prompts none`](</docs/en/headless#turn-off-permission-prompts-in-unattended-runs>), denies it unless a `PermissionRequest` hook allows it. To run these removals with no prompt instead, see Turn off the critical-path removal prompt
Wherever the removal is denied, you can read the whole command and run it in your shell. To change what you get in each mode, set [`CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUT`](</docs/en/env-vars#variables>) to `1`:
@@ -913,6 +913,65 @@
{ "name": "CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUT", "value": "1" }
]
}
+
+###
+
+
+
+Turn off the critical-path removal prompt in bypassPermissions mode
+
+To run Bash `rm` and `rmdir` commands that target critical paths with no prompt in `bypassPermissions` mode, start Claude Code with [`CLAUDE_CODE_EVEN_MORE_DANGEROUSLY_SKIP_PERMISSIONS=1`](</docs/en/env-vars#variables>) in its environment. This requires Claude Code v2.1.311 or later. Claude Code reads the variable from the launch environment only and [ignores it in a settings file’s `env` block](</docs/en/settings-reference#variables-claude-code-ignores-in-env>). For example, set it in [your shell](</docs/en/env-vars#set-variables-in-your-shell>) and start `claude` from there:
+
+ * macOS, Linux, WSL
+
+ * Windows PowerShell
+
+ * Windows CMD
+
+ export CLAUDE_CODE_EVEN_MORE_DANGEROUSLY_SKIP_PERMISSIONS=1
+ claude --permission-mode bypassPermissions
+
+ $env:CLAUDE_CODE_EVEN_MORE_DANGEROUSLY_SKIP_PERMISSIONS = "1"
+ claude --permission-mode bypassPermissions
+
+ set CLAUDE_CODE_EVEN_MORE_DANGEROUSLY_SKIP_PERMISSIONS=1
+ claude --permission-mode bypassPermissions
+
+With this variable set, you lose a safety prompt for destructive deletes: a command such as `rm -rf ~` can run without asking you. Set it only in an isolated environment whose contents you can afford to lose.
+
+Removals run with no prompt only in `bypassPermissions` mode itself, not in plan mode, and only for what the critical-path check flags in the Bash and [Monitor](</docs/en/tools-reference#monitor-tool>) tools. That includes commands Claude Code can’t fully parse, which also run with no prompt.
+
+####
+
+
+
+Startup notices about the critical-path removal prompt
+
+To check whether `CLAUDE_CODE_EVEN_MORE_DANGEROUSLY_SKIP_PERMISSIONS` is working, read the line Claude Code prints at startup. In a `-p` run, it’s on stderr. In an Agent SDK app, pass the [`stderr` option](</docs/en/agent-sdk/typescript#options>) to read it. The line says one of these:
+
+ * **`is set, so dangerous rm commands can run without a prompt`** : removals can run with no prompt once managed settings and plugin hooks have loaded. If removals keep getting a prompt or denial, see Why the critical-path removal prompt stays on
+ * **`has no effect in this session`** : removals keep their usual prompt or denial for the whole session. To change that, find your case under Why the critical-path removal prompt stays on
+ * **`has no effect while the Windows registry cannot be read for managed settings`** : removals keep their usual prompt or denial, and the variable takes effect with no restart if a later read of the registry succeeds. If removals keep getting a prompt or denial, see Why the critical-path removal prompt stays on
+
+A missing line doesn’t mean the prompt is on: an Agent SDK app with no `stderr` option sees no line, and removals can still run with no prompt. Otherwise, check that you set the variable in the launch environment, that the session can enter `bypassPermissions` mode, and that `claude` isn’t inside another session. Some sessions start without the variable. If you see one of these lines and didn’t set the variable, find where it’s set, such as your shell profile, and remove it.
+
+####
+
+
+
+Why the critical-path removal prompt stays on
+
+If `CLAUDE_CODE_EVEN_MORE_DANGEROUSLY_SKIP_PERMISSIONS` has no effect and removals keep their usual prompt or denial, check for causes such as these:
+
+ * **Something else handles permission prompts** : a [`--permission-prompt-tool`](</docs/en/cli-reference#cli-flags>) or an Agent SDK [`canUseTool` callback](</docs/en/agent-sdk/user-input>) without [`--permission-prompts none`](</docs/en/headless#turn-off-permission-prompts-in-unattended-runs>), a [`PermissionRequest` hook](</docs/en/hooks#permissionrequest>) with any matcher, or a [mod](</docs/en/plugins/mods/events#hook-the-settings-hook-events>) that handles that event. Remove the hook, mod, tool, or callback and restart `claude`
+ * **The[VS Code extension](</docs/en/vs-code>)’s chat panel or the [Desktop app](</docs/en/desktop>) runs the session**: start `claude` in a terminal instead, such as an IDE’s integrated terminal
+ * **A rule covers Bash, Edit, or Read** : a [deny or ask rule](</docs/en/permissions#manage-permissions>) that targets one of these tools, at launch or once Claude Code reads it during the session, even if you remove it later. Remove the rule and restart `claude`. To leave a tool out, use [`--tools`](</docs/en/cli-reference#cli-flags>) instead of a deny rule
+ * **[`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) is on**: remove the setting from every settings file that sets it to `true`, then restart `claude`
+ * **`claude` runs inside another session**: a `claude` started from a session’s Bash tool or a hook, even with the variable on its command line. Start `claude` from your own shell. Don’t rely on this nested-session limit as a security boundary
+ * **A`PreToolUse` hook answers `ask` for a removal**: change what the hook returns
+ * **Claude Code starts the session for you** : [background sessions](</docs/en/agent-view>), [agent team](</docs/en/agent-teams>) teammates in split panes, and sessions a [Remote Control](</docs/en/remote-control>) server creates start without the variable. Start `claude` from your own shell
+ * **Managed settings can’t be read** : Claude Code hasn’t successfully read your [managed settings](</docs/en/managed-settings>) sources. If server-managed settings keep failing to load, see [Remote managed settings failed to load](</docs/en/errors#remote-managed-settings-failed-to-load>). For any other failure that isn’t a registry query, ask whoever manages that source to fix it
+ * **The Windows registry can’t be queried** : on Windows and in WSL, the variable needs an answer from the registry, even when [WSL doesn’t use it for settings](</docs/en/settings-reference#wslinheritswindowssettings>). The query can fail all session on a non-English Windows, in WSL with interop off, or in a container on a WSL2 kernel. If interop is off, turn it on. Otherwise, run those removals yourself
###
Show diff (110 lines)
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -30,7 +30,7 @@
* Tools matched by an explicit [ask rule](</docs/en/permissions#manage-permissions>)
* Connector tools your organization [set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>), in sessions where that setting reaches Claude Code
* Tools that require user interaction: the built-in `AskUserQuestion` tool and MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>)
- * Recognized `rm` and `rmdir` critical-path removals, which no allow rule or `PreToolUse` hook `"allow"` approves
+ * Recognized `rm` and `rmdir` critical-path removals, which no allow rule or `PreToolUse` hook `"allow"` approves, and Bash commands flagged `Dangerous rm operation not ruled out`
* The cross-session messaging safeguards
* Reads outside the working directories while [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) is on: recognized file-reading Bash commands prompt even in auto mode and `bypassPermissions` mode, and so does any [unsandboxed retry](</docs/en/sandboxing#the-unsandboxed-retry-escape-hatch>) that needs approval to run outside the sandbox. Requires Claude Code v2.1.257 or later. A command the shell parser can’t trace, such as one that changes directory more than once or runs a subshell, prompts the same way even when it names no outside path. This prompt doesn’t apply when the command runs in the [sandbox](</docs/en/sandboxing>) and the sandbox enforces the block.
@@ -229,11 +229,12 @@
Auto-approve file edits with acceptEdits mode
-`acceptEdits` mode lets Claude create and edit files in your working directory without prompting. The status bar shows `⏵⏵ accept edits on` while this mode is active. In addition to file edits, `acceptEdits` mode auto-approves common filesystem Bash commands: `mkdir`, `touch`, `rm`, `rmdir`, `mv`, `cp`, and `sed`. These commands are also auto-approved when prefixed with safe environment variables such as `LANG=C` or `NO_COLOR=1`, or process wrappers such as `timeout`, `nice`, or `nohup`. Like file edits, auto-approval applies only to paths inside your working directory or `additionalDirectories`. These still prompt:
+`acceptEdits` mode lets Claude create and edit files in your working directory without prompting. The status bar shows `⏵⏵ accept edits on` while this mode is active. In addition to file edits, `acceptEdits` mode auto-approves common filesystem Bash commands: `mkdir`, `touch`, `rm`, `rmdir`, `mv`, `cp`, and `sed`. Except for `touch`, these commands are also auto-approved when prefixed with safe environment variables such as `LANG=C` or `NO_COLOR=1`, or process wrappers such as `timeout`, `nice`, or `nohup`. Like file edits, auto-approval applies only to paths inside your working directory or `additionalDirectories`. These still prompt:
* Paths outside that scope
* Writes to protected paths
* Recognized `rm` and `rmdir` critical-path removals
+ * `touch` with anything beyond plain file paths, for example an option, a glob, or a prefix such as `timeout 5` or `LANG=C`
* All other Bash commands except the [built-in read-only set](</docs/en/permissions#read-only-commands>)
Each path also goes through the [symlink check](</docs/en/permissions#symlinks>), so a write that resolves outside that scope isn’t auto-approved either. When the [PowerShell tool](</docs/en/tools-reference#powershell-tool>) is enabled, `acceptEdits` mode also auto-approves `Set-Content`, `Add-Content`, `Clear-Content`, and `Remove-Item` on in-scope paths, along with their common aliases. The same scope and protected-path rules apply, and `Remove-Item` gets its own check. A positional argument that contains a quote character, such as the apostrophe in `Set-Content .\notes.txt "It's done"`, still prompts even on in-scope paths, because Claude Code can’t statically validate an argument whose quoted and unquoted readings differ. Pass the content through a named parameter such as `-Value` to avoid the prompt. Use `acceptEdits` when you want to review changes in your editor or via `git diff` after the fact rather than approving each edit inline. Press `Shift+Tab` once from Manual mode to enter it, or start with it directly:
@@ -323,6 +324,7 @@
* **A direct connection to the Anthropic API** : in interactive terminal sessions and in `-p`, Agent SDK, [VS Code extension](</docs/en/vs-code>), and [desktop app](</docs/en/desktop>) sessions, whatever your plan or account type, as Anthropic rolls it out. In interactive terminal sessions, this requires Claude Code v2.1.271 or later on Pro, Max, and Team plans, and v2.1.278 or later on Enterprise plans and Claude API accounts. In `-p`, Agent SDK, VS Code extension, and desktop app sessions, this requires Claude Code v2.1.281 or later. From v2.1.282, a session that [doesn’t fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), for example because you turned telemetry off, asks the server by default in any kind of session.
* **A cloud provider, or an LLM gateway or proxy** : on [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry, and whenever you point `ANTHROPIC_BASE_URL` at an [LLM gateway or proxy](</docs/en/llm-gateway>), whatever your plan. Asking by default requires Claude Code v2.1.278 or later.
* **A signed-in[Claude apps gateway](</docs/en/claude-apps-gateway>) session**: requires Claude Code v2.1.280 or later
+ * **A[cloud session](</docs/en/claude-code-on-the-web>) in an Anthropic-hosted environment**: whatever your plan, when you start it from the web, the mobile app, or the desktop app with **Cloud** selected. Sessions started by a [cloud scheduled task](</docs/en/routines>) ask the server as Anthropic rolls it out.
Where the server reviews the actions, its verdicts decide them. Two other outcomes are possible:
@@ -595,7 +597,7 @@
Skip all checks with bypassPermissions mode
-`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. The actions no mode auto-approves still prompt in this mode. Reading [another organization’s public artifact](</docs/en/artifacts#read-an-artifact-shared-with-you>) needs your approval, and this mode doesn’t ask for it, so Claude can’t read one. The Remove-Item in PowerShell denies also apply in this mode. Two [cross-session messaging](</docs/en/cross-session-messaging>) safeguards still apply in this mode, and in interactive terminal plan-mode sessions where bypass permissions are available:
+`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. Even in `bypassPermissions` mode, each of the actions no mode auto-approves gets a prompt or a denial instead of running on its own. Reading [another organization’s public artifact](</docs/en/artifacts#read-an-artifact-shared-with-you>) needs your approval, and this mode doesn’t ask for it, so Claude can’t read one. The Remove-Item in PowerShell denies also apply in this mode. Two [cross-session messaging](</docs/en/cross-session-messaging>) safeguards still apply in this mode, and in interactive terminal plan-mode sessions where bypass permissions are available:
* The [`isolatePeerMachines`](</docs/en/settings-reference#isolatepeermachines>) approval prompt for messages to your sessions beyond this machine still appears.
* When no [`crossSessionInbound`](</docs/en/cross-session-messaging#control-inbound-messages>) value applies, Claude Code holds an inbound message from another of your sessions for your approval, and delivers without asking only when the sending session identifies itself as also bypassing permission prompts. If you leave the permission mode while messages are held, Claude Code re-applies the inbound rules and delivers any held message they now accept.
@@ -701,6 +703,7 @@
* `.devcontainer.json`
* `.ripgreprc`, `pyrightconfig.json`
* `.mcp.json`, `.claude.json`
+ * A file you passed to [`--settings`](</docs/en/cli-reference#cli-flags>), `--mcp-config`, or `--agents` when you started the session
* The file that your user, project, or local [settings file](</docs/en/settings#settings-files-and-who-they-affect>) points to when the settings file is itself a symbolic link, for example into a dotfiles repository. In the modes that route protected-path writes to the classifier, a write to this file prompts you instead, even when an allow rule matches. If the file’s own path is also that of a settings file, such as `.claude/settings.json` in another folder, the write goes to the classifier as other protected-path writes do
##
@@ -794,6 +797,22 @@
+The `Dangerous rm operation not ruled out` prompt
+
+The full reason reads:
+
+ Dangerous rm operation not ruled out — the shell may read this command differently than it was parsed
+
+This reason means the shell may read the command differently than Claude Code did, so a removal could sit in an unchecked part, even with no `rm` present. In `auto` or `bypassPermissions` mode, a denial with this sentence comes from the same check:
+
+ This command could not be checked for dangerous rm operations: the shell may read it differently than it was parsed.
+
+You get the prompt or denial a critical-path removal gets in your permission mode, `bypassPermissions` included. You can’t approve the command with a `Bash` or `Bash(*)` allow rule, sandbox [auto-allow mode](</docs/en/sandboxing#auto-allow-mode>), or a `PreToolUse` hook returning `"allow"`. Read the command, then approve the prompt or, after a denial, run it in your shell.
+
+###
+
+
+
The mounted drive prompt
The mounted drive prompt appears on macOS, Linux, and WSL when a recursive `rm` targets a listed mounted drive path, such as `/mnt/c` or `/Volumes/USB/build`. Its reason reads `Dangerous rm operation on mounted drive path: <path>`. A `/*` target gets the prompt without the recursive flag, since Claude Code reads `rm /Volumes/USB/build/*` as a removal of `/Volumes/USB/build`. Even with an allow rule for `rm`, Claude Code handles the command as a critical-path removal: a prompt or a denial depending on your permission mode. Approve the prompt to let the `rm` run, or turn the prompt off.
@@ -858,7 +877,7 @@
`plan`| Asks you to approve it. When the classifier reviews commands during planning and no bypass permissions are available, handles it as in `auto` mode
`auto`| Asks you to approve it in the terminal, with a time limit. Elsewhere, denies it
`dontAsk`| Denies it
-`bypassPermissions`| Asks you to approve it, with a time limit in the terminal
+`bypassPermissions`| In the terminal, asks you to approve it before a time limit runs out. Elsewhere, see what happens in each place
If an explicit [ask rule](</docs/en/permissions#manage-permissions>) matches the command, Claude Code asks you instead, even in `auto` mode and without a time limit. In modes that ask, a [`PermissionRequest` hook](</docs/en/hooks#permissionrequest>) can answer the prompt.
@@ -874,7 +893,26 @@
* Press any key while the prompt is open to stop the countdown and keep the prompt waiting for your answer.
* After three of these prompts run out unanswered in a session, Claude Code stops showing them and denies further critical-path removals immediately. Sending a new message starts the count over.
-In `auto` mode, wherever Claude Code can’t show you a terminal prompt, it denies the command immediately, for example in [non-interactive runs](</docs/en/headless>) with `-p`, in [Agent SDK](</docs/en/agent-sdk/permissions>) sessions, and in the VS Code extension’s chat panel and the Desktop app. The denial tells Claude to report what it wanted to delete and leave the removal to you. The `auto` and `bypassPermissions` handling requires Claude Code v2.1.281 or later. To turn it off, set [`CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUT=1`](</docs/en/env-vars#variables>) in the environment that launches Claude Code. In `auto` mode, critical-path removals then go to the classifier instead, and in `bypassPermissions` mode the prompt has no time limit.
+The time limit applies in Claude Code v2.1.281 and later, and so does the `auto` mode denial outside the terminal. Away from the terminal, you don’t get that prompt:
+
+Where| `auto`| `bypassPermissions`
+---|---|---
+[VS Code extension](</docs/en/vs-code>)’s chat panel| Denies it| Denies it unless a [`PermissionRequest` hook](</docs/en/hooks#permissionrequest>) allows it
+[Desktop app](</docs/en/desktop>)| Denies it| Denies it unless a `PermissionRequest` hook allows it
+[`-p` run](</docs/en/headless>) or [Agent SDK session](</docs/en/agent-sdk/permissions>)| Denies it| Your [`--permission-prompt-tool`](</docs/en/cli-reference#cli-flags>) or [`canUseTool` callback](</docs/en/agent-sdk/user-input#handle-tool-approval-requests>) decides. With neither, or under [`--permission-prompts none`](</docs/en/headless#turn-off-permission-prompts-in-unattended-runs>), denies it unless a `PermissionRequest` hook allows it
+
+Wherever the removal is denied, you can read the whole command and run it in your shell. To change what you get in each mode, set [`CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUT`](</docs/en/env-vars#variables>) to `1`:
+
+ * **`bypassPermissions`** : the terminal prompt has no time limit, and the VS Code chat panel asks you
+ * **`auto`** : the classifier decides, in the terminal, the VS Code chat panel, `-p` runs and Agent SDK sessions
+
+Set it in the environment that starts Claude Code, such as your shell or the SDK’s `env` option, not in a Claude Code settings file. For the chat panel, add it to [`claudeCode.environmentVariables`](</docs/en/vs-code#extension-settings>) in VS Code’s own user `settings.json`, then start a new conversation:
+
+ {
+ "claudeCode.environmentVariables": [
+ { "name": "CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUT", "value": "1" }
+ ]
+ }
###
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -212,7 +212,7 @@
Cowork doesn’t use these modes. It has its own permission modes, enabled separately, and shows no mode selector at all until a mode beyond its default is enabled for your account. See the [Cowork docs](<https://claude.com/docs/cowork/overview>).For desktop-specific details, see [Choose a permission mode](</docs/en/desktop#choose-a-permission-mode>) in the Desktop guide.**As a default** : set `defaultMode` in [settings](</docs/en/settings#where-settings-live>). The desktop app reads the same settings files as the CLI and applies the permission mode to new local sessions.A mode you pick in the mode selector is remembered per folder and takes precedence over `defaultMode` for that folder. Plan is the exception: picking it applies to the current session only.For where `defaultMode` goes in a settings file, see the example under Start in a different permission mode.
-On [claude.ai/code](<https://claude.ai/code>), use the mode dropdown next to the prompt box. In the mobile app, tap the **+** button in the prompt box, then **Permission**. Cloud sessions and Remote Control sessions offer different permission modes:
+On [claude.ai/code](<https://claude.ai/code>), use the mode dropdown in the row under the prompt box. In the mobile app, tap the **+** button in the prompt box, then **Permission**. Cloud sessions and Remote Control sessions offer different permission modes:
* **[Cloud sessions](</docs/en/claude-code-on-the-web>)** : Accept edits, Plan, and Auto. Accept edits corresponds to `default` mode: cloud sessions pre-approve file edits regardless of mode, so the dropdown shows Accept edits instead of Manual. Cloud sessions still honor `defaultMode: "acceptEdits"` from settings. Auto mode appears only when your organization allows it and the selected model supports it. Bypass permissions isn’t available.
* **[Remote Control](</docs/en/remote-control>) sessions** on your local machine: Manual, Accept edits, Plan, and Auto for a session you started yourself, and you can’t select Bypass permissions from the app. To use Auto, the session has to meet the auto mode availability requirements. For a project thread running on your computer, see [Run a thread on your own computer](</docs/en/claude-projects#run-a-thread-on-your-own-computer>).
Show diff (111 lines)
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -30,7 +30,7 @@
* Tools matched by an explicit [ask rule](</docs/en/permissions#manage-permissions>)
* Connector tools your organization [set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>), in sessions where that setting reaches Claude Code
* Tools that require user interaction: the built-in `AskUserQuestion` tool and MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>)
- * `rm` and `rmdir` removals targeting a critical path, which no allow rule or `PreToolUse` hook `"allow"` approves
+ * Recognized `rm` and `rmdir` critical-path removals, which no allow rule or `PreToolUse` hook `"allow"` approves
* The cross-session messaging safeguards
* Reads outside the working directories while [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) is on: recognized file-reading Bash commands prompt even in auto mode and `bypassPermissions` mode, and so does any [unsandboxed retry](</docs/en/sandboxing#the-unsandboxed-retry-escape-hatch>) that needs approval to run outside the sandbox. Requires Claude Code v2.1.257 or later. A command the shell parser can’t trace, such as one that changes directory more than once or runs a subshell, prompts the same way even when it names no outside path. This prompt doesn’t apply when the command runs in the [sandbox](</docs/en/sandboxing>) and the sandbox enforces the block.
@@ -210,7 +210,7 @@
* **Auto** : appears when auto mode is available
* **Bypass permissions** : requires the **Allow bypass permissions mode** toggle in Desktop settings on Pro and Max plans; on Team and Enterprise plans, organization policy controls it instead
-The Cowork tab doesn’t use these modes. Cowork has its own permission modes, enabled separately, and the Cowork tab shows no mode selector at all until a mode beyond its default is enabled for your account. See the [Cowork docs](<https://claude.com/docs/cowork/overview>).For desktop-specific details, see [Choose a permission mode](</docs/en/desktop#choose-a-permission-mode>) in the Desktop guide.**As a default** : set `defaultMode` in [settings](</docs/en/settings#where-settings-live>). The desktop app reads the same settings files as the CLI and applies the permission mode to new local sessions.A mode you pick in the mode selector is remembered per folder and takes precedence over `defaultMode` for that folder. Plan is the exception: picking it applies to the current session only.For where `defaultMode` goes in a settings file, see the example under Start in a different permission mode.
+Cowork doesn’t use these modes. It has its own permission modes, enabled separately, and shows no mode selector at all until a mode beyond its default is enabled for your account. See the [Cowork docs](<https://claude.com/docs/cowork/overview>).For desktop-specific details, see [Choose a permission mode](</docs/en/desktop#choose-a-permission-mode>) in the Desktop guide.**As a default** : set `defaultMode` in [settings](</docs/en/settings#where-settings-live>). The desktop app reads the same settings files as the CLI and applies the permission mode to new local sessions.A mode you pick in the mode selector is remembered per folder and takes precedence over `defaultMode` for that folder. Plan is the exception: picking it applies to the current session only.For where `defaultMode` goes in a settings file, see the example under Start in a different permission mode.
On [claude.ai/code](<https://claude.ai/code>), use the mode dropdown next to the prompt box. In the mobile app, tap the **+** button in the prompt box, then **Permission**. Cloud sessions and Remote Control sessions offer different permission modes:
@@ -229,7 +229,14 @@
Auto-approve file edits with acceptEdits mode
-`acceptEdits` mode lets Claude create and edit files in your working directory without prompting. The status bar shows `⏵⏵ accept edits on` while this mode is active. In addition to file edits, `acceptEdits` mode auto-approves common filesystem Bash commands: `mkdir`, `touch`, `rm`, `rmdir`, `mv`, `cp`, and `sed`. These commands are also auto-approved when prefixed with safe environment variables such as `LANG=C` or `NO_COLOR=1`, or process wrappers such as `timeout`, `nice`, or `nohup`. Like file edits, auto-approval applies only to paths inside your working directory or `additionalDirectories`. Each path also goes through the [symlink check](</docs/en/permissions#symlinks>), so a write that resolves outside that scope isn’t auto-approved either. Paths outside that scope, writes to protected paths, `rm` and `rmdir` removals targeting a critical path, and all other Bash commands except the [built-in read-only set](</docs/en/permissions#read-only-commands>) still prompt. When the [PowerShell tool](</docs/en/tools-reference#powershell-tool>) is enabled, `acceptEdits` mode also auto-approves `Set-Content`, `Add-Content`, `Clear-Content`, and `Remove-Item` on in-scope paths, along with their common aliases. The same scope and protected-path rules apply, and `Remove-Item` gets its own check. A positional argument that contains a quote character, such as the apostrophe in `Set-Content .\notes.txt "It's done"`, still prompts even on in-scope paths, because Claude Code can’t statically validate an argument whose quoted and unquoted readings differ. Pass the content through a named parameter such as `-Value` to avoid the prompt. Use `acceptEdits` when you want to review changes in your editor or via `git diff` after the fact rather than approving each edit inline. Press `Shift+Tab` once from Manual mode to enter it, or start with it directly:
+`acceptEdits` mode lets Claude create and edit files in your working directory without prompting. The status bar shows `⏵⏵ accept edits on` while this mode is active. In addition to file edits, `acceptEdits` mode auto-approves common filesystem Bash commands: `mkdir`, `touch`, `rm`, `rmdir`, `mv`, `cp`, and `sed`. These commands are also auto-approved when prefixed with safe environment variables such as `LANG=C` or `NO_COLOR=1`, or process wrappers such as `timeout`, `nice`, or `nohup`. Like file edits, auto-approval applies only to paths inside your working directory or `additionalDirectories`. These still prompt:
+
+ * Paths outside that scope
+ * Writes to protected paths
+ * Recognized `rm` and `rmdir` critical-path removals
+ * All other Bash commands except the [built-in read-only set](</docs/en/permissions#read-only-commands>)
+
+Each path also goes through the [symlink check](</docs/en/permissions#symlinks>), so a write that resolves outside that scope isn’t auto-approved either. When the [PowerShell tool](</docs/en/tools-reference#powershell-tool>) is enabled, `acceptEdits` mode also auto-approves `Set-Content`, `Add-Content`, `Clear-Content`, and `Remove-Item` on in-scope paths, along with their common aliases. The same scope and protected-path rules apply, and `Remove-Item` gets its own check. A positional argument that contains a quote character, such as the apostrophe in `Set-Content .\notes.txt "It's done"`, still prompts even on in-scope paths, because Claude Code can’t statically validate an argument whose quoted and unquoted readings differ. Pass the content through a named parameter such as `-Value` to avoid the prompt. Use `acceptEdits` when you want to review changes in your editor or via `git diff` after the fact rather than approving each edit inline. Press `Shift+Tab` once from Manual mode to enter it, or start with it directly:
claude --permission-mode acceptEdits
@@ -279,7 +286,7 @@
Eliminate permission prompts with auto mode
-Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt. With Claude Code v2.1.283 or later, auto mode is the built-in starting permission mode for interactive terminal and VS Code sessions on every plan and provider. On earlier versions, it’s the built-in starting permission mode only on Pro, Max, and Team plans. The classifier also reviews each message Claude sends to another agent with [`SendMessage`](</docs/en/tools-reference>), whether plain text or a structured [agent team](</docs/en/agent-teams>) message, before Claude Code delivers it, both in auto mode and in plan mode while the classifier reviews commands; the send review requires Claude Code v2.1.222 or later. By default, the classifier doesn’t review `rm` and `rmdir` removals targeting a critical path, such as `rm -rf /` or `rm -rf ~`. Critical paths covers what happens to them in each permission mode. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior in a mode that still prompts you, set the [Proactive output style](</docs/en/output-styles>) instead.
+Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt. With Claude Code v2.1.283 or later, auto mode is the built-in starting permission mode for interactive terminal and VS Code sessions on every plan and provider. On earlier versions, it’s the built-in starting permission mode only on Pro, Max, and Team plans. The classifier also reviews each message Claude sends to another agent with [`SendMessage`](</docs/en/tools-reference>), whether plain text or a structured [agent team](</docs/en/agent-teams>) message, before Claude Code delivers it, both in auto mode and in plan mode while the classifier reviews commands; the send review requires Claude Code v2.1.222 or later. By default, the classifier doesn’t review recognized `rm` and `rmdir` critical-path removals, such as `rm -rf /` or `rm -rf ~`. Critical paths covers what happens to them in each permission mode. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior in a mode that still prompts you, set the [Proactive output style](</docs/en/output-styles>) instead.
Auto mode reduces permission prompts but does not guarantee safety. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations.
@@ -531,7 +538,7 @@
1. Actions matching your [allow, ask, or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately, with these exceptions:
* Writes to protected paths route to the classifier even when an allow rule matches. When the protected path is the file that a symlinked settings file points to, the write can prompt you instead, as the protected paths list describes
- * No allow rule approves `rm` and `rmdir` removals targeting a critical path
+ * No allow rule approves recognized `rm` and `rmdir` critical-path removals
* MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>) prompt you directly even when an allow rule matches, and so do connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code
* A shell command that carries [per-command allowed domains](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) also routes to the classifier even when an allow rule matches, because a rule approves the command, not its hosts
* Ask rules that match on a command’s content, such as `Bash(git push *)`, fall back to a permission prompt
@@ -573,7 +580,12 @@
Allow only pre-approved tools with dontAsk mode
-If you set `dontAsk` mode, Claude Code auto-denies every tool call that would otherwise prompt you, though a [mod](</docs/en/plugins/mods/overview>) you installed can still approve some of those calls. To check which calls a mod can approve, see [Extend permissions with hooks](</docs/en/permissions#precedence-among-rules-hooks-and-mods>). Claude still runs actions that need no approval in Manual mode, such as file reads inside your working directories and [read-only Bash commands](</docs/en/permissions#read-only-commands>). Actions matching your `permissions.allow` rules and calls approved by a [PreToolUse hook](</docs/en/permissions#extend-permissions-with-hooks>) run too. Use this mode for CI pipelines or restricted environments where you pre-define what Claude may do; the session never waits for input. The status bar shows `⏵⏵ don't ask on` in this mode. Claude Code denies calls matching your explicit [`ask` rules](</docs/en/permissions#manage-permissions>) rather than prompting. It also denies the built-in `AskUserQuestion` tool even if your allow rules match it, and does the same to connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code. It denies MCP tools marked [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) the same way, because their approval card needs an answer this mode never collects. `rm` and `rmdir` removals targeting a critical path, such as `rm -rf /` and `rm -rf ~`, are denied even when an allow rule matches them or a `PreToolUse` hook allows them. A read from a [network path](</docs/en/permissions#network-paths>) is denied the same way. [Cloud sessions](</docs/en/claude-code-on-the-web>) ignore `defaultMode: "dontAsk"`; see bypassPermissions for details. Set it at startup with the flag:
+If you set `dontAsk` mode, Claude Code auto-denies every tool call that would otherwise prompt you, though a [mod](</docs/en/plugins/mods/overview>) you installed can still approve some of those calls. To check which calls a mod can approve, see [Extend permissions with hooks](</docs/en/permissions#precedence-among-rules-hooks-and-mods>). Claude still runs actions that need no approval in Manual mode, such as file reads inside your working directories and [read-only Bash commands](</docs/en/permissions#read-only-commands>). Actions matching your `permissions.allow` rules and calls approved by a [PreToolUse hook](</docs/en/permissions#extend-permissions-with-hooks>) run too. Use this mode for CI pipelines or restricted environments where you pre-define what Claude may do; the session never waits for input. The status bar shows `⏵⏵ don't ask on` in this mode. Claude Code denies calls matching your explicit [`ask` rules](</docs/en/permissions#manage-permissions>) rather than prompting. It also denies the built-in `AskUserQuestion` tool even if your allow rules match it, and does the same to connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code. It denies MCP tools marked [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) the same way, because their approval card needs an answer this mode never collects. An allow rule or `PreToolUse` hook can’t approve these:
+
+ * Recognized `rm` and `rmdir` critical-path removals, such as `rm -rf /` and `rm -rf ~`
+ * Reads from a [network path](</docs/en/permissions#network-paths>)
+
+[Cloud sessions](</docs/en/claude-code-on-the-web>) ignore `defaultMode: "dontAsk"`; see bypassPermissions for details. Set it at startup with the flag:
claude --permission-mode dontAsk
@@ -588,7 +600,7 @@
* The [`isolatePeerMachines`](</docs/en/settings-reference#isolatepeermachines>) approval prompt for messages to your sessions beyond this machine still appears.
* When no [`crossSessionInbound`](</docs/en/cross-session-messaging#control-inbound-messages>) value applies, Claude Code holds an inbound message from another of your sessions for your approval, and delivers without asking only when the sending session identifies itself as also bypassing permission prompts. If you leave the permission mode while messages are held, Claude Code re-applies the inbound rules and delivers any held message they now accept.
-In interactive terminal sessions with bypass permissions available, Claude Code also doesn’t enforce plan mode’s blocks. Claude is still instructed to plan without editing, but a file edit or shell command it attempts during planning runs without prompting. Explicit [ask rules](</docs/en/permissions#manage-permissions>) and `rm` and `rmdir` removals targeting a critical path still prompt. Plan mode keeps its blocks wherever Claude Code runs without an interactive terminal, including [non-interactive runs](</docs/en/headless>) with `-p`, [Agent SDK](</docs/en/agent-sdk/permissions#plan-mode-plan>) sessions, and conversations in the [VS Code extension](</docs/en/vs-code>)’s chat panel. There, `--allow-dangerously-skip-permissions` makes `bypassPermissions` selectable later.
+In interactive terminal sessions with bypass permissions available, Claude Code also doesn’t enforce plan mode’s blocks. Claude is still instructed to plan without editing, but a file edit or shell command it attempts during planning runs without prompting. Explicit [ask rules](</docs/en/permissions#manage-permissions>) and recognized `rm` and `rmdir` critical-path removals still prompt. Plan mode keeps its blocks wherever Claude Code runs without an interactive terminal, including [non-interactive runs](</docs/en/headless>) with `-p`, [Agent SDK](</docs/en/agent-sdk/permissions#plan-mode-plan>) sessions, and conversations in the [VS Code extension](</docs/en/vs-code>)’s chat panel. There, `--allow-dangerously-skip-permissions` makes `bypassPermissions` selectable later.
Only use this mode in isolated environments like containers, VMs, or dev containers without internet access, where Claude Code cannot damage your host system.
@@ -628,6 +640,14 @@
Bypass permissions was requested at launch and ignored · if that was you, ~/.claude/settings.json needs "skipDangerousModePermissionPrompt": true
Add `"skipDangerousModePermissionPrompt": true` to `~/.claude/settings.json`, then start a new background session.
+
+###
+
+
+
+`claude agents` shows the bypass permissions warning that interactive sessions skip
+
+If [`claude agents`](</docs/en/agent-view#dispatch-defaults>) shows the bypass permissions warning although your interactive sessions skip it, check whether `skipDangerousModePermissionPrompt` is set in `.claude/settings.local.json` or a `--settings` file. Interactive sessions count the key there as your acceptance of the warning, and `claude agents` doesn’t. Whether or not you find it there, accept the warning to add the key to `~/.claude/settings.json`, where `claude agents` looks for it.
##
@@ -689,7 +709,17 @@
Critical paths
-Critical paths are the directories Claude Code protects from `rm` and `rmdir` commands, such as the filesystem root, your home directory, and your working directory. Claude Code never lets a [`permissions.allow`](</docs/en/permissions#manage-permissions>) rule or a [`PreToolUse` hook](</docs/en/permissions#extend-permissions-with-hooks>) that returns `"allow"` approve an `rm` or `rmdir` command that targets a critical path, even in modes that skip other prompts. This circuit breaker guards against model error. A matching deny rule still blocks the command outright. What happens instead depends on your permission mode. `Remove-Item` and the `cmd` removal built-ins have their own checks, covered in Remove-Item in PowerShell.
+Critical paths are the directories Claude Code protects from `rm` and `rmdir` commands, such as the filesystem root, your home directory, and your working directory. Claude Code checks these commands before they run, and no [allow rule](</docs/en/permissions#manage-permissions>) approves one whose target it recognizes as a critical path. The check can miss some commands, so it doesn’t replace an operating-system control such as [sandboxing](</docs/en/sandboxing>). A critical-path removal is an `rm` or `rmdir` command whose target Claude Code recognizes as a critical path. No [`PreToolUse` hook](</docs/en/permissions#extend-permissions-with-hooks>) that returns `"allow"` approves one either. An allow rule or `PreToolUse` hook can’t approve one even in the permission modes that skip other prompts.
+
+A command the check misses gets no special handling, so anything that approves Bash commands in your session can approve it with no prompt. That includes an allow rule, `bypassPermissions` mode, and the sandbox’s [auto-allow mode](</docs/en/sandboxing#auto-allow-mode>). The check applies to `rm` and `rmdir`, so other approved commands can delete critical paths too.
+
+These controls apply whether or not the check recognizes a command:
+
+ * **Deny rules** : a [deny rule](</docs/en/permissions#manage-permissions>) that matches the command blocks it, though a [mod](</docs/en/plugins/mods/overview>) you installed can still approve [some of those calls](</docs/en/permissions#precedence-among-rules-hooks-and-mods>)
+ * **Sandboxing** : [sandboxing](</docs/en/sandboxing>) has the operating system limit which paths Bash commands can write to. Sandboxed commands can still delete your working directory
+ * **Strict sandbox mode** : by default a sandboxed command can be [retried outside the sandbox](</docs/en/sandboxing#the-unsandboxed-retry-escape-hatch>), and an allow rule or `bypassPermissions` mode can approve that retry with no prompt. [Strict sandbox mode](</docs/en/sandboxing#turn-off-the-retry-with-strict-sandbox-mode>) turns the retry off
+
+What happens to a removal that Claude Code recognizes depends on your permission mode. `Remove-Item` and the `cmd` removal built-ins have their own checks, covered in Remove-Item in PowerShell.
###
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -545,7 +545,7 @@
3. Everything else goes to the classifier, apart from critical-path removals under their default handling. The connector tools and `requiresUserInteraction` MCP tools that prompt you directly in step 1 never reach the classifier either, so neither an org-required approval nor a consent step is auto-approved
4. If the classifier blocks, Claude receives the reason. In most sessions the reason names the rule the classifier matched, such as `[Data Exfiltration]`, rather than giving a written explanation; see [Review denials](</docs/en/auto-mode-config#review-denials>)
-A [mod](</docs/en/plugins/mods/overview>) you install that handles `tool.check` can also approve an action. For the cases where its approval doesn’t get past your rules and hooks, see [Extend permissions with hooks](</docs/en/permissions#precedence-among-rules-hooks-and-mods>).In the VS Code extension, how [Claude in Chrome](</docs/en/chrome>) browser actions get approved depends on how the session connected to the browser: see [Permission prompts in VS Code sessions](</docs/en/chrome#permission-prompts-in-vs-code-sessions>).On entering auto mode, broad allow rules that grant arbitrary code execution are dropped:
+A [mod](</docs/en/plugins/mods/overview>) you install that handles `tool.check` can also approve an action. For the cases where its approval doesn’t get past your rules and hooks, see [Extend permissions with hooks](</docs/en/permissions#precedence-among-rules-hooks-and-mods>).For how [Claude in Chrome](</docs/en/chrome>) browser actions get approved in the VS Code extension, see [Permission prompts in VS Code sessions](</docs/en/chrome#permission-prompts-in-vs-code-sessions>).On entering auto mode, broad allow rules that grant arbitrary code execution are dropped:
* Blanket `Bash(*)` or `PowerShell(*)`
* Wildcarded interpreters like `Bash(python*)`
@@ -603,10 +603,11 @@
In [non-interactive mode](</docs/en/headless>) no dialog is shown. A [background session](</docs/en/agent-view>) honors your acceptance when it’s recorded in user or managed settings:
- * With no acceptance recorded, `claude --bg --permission-mode bypassPermissions` is refused until you accept the dialog in an interactive session.
- * With `skipDangerousModePermissionPrompt` set only in `.claude/settings.local.json`, the background session starts with the bypass request ignored and pins the notice `Bypass permissions was requested at launch and ignored · if that was you, ~/.claude/settings.json needs "skipDangerousModePermissionPrompt": true`. Add that key to `~/.claude/settings.json`, then start a new background session. The session showing the notice still runs:
+ * With no acceptance recorded, `claude --bg --permission-mode bypassPermissions` is refused. Accept the dialog in an interactive session first.
+ * With `skipDangerousModePermissionPrompt` set only in `.claude/settings.local.json`, the background session starts with the bypass request ignored:
* With `--allow-dangerously-skip-permissions` ignored, `bypassPermissions` is left out of its `Shift+Tab` cycle.
* With `--permission-mode bypassPermissions` or `--dangerously-skip-permissions` ignored, the session starts in Manual mode instead.
+Add `"skipDangerousModePermissionPrompt": true` to `~/.claude/settings.json`, then start a new background session.
On Linux and macOS, Claude Code refuses to start in `bypassPermissions` mode when running as root or under `sudo`:
@@ -615,6 +616,18 @@
The check is skipped automatically inside a recognized sandbox. To run autonomously in a container, use the [dev container](</docs/en/devcontainer>) configuration, which runs Claude Code as a non-root user. [Cloud sessions](</docs/en/claude-code-on-the-web>) don’t honor `defaultMode: "bypassPermissions"` or `"dontAsk"` from your settings files, so a repository’s checked-in settings can’t start a cloud session in bypass-permissions mode. The setting is ignored silently and the session starts in the permission mode shown in the mode dropdown instead. See Switch permission modes for which modes cloud sessions offer.
`bypassPermissions` offers no protection against prompt injection or unintended actions. For background safety checks with far fewer permission prompts, use auto mode instead. Administrators can block this mode by setting `permissions.disableBypassPermissionsMode` to `"disable"` in [managed settings](</docs/en/managed-settings>).
+
+###
+
+
+
+Bypass permissions ignored in a background session
+
+This notice means the [background session](</docs/en/agent-view>) didn’t find your acceptance of the bypass permissions warning in user or managed settings, so it ignored the bypass request made at launch:
+
+ Bypass permissions was requested at launch and ignored · if that was you, ~/.claude/settings.json needs "skipDangerousModePermissionPrompt": true
+
+Add `"skipDangerousModePermissionPrompt": true` to `~/.claude/settings.json`, then start a new background session.
##
Show diff (269 lines)
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -14,7 +14,7 @@
`acceptEdits`| Reads, file edits, and common filesystem commands (`mkdir`, `touch`, `mv`, `cp`, etc.)| Iterating on code you’re reviewing
`plan`| Reads, plus classifier-approved commands when auto mode is available| Exploring a codebase before changing it
`auto`| Everything, with background safety checks| Long tasks, reducing prompt fatigue
-`dontAsk`| File reads inside your working directories and pre-approved tools; anything that would prompt is denied| Locked-down CI and scripts
+`dontAsk`| File reads inside your working directories and pre-approved tools; anything that would prompt is denied, though a [mod](</docs/en/plugins/mods/overview>) you installed can still approve some of those calls| Locked-down CI and scripts
`bypassPermissions`| Everything| Isolated containers and VMs only
The mode that reviews every action is named **Manual** in the CLI, in `claude --help`, in the VS Code and JetBrains extensions, and in the desktop app. Its config value is `default`, which is what hooks and SDK integrations use. The CLI accepts `manual` as an alias wherever you type the value, for example `claude --permission-mode manual` or `"defaultMode": "manual"`. Writes to protected paths are never auto-approved except in `bypassPermissions` mode and in plan-mode sessions where bypass permissions are available, meaning interactive terminal sessions started in a way that puts `bypassPermissions` in the mode cycle. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. Deny rules block in every mode, including `bypassPermissions`. Deny and ask rules don’t apply to [`EndConversation`](</docs/en/tools-reference#endconversation-tool-behavior>) as long as Claude still has at least one other tool it can call. Allow rules have no effect in `bypassPermissions`.
@@ -70,16 +70,47 @@
How you run Claude Code| Built-in starting permission mode
---|---
Any settings file sets `disableAutoMode` to `"disable"`| `default`
-`claude -p` or the [Agent SDK](</docs/en/agent-sdk/permissions#permission-modes>)| `default` in sessions that [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>). In sessions that don’t, such as on a third-party provider or with telemetry off, `auto` with Claude Code v2.1.285 or later and `default` on earlier versions. A session in an organization whose policy withholds the `auto` default starts in `default` instead
+`claude -p` or the [Agent SDK](</docs/en/agent-sdk/permissions#permission-modes>)| `default`
Your organization has the HIPAA configuration applied and the session is [eligible for it](</docs/en/hipaa-setup#check-how-developers-sign-in-and-connect>)| `default` with Claude Code v2.1.285 or later; auto mode stays available to switch to
In a terminal or through the [VS Code extension](</docs/en/vs-code>)| `auto` with Claude Code v2.1.283 or later; on earlier versions, `auto` on Pro, Max, or Team plans in sessions that [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), and `default` otherwise
-In your [first session after an install or upgrade](</docs/en/env-vars#first-session-after-an-install-or-upgrade>), Claude Code can choose the starting permission mode before its feature flags arrive. That session can start in a different permission mode than the table gives. When the flag, a settings file, or the built-in default selects `auto` but auto mode isn’t available to the session, Claude Code starts the session in Manual instead. Auto mode is unavailable when the session doesn’t meet the availability requirements, such as a settings file turning it off or a model that doesn’t support it, or when Anthropic has temporarily turned it off server-side. The first time the built-in default starts one of your sessions in auto mode, Claude Code shows a notice that links to this page:
+When the flag, a settings file, or the built-in default selects `auto` but auto mode isn’t available to the session, Claude Code starts the session in Manual instead. Auto mode is unavailable when the session doesn’t meet the availability requirements, such as a settings file turning it off or a model that doesn’t support it, or when Anthropic has temporarily turned it off server-side. The first time the built-in default starts one of your sessions in auto mode, Claude Code shows a notice that links to this page:
* In a terminal, once, at the top of the session
* In the VS Code extension, as a card on the new-conversation screen that stays until you dismiss it
If your `~/.claude/settings.json` sets a `defaultMode` other than `auto` and no other settings file sets one, your sessions keep starting in that mode. On Pro, Max, and Team plans, and in sessions that [don’t fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), Claude Code asks once, in the terminal or in the VS Code extension, whether to change the setting to auto mode. If you decline, your setting stays as it is.
+
+###
+
+
+
+Tool calls denied in `claude -p` and Agent SDK runs
+
+In Claude Code v2.1.302 or later, `claude -p` and [Agent SDK](</docs/en/agent-sdk/permissions#permission-modes>) runs with no permission mode set start in Manual mode. This mode appears as `default` in SDK options and settings. Calls needing approval are denied unless you approve them with an allow rule, hook, `canUseTool` callback, or `--permission-prompt-tool`. To get these calls approved, add allow rules or start in auto mode:
+
+ * **[Add allow rules](</docs/en/permissions#manage-permissions>)** : Claude runs the calls you list. Pass [`--allowedTools "Bash(npm test)"`](</docs/en/headless#auto-approve-tools>) to `claude -p`, or set your SDK’s [allowed-tools option](</docs/en/agent-sdk/permissions#allow-and-deny-rules>).
+ * **Start inauto mode**: a classifier model reviews calls, so you list nothing beforehand. Pass `--permission-mode auto` to `claude -p`, or set your SDK’s [permission mode option](</docs/en/agent-sdk/permissions#set-permission-mode>).
+
+These examples show the auto mode form for the CLI and each SDK:
+
+ * CLI
+
+ * TypeScript
+
+ * Python
+
+ claude -p "Run the test suite and fix any failures" --permission-mode auto
+
+ const options = {
+ permissionMode: "auto"
+ };
+
+ from claude_agent_sdk import ClaudeAgentOptions
+
+ options = ClaudeAgentOptions(permission_mode="auto")
+
+Before v2.1.302, these runs could start in auto mode if they didn’t [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), for example on a [third-party provider](</docs/en/third-party-integrations>) or with `DISABLE_TELEMETRY`.
###
@@ -174,7 +205,7 @@
The JetBrains plugin runs Claude Code in the IDE terminal, so switching permission modes works the same as in the CLI: press `Shift+Tab` to cycle, or pass `--permission-mode` when launching.
-**During a session** : in the Code tab, use the mode selector next to the send button. Not every mode appears in the selector:
+**During a session** : in the Code tab, use the mode selector in the row under the prompt box. Not every mode appears in the selector:
* **Auto** : appears when auto mode is available
* **Bypass permissions** : requires the **Allow bypass permissions mode** toggle in Desktop settings on Pro and Max plans; on Team and Enterprise plans, organization policy controls it instead
@@ -267,7 +298,12 @@
Auto mode on Bedrock, Agent Platform, or Foundry
-On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode is available by default. When nothing else sets a permission mode, it’s also the built-in starting permission mode, on the versions that section’s table lists. To choose the starting permission mode yourself, set `permissions.defaultMode` as Start in a different permission mode describes, or pick a permission mode from the VS Code extension’s mode indicator. Only Claude Sonnet 5 or later, Opus 4.7 or later, Haiku 5.5, and the Fable models are supported on these providers. On any other model, the session starts in Manual instead. Auto mode with Haiku 5.5 on these providers requires Claude Code v2.1.293 or later. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. A session already running in auto mode leaves it when the setting reaches that session from an [admin-deployed source](</docs/en/managed-settings#which-managed-source-claude-code-uses>), and shows `auto mode disabled by settings`. Before v2.1.251, a running session kept auto mode until it ended.
+On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode is available by default. If you don’t set a permission mode there, interactive sessions start in auto mode, and `claude -p` or Agent SDK runs start in Manual mode, whose config value is `default`:
+
+ * **Interactive terminal and VS Code sessions** : to start them in a permission mode other than auto, set `permissions.defaultMode` as Start in a different permission mode describes, or pick one from the VS Code extension’s mode indicator. Which mode a session starts in lists the Claude Code versions that start them in auto mode.
+ * **`claude -p` and Agent SDK runs**: to start one in auto mode, pass `--permission-mode auto` to `claude -p`, or pass `permissionMode: "auto"` in TypeScript or `permission_mode="auto"` in Python. If you pass no permission mode, see Tool calls denied in `claude -p` and Agent SDK runs, which also covers earlier Claude Code versions.
+
+Only Claude Sonnet 5 or later, Opus 4.7 or later, Haiku 5.5, and the Fable models are supported on these providers. On any other model, the session starts in Manual instead. Auto mode with Haiku 5.5 on these providers requires Claude Code v2.1.293 or later. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. A session already running in auto mode leaves it when the setting reaches that session from an [admin-deployed source](</docs/en/managed-settings#which-managed-source-claude-code-uses>), and shows `auto mode disabled by settings`. Before v2.1.251, a running session kept auto mode until it ended.
###
@@ -287,6 +323,69 @@
* **The server gives no verdict for an action** : Claude Code denies the action rather than run it unreviewed. On any connection, this happens when the response ends before the review results arrive or the results arrive in a form Claude Code can’t read. An LLM gateway or proxy that cuts responses short or rewrites the results can cause either. On a direct connection to the Anthropic API, it also happens when the server’s check fails for the action, for example by timing out. [The server returned no safety verdict](</docs/en/errors#the-server-returned-no-safety-verdict>) covers the denial message, what happens when denials repeat, and what to do.
To skip asking the server and always use Claude Code’s own classifier requests, set [`CLAUDE_CODE_AUTO_MODE_SERVER=0`](</docs/en/env-vars>). On a direct connection to the Anthropic API, the variable requires Claude Code v2.1.281 or later. Setting it to `1` there turns server review on in a session that doesn’t have it yet, unless you’ve also set `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1`. If you set `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1` and leave `CLAUDE_CODE_AUTO_MODE_SERVER` unset, Claude Code also stops asking the server, except as [Disable pre-release capabilities](</docs/en/llm-gateway-protocol#disable-pre-release-capabilities>) describes.
+
+###
+
+
+
+Default classifier model
+
+By default, classifier requests go to Claude Sonnet 5. If `/status` shows `Auto mode server` as `Enabled`, they’re sent only for calls outside the server’s review. Find the first row in this table that matches your session. You get that row’s model in place of Sonnet 5.
+
+Your session| Classifier model
+---|---
+Has an Anthropic-configured classifier model| The configured model. Check the debug log to see which
+Runs on Claude Sonnet 4.6| Sonnet 4.6
+Has [`ANTHROPIC_DEFAULT_SONNET_MODEL`](</docs/en/model-config#environment-variables>) set| Its value, or Sonnet 5 if its value is Claude Sonnet 5.5 or Claude Opus 5.5
+
+If Sonnet 5 or the model in `ANTHROPIC_DEFAULT_SONNET_MODEL` is unavailable from your provider or excluded by your organization’s [model policy](</docs/en/model-config#restrict-model-selection>), Claude Code uses a fallback model. That’s your session’s model, or an Opus model in a [Fable session](</docs/en/model-config#work-with-fable>).
+
+###
+
+
+
+Choose the classifier model
+
+With Claude Code v2.1.302 or later, set [`CLAUDE_CODE_AUTO_MODE_MODEL`](</docs/en/env-vars>) to a full model ID to run the classifier on a model other than the default. Your cloud provider’s own full model IDs work too. This `~/.claude/settings.json` example sets Claude Sonnet 4.6:
+
+ {
+ "env": {
+ "CLAUDE_CODE_AUTO_MODE_MODEL": "claude-sonnet-4-6"
+ }
+ }
+
+####
+
+
+
+When your model doesn’t review
+
+Situation| What happens| What to do
+---|---|---
+The debug log reports an Anthropic-configured classifier model| That model reviews| None needed
+You set Claude Opus 5, Sonnet 5.5, Opus 5.5 or one your organization’s [model policy](</docs/en/model-config#restrict-model-selection>) excludes| The default classifier model reviews| Set another model
+Your provider can’t serve the model| Classifier checks fail, so Claude Code [denies each action it checks](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>)| Set a model it serves, or remove the variable
+In a session, `/status` shows `Auto mode server` as `Enabled`| The server reviews without your model| None needed
+
+If several situations apply, go by the first listed.
+
+####
+
+
+
+Check which model the classifier used
+
+From your shell, start an auto mode session with [`--debug-file`](</docs/en/cli-reference#cli-flags>):
+
+ claude --permission-mode auto --debug-file classifier-debug.log
+
+Have Claude run a shell command that isn’t read-only, then search the log for `classifier_request_started`:
+
+ * **Your model after`model=`**: the variable took effect
+ * **A different model after`model=`**: search the log for `ignoring CLAUDE_CODE_AUTO_MODE_MODEL`, which gives the reason and any step to take
+ * **No such line** : read `Auto mode server` in `/status` at the Claude Code prompt:
+ * **`Enabled`** : the server is set to review this session’s calls.
+ * **`Disabled`** : make sure the permission mode is auto, then have Claude run another command that isn’t read-only.
###
@@ -304,7 +403,7 @@
* Modifying shared infrastructure
* Irreversibly destroying files that existed before the session
* Force push
- * Committing or pushing a change that would send secrets or sensitive data outside the repository when it runs, or widen what a deploy exposes. This covers a CI workflow or deploy configuration that passes a secret to a destination that doesn’t already receive it, a script or setup step that reads a secret store and sends the data out, and a config change that widens what a deploy publishes, such as a registry, visibility, artifact, or sourcemap setting. The check applies on any branch, applies even when the repository is public, and fires when the change is committed or pushed, whether or not that commit or push triggers the pipeline; clearing it requires naming the execution effect, not only the commit or push. Before v2.1.211, this check was scoped to the default branch instead: a push there was blocked when it carried sensitive content, changes concealed or misdescribed relative to what you asked for, content ported in from outside the repository, or routed around a review you asked for
+ * Committing or pushing a change that would send secrets or sensitive data outside the repository when it runs, or widen what a deploy exposes. This covers a CI workflow or deploy configuration that passes a secret to a destination that doesn’t already receive it, a script or setup step that reads a secret store and sends the data out, and a config change that widens what a deploy publishes, such as a registry, visibility, artifact, or sourcemap setting. The check applies on any branch, applies even when the repository is public, and fires when the change is committed or pushed, whether or not that commit or push triggers the pipeline; clearing it requires naming the execution effect, not only the commit or push
* `git reset --hard`, `git checkout -- .`, `git restore .`, `git clean -fd`, `git stash drop`, or `git stash clear`, which the classifier presumes would discard uncommitted changes
* `git commit --amend` when the commit at HEAD was not created in this session
* From v2.1.198, `git commit --amend` when the commit at HEAD has already been pushed. A message-only reword is not blocked: `--amend -m` with nothing newly staged, on a commit that Claude created during this session
@@ -354,7 +453,7 @@
* Installing dependencies declared in your lock files or manifests
* Reading `.env` and sending credentials to their matching API
* Read-only HTTP requests
- * Pushing to any branch of the repository you’re working in, including the default branch. A non-default branch whose name marks it as a deploy or publication target, such as `production` or `gh-pages`, isn’t covered: the classifier judges a push there on its own terms. The push’s content is still checked against the other rules, [`permissions.deny` rules](</docs/en/permissions#manage-permissions>) can still block push commands [as written](</docs/en/permissions#bash-rule-limits>) in every mode, and the remote’s own branch protection still applies. Before v2.1.211, only pushes to the branch you started on, branches Claude created, and routine pushes to the default branch were allowed by default
+ * Pushing to any branch of the repository you’re working in, including the default branch. A non-default branch whose name marks it as a deploy or publication target, such as `production` or `gh-pages`, isn’t covered: the classifier judges a push there on its own terms. A push’s content is still checked against the classifier’s other rules, and [`permissions.deny` rules](</docs/en/permissions#manage-permissions>) can still block push commands [as written](</docs/en/permissions#bash-rule-limits>) in every mode. The remote’s own branch protection still applies. From v2.1.203 until v2.1.211, only routine default-branch pushes and pushes to the branch you started on or to branches Claude created were allowed by default.
* Deleting the exact jobs Claude created earlier in the same session
* Reading, reviewing, or writing security-related code, configs, and threat models as part of your task
* Messages between agents working together in the same multi-agent session
@@ -446,7 +545,7 @@
3. Everything else goes to the classifier, apart from critical-path removals under their default handling. The connector tools and `requiresUserInteraction` MCP tools that prompt you directly in step 1 never reach the classifier either, so neither an org-required approval nor a consent step is auto-approved
4. If the classifier blocks, Claude receives the reason. In most sessions the reason names the rule the classifier matched, such as `[Data Exfiltration]`, rather than giving a written explanation; see [Review denials](</docs/en/auto-mode-config#review-denials>)
-A [mod](</docs/en/plugins/mods/overview>) you install that handles `tool.check` can approve an action before step 3, and the classifier doesn’t check an action the mod approves. See [Extend permissions with hooks](</docs/en/permissions#extend-permissions-with-hooks>).In the VS Code extension, how [Claude in Chrome](</docs/en/chrome>) browser actions get approved depends on how the session connected to the browser: see [Permission prompts in VS Code sessions](</docs/en/chrome#permission-prompts-in-vs-code-sessions>).On entering auto mode, broad allow rules that grant arbitrary code execution are dropped:
+A [mod](</docs/en/plugins/mods/overview>) you install that handles `tool.check` can also approve an action. For the cases where its approval doesn’t get past your rules and hooks, see [Extend permissions with hooks](</docs/en/permissions#precedence-among-rules-hooks-and-mods>).In the VS Code extension, how [Claude in Chrome](</docs/en/chrome>) browser actions get approved depends on how the session connected to the browser: see [Permission prompts in VS Code sessions](</docs/en/chrome#permission-prompts-in-vs-code-sessions>).On entering auto mode, broad allow rules that grant arbitrary code execution are dropped:
* Blanket `Bash(*)` or `PowerShell(*)`
* Wildcarded interpreters like `Bash(python*)`
@@ -466,7 +565,7 @@
Cost and latency
-The classifier runs on Claude Sonnet 5 by default rather than on your `/model` selection. A classifier model that Anthropic configures server-side takes precedence over that default. When your session’s model is Claude Sonnet 4.6, or when [`availableModels`](</docs/en/model-config#restrict-model-selection>) excludes Sonnet 5, the classifier runs on the session’s model instead, or on an Opus model when the session runs on a [Fable model](</docs/en/model-config#work-with-fable>). On providers other than the Anthropic API, that Opus fallback is the model you set in [`ANTHROPIC_DEFAULT_OPUS_MODEL`](</docs/en/model-config#environment-variables>), or Opus 5 if you haven’t set one.The session’s first auto-mode request validates the Sonnet 5 default: if the request succeeds, Sonnet 5 stays the session’s classifier model, and if it fails because the model isn’t available, the session uses the fallback instead.On Enterprise plans and on accounts that use the Claude API, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations. Where the server reviews the actions as part of the session’s model requests, there are no separate classifier calls to count; see Server-side classifier review.Sandboxed network access adds no per-connection classifier requests. The classifier judges [the hosts a command names](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) together with the command in one review, and Claude Code checks each connection against the approved list without calling the classifier again.
+Claude Code’s classifier requests can run on a model other than your `/model` selection. See which model they run on.On Enterprise plans and on accounts that use the Claude API, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations. Where the server reviews the actions as part of the session’s model requests, there are no separate classifier calls to count; see Server-side classifier review.Sandboxed network access adds no per-connection classifier requests. The classifier judges [the hosts a command names](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) together with the command in one review, and Claude Code checks each connection against the approved list without calling the classifier again.
##
@@ -474,7 +573,7 @@
Allow only pre-approved tools with dontAsk mode
-If you set `dontAsk` mode, Claude Code auto-denies every tool call that would otherwise prompt you. Claude still runs actions that need no approval in Manual mode, such as file reads inside your working directories and [read-only Bash commands](</docs/en/permissions#read-only-commands>), plus actions matching your `permissions.allow` rules and calls approved by a [PreToolUse hook](</docs/en/permissions#extend-permissions-with-hooks>). Use this mode for CI pipelines or restricted environments where you pre-define what Claude may do; the session never waits for input. The status bar shows `⏵⏵ don't ask on` while this mode is active. Claude Code denies calls matching your explicit [`ask` rules](</docs/en/permissions#manage-permissions>) rather than prompting. It also denies the built-in `AskUserQuestion` tool even if your allow rules match it, and does the same to connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code. It denies MCP tools marked [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) the same way, because their approval card needs an answer this mode never collects. `rm` and `rmdir` removals targeting a critical path, such as `rm -rf /` and `rm -rf ~`, are denied even when an allow rule matches them or a `PreToolUse` hook allows them. A read from a [network path](</docs/en/permissions#network-paths>) is denied the same way. [Cloud sessions](</docs/en/claude-code-on-the-web>) ignore `defaultMode: "dontAsk"`; see bypassPermissions for details. Set it at startup with the flag:
+If you set `dontAsk` mode, Claude Code auto-denies every tool call that would otherwise prompt you, though a [mod](</docs/en/plugins/mods/overview>) you installed can still approve some of those calls. To check which calls a mod can approve, see [Extend permissions with hooks](</docs/en/permissions#precedence-among-rules-hooks-and-mods>). Claude still runs actions that need no approval in Manual mode, such as file reads inside your working directories and [read-only Bash commands](</docs/en/permissions#read-only-commands>). Actions matching your `permissions.allow` rules and calls approved by a [PreToolUse hook](</docs/en/permissions#extend-permissions-with-hooks>) run too. Use this mode for CI pipelines or restricted environments where you pre-define what Claude may do; the session never waits for input. The status bar shows `⏵⏵ don't ask on` in this mode. Claude Code denies calls matching your explicit [`ask` rules](</docs/en/permissions#manage-permissions>) rather than prompting. It also denies the built-in `AskUserQuestion` tool even if your allow rules match it, and does the same to connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code. It denies MCP tools marked [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) the same way, because their approval card needs an answer this mode never collects. `rm` and `rmdir` removals targeting a critical path, such as `rm -rf /` and `rm -rf ~`, are denied even when an allow rule matches them or a `PreToolUse` hook allows them. A read from a [network path](</docs/en/permissions#network-paths>) is denied the same way. [Cloud sessions](</docs/en/claude-code-on-the-web>) ignore `defaultMode: "dontAsk"`; see bypassPermissions for details. Set it at startup with the flag:
claude --permission-mode dontAsk
@@ -594,7 +693,7 @@
* Your working directory and its parents
* Your additional working directories and their parents, but only when the removal is a glob under one of them, such as `rm -rf <dir>/*`. `rm -rf <dir>` on the directory itself doesn’t trigger this check
-The checks on the home directory’s 8.3 short name and on the `\\?\C:\` and `\\localhost\C$` spellings require Claude Code v2.1.292 or later.
+For mounted drive paths such as `/mnt/c` or `/Volumes/USB`, see The mounted drive prompt. The checks on the home directory’s 8.3 short name and on the `\\?\C:\` and `\\localhost\C$` spellings require Claude Code v2.1.292 or later.
###
@@ -652,6 +751,60 @@
+The mounted drive prompt
+
+The mounted drive prompt appears on macOS, Linux, and WSL when a recursive `rm` targets a listed mounted drive path, such as `/mnt/c` or `/Volumes/USB/build`. Its reason reads `Dangerous rm operation on mounted drive path: <path>`. A `/*` target gets the prompt without the recursive flag, since Claude Code reads `rm /Volumes/USB/build/*` as a removal of `/Volumes/USB/build`. Even with an allow rule for `rm`, Claude Code handles the command as a critical-path removal: a prompt or a denial depending on your permission mode. Approve the prompt to let the `rm` run, or turn the prompt off.
+
+####
+
+
+
+Paths that get the mounted drive prompt
+
+Match the target of your recursive `rm` or `/*` removal against these path shapes, where each placeholder such as `<drive>` or `<name>` stands for exactly one path segment:
+
+Under| Path shapes that get the prompt| Examples
+---|---|---
+`/Volumes`| `/Volumes/<drive>`, `/Volumes/<drive>/<name>`| `/Volumes/USB`, `/Volumes/USB/build`
+`/System/Volumes`| `/System/Volumes`, `/System/Volumes/<volume>`, `/System/Volumes/<volume>/<name>`| `/System/Volumes/Data`
+`/media`| `/media/<user>`, `/media/<user>/<drive>`, `/media/<user>/<drive>/<name>`| `/media/alex`
+`/run/media`| `/run/media`, `/run/media/<user>`, `/run/media/<user>/<drive>`, `/run/media/<user>/<drive>/<name>`| `/run/media/alex/USB/build`
+`/mnt`| `/mnt/<name>`, and `/mnt/<letter>/<name>` under a one-letter mount such as WSL’s `/mnt/c`| `/mnt/data`, `/mnt/c/Users`
+
+For a recursive or non-recursive `rm` on `/Volumes`, `/media`, or `/mnt` itself, you see the critical path reason `Dangerous rm operation on critical path: <path>` instead. A relative target counts from your working directory, so `rm -rf build` while you work in `/Volumes/USB` targets `/Volumes/USB/build` and gets the prompt.
+
+####
+
+
+
+Turn off the mounted drive prompt
+
+To stop getting the mounted drive prompt while prompts from other causes stay, start Claude Code with [`CLAUDE_CODE_DISABLE_MOUNTED_DRIVE_RM_PROMPT=1`](</docs/en/env-vars#variables>) in its environment. For example, set the variable in [your shell](</docs/en/env-vars#set-variables-in-your-shell>) and start `claude` from it:
+
+ export CLAUDE_CODE_DISABLE_MOUNTED_DRIVE_RM_PROMPT=1
+ claude
+
+In a session started that way, the mounted drive prompt stops for a whole drive such as `/Volumes/USB` and for the other listed paths. If you allow `Bash(rm *)`, use Manual mode, and work in `/Volumes/USB`, then `rm -rf build` runs with no prompt. A prompt that still shows `Dangerous rm operation on mounted drive path` means the variable isn’t reaching the session:
+
+ * **Variable in a settings file** : Claude Code [ignores the variable in a settings file’s `env` block](</docs/en/settings-reference#variables-claude-code-ignores-in-env>), whichever kind of settings file, so set the variable where you start `claude` instead
+ * **Session started without the variable** : start `claude` again from an environment where the variable is set, since a running session doesn’t pick it up
+
+####
+
+
+
+Removals that still prompt with the mounted drive prompt off
+
+In Manual mode with an allow rule for `rm`, an `rm` on a mounted drive path can still prompt, without the `Dangerous rm operation on mounted drive path` reason:
+
+ * **Target outside your working directories** : `rm -rf /Volumes/USB/other` while you work in `/Volumes/USB/project` gets a prompt. To stop that prompt, [add a directory that contains the target](</docs/en/permissions#working-directories>) to the session
+ * **Target with a`*`**: `rm -rf build/*` gets a prompt. Approve that prompt to run the command, or ask Claude to name each target without a `*`
+ * **Target that is a critical path** : `/mnt` itself and your working directory itself stay critical paths, so `rm -rf` on either gets a prompt. Approve that prompt to let the `rm` run
+
+###
+
+
+
Critical-path removals in each permission mode
What Claude Code does with a critical-path removal depends on your permission mode:
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -505,9 +505,11 @@
In [non-interactive mode](</docs/en/headless>) no dialog is shown. A [background session](</docs/en/agent-view>) honors your acceptance when it’s recorded in user or managed settings:
* With no acceptance recorded, `claude --bg --permission-mode bypassPermissions` is refused until you accept the dialog in an interactive session.
- * With `skipDangerousModePermissionPrompt` set only in `.claude/settings.local.json`, the background session starts with the bypass request ignored and pins the notice `Bypass permissions was requested at launch and ignored · if that was you, ~/.claude/settings.json needs "skipDangerousModePermissionPrompt": true`. To get bypass honored, add that key to `~/.claude/settings.json`, then start a new background session.
-
-On Linux and macOS, Claude Code refuses to start in this mode when running as root or under `sudo`:
+ * With `skipDangerousModePermissionPrompt` set only in `.claude/settings.local.json`, the background session starts with the bypass request ignored and pins the notice `Bypass permissions was requested at launch and ignored · if that was you, ~/.claude/settings.json needs "skipDangerousModePermissionPrompt": true`. Add that key to `~/.claude/settings.json`, then start a new background session. The session showing the notice still runs:
+ * With `--allow-dangerously-skip-permissions` ignored, `bypassPermissions` is left out of its `Shift+Tab` cycle.
+ * With `--permission-mode bypassPermissions` or `--dangerously-skip-permissions` ignored, the session starts in Manual mode instead.
+
+On Linux and macOS, Claude Code refuses to start in `bypassPermissions` mode when running as root or under `sudo`:
--dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons
@@ -554,6 +556,7 @@
* Markdown files in the project’s [auto memory](</docs/en/memory#storage-location>) directory, such as `~/.claude/projects/<project>/memory/`, in a session started without `--restricted`
* Markdown files in a [subagent memory](</docs/en/sub-agents#enable-persistent-memory>) directory, such as `.claude/agent-memory/`, in a session started without `--restricted`
* A directory you loaded with [`--plugin-dir`](</docs/en/plugins/mods/create#change-a-mod-with-claude>), because Claude Code reloads and runs a mod’s code from it when a file changes
+ * `~/.claude/dev-mods/`, or `dev-mods/` in the directory [`CLAUDE_CONFIG_DIR`](</docs/en/env-vars>) points to, where Claude saves the [mods it writes for you](</docs/en/plugins/mods/create#ask-claude-for-a-mod>)
Protected files:
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -187,7 +187,6 @@
* **[Remote Control](</docs/en/remote-control>) sessions** on your local machine: Manual, Accept edits, Plan, and Auto for a session you started yourself, and you can’t select Bypass permissions from the app. To use Auto, the session has to meet the auto mode availability requirements. For a project thread running on your computer, see [Run a thread on your own computer](</docs/en/claude-projects#run-a-thread-on-your-own-computer>).
* Except for Bypass permissions, the dropdown shows the permission mode the local session is in, including one set from the terminal. It updates when the permission mode changes in the app or in the terminal.
* Sessions hosted by the [desktop app](</docs/en/desktop>) or the [VS Code extension](</docs/en/vs-code>) report permission mode changes to claude.ai as they happen, the same as sessions hosted in a terminal.
- * Before v2.1.202, sessions connected with `/remote-control` or `claude --remote-control` didn’t report their permission mode at all, so claude.ai and the mobile app could show a permission mode the session wasn’t in. The mismatch affected only the label. Claude Code generated permission prompts from the session’s actual permission mode, and they still appeared in the app for approval.
For Remote Control, the local machine running the session must be signed in with your claude.ai account; API keys aren’t supported. You can also set the starting permission mode when launching that local session:
@@ -268,7 +267,7 @@
Auto mode on Bedrock, Agent Platform, or Foundry
-On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode is available by default. When nothing else sets a permission mode, it’s also the built-in starting permission mode, on the versions that section’s table lists. To choose the starting permission mode yourself, set `permissions.defaultMode` as Start in a different permission mode describes, or pick a permission mode from the VS Code extension’s mode indicator. Only Claude Sonnet 5 or later, Opus 4.7 or later, Haiku 5.5, and the Fable models are supported on these providers. On any other model, the session starts in Manual instead. Auto mode with Haiku 5.5 on these providers requires Claude Code v2.1.293 or later. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. A session already running in auto mode leaves it when the setting reaches that session from an [admin-deployed source](</docs/en/managed-settings#which-managed-source-claude-code-uses>), and shows `auto mode disabled by settings`. Before v2.1.251, a running session kept auto mode until it ended. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
+On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode is available by default. When nothing else sets a permission mode, it’s also the built-in starting permission mode, on the versions that section’s table lists. To choose the starting permission mode yourself, set `permissions.defaultMode` as Start in a different permission mode describes, or pick a permission mode from the VS Code extension’s mode indicator. Only Claude Sonnet 5 or later, Opus 4.7 or later, Haiku 5.5, and the Fable models are supported on these providers. On any other model, the session starts in Manual instead. Auto mode with Haiku 5.5 on these providers requires Claude Code v2.1.293 or later. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. A session already running in auto mode leaves it when the setting reaches that session from an [admin-deployed source](</docs/en/managed-settings#which-managed-source-claude-code-uses>), and shows `auto mode disabled by settings`. Before v2.1.251, a running session kept auto mode until it ended.
###
@@ -326,25 +325,19 @@
* Launching an autonomous agent loop that runs without human approval or a sandbox, such as one started with `--dangerously-skip-permissions` or `--no-sandbox`. This includes running a third-party agent or eval harness with isolation and per-action approval disabled, such as a runner started with `--yes-always`
* [Claude in Chrome](</docs/en/chrome>) browser actions that could send page content, cookies, or credentials off-origin
* Deleting files in `/tmp`, `$TMPDIR`, or another shared scratch or cache directory by wildcard, glob, or age filter rather than by a specific named path
- * Including sensitive details in content sent, uploaded, published, or written to other people or shared systems, when your own message didn’t authorize those details for that recipient. PR and issue bodies, commit messages, and comments count as this kind of outbound content when the repository is outside the trust boundary or public, including your organization’s own public repositories; internal file paths, code names, live API response data such as emails or account identifiers, and infrastructure identifiers count as sensitive details. Live personal data from an API response in a PR or issue body, such as an email address, an account or organization identifier, or a usage metric, requires you to name those details and the recipient regardless of the repository’s visibility or trust boundary. That check requires Claude Code v2.1.203 or later
+ * Including sensitive details in content sent, uploaded, published, or written to other people or shared systems, when your own message didn’t authorize those details for that recipient. PR and issue bodies, commit messages, and comments count as this kind of outbound content when the repository is outside the trust boundary or public, including your organization’s own public repositories; internal file paths, code names, live API response data such as emails or account identifiers, and infrastructure identifiers count as sensitive details. Live personal data from an API response in a PR or issue body, such as an email address, an account or organization identifier, or a usage metric, requires you to name those details and the recipient regardless of the repository’s visibility or trust boundary
* Sending keystrokes to Claude Code’s own tmux pane to drive its own interface, which the classifier treats as Claude changing its own permissions or oversight
* Commenting out, deleting, or force-passing a test or assertion that guards security behavior, such as auth, access control, input validation, or sandboxing
* Deleting or tearing down a stateful resource Claude didn’t create in the session, when no more specific deletion rule applies and you didn’t name that resource
* Repointing an API base URL, proxy endpoint, webhook receiver, or registry mirror at a third-party host that doesn’t fit the task, including in example files like `.env.example`
* Changing where pushes go with `git remote set-url` or `git remote add`, unless you named the new remote
- * Pushing secrets or personal or entrusted data to a repository known to be public, or pushing confidential material there that isn’t part of that repository’s own work. A dotfiles repository’s own subject matter is the one exception for personal or entrusted data, and content from a private repository reaching any public surface is blocked the same way; both refinements require Claude Code v2.1.203 or later. Before v2.1.203, personal data was grouped with confidential material and blocked only when it wasn’t part of that repository’s own work. When a repository’s visibility isn’t established, the classifier doesn’t block on that alone; it judges the content against the other rules instead
+ * Pushing secrets or personal or entrusted data to a repository known to be public, or pushing confidential material there that isn’t part of that repository’s own work. A dotfiles repository’s own subject matter is the one exception for personal or entrusted data, and content from a private repository reaching any public surface is blocked the same way. When a repository’s visibility isn’t established, the classifier doesn’t block on that alone; it judges the content against the other rules instead
* Opening a pull request against a different repository or organization, forking with `gh repo fork`, or pushing to a third-party repository, unless you named that external target
-
-Several of these categories depend on [environment](</docs/en/auto-mode-config#define-trusted-infrastructure>) entries, such as sensitive remote targets and protected IaC scopes, that you can narrow to concrete names. Claude Code v2.1.203 and later also block these by default:
-
* Content from a sensitive local store, or from a file whose name, path, or type marks it as sensitive, entering a commit, a push, PR or issue text, a gist or paste, or a package publish, unless you named both the source and the destination. Session transcripts and conversation logs, credential and configuration dot-folders such as SSH keys, cloud credentials, browser profiles, and shell history, and user-data exports all count, and the repository being private doesn’t clear it
-
-Claude Code v2.1.205 and later also block these by default:
-
* Writing to Claude Code session transcripts, the `.jsonl` history files under `~/.claude/projects/` or your configured config directory, whether directly or through a shell command. The rule also covers the metadata lines Claude Code appends to each transcript entry for its own checks. Reading a transcript isn’t blocked
* A recursive forced delete such as `rm -rf "$VAR"` or `Remove-Item -Recurse -Force $dir` whose target is a shell variable that isn’t assigned anywhere in the conversation the classifier sees, or a glob rooted at such a variable. The value came only from earlier command output, which the classifier never receives, so the classifier can’t verify the deletion target against the other deletion rules. The block clears when you name the exact path being deleted, or when Claude re-runs the delete with the resolved literal path written into the command. Deletes whose target the classifier can resolve aren’t affected. A glob directly under the variable, as in `rm -rf "$VAR"/*`, is a critical path instead. `Remove-Item` targets that are a bare `*` or end in `/*` or `\*` never reach the classifier: Claude Code denies them outright.
-Claude Code v2.1.257 and later also block these by default:
+Several of these categories depend on [environment](</docs/en/auto-mode-config#define-trusted-infrastructure>) entries, such as sensitive remote targets and protected IaC scopes, that you can narrow to concrete names. Claude Code v2.1.257 and later also block these by default:
* Requesting credentials from the cloud instance-metadata endpoint, such as `169.254.169.254`, or explicitly authenticating a cloud, cluster, or registry call with the machine’s own service-account or node identity
* Reaching a public host by a route other than a direct request, such as a tunnel, a reverse shell, or a resolver or proxy configuration rewritten to point outside
@@ -361,7 +354,7 @@
* Installing dependencies declared in your lock files or manifests
* Reading `.env` and sending credentials to their matching API
* Read-only HTTP requests
- * Pushing to any branch of the repository you’re working in, including the default branch. A non-default branch whose name marks it as a deploy or publication target, such as `production` or `gh-pages`, isn’t covered: the classifier judges a push there on its own terms. The push’s content is still checked against the other rules, [`permissions.deny` rules](</docs/en/permissions#manage-permissions>) can still block push commands [as written](</docs/en/permissions#bash-rule-limits>) in every mode, and the remote’s own branch protection still applies. Before v2.1.211, only pushes to the branch you started on, branches Claude created, and routine pushes to the default branch were allowed by default, and before v2.1.203 any direct push to the default branch was blocked
+ * Pushing to any branch of the repository you’re working in, including the default branch. A non-default branch whose name marks it as a deploy or publication target, such as `production` or `gh-pages`, isn’t covered: the classifier judges a push there on its own terms. The push’s content is still checked against the other rules, [`permissions.deny` rules](</docs/en/permissions#manage-permissions>) can still block push commands [as written](</docs/en/permissions#bash-rule-limits>) in every mode, and the remote’s own branch protection still applies. Before v2.1.211, only pushes to the branch you started on, branches Claude created, and routine pushes to the default branch were allowed by default
* Deleting the exact jobs Claude created earlier in the same session
* Reading, reviewing, or writing security-related code, configs, and threat models as part of your task
* Messages between agents working together in the same multi-agent session
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -45,7 +45,7 @@
You want to| Start with| Isolation needed| Notes
---|---|---|---
Review every action yourself| Manual mode: `claude --permission-mode default`| None| Sensitive work, unfamiliar code
-Iterate locally with fewer prompts, without a classifier| Manual mode plus the Bash sandbox in [auto-allow mode](</docs/en/sandboxing#sandbox-modes>): `claude --permission-mode default`, then run `/sandbox` and select auto-allow| The built-in Bash sandbox, on macOS, Linux, and WSL2| Deny rules still apply, and ask rules that name a command, such as `Bash(git push *)`, still prompt. To turn the sandbox on from a settings file instead, set [`sandbox.enabled`](</docs/en/settings-reference#sandbox-enabled>) to `true`
+Iterate locally with fewer prompts, without a classifier| Manual mode plus the Bash sandbox in [auto-allow mode](</docs/en/sandboxing#sandbox-modes>): `claude --permission-mode default`, then run `/sandbox` and select auto-allow| The built-in Bash sandbox, on macOS, Linux, and WSL2| Deny rules still apply, and ask rules that name a command, such as `Bash(git push *)`, still prompt. [Auto-allow mode](</docs/en/sandboxing#auto-allow-mode>) covers other commands that can prompt. To turn the sandbox on from a settings file instead, set [`sandbox.enabled`](</docs/en/settings-reference#sandbox-enabled>) to `true`
Explore before changing anything| `claude --permission-mode plan`| None| Claude Code blocks edits until you approve a plan
Work hands-off in auto mode| `claude --permission-mode auto`, the built-in starting permission mode with v2.1.283 or later| None; a sandbox or container adds defense in depth| Requires a supported model, and your organization can turn auto mode off
Run in CI with an exact allowlist| `claude -p "run the test suite" --permission-mode dontAsk --allowedTools "Bash(npm test)" "Read"`| None beyond what your CI runner provides| [Cloud sessions](</docs/en/claude-code-on-the-web>) ignore `dontAsk` from settings files
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -14,7 +14,7 @@
`acceptEdits`| Reads, file edits, and common filesystem commands (`mkdir`, `touch`, `mv`, `cp`, etc.)| Iterating on code you’re reviewing
`plan`| Reads, plus classifier-approved commands when auto mode is available| Exploring a codebase before changing it
`auto`| Everything, with background safety checks| Long tasks, reducing prompt fatigue
-`dontAsk`| Reads and pre-approved tools; anything that would prompt is denied| Locked-down CI and scripts
+`dontAsk`| File reads inside your working directories and pre-approved tools; anything that would prompt is denied| Locked-down CI and scripts
`bypassPermissions`| Everything| Isolated containers and VMs only
The mode that reviews every action is named **Manual** in the CLI, in `claude --help`, in the VS Code and JetBrains extensions, and in the desktop app. Its config value is `default`, which is what hooks and SDK integrations use. The CLI accepts `manual` as an alias wherever you type the value, for example `claude --permission-mode manual` or `"defaultMode": "manual"`. Writes to protected paths are never auto-approved except in `bypassPermissions` mode and in plan-mode sessions where bypass permissions are available, meaning interactive terminal sessions started in a way that puts `bypassPermissions` in the mode cycle. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. Deny rules block in every mode, including `bypassPermissions`. Deny and ask rules don’t apply to [`EndConversation`](</docs/en/tools-reference#endconversation-tool-behavior>) as long as Claude still has at least one other tool it can call. Allow rules have no effect in `bypassPermissions`.
@@ -376,7 +376,7 @@
The first read outside the working directories
-While [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) is off, file reads run without a prompt in auto mode, including reads outside the [working directories](</docs/en/permissions#working-directories>). The first time Claude uses the Read, Grep, or Glob tool on a path outside them, Claude Code asks whether to allow that read. The prompt doesn’t appear in non-interactive `-p` runs or background sessions; reads there run as before. Whatever you answer, Claude keeps working:
+While [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) is off, file reads other than [reads from network paths](</docs/en/permissions#network-paths>) run without a prompt in auto mode, including reads outside the [working directories](</docs/en/permissions#working-directories>). The first time Claude uses the Read, Grep, or Glob tool on a path outside them, Claude Code asks whether to allow that read. The prompt doesn’t appear in non-interactive `-p` runs or background sessions; reads there run as before. Whatever you answer, Claude keeps working:
* **Yes, and keep allowing any reads outside the working directories** : the read runs, later reads outside the working directories run as before, and Claude Code records your answer so the prompt doesn’t appear again
* **No, and block reads outside the working directories from now on** : the read is refused, and Claude Code sets [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) to `true` in your user settings, which makes the file tools refuse such reads in every later session and every permission mode. To let Claude read such a path later, add its directory with `/add-dir` or remove the setting.
@@ -438,16 +438,18 @@
Each action goes through a fixed decision order. The first matching step wins:
1. Actions matching your [allow, ask, or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately, with these exceptions:
- * Writes to protected paths route to the classifier even when an allow rule matches
+ * Writes to protected paths route to the classifier even when an allow rule matches. When the protected path is the file that a symlinked settings file points to, the write can prompt you instead, as the protected paths list describes
* No allow rule approves `rm` and `rmdir` removals targeting a critical path
* MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>) prompt you directly even when an allow rule matches, and so do connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code
* A shell command that carries [per-command allowed domains](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) also routes to the classifier even when an allow rule matches, because a rule approves the command, not its hosts
* Ask rules that match on a command’s content, such as `Bash(git push *)`, fall back to a permission prompt
* A write that the [symlink check](</docs/en/permissions#symlinks>) resolves to a protected path prompts you when the path Claude requested isn’t itself protected
+ * A read from a [network path](</docs/en/permissions#network-paths>) prompts you even when an allow rule matches
2. Read-only actions and file edits in your working directory are auto-approved, except writes to protected paths and the first read outside the working directories, which prompts you
* In a session with server-side classifier review, read-only and [sandboxed](</docs/en/sandboxing#sandbox-modes>) shell commands wait for that review and are blocked if it flags them
* A write inside your working directory that the [symlink check](</docs/en/permissions#symlinks>) resolves to a location outside it prompts you
* When Claude reads an [artifact someone else made](</docs/en/artifacts#read-an-artifact-shared-with-you>), the approval cases listed in that section apply
+ * A read from a [network path](</docs/en/permissions#network-paths>) prompts you
3. Everything else goes to the classifier, apart from critical-path removals under their default handling. The connector tools and `requiresUserInteraction` MCP tools that prompt you directly in step 1 never reach the classifier either, so neither an org-required approval nor a consent step is auto-approved
4. If the classifier blocks, Claude receives the reason. In most sessions the reason names the rule the classifier matched, such as `[Data Exfiltration]`, rather than giving a written explanation; see [Review denials](</docs/en/auto-mode-config#review-denials>)
@@ -479,7 +481,7 @@
Allow only pre-approved tools with dontAsk mode
-If you set `dontAsk` mode, Claude Code auto-denies every tool call that would otherwise prompt you. Claude still runs actions that need no approval in Manual mode, such as file reads inside your working directories and [read-only Bash commands](</docs/en/permissions#read-only-commands>), plus actions matching your `permissions.allow` rules and calls approved by a [PreToolUse hook](</docs/en/permissions#extend-permissions-with-hooks>). Use this mode for CI pipelines or restricted environments where you pre-define what Claude may do; the session never waits for input. The status bar shows `⏵⏵ don't ask on` while this mode is active. Claude Code denies calls matching your explicit [`ask` rules](</docs/en/permissions#manage-permissions>) rather than prompting. It also denies the built-in `AskUserQuestion` tool even if your allow rules match it, and does the same to connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code. It denies MCP tools marked [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) the same way, because their approval card needs an answer this mode never collects. `rm` and `rmdir` removals targeting a critical path, such as `rm -rf /` and `rm -rf ~`, are denied even when an allow rule matches them or a `PreToolUse` hook allows them. [Cloud sessions](</docs/en/claude-code-on-the-web>) ignore `defaultMode: "dontAsk"`; see bypassPermissions for details. Set it at startup with the flag:
+If you set `dontAsk` mode, Claude Code auto-denies every tool call that would otherwise prompt you. Claude still runs actions that need no approval in Manual mode, such as file reads inside your working directories and [read-only Bash commands](</docs/en/permissions#read-only-commands>), plus actions matching your `permissions.allow` rules and calls approved by a [PreToolUse hook](</docs/en/permissions#extend-permissions-with-hooks>). Use this mode for CI pipelines or restricted environments where you pre-define what Claude may do; the session never waits for input. The status bar shows `⏵⏵ don't ask on` while this mode is active. Claude Code denies calls matching your explicit [`ask` rules](</docs/en/permissions#manage-permissions>) rather than prompting. It also denies the built-in `AskUserQuestion` tool even if your allow rules match it, and does the same to connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code. It denies MCP tools marked [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) the same way, because their approval card needs an answer this mode never collects. `rm` and `rmdir` removals targeting a critical path, such as `rm -rf /` and `rm -rf ~`, are denied even when an allow rule matches them or a `PreToolUse` hook allows them. A read from a [network path](</docs/en/permissions#network-paths>) is denied the same way. [Cloud sessions](</docs/en/claude-code-on-the-web>) ignore `defaultMode: "dontAsk"`; see bypassPermissions for details. Set it at startup with the flag:
claude --permission-mode dontAsk
@@ -507,7 +509,12 @@
* **If you accept** : Claude Code sets `skipDangerousModePermissionPrompt` to `true` in `~/.claude/settings.json`, so later sessions skip the dialog. To see the dialog again, remove the key from that file or set it to `false`. The [`skipDangerousModePermissionPrompt` reference](</docs/en/settings-reference#skipdangerousmodepermissionprompt>) lists the other settings files where you or your organization can set it.
* **If you decline** : Claude Code exits.
-In [non-interactive mode](</docs/en/headless>) no dialog is shown, and a [background session](</docs/en/agent-view>) started with `--bg` is refused until you’ve accepted the dialog in an interactive session. On Linux and macOS, Claude Code refuses to start in this mode when running as root or under `sudo`:
+In [non-interactive mode](</docs/en/headless>) no dialog is shown. A [background session](</docs/en/agent-view>) honors your acceptance when it’s recorded in user or managed settings:
+
+ * With no acceptance recorded, `claude --bg --permission-mode bypassPermissions` is refused until you accept the dialog in an interactive session.
+ * With `skipDangerousModePermissionPrompt` set only in `.claude/settings.local.json`, the background session starts with the bypass request ignored and pins the notice `Bypass permissions was requested at launch and ignored · if that was you, ~/.claude/settings.json needs "skipDangerousModePermissionPrompt": true`. To get bypass honored, add that key to `~/.claude/settings.json`, then start a new background session.
+
+On Linux and macOS, Claude Code refuses to start in this mode when running as root or under `sudo`:
--dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons
@@ -566,6 +573,7 @@
* `.devcontainer.json`
* `.ripgreprc`, `pyrightconfig.json`
* `.mcp.json`, `.claude.json`
+ * The file that your user, project, or local [settings file](</docs/en/settings#settings-files-and-who-they-affect>) points to when the settings file is itself a symbolic link, for example into a dotfiles repository. In the modes that route protected-path writes to the classifier, a write to this file prompts you instead, even when an allow rule matches. If the file’s own path is also that of a settings file, such as `.claude/settings.json` in another folder, the write goes to the classifier as other protected-path writes do
##
@@ -585,10 +593,12 @@
* The filesystem root
* Top-level directories, meaning any direct child of the root, such as `/usr`, `/etc`, or `/data`
- * Your home directory
- * Windows drive roots and their top-level directories, such as `C:\` and `C:\Windows`
+ * Your home directory. On Windows, its 8.3 short name counts too, such as `C:\Users\LONGNA~1`
+ * Windows drive roots and their top-level directories, such as `C:\` and `C:\Windows`. Spellings such as `\\?\C:\` and `\\localhost\C$` count as `C:\`
* Your working directory and its parents
* Your additional working directories and their parents, but only when the removal is a glob under one of them, such as `rm -rf <dir>/*`. `rm -rf <dir>` on the directory itself doesn’t trigger this check
+
+The checks on the home directory’s 8.3 short name and on the `\\?\C:\` and `\\localhost\C$` spellings require Claude Code v2.1.292 or later.
###
@@ -607,6 +617,7 @@
A target that is only the output of a command substitution, when the `rm` is recursive| `rm -rf "$(pwd)"`| Claude Code can’t check the target before the command runs
A trailing command substitution after a critical path| `rm -rf ~/$(cmd)`| Claude Code checks the path that would remain if the substitution expanded empty, here your home directory
A target that is only backslashes| `rm -rf "\\"`| Git Bash on Windows reads a lone backslash as the current drive’s root, so the check applies on every platform
+A Windows path that names a volume by GUID instead of a drive letter| `rm -rf '\\?\Volume{GUID}\work\build'`| The path doesn’t say which drive it’s on, so it could be a critical path. Requires Claude Code v2.1.292 or later
Some targets that end in `/*` or `/*/`| `rm -rf logs/*/*`, `rm -rf logs/*/`, `cd logs && rm -rf a/*`| Claude Code can’t tell before the command runs which directories they reach
To turn off the check on a target that is only command substitution output, set [`CLAUDE_CODE_DISABLE_SUBSTITUTION_RM_PROMPT=1`](</docs/en/env-vars#variables>) in the environment that launches Claude Code.
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -181,10 +181,10 @@
The Cowork tab doesn’t use these modes. Cowork has its own permission modes, enabled separately, and the Cowork tab shows no mode selector at all until a mode beyond its default is enabled for your account. See the [Cowork docs](<https://claude.com/docs/cowork/overview>).For desktop-specific details, see [Choose a permission mode](</docs/en/desktop#choose-a-permission-mode>) in the Desktop guide.**As a default** : set `defaultMode` in [settings](</docs/en/settings#where-settings-live>). The desktop app reads the same settings files as the CLI and applies the permission mode to new local sessions.A mode you pick in the mode selector is remembered per folder and takes precedence over `defaultMode` for that folder. Plan is the exception: picking it applies to the current session only.For where `defaultMode` goes in a settings file, see the example under Start in a different permission mode.
-Use the mode dropdown next to the prompt box on [claude.ai/code](<https://claude.ai/code>) or in the mobile app. Permission prompts appear in claude.ai for approval. Which modes appear depends on where the session runs:
+On [claude.ai/code](<https://claude.ai/code>), use the mode dropdown next to the prompt box. In the mobile app, tap the **+** button in the prompt box, then **Permission**. Cloud sessions and Remote Control sessions offer different permission modes:
* **[Cloud sessions](</docs/en/claude-code-on-the-web>)** : Accept edits, Plan, and Auto. Accept edits corresponds to `default` mode: cloud sessions pre-approve file edits regardless of mode, so the dropdown shows Accept edits instead of Manual. Cloud sessions still honor `defaultMode: "acceptEdits"` from settings. Auto mode appears only when your organization allows it and the selected model supports it. Bypass permissions isn’t available.
- * **[Remote Control](</docs/en/remote-control>) sessions** on your local machine: Manual, Accept edits, and Plan for a session you started yourself, and you can’t select Auto or Bypass permissions from the app. For a project thread running on your computer, see [Run a thread on your own computer](</docs/en/claude-projects#run-a-thread-on-your-own-computer>).
+ * **[Remote Control](</docs/en/remote-control>) sessions** on your local machine: Manual, Accept edits, Plan, and Auto for a session you started yourself, and you can’t select Bypass permissions from the app. To use Auto, the session has to meet the auto mode availability requirements. For a project thread running on your computer, see [Run a thread on your own computer](</docs/en/claude-projects#run-a-thread-on-your-own-computer>).
* Except for Bypass permissions, the dropdown shows the permission mode the local session is in, including one set from the terminal. It updates when the permission mode changes in the app or in the terminal.
* Sessions hosted by the [desktop app](</docs/en/desktop>) or the [VS Code extension](</docs/en/vs-code>) report permission mode changes to claude.ai as they happen, the same as sessions hosted in a terminal.
* Before v2.1.202, sessions connected with `/remote-control` or `claude --remote-control` didn’t report their permission mode at all, so claude.ai and the mobile app could show a permission mode the session wasn’t in. The mismatch affected only the label. Claude Code generated permission prompts from the session’s actual permission mode, and they still appeared in the app for approval.
@@ -257,7 +257,7 @@
* **Plan** : All plans.
* **Organization** : on Team and Enterprise, auto mode is available by default. Administrators can turn it off for the organization by setting `permissions.disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>).
- * **Model** : on the Anthropic API and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Claude Opus 4.6 or later, Sonnet 4.6 or later, or a [Fable model](</docs/en/model-config#work-with-fable>). On Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, only Claude Sonnet 5 or later, Opus 4.7 or later, and the Fable models. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
+ * **Model** : on the Anthropic API and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Claude Opus 4.6 or later, Sonnet 4.6 or later, Haiku 5.5, or a [Fable model](</docs/en/model-config#work-with-fable>). On Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, only Claude Sonnet 5 or later, Opus 4.7 or later, Haiku 5.5, and the Fable models. Older models, including Sonnet 4.5, Opus 4.5, Haiku 4.5, and claude-3 models, are not supported on any provider.
* **Provider** : available by default on 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, first check these requirements and whether any settings file sets [`disableAutoMode`](</docs/en/settings-reference#disableautomode>). Anthropic may also have turned auto mode off server-side, or the server may have rejected auto mode for your account. A session that received either answer keeps auto mode off until the session ends, so start a new session later. A separate message that names a model and says auto mode “cannot determine the safety” of an action means a classifier request failed. That failure is usually transient, but on Amazon Bedrock it can repeat until your account can invoke the named model. See the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>) for the causes and what to do. If you set `defaultMode: "auto"` in [settings](</docs/en/settings-reference#all-settings>) and a terminal session starts in Manual mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. `auto` doesn’t take effect from those files. Move it to `~/.claude/settings.json`. For a conversation the VS Code extension started, check the extension’s own list in Switch permission modes instead.
@@ -268,7 +268,7 @@
Auto mode on Bedrock, Agent Platform, or Foundry
-On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode is available by default. When nothing else sets a permission mode, it’s also the built-in starting permission mode, on the versions that section’s table lists. To choose the starting permission mode yourself, set `permissions.defaultMode` as Start in a different permission mode describes, or pick a permission mode from the VS Code extension’s mode indicator. Only Claude Sonnet 5 or later, Opus 4.7 or later, and the Fable models are supported on these providers. On any other model, the session starts in Manual instead. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. A session already running in auto mode leaves it when the setting reaches that session from an [admin-deployed source](</docs/en/managed-settings#which-managed-source-claude-code-uses>), and shows `auto mode disabled by settings`. Before v2.1.251, a running session kept auto mode until it ended. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
+On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode is available by default. When nothing else sets a permission mode, it’s also the built-in starting permission mode, on the versions that section’s table lists. To choose the starting permission mode yourself, set `permissions.defaultMode` as Start in a different permission mode describes, or pick a permission mode from the VS Code extension’s mode indicator. Only Claude Sonnet 5 or later, Opus 4.7 or later, Haiku 5.5, and the Fable models are supported on these providers. On any other model, the session starts in Manual instead. Auto mode with Haiku 5.5 on these providers requires Claude Code v2.1.293 or later. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. A session already running in auto mode leaves it when the setting reaches that session from an [admin-deployed source](</docs/en/managed-settings#which-managed-source-claude-code-uses>), and shows `auto mode disabled by settings`. Before v2.1.251, a running session kept auto mode until it ended. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
###
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -71,6 +71,7 @@
---|---
Any settings file sets `disableAutoMode` to `"disable"`| `default`
`claude -p` or the [Agent SDK](</docs/en/agent-sdk/permissions#permission-modes>)| `default` in sessions that [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>). In sessions that don’t, such as on a third-party provider or with telemetry off, `auto` with Claude Code v2.1.285 or later and `default` on earlier versions. A session in an organization whose policy withholds the `auto` default starts in `default` instead
+Your organization has the HIPAA configuration applied and the session is [eligible for it](</docs/en/hipaa-setup#check-how-developers-sign-in-and-connect>)| `default` with Claude Code v2.1.285 or later; auto mode stays available to switch to
In a terminal or through the [VS Code extension](</docs/en/vs-code>)| `auto` with Claude Code v2.1.283 or later; on earlier versions, `auto` on Pro, Max, or Team plans in sessions that [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), and `default` otherwise
In your [first session after an install or upgrade](</docs/en/env-vars#first-session-after-an-install-or-upgrade>), Claude Code can choose the starting permission mode before its feature flags arrive. That session can start in a different permission mode than the table gives. When the flag, a settings file, or the built-in default selects `auto` but auto mode isn’t available to the session, Claude Code starts the session in Manual instead. Auto mode is unavailable when the session doesn’t meet the availability requirements, such as a settings file turning it off or a model that doesn’t support it, or when Anthropic has temporarily turned it off server-side. The first time the built-in default starts one of your sessions in auto mode, Claude Code shows a notice that links to this page:
@@ -104,6 +105,21 @@
}
The next session you start shows `⏸ manual mode on` in the status bar.
+
+###
+
+
+
+Permission modes with the HIPAA configuration
+
+In an organization with the [HIPAA configuration](</docs/en/hipaa-setup>) applied, the built-in `auto` default doesn’t apply. A terminal or VS Code session starts in Manual mode when nothing else chooses its starting permission mode. A terminal session also shows `Auto mode isn't the default for your organization · Shift+Tab to switch`, and the VS Code extension shows no notice. [Check how developers sign in and connect](</docs/en/hipaa-setup#check-how-developers-sign-in-and-connect>) lists the sessions this applies to. Auto mode and `bypassPermissions` stay available:
+
+ * **Switch to auto mode** : press `Shift+Tab`, or use your interface’s control
+ * **Start in auto mode** : pass `--permission-mode auto`, or set `permissions.defaultMode` to `auto` in your user settings, or in managed settings for your whole organization. See Start in a different permission mode
+ * **Remove auto mode** : set [`permissions.disableAutoMode`](</docs/en/settings-reference#disableautomode>) to `"disable"` in managed settings
+ * **Block`bypassPermissions`**: set [`permissions.disableBypassPermissionsMode`](</docs/en/settings-reference#permissions-disablebypasspermissionsmode>) to `"disable"` in managed settings
+
+Requires Claude Code v2.1.285 or later, the [minimum version for the HIPAA configuration](</docs/en/hipaa-setup#update-claude-code-and-claude-desktop>).
##
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -17,7 +17,7 @@
`dontAsk`| Reads and pre-approved tools; anything that would prompt is denied| Locked-down CI and scripts
`bypassPermissions`| Everything| Isolated containers and VMs only
-The mode that reviews every action is named **Manual** in the CLI, in `claude --help`, in the VS Code and JetBrains extensions, and in the desktop app. Its config value is `default`, which is what hooks and SDK integrations use. The CLI accepts `manual` as an alias wherever you type the value, for example `claude --permission-mode manual` or `"defaultMode": "manual"`. The Manual label and the `manual` alias require Claude Code v2.1.200 or later. The desktop app’s label doesn’t depend on your CLI version. Writes to protected paths are never auto-approved except in `bypassPermissions` mode and in plan-mode sessions where bypass permissions are available, meaning interactive terminal sessions started in a way that puts `bypassPermissions` in the mode cycle. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. Deny rules block in every mode, including `bypassPermissions`. Deny and ask rules don’t apply to [`EndConversation`](</docs/en/tools-reference#endconversation-tool-behavior>) as long as Claude still has at least one other tool it can call. Allow rules have no effect in `bypassPermissions`.
+The mode that reviews every action is named **Manual** in the CLI, in `claude --help`, in the VS Code and JetBrains extensions, and in the desktop app. Its config value is `default`, which is what hooks and SDK integrations use. The CLI accepts `manual` as an alias wherever you type the value, for example `claude --permission-mode manual` or `"defaultMode": "manual"`. Writes to protected paths are never auto-approved except in `bypassPermissions` mode and in plan-mode sessions where bypass permissions are available, meaning interactive terminal sessions started in a way that puts `bypassPermissions` in the mode cycle. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. Deny rules block in every mode, including `bypassPermissions`. Deny and ask rules don’t apply to [`EndConversation`](</docs/en/tools-reference#endconversation-tool-behavior>) as long as Claude still has at least one other tool it can call. Allow rules have no effect in `bypassPermissions`.
###
@@ -279,7 +279,7 @@
What the classifier blocks by default
-The classifier trusts your working directory and the remotes that were configured for it when the session started. A remote added or repointed during the session with `git remote add` or `git remote set-url` isn’t trusted, and everything else is treated as external until you [configure trusted infrastructure](</docs/en/auto-mode-config>). Before v2.1.200, remotes added mid-session were also trusted. **Blocked by default** :
+The classifier trusts your working directory and the remotes that were configured for it when the session started. A remote added or repointed during the session with `git remote add` or `git remote set-url` isn’t trusted, and everything else is treated as external until you [configure trusted infrastructure](</docs/en/auto-mode-config>). **Blocked by default** :
* Downloading and executing code, like `curl | bash`
* Sending sensitive data to external endpoints
@@ -310,11 +310,8 @@
* Launching an autonomous agent loop that runs without human approval or a sandbox, such as one started with `--dangerously-skip-permissions` or `--no-sandbox`. This includes running a third-party agent or eval harness with isolation and per-action approval disabled, such as a runner started with `--yes-always`
* [Claude in Chrome](</docs/en/chrome>) browser actions that could send page content, cookies, or credentials off-origin
* Deleting files in `/tmp`, `$TMPDIR`, or another shared scratch or cache directory by wildcard, glob, or age filter rather than by a specific named path
- * Including sensitive details in content sent, uploaded, published, or written to other people or shared systems, when your own message didn’t authorize those details for that recipient. PR and issue bodies, commit messages, and comments count as this kind of outbound content when the repository is outside the trust boundary or public, including your organization’s own public repositories; internal file paths, code names, live API response data such as emails or account identifiers, and infrastructure identifiers count as sensitive details. The PR, issue, and commit-message scoping requires Claude Code v2.1.200 or later. Live personal data from an API response in a PR or issue body, such as an email address, an account or organization identifier, or a usage metric, requires you to name those details and the recipient regardless of the repository’s visibility or trust boundary. That check requires Claude Code v2.1.203 or later
+ * Including sensitive details in content sent, uploaded, published, or written to other people or shared systems, when your own message didn’t authorize those details for that recipient. PR and issue bodies, commit messages, and comments count as this kind of outbound content when the repository is outside the trust boundary or public, including your organization’s own public repositories; internal file paths, code names, live API response data such as emails or account identifiers, and infrastructure identifiers count as sensitive details. Live personal data from an API response in a PR or issue body, such as an email address, an account or organization identifier, or a usage metric, requires you to name those details and the recipient regardless of the repository’s visibility or trust boundary. That check requires Claude Code v2.1.203 or later
* Sending keystrokes to Claude Code’s own tmux pane to drive its own interface, which the classifier treats as Claude changing its own permissions or oversight
-
-Several of these categories depend on [environment](</docs/en/auto-mode-config#define-trusted-infrastructure>) entries, such as sensitive remote targets and protected IaC scopes, that you can narrow to concrete names. Claude Code v2.1.200 and later also block these by default:
-
* Commenting out, deleting, or force-passing a test or assertion that guards security behavior, such as auth, access control, input validation, or sandboxing
* Deleting or tearing down a stateful resource Claude didn’t create in the session, when no more specific deletion rule applies and you didn’t name that resource
* Repointing an API base URL, proxy endpoint, webhook receiver, or registry mirror at a third-party host that doesn’t fit the task, including in example files like `.env.example`
@@ -322,7 +319,7 @@
* Pushing secrets or personal or entrusted data to a repository known to be public, or pushing confidential material there that isn’t part of that repository’s own work. A dotfiles repository’s own subject matter is the one exception for personal or entrusted data, and content from a private repository reaching any public surface is blocked the same way; both refinements require Claude Code v2.1.203 or later. Before v2.1.203, personal data was grouped with confidential material and blocked only when it wasn’t part of that repository’s own work. When a repository’s visibility isn’t established, the classifier doesn’t block on that alone; it judges the content against the other rules instead
* Opening a pull request against a different repository or organization, forking with `gh repo fork`, or pushing to a third-party repository, unless you named that external target
-Claude Code v2.1.203 and later also block these by default:
+Several of these categories depend on [environment](</docs/en/auto-mode-config#define-trusted-infrastructure>) entries, such as sensitive remote targets and protected IaC scopes, that you can narrow to concrete names. Claude Code v2.1.203 and later also block these by default:
* Content from a sensitive local store, or from a file whose name, path, or type marks it as sensitive, entering a commit, a push, PR or issue text, a gist or paste, or a package publish, unless you named both the source and the destination. Session transcripts and conversation logs, credential and configuration dot-folders such as SSH keys, cloud credentials, browser profiles, and shell history, and user-data exports all count, and the repository being private doesn’t clear it
@@ -534,7 +531,12 @@
* `.devcontainer`
* `.yarn`
* `.mvn`
- * `.claude`, except for `.claude/worktrees` where Claude stores its own git worktrees, and except for the markdown files in Claude’s own [auto memory](</docs/en/memory#storage-location>) directory in a session started without `--restricted`
+ * `.claude`, with a few exceptions, such as:
+ * Claude’s own git worktrees under `.claude/worktrees/`
+ * The current session’s own plan files in `~/.claude/plans/`, or in the [`plansDirectory`](</docs/en/settings-reference#plansdirectory>) you set
+ * A [background session](</docs/en/agent-view#where-state-is-stored>)’s own scratch directory at `~/.claude/jobs/<id>/tmp/`
+ * Markdown files in the project’s [auto memory](</docs/en/memory#storage-location>) directory, such as `~/.claude/projects/<project>/memory/`, in a session started without `--restricted`
+ * Markdown files in a [subagent memory](</docs/en/sub-agents#enable-persistent-memory>) directory, such as `.claude/agent-memory/`, in a session started without `--restricted`
* A directory you loaded with [`--plugin-dir`](</docs/en/plugins/mods/create#change-a-mod-with-claude>), because Claude Code reloads and runs a mod’s code from it when a file changes
Protected files:
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -589,6 +589,7 @@
A target that is only the output of a command substitution, when the `rm` is recursive| `rm -rf "$(pwd)"`| Claude Code can’t check the target before the command runs
A trailing command substitution after a critical path| `rm -rf ~/$(cmd)`| Claude Code checks the path that would remain if the substitution expanded empty, here your home directory
A target that is only backslashes| `rm -rf "\\"`| Git Bash on Windows reads a lone backslash as the current drive’s root, so the check applies on every platform
+Some targets that end in `/*` or `/*/`| `rm -rf logs/*/*`, `rm -rf logs/*/`, `cd logs && rm -rf a/*`| Claude Code can’t tell before the command runs which directories they reach
To turn off the check on a target that is only command substitution output, set [`CLAUDE_CODE_DISABLE_SUBSTITUTION_RM_PROMPT=1`](</docs/en/env-vars#variables>) in the environment that launches Claude Code.
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -73,7 +73,7 @@
`claude -p` or the [Agent SDK](</docs/en/agent-sdk/permissions#permission-modes>)| `default` in sessions that [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>). In sessions that don’t, such as on a third-party provider or with telemetry off, `auto` with Claude Code v2.1.285 or later and `default` on earlier versions. A session in an organization whose policy withholds the `auto` default starts in `default` instead
In a terminal or through the [VS Code extension](</docs/en/vs-code>)| `auto` with Claude Code v2.1.283 or later; on earlier versions, `auto` on Pro, Max, or Team plans in sessions that [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), and `default` otherwise
-In your [first session after an install or upgrade](</docs/en/env-vars#first-session-after-an-install-or-upgrade>), Claude Code can choose the starting permission mode before its feature flags arrive. That session can start in a different permission mode than the table gives, and your next session matches the table. When the flag, a settings file, or the built-in default selects `auto` but auto mode isn’t available to the session, Claude Code starts the session in Manual instead. Auto mode is unavailable when the session doesn’t meet the availability requirements, such as a settings file turning it off or a model that doesn’t support it, or when Anthropic has temporarily turned it off server-side. The first time the built-in default starts one of your sessions in auto mode, Claude Code shows a notice that links to this page:
+In your [first session after an install or upgrade](</docs/en/env-vars#first-session-after-an-install-or-upgrade>), Claude Code can choose the starting permission mode before its feature flags arrive. That session can start in a different permission mode than the table gives. When the flag, a settings file, or the built-in default selects `auto` but auto mode isn’t available to the session, Claude Code starts the session in Manual instead. Auto mode is unavailable when the session doesn’t meet the availability requirements, such as a settings file turning it off or a model that doesn’t support it, or when Anthropic has temporarily turned it off server-side. The first time the built-in default starts one of your sessions in auto mode, Claude Code shows a notice that links to this page:
* In a terminal, once, at the top of the session
* In the VS Code extension, as a card on the new-conversation screen that stays until you dismiss it
@@ -534,7 +534,7 @@
* `.devcontainer`
* `.yarn`
* `.mvn`
- * `.claude`, except for `.claude/worktrees` where Claude stores its own git worktrees
+ * `.claude`, except for `.claude/worktrees` where Claude stores its own git worktrees, and except for the markdown files in Claude’s own [auto memory](</docs/en/memory#storage-location>) directory in a session started without `--restricted`
* A directory you loaded with [`--plugin-dir`](</docs/en/plugins/mods/create#change-a-mod-with-claude>), because Claude Code reloads and runs a mod’s code from it when a file changes
Protected files:
@@ -601,9 +601,11 @@
Claude Code also looks inside these constructs:
* **Nested commands** : a subshell with `(...)`, a brace group with `{ ...; }`, command substitution with `$(...)` or backticks, or process substitution with `<(...)`. Claude Code finds a critical-path removal whether it sits inside the nested form, as in `(rm -rf ~)` or `echo "$(rm -rf ~)"`, or elsewhere in the same command.
- * **Inline scripts** : Claude Code checks a script passed to a shell such as `sh -c` or `bash -c` for the shell variable and positional parameter targets.
+ * **Inline scripts** : a script passed to `sh`, `bash`, `zsh`, or a similar POSIX shell with `-c`, as in `bash -c 'rm -rf ~'`.
* When the script is double-quoted, the invoking shell expands its variables before the inner shell receives the script. In `find . -name '*.tmp' -exec sh -c "rm -rf \"$1\"/*" _ {} \;`, the command expands to a removal from the filesystem root once per match, and Claude Code treats it as a critical-path removal.
* A single-quoted script that binds `$1` to a real value, as `sh -c 'rm -rf "$1"/*' _ {}` does, isn’t flagged.
+
+To turn off the check on a critical path typed directly in a `-c` script, such as `~`, set [`CLAUDE_CODE_DISABLE_INLINE_SHELL_RM_PROMPT=1`](</docs/en/env-vars#variables>) in the environment that launches Claude Code.
###
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -466,7 +466,7 @@
Allow only pre-approved tools with dontAsk mode
-If you set `dontAsk` mode, Claude Code auto-denies every tool call that would otherwise prompt you. Claude still runs actions that need no approval in Manual mode, such as file reads inside your working directories and [read-only Bash commands](</docs/en/permissions#read-only-commands>), plus actions matching your `permissions.allow` rules and calls approved by a [PreToolUse hook](</docs/en/permissions#extend-permissions-with-hooks>). Use this mode for CI pipelines or restricted environments where you pre-define what Claude may do; the session never waits for input. The status bar shows `⏵⏵ don't ask on` while this mode is active. Claude Code denies calls matching your explicit [`ask` rules](</docs/en/permissions#manage-permissions>) rather than prompting. It also denies the built-in `AskUserQuestion` tool even if your allow rules match it, and does the same to connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code. It denies MCP tools marked [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) the same way, because their approval card needs an answer this mode never collects; this requires Claude Code v2.1.199 or later. `rm` and `rmdir` removals targeting a critical path, such as `rm -rf /` and `rm -rf ~`, are denied even when an allow rule matches them or a `PreToolUse` hook allows them. [Cloud sessions](</docs/en/claude-code-on-the-web>) ignore `defaultMode: "dontAsk"`; see bypassPermissions for details. Set it at startup with the flag:
+If you set `dontAsk` mode, Claude Code auto-denies every tool call that would otherwise prompt you. Claude still runs actions that need no approval in Manual mode, such as file reads inside your working directories and [read-only Bash commands](</docs/en/permissions#read-only-commands>), plus actions matching your `permissions.allow` rules and calls approved by a [PreToolUse hook](</docs/en/permissions#extend-permissions-with-hooks>). Use this mode for CI pipelines or restricted environments where you pre-define what Claude may do; the session never waits for input. The status bar shows `⏵⏵ don't ask on` while this mode is active. Claude Code denies calls matching your explicit [`ask` rules](</docs/en/permissions#manage-permissions>) rather than prompting. It also denies the built-in `AskUserQuestion` tool even if your allow rules match it, and does the same to connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code. It denies MCP tools marked [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) the same way, because their approval card needs an answer this mode never collects. `rm` and `rmdir` removals targeting a critical path, such as `rm -rf /` and `rm -rf ~`, are denied even when an allow rule matches them or a `PreToolUse` hook allows them. [Cloud sessions](</docs/en/claude-code-on-the-web>) ignore `defaultMode: "dontAsk"`; see bypassPermissions for details. Set it at startup with the flag:
claude --permission-mode dontAsk
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -123,7 +123,9 @@
* Web and mobile
-**During a session** : press `Shift+Tab` to cycle permission modes. From `auto`, the first press switches to `default`, and the cycle then runs `default` → `acceptEdits` → `plan` → back to `default`. Optional modes, described below, slot in after `plan`. The status bar shows the active mode as a gray `⏸ manual mode on` for `default`, or as `⏵⏵ accept edits on`, `⏸ plan mode on`, `⏵⏵ auto mode on`, `⏵⏵ don't ask on`, or `⏵⏵ bypass permissions on`.Not every mode is in the default cycle:
+**During a session** : press `Shift+Tab` to cycle permission modes. From `auto`, the first press switches to `default`, and the cycle then runs `default` → `acceptEdits` → `plan`. Optional modes slot in after `plan`. The status bar shows the active mode as a gray `⏸ manual mode on` for `default`, or as `⏵⏵ accept edits on`, `⏸ plan mode on`, `⏵⏵ auto mode on`, `⏵⏵ don't ask on`, or `⏵⏵ bypass permissions on`.Watch the status bar in this clip of a session that started in auto mode. Each time you press `Shift+Tab`, it changes from `auto mode on` to `manual mode on`, `accept edits on`, `plan mode on`, and back to `auto mode on`.
+
+Not every mode is in the default cycle:
* `auto`: appears when auto mode is available; cycling to it switches permission modes without a confirmation prompt
* `bypassPermissions`: appears after you start with `--permission-mode bypassPermissions`, `--dangerously-skip-permissions`, `--allow-dangerously-skip-permissions`, or `permissions.defaultMode: "bypassPermissions"` in [user, `--settings`, or managed settings](</docs/en/settings-reference#permissions-defaultmode>). The `--allow-` variant adds the permission mode to the cycle without activating it
@@ -260,7 +262,7 @@
In auto mode, Claude Code can ask the server to check the actions that the decision order sends for review, as part of the session’s model requests, in place of sending its own classifier requests. These sessions ask:
- * **A direct connection to the Anthropic API** : in an interactive terminal session, on every claude.ai plan and on accounts that use the Claude API, as Anthropic rolls it out. Requires Claude Code v2.1.271 or later on Pro, Max, and Team plans, and v2.1.278 or later on Enterprise plans and Claude API accounts. From v2.1.282, a session that [doesn’t fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), for example because you turned telemetry off, asks the server by default in any kind of session.
+ * **A direct connection to the Anthropic API** : in interactive terminal sessions and in `-p`, Agent SDK, [VS Code extension](</docs/en/vs-code>), and [desktop app](</docs/en/desktop>) sessions, whatever your plan or account type, as Anthropic rolls it out. In interactive terminal sessions, this requires Claude Code v2.1.271 or later on Pro, Max, and Team plans, and v2.1.278 or later on Enterprise plans and Claude API accounts. In `-p`, Agent SDK, VS Code extension, and desktop app sessions, this requires Claude Code v2.1.281 or later. From v2.1.282, a session that [doesn’t fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), for example because you turned telemetry off, asks the server by default in any kind of session.
* **A cloud provider, or an LLM gateway or proxy** : on [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry, and whenever you point `ANTHROPIC_BASE_URL` at an [LLM gateway or proxy](</docs/en/llm-gateway>), whatever your plan. Asking by default requires Claude Code v2.1.278 or later.
* **A signed-in[Claude apps gateway](</docs/en/claude-apps-gateway>) session**: requires Claude Code v2.1.280 or later
@@ -269,7 +271,7 @@
* **The server doesn’t review the session** : a response completes with no review results, or the server answers that it doesn’t review this session. The most common causes are an LLM gateway or proxy that drops the request for review or the results, and a platform, region, or credential that doesn’t have server-side checks yet. Claude Code falls back to its own classifier requests. Once that fallback holds for the rest of the session, it shows a [notice about classifier request charges](</docs/en/auto-mode-classifier-billing>) on accounts where those requests are billed.
* **The server gives no verdict for an action** : Claude Code denies the action rather than run it unreviewed. On any connection, this happens when the response ends before the review results arrive or the results arrive in a form Claude Code can’t read. An LLM gateway or proxy that cuts responses short or rewrites the results can cause either. On a direct connection to the Anthropic API, it also happens when the server’s check fails for the action, for example by timing out. [The server returned no safety verdict](</docs/en/errors#the-server-returned-no-safety-verdict>) covers the denial message, what happens when denials repeat, and what to do.
-To skip asking the server and always use Claude Code’s own classifier requests, set [`CLAUDE_CODE_AUTO_MODE_SERVER=0`](</docs/en/env-vars>). On a direct connection to the Anthropic API, the variable requires Claude Code v2.1.281 or later. Setting it to `1` there turns server review on in a session that doesn’t have it yet, such as a `-p` or Agent SDK session, unless you’ve also set `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1`. If you set `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1` and leave `CLAUDE_CODE_AUTO_MODE_SERVER` unset, Claude Code also stops asking the server, except as [Disable pre-release capabilities](</docs/en/llm-gateway-protocol#disable-pre-release-capabilities>) describes.
+To skip asking the server and always use Claude Code’s own classifier requests, set [`CLAUDE_CODE_AUTO_MODE_SERVER=0`](</docs/en/env-vars>). On a direct connection to the Anthropic API, the variable requires Claude Code v2.1.281 or later. Setting it to `1` there turns server review on in a session that doesn’t have it yet, unless you’ve also set `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1`. If you set `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1` and leave `CLAUDE_CODE_AUTO_MODE_SERVER` unset, Claude Code also stops asking the server, except as [Disable pre-release capabilities](</docs/en/llm-gateway-protocol#disable-pre-release-capabilities>) describes.
###
@@ -302,19 +304,16 @@
* Interactive shells or port-forwards into a sensitive remote target
* Opening a tunnel or reverse shell that makes a local service reachable from the public internet
* Printing a live credential or token into the transcript or a file
- * Accessing a location listed as a sensitive data location in your [environment](</docs/en/auto-mode-config#define-trusted-infrastructure>), or copying data out of one. As of v2.1.198 this also blocks sending data from one to an audience the entry excludes
- * Routing a package install around your internal package registry to a public registry. As of v2.1.198, this also applies when you’ve told Claude an internal registry or mirror exists in the conversation, not only when one is listed in your environment
+ * Accessing a location listed as a sensitive data location in your [environment](</docs/en/auto-mode-config#define-trusted-infrastructure>), copying data out of one, or sending data from one to an audience the entry excludes
+ * Routing a package install around your internal package registry to a public registry. This applies when an internal registry or mirror is listed in your environment or when you’ve told Claude in the conversation that one exists
* Running a command with a flag that disarms a safety guard, like `--insecure`
- * Launching an autonomous agent loop that runs without human approval or a sandbox, such as one started with `--dangerously-skip-permissions` or `--no-sandbox`. As of v2.1.198 this also covers running a third-party agent or eval harness with isolation and per-action approval disabled, such as a runner started with `--yes-always`
+ * Launching an autonomous agent loop that runs without human approval or a sandbox, such as one started with `--dangerously-skip-permissions` or `--no-sandbox`. This includes running a third-party agent or eval harness with isolation and per-action approval disabled, such as a runner started with `--yes-always`
* [Claude in Chrome](</docs/en/chrome>) browser actions that could send page content, cookies, or credentials off-origin
-
-Several of these categories depend on [environment](</docs/en/auto-mode-config#define-trusted-infrastructure>) entries, such as sensitive remote targets and protected IaC scopes, that you can narrow to concrete names. Claude Code v2.1.198 and later also block these by default:
-
* Deleting files in `/tmp`, `$TMPDIR`, or another shared scratch or cache directory by wildcard, glob, or age filter rather than by a specific named path
* Including sensitive details in content sent, uploaded, published, or written to other people or shared systems, when your own message didn’t authorize those details for that recipient. PR and issue bodies, commit messages, and comments count as this kind of outbound content when the repository is outside the trust boundary or public, including your organization’s own public repositories; internal file paths, code names, live API response data such as emails or account identifiers, and infrastructure identifiers count as sensitive details. The PR, issue, and commit-message scoping requires Claude Code v2.1.200 or later. Live personal data from an API response in a PR or issue body, such as an email address, an account or organization identifier, or a usage metric, requires you to name those details and the recipient regardless of the repository’s visibility or trust boundary. That check requires Claude Code v2.1.203 or later
* Sending keystrokes to Claude Code’s own tmux pane to drive its own interface, which the classifier treats as Claude changing its own permissions or oversight
-Claude Code v2.1.200 and later also block these by default:
+Several of these categories depend on [environment](</docs/en/auto-mode-config#define-trusted-infrastructure>) entries, such as sensitive remote targets and protected IaC scopes, that you can narrow to concrete names. Claude Code v2.1.200 and later also block these by default:
* Commenting out, deleting, or force-passing a test or assertion that guards security behavior, such as auth, access control, input validation, or sandboxing
* Deleting or tearing down a stateful resource Claude didn’t create in the session, when no more specific deletion rule applies and you didn’t name that resource
@@ -435,10 +434,11 @@
2. Read-only actions and file edits in your working directory are auto-approved, except writes to protected paths and the first read outside the working directories, which prompts you
* In a session with server-side classifier review, read-only and [sandboxed](</docs/en/sandboxing#sandbox-modes>) shell commands wait for that review and are blocked if it flags them
* A write inside your working directory that the [symlink check](</docs/en/permissions#symlinks>) resolves to a location outside it prompts you
+ * When Claude reads an [artifact someone else made](</docs/en/artifacts#read-an-artifact-shared-with-you>), the approval cases listed in that section apply
3. Everything else goes to the classifier, apart from critical-path removals under their default handling. The connector tools and `requiresUserInteraction` MCP tools that prompt you directly in step 1 never reach the classifier either, so neither an org-required approval nor a consent step is auto-approved
4. If the classifier blocks, Claude receives the reason. In most sessions the reason names the rule the classifier matched, such as `[Data Exfiltration]`, rather than giving a written explanation; see [Review denials](</docs/en/auto-mode-config#review-denials>)
-On entering auto mode, broad allow rules that grant arbitrary code execution are dropped:
+A [mod](</docs/en/plugins/mods/overview>) you install that handles `tool.check` can approve an action before step 3, and the classifier doesn’t check an action the mod approves. See [Extend permissions with hooks](</docs/en/permissions#extend-permissions-with-hooks>).In the VS Code extension, how [Claude in Chrome](</docs/en/chrome>) browser actions get approved depends on how the session connected to the browser: see [Permission prompts in VS Code sessions](</docs/en/chrome#permission-prompts-in-vs-code-sessions>).On entering auto mode, broad allow rules that grant arbitrary code execution are dropped:
* Blanket `Bash(*)` or `PowerShell(*)`
* Wildcarded interpreters like `Bash(python*)`
@@ -458,7 +458,7 @@
Cost and latency
-The classifier runs on Claude Sonnet 5 by default rather than on your `/model` selection. A classifier model that Anthropic configures server-side takes precedence over that default. When your session’s model is Claude Sonnet 4.6, or when [`availableModels`](</docs/en/model-config#restrict-model-selection>) excludes Sonnet 5, the classifier runs on the session’s model instead, or on an Opus model when the session runs on a [Fable model](</docs/en/model-config#work-with-fable>); on providers other than the Anthropic API, that Opus fallback is the provider’s default Opus model.The session’s first auto-mode request validates the Sonnet 5 default: if the request succeeds, Sonnet 5 stays the session’s classifier model, and if it fails because the model isn’t available, the session uses the fallback instead.On Enterprise plans and on accounts that use the Claude API, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations. Where the server reviews the actions as part of the session’s model requests, there are no separate classifier calls to count; see Server-side classifier review.Sandboxed network access adds no per-connection classifier requests. The classifier judges [the hosts a command names](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) together with the command in one review, and Claude Code checks each connection against the approved list without calling the classifier again.
+The classifier runs on Claude Sonnet 5 by default rather than on your `/model` selection. A classifier model that Anthropic configures server-side takes precedence over that default. When your session’s model is Claude Sonnet 4.6, or when [`availableModels`](</docs/en/model-config#restrict-model-selection>) excludes Sonnet 5, the classifier runs on the session’s model instead, or on an Opus model when the session runs on a [Fable model](</docs/en/model-config#work-with-fable>). On providers other than the Anthropic API, that Opus fallback is the model you set in [`ANTHROPIC_DEFAULT_OPUS_MODEL`](</docs/en/model-config#environment-variables>), or Opus 5 if you haven’t set one.The session’s first auto-mode request validates the Sonnet 5 default: if the request succeeds, Sonnet 5 stays the session’s classifier model, and if it fails because the model isn’t available, the session uses the fallback instead.On Enterprise plans and on accounts that use the Claude API, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations. Where the server reviews the actions as part of the session’s model requests, there are no separate classifier calls to count; see Server-side classifier review.Sandboxed network access adds no per-connection classifier requests. The classifier judges [the hosts a command names](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) together with the command in one review, and Claude Code checks each connection against the approved list without calling the classifier again.
##
@@ -476,7 +476,7 @@
Skip all checks with bypassPermissions mode
-`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. The actions no mode auto-approves still prompt in this mode. The Remove-Item in PowerShell denies also apply in this mode. Two [cross-session messaging](</docs/en/cross-session-messaging>) safeguards still apply in this mode, and in interactive terminal plan-mode sessions where bypass permissions are available:
+`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. The actions no mode auto-approves still prompt in this mode. Reading [another organization’s public artifact](</docs/en/artifacts#read-an-artifact-shared-with-you>) needs your approval, and this mode doesn’t ask for it, so Claude can’t read one. The Remove-Item in PowerShell denies also apply in this mode. Two [cross-session messaging](</docs/en/cross-session-messaging>) safeguards still apply in this mode, and in interactive terminal plan-mode sessions where bypass permissions are available:
* The [`isolatePeerMachines`](</docs/en/settings-reference#isolatepeermachines>) approval prompt for messages to your sessions beyond this machine still appears.
* When no [`crossSessionInbound`](</docs/en/cross-session-messaging#control-inbound-messages>) value applies, Claude Code holds an inbound message from another of your sessions for your approval, and delivers without asking only when the sending session identifies itself as also bypassing permission prompts. If you leave the permission mode while messages are held, Claude Code re-applies the inbound rules and delivers any held message they now accept.
@@ -535,6 +535,7 @@
* `.yarn`
* `.mvn`
* `.claude`, except for `.claude/worktrees` where Claude stores its own git worktrees
+ * A directory you loaded with [`--plugin-dir`](</docs/en/plugins/mods/create#change-a-mod-with-claude>), because Claude Code reloads and runs a mod’s code from it when a file changes
Protected files:
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -70,7 +70,7 @@
How you run Claude Code| Built-in starting permission mode
---|---
Any settings file sets `disableAutoMode` to `"disable"`| `default`
-`claude -p` or the [Agent SDK](</docs/en/agent-sdk/permissions>)| `default`
+`claude -p` or the [Agent SDK](</docs/en/agent-sdk/permissions#permission-modes>)| `default` in sessions that [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>). In sessions that don’t, such as on a third-party provider or with telemetry off, `auto` with Claude Code v2.1.285 or later and `default` on earlier versions. A session in an organization whose policy withholds the `auto` default starts in `default` instead
In a terminal or through the [VS Code extension](</docs/en/vs-code>)| `auto` with Claude Code v2.1.283 or later; on earlier versions, `auto` on Pro, Max, or Team plans in sessions that [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), and `default` otherwise
In your [first session after an install or upgrade](</docs/en/env-vars#first-session-after-an-install-or-upgrade>), Claude Code can choose the starting permission mode before its feature flags arrive. That session can start in a different permission mode than the table gives, and your next session matches the table. When the flag, a settings file, or the built-in default selects `auto` but auto mode isn’t available to the session, Claude Code starts the session in Manual instead. Auto mode is unavailable when the session doesn’t meet the availability requirements, such as a settings file turning it off or a model that doesn’t support it, or when Anthropic has temporarily turned it off server-side. The first time the built-in default starts one of your sessions in auto mode, Claude Code shows a notice that links to this page:
@@ -78,7 +78,7 @@
* In a terminal, once, at the top of the session
* In the VS Code extension, as a card on the new-conversation screen that stays until you dismiss it
-On Pro, Max, and Team plans, if your `~/.claude/settings.json` sets a `defaultMode` other than `auto` and no other settings file sets one, your sessions keep starting in that mode. Claude Code asks once, in the terminal or in the VS Code extension, whether to change the setting to auto mode. If you decline, your setting stays as it is.
+If your `~/.claude/settings.json` sets a `defaultMode` other than `auto` and no other settings file sets one, your sessions keep starting in that mode. On Pro, Max, and Team plans, and in sessions that [don’t fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), Claude Code asks once, in the terminal or in the VS Code extension, whether to change the setting to auto mode. If you decline, your setting stays as it is.
###
@@ -250,7 +250,7 @@
Auto mode on Bedrock, Agent Platform, or Foundry
-On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode is available by default. With Claude Code v2.1.283 or later, it’s also the built-in starting permission mode for interactive terminal and [VS Code](</docs/en/vs-code>) sessions. To choose the starting permission mode yourself, set `permissions.defaultMode` as Start in a different permission mode describes, or pick a permission mode from the VS Code extension’s mode indicator. Only Claude Sonnet 5 or later, Opus 4.7 or later, and the Fable models are supported on these providers. On any other model, the session starts in Manual instead. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. A session already running in auto mode leaves it when the setting reaches that session from an [admin-deployed source](</docs/en/managed-settings#which-managed-source-claude-code-uses>), and shows `auto mode disabled by settings`. Before v2.1.251, a running session kept auto mode until it ended. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
+On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode is available by default. When nothing else sets a permission mode, it’s also the built-in starting permission mode, on the versions that section’s table lists. To choose the starting permission mode yourself, set `permissions.defaultMode` as Start in a different permission mode describes, or pick a permission mode from the VS Code extension’s mode indicator. Only Claude Sonnet 5 or later, Opus 4.7 or later, and the Fable models are supported on these providers. On any other model, the session starts in Manual instead. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. A session already running in auto mode leaves it when the setting reaches that session from an [admin-deployed source](</docs/en/managed-settings#which-managed-source-claude-code-uses>), and shows `auto mode disabled by settings`. Before v2.1.251, a running session kept auto mode until it ended. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
###
@@ -453,12 +453,12 @@
The classifier checks [subagent](</docs/en/sub-agents>) work at three points:
1. Before a subagent starts, the delegated task description is evaluated, so a dangerous-looking task is blocked at spawn time.
- 2. While the subagent runs, each of its actions goes through the classifier with the same rules as the parent session, and any `permissionMode` in the subagent’s frontmatter is ignored.
+ 2. While the subagent runs, each of its actions goes through the same decision order as in the parent session, with the same block and allow rules. Any `permissionMode` in the subagent’s frontmatter is ignored.
3. When the subagent finishes, the classifier reviews its work and its final report before the parent reads the report. When the classifier flags the subagent’s work or report, or a separate API safety check refuses the review, the report is still delivered, prepended with a security warning. When the classifier is unavailable for the review, the report arrives with a note to verify the subagent’s work before acting on it.
Cost and latency
-The classifier runs on Claude Sonnet 5 by default rather than on your `/model` selection. A classifier model that Anthropic configures server-side takes precedence over that default. When your session’s model is Claude Sonnet 4.6, or when [`availableModels`](</docs/en/model-config#restrict-model-selection>) excludes Sonnet 5, the classifier runs on the session’s model instead, or on an Opus model when the session runs on a [Fable model](</docs/en/model-config#work-with-fable>); on providers other than the Anthropic API, that Opus fallback is the provider’s default Opus model.The session’s first auto-mode request validates the Sonnet 5 default: if the request succeeds, Sonnet 5 stays the session’s classifier model, and if it fails because the model isn’t available, the session uses the fallback instead. After that validation settles, the classifier’s model doesn’t change for the session.On Enterprise plans and on accounts that use the Claude API, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations. Where the server reviews the actions as part of the session’s model requests, there are no separate classifier calls to count; see Server-side classifier review.Sandboxed network access adds no per-connection classifier requests. The classifier judges [the hosts a command names](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) together with the command in one review, and Claude Code checks each connection against the approved list without calling the classifier again.
+The classifier runs on Claude Sonnet 5 by default rather than on your `/model` selection. A classifier model that Anthropic configures server-side takes precedence over that default. When your session’s model is Claude Sonnet 4.6, or when [`availableModels`](</docs/en/model-config#restrict-model-selection>) excludes Sonnet 5, the classifier runs on the session’s model instead, or on an Opus model when the session runs on a [Fable model](</docs/en/model-config#work-with-fable>); on providers other than the Anthropic API, that Opus fallback is the provider’s default Opus model.The session’s first auto-mode request validates the Sonnet 5 default: if the request succeeds, Sonnet 5 stays the session’s classifier model, and if it fails because the model isn’t available, the session uses the fallback instead.On Enterprise plans and on accounts that use the Claude API, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations. Where the server reviews the actions as part of the session’s model requests, there are no separate classifier calls to count; see Server-side classifier review.Sandboxed network access adds no per-connection classifier requests. The classifier judges [the hosts a command names](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) together with the command in one review, and Claude Code checks each connection against the approved list without calling the classifier again.
##
Show diff (226 lines)
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -167,7 +167,7 @@
* **[Cloud sessions](</docs/en/claude-code-on-the-web>)** : Accept edits, Plan, and Auto. Accept edits corresponds to `default` mode: cloud sessions pre-approve file edits regardless of mode, so the dropdown shows Accept edits instead of Manual. Cloud sessions still honor `defaultMode: "acceptEdits"` from settings. Auto mode appears only when your organization allows it and the selected model supports it. Bypass permissions isn’t available.
* **[Remote Control](</docs/en/remote-control>) sessions** on your local machine: Manual, Accept edits, and Plan for a session you started yourself, and you can’t select Auto or Bypass permissions from the app. For a project thread running on your computer, see [Run a thread on your own computer](</docs/en/claude-projects#run-a-thread-on-your-own-computer>).
- * Except for Bypass permissions, the dropdown shows the permission mode the local session is in, including one set from the terminal. It updates when the permission mode changes in the app or in the terminal. The session never reports Bypass permissions to claude.ai, so switching into it from the terminal doesn’t change what the dropdown shows.
+ * Except for Bypass permissions, the dropdown shows the permission mode the local session is in, including one set from the terminal. It updates when the permission mode changes in the app or in the terminal.
* Sessions hosted by the [desktop app](</docs/en/desktop>) or the [VS Code extension](</docs/en/vs-code>) report permission mode changes to claude.ai as they happen, the same as sessions hosted in a terminal.
* Before v2.1.202, sessions connected with `/remote-control` or `claude --remote-control` didn’t report their permission mode at all, so claude.ai and the mobile app could show a permission mode the session wasn’t in. The mismatch affected only the label. Claude Code generated permission prompts from the session’s actual permission mode, and they still appeared in the app for approval.
@@ -292,9 +292,6 @@
* `git commit --amend` when the commit at HEAD was not created in this session
* From v2.1.198, `git commit --amend` when the commit at HEAD has already been pushed. A message-only reword is not blocked: `--amend -m` with nothing newly staged, on a commit that Claude created during this session
* `terraform destroy`, `pulumi destroy`, `cdk destroy`, or `terragrunt destroy`, and applying a plan that destroys resources
-
-Claude Code v2.1.195 and later block more categories by default. Several depend on [environment](</docs/en/auto-mode-config#define-trusted-infrastructure>) entries, such as sensitive remote targets and protected IaC scopes, that you can narrow to concrete names.
-
* Writing to a secret manager, or changing DNS records or TLS certificates
* Merging a pull request no human has approved, approving Claude’s own pull request, or disabling CI checks
* Posting a comment that is itself a command to automation, such as `atlantis apply` or a bot’s `/deploy` or `/merge`
@@ -311,7 +308,7 @@
* Launching an autonomous agent loop that runs without human approval or a sandbox, such as one started with `--dangerously-skip-permissions` or `--no-sandbox`. As of v2.1.198 this also covers running a third-party agent or eval harness with isolation and per-action approval disabled, such as a runner started with `--yes-always`
* [Claude in Chrome](</docs/en/chrome>) browser actions that could send page content, cookies, or credentials off-origin
-Claude Code v2.1.198 and later also block these by default:
+Several of these categories depend on [environment](</docs/en/auto-mode-config#define-trusted-infrastructure>) entries, such as sensitive remote targets and protected IaC scopes, that you can narrow to concrete names. Claude Code v2.1.198 and later also block these by default:
* Deleting files in `/tmp`, `$TMPDIR`, or another shared scratch or cache directory by wildcard, glob, or age filter rather than by a specific named path
* Including sensitive details in content sent, uploaded, published, or written to other people or shared systems, when your own message didn’t authorize those details for that recipient. PR and issue bodies, commit messages, and comments count as this kind of outbound content when the repository is outside the trust boundary or public, including your organization’s own public repositories; internal file paths, code names, live API response data such as emails or account identifiers, and infrastructure identifiers count as sensitive details. The PR, issue, and commit-message scoping requires Claude Code v2.1.200 or later. Live personal data from an API response in a PR or issue body, such as an email address, an account or organization identifier, or a usage metric, requires you to name those details and the recipient regardless of the repository’s visibility or trust boundary. That check requires Claude Code v2.1.203 or later
@@ -353,9 +350,6 @@
* Reading `.env` and sending credentials to their matching API
* Read-only HTTP requests
* Pushing to any branch of the repository you’re working in, including the default branch. A non-default branch whose name marks it as a deploy or publication target, such as `production` or `gh-pages`, isn’t covered: the classifier judges a push there on its own terms. The push’s content is still checked against the other rules, [`permissions.deny` rules](</docs/en/permissions#manage-permissions>) can still block push commands [as written](</docs/en/permissions#bash-rule-limits>) in every mode, and the remote’s own branch protection still applies. Before v2.1.211, only pushes to the branch you started on, branches Claude created, and routine pushes to the default branch were allowed by default, and before v2.1.203 any direct push to the default branch was blocked
-
-Claude Code v2.1.195 and later also allow these by default:
-
* Deleting the exact jobs Claude created earlier in the same session
* Reading, reviewing, or writing security-related code, configs, and threat models as part of your task
* Messages between agents working together in the same multi-agent session
@@ -405,13 +399,27 @@
When auto mode can’t approve your session’s actions, what happens depends on the case:
- * **A blocked action** : Claude Code shows a notification and lists the action in `/permissions` under the **Recently denied** tab, where you can press `r` to retry it with a manual approval. When the classifier produces [no verdict on the action](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>), because a safety check separate from auto mode refused the classifier’s own request or its response didn’t parse, Claude Code denies the action without the notification or the **Recently denied** entry.
- * **Repeated blocks** : if the classifier blocks an action 3 times in a row or 20 times total, auto mode pauses and Claude Code resumes prompting. Approving the prompted action resumes auto mode. These thresholds are not configurable. Any allowed action resets the consecutive counter, while the total counter persists for the session and resets only when its own limit triggers a fallback. Claude Code doesn’t count a denial toward either threshold when [a safety check separate from auto mode refuses the classifier’s own request](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>); the linked entry covers how Claude Code handles those denials.
- * **Sessions that can’t prompt** : a [non-interactive](</docs/en/headless>) `-p` run without a [`--permission-prompt-tool`](</docs/en/cli-reference#cli-flags>) has no prompt to fall back to. When repeated blocks reach a threshold, the action doesn’t run and Claude keeps working. The same applies when [a safety check separate from auto mode refuses the classifier’s request](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>). Claude Code doesn’t stop the run in either case.
+ * **A blocked action** : Claude Code shows a notification and lists the action in `/permissions` under the **Recently denied** tab, where you can press `r` to retry it with a manual approval.
+ * **Repeated blocks** : if the classifier blocks an action 3 times in a row or 20 times total, auto mode pauses and Claude Code resumes prompting. Approving the prompted action resumes auto mode. See Repeated-block thresholds for how the blocks are counted.
+ * **No verdict from the classifier** : when a safety check separate from auto mode refuses the classifier’s own request, or the classifier’s response doesn’t parse, Claude Code denies the action without the notification or the **Recently denied** entry. See [Auto mode cannot determine the safety of an action](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>) for the message each case shows and what to do.
* **No verdict from the server** : under server-side classifier review, Claude Code denies an action the server gives no verdict for, and stops the turn after ten responses in a row with no verdict. See [The server returned no safety verdict](</docs/en/errors#the-server-returned-no-safety-verdict>).
- * **A mode switch during a check** : if you switch permission modes while a classifier check is pending, Claude Code discards a verdict the new mode wouldn’t have requested rather than applying it: you’re prompted for approval instead, or the action is auto-denied in `dontAsk` mode.
-
-Repeated blocks usually mean the classifier is missing context about your infrastructure. Use `/feedback` to report false positives, or have an administrator [configure trusted infrastructure](</docs/en/auto-mode-config>).
+ * **A mode switch during a check** : if you switch permission modes while a classifier check is pending, Claude Code discards a verdict the new mode wouldn’t have requested. You’re prompted for approval instead, or the action is auto-denied in `dontAsk` mode.
+
+####
+
+
+
+Repeated-block thresholds
+
+The thresholds of 3 blocks in a row and 20 blocks total are not configurable. The total counter persists for the session and resets only when its own limit triggers a fallback. Claude Code doesn’t count a denial toward either threshold when a safety check separate from auto mode refuses the classifier’s own request. A [non-interactive](</docs/en/headless>) `-p` run without a [`--permission-prompt-tool`](</docs/en/cli-reference#cli-flags>) has no prompt to fall back to. When repeated blocks reach a threshold, the action doesn’t run and Claude keeps working. Claude Code doesn’t stop the run. Repeated blocks usually mean the classifier is missing context about your infrastructure. Use `/feedback` to report false positives, or have an administrator [configure trusted infrastructure](</docs/en/auto-mode-config>).
+
+###
+
+
+
+How auto mode evaluates actions
+
+The following sections cover the order Claude Code evaluates an action in, how the classifier reviews subagent work, and what classifier calls add in cost and latency.
How the classifier evaluates actions
@@ -428,7 +436,7 @@
* In a session with server-side classifier review, read-only and [sandboxed](</docs/en/sandboxing#sandbox-modes>) shell commands wait for that review and are blocked if it flags them
* A write inside your working directory that the [symlink check](</docs/en/permissions#symlinks>) resolves to a location outside it prompts you
3. Everything else goes to the classifier, apart from critical-path removals under their default handling. The connector tools and `requiresUserInteraction` MCP tools that prompt you directly in step 1 never reach the classifier either, so neither an org-required approval nor a consent step is auto-approved
- 4. If the classifier blocks, Claude receives the reason and tries an alternative. In most sessions the reason names the rule the classifier matched, such as `[Data Exfiltration]`, rather than giving a written explanation; see [Review denials](</docs/en/auto-mode-config#review-denials>)
+ 4. If the classifier blocks, Claude receives the reason. In most sessions the reason names the rule the classifier matched, such as `[Data Exfiltration]`, rather than giving a written explanation; see [Review denials](</docs/en/auto-mode-config#review-denials>)
On entering auto mode, broad allow rules that grant arbitrary code execution are dropped:
@@ -481,7 +489,12 @@
claude --permission-mode bypassPermissions
-The `--dangerously-skip-permissions` flag is equivalent. Claude Code refuses `bypassPermissions` in a session you start with [`--restricted`](</docs/en/cli-reference#cli-flags>). `--restricted` requires Claude Code v2.1.248 or later. The first time you start an interactive session with this mode enabled, Claude Code shows a warning dialog asking you to accept responsibility for actions taken without permission checks. Claude Code saves your acceptance to user settings, so the dialog appears only once. If you decline, Claude Code exits. In [non-interactive mode](</docs/en/headless>) no dialog is shown, and a [background session](</docs/en/agent-view>) started with `--bg` is refused until you’ve accepted the dialog in an interactive session. On Linux and macOS, Claude Code refuses to start in this mode when running as root or under `sudo`:
+The `--dangerously-skip-permissions` flag is equivalent. Claude Code refuses `bypassPermissions` in a session you start with [`--restricted`](</docs/en/cli-reference#cli-flags>). `--restricted` requires Claude Code v2.1.248 or later. The first time you start an interactive session with this mode enabled, Claude Code shows a warning dialog asking you to accept responsibility for actions taken without permission checks:
+
+ * **If you accept** : Claude Code sets `skipDangerousModePermissionPrompt` to `true` in `~/.claude/settings.json`, so later sessions skip the dialog. To see the dialog again, remove the key from that file or set it to `false`. The [`skipDangerousModePermissionPrompt` reference](</docs/en/settings-reference#skipdangerousmodepermissionprompt>) lists the other settings files where you or your organization can set it.
+ * **If you decline** : Claude Code exits.
+
+In [non-interactive mode](</docs/en/headless>) no dialog is shown, and a [background session](</docs/en/agent-view>) started with `--bg` is refused until you’ve accepted the dialog in an interactive session. On Linux and macOS, Claude Code refuses to start in this mode when running as root or under `sudo`:
--dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons
@@ -541,9 +554,80 @@
Critical paths
-Claude Code never lets a [`permissions.allow`](</docs/en/permissions#manage-permissions>) rule or a [`PreToolUse` hook](</docs/en/permissions#extend-permissions-with-hooks>) that returns `"allow"` approve an `rm` or `rmdir` command that targets a critical path, even in modes that skip other prompts. This circuit breaker guards against model error. A matching deny rule still blocks the command outright. What happens instead depends on your permission mode:
-
-Mode| What Claude Code does with a critical-path removal
+Critical paths are the directories Claude Code protects from `rm` and `rmdir` commands, such as the filesystem root, your home directory, and your working directory. Claude Code never lets a [`permissions.allow`](</docs/en/permissions#manage-permissions>) rule or a [`PreToolUse` hook](</docs/en/permissions#extend-permissions-with-hooks>) that returns `"allow"` approve an `rm` or `rmdir` command that targets a critical path, even in modes that skip other prompts. This circuit breaker guards against model error. A matching deny rule still blocks the command outright. What happens instead depends on your permission mode. `Remove-Item` and the `cmd` removal built-ins have their own checks, covered in Remove-Item in PowerShell.
+
+###
+
+
+
+Which paths are critical
+
+Claude Code treats an `rm` or `rmdir` target as a critical path when it is any of the following:
+
+ * The filesystem root
+ * Top-level directories, meaning any direct child of the root, such as `/usr`, `/etc`, or `/data`
+ * Your home directory
+ * Windows drive roots and their top-level directories, such as `C:\` and `C:\Windows`
+ * Your working directory and its parents
+ * Your additional working directories and their parents, but only when the removal is a glob under one of them, such as `rm -rf <dir>/*`. `rm -rf <dir>` on the directory itself doesn’t trigger this check
+
+###
+
+
+
+Other targets that count as critical paths
+
+Claude Code also treats the following `rm` and `rmdir` targets as critical paths. The last column says why each one counts.
+
+Target| Example| Why it counts
+---|---|---
+A glob or trailing slash directly under a shell variable| `rm -rf "$DIR"/*`| The command becomes a removal from the filesystem root when the variable is empty
+The same form under a positional parameter such as `$1` or `$@`, when nothing in the command gives it a value| `rm -rf "$1"/*`| The command expands to a removal from the root
+A shell variable followed by one common top-level directory name, such as `mnt`, `tmp`, `usr`, or `Users`| `rm -rf "$TMPDIR/mnt"`| When the variable expands empty, the command removes `/mnt`
+A variable that the same command assigns from a directory-printing substitution, such as `$(pwd)` or `$(git rev-parse --show-toplevel)`| `D=$(pwd); rm -rf "$D"`| The value can name your working directory or repository root
+A target that is only the output of a command substitution, when the `rm` is recursive| `rm -rf "$(pwd)"`| Claude Code can’t check the target before the command runs
+A trailing command substitution after a critical path| `rm -rf ~/$(cmd)`| Claude Code checks the path that would remain if the substitution expanded empty, here your home directory
+A target that is only backslashes| `rm -rf "\\"`| Git Bash on Windows reads a lone backslash as the current drive’s root, so the check applies on every platform
+
+To turn off the check on a target that is only command substitution output, set [`CLAUDE_CODE_DISABLE_SUBSTITUTION_RM_PROMPT=1`](</docs/en/env-vars#variables>) in the environment that launches Claude Code.
+
+###
+
+
+
+Removals inside nested commands and inline scripts
+
+Claude Code also looks inside these constructs:
+
+ * **Nested commands** : a subshell with `(...)`, a brace group with `{ ...; }`, command substitution with `$(...)` or backticks, or process substitution with `<(...)`. Claude Code finds a critical-path removal whether it sits inside the nested form, as in `(rm -rf ~)` or `echo "$(rm -rf ~)"`, or elsewhere in the same command.
+ * **Inline scripts** : Claude Code checks a script passed to a shell such as `sh -c` or `bash -c` for the shell variable and positional parameter targets.
+ * When the script is double-quoted, the invoking shell expands its variables before the inner shell receives the script. In `find . -name '*.tmp' -exec sh -c "rm -rf \"$1\"/*" _ {} \;`, the command expands to a removal from the filesystem root once per match, and Claude Code treats it as a critical-path removal.
+ * A single-quoted script that binds `$1` to a real value, as `sh -c 'rm -rf "$1"/*' _ {}` does, isn’t flagged.
+
+###
+
+
+
+Rewrite a flagged command
+
+How to rewrite a command so it passes the check depends on which of the other targets it uses:
+
+ * **A glob or trailing slash under a variable such as`$DIR`**: guard each expansion so the shell stops with an error when the variable is unset or empty, as in `rm -rf "${DIR:?}"/*`, or use a literal path. A removal whose expansions are all guarded that way passes this check, so in `bypassPermissions` mode it runs without a prompt unless another critical-path check flags it.
+ * **A glob or trailing slash under a variable that is normally set, such as`$HOME`**: use a literal path.
+ * **A variable assigned from a directory-printing substitution** : use a literal path. A `"${D:?}"` guard doesn’t clear this check, because the variable isn’t empty.
+ * **A target that is only command substitution output** : run the substitution on its own first, then remove the literal paths it prints. The prompt tells Claude to do the same.
+
+For a glob or trailing slash under a variable, the prompt names the flagged `rm` and says how to rewrite it so the check passes.
+
+###
+
+
+
+Critical-path removals in each permission mode
+
+What Claude Code does with a critical-path removal depends on your permission mode:
+
+Mode| Outcome
---|---
`default`, `acceptEdits`| Asks you to approve it
`plan`| Asks you to approve it. When the classifier reviews commands during planning and no bypass permissions are available, handles it as in `auto` mode
@@ -551,34 +635,21 @@
`dontAsk`| Denies it
`bypassPermissions`| Asks you to approve it, with a time limit in the terminal
-If an explicit [ask rule](</docs/en/permissions#manage-permissions>) matches the command, Claude Code asks you instead, even in `auto` mode and without a time limit. In modes that ask, a [`PermissionRequest` hook](</docs/en/hooks#permissionrequest>) can answer the prompt. The `auto` and `bypassPermissions` handling requires Claude Code v2.1.281 or later. To turn it off, set [`CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUT=1`](</docs/en/env-vars#variables>) in the environment that launches Claude Code. In `auto` mode, critical-path removals then go to the classifier instead, and in `bypassPermissions` mode the prompt has no time limit. In `auto` and `bypassPermissions` modes, the terminal prompt shows a two-minute countdown:
+If an explicit [ask rule](</docs/en/permissions#manage-permissions>) matches the command, Claude Code asks you instead, even in `auto` mode and without a time limit. In modes that ask, a [`PermissionRequest` hook](</docs/en/hooks#permissionrequest>) can answer the prompt.
+
+###
+
+
+
+Time limits and denials in auto and bypassPermissions modes
+
+In `auto` and `bypassPermissions` modes, the terminal prompt for a critical-path removal shows a two-minute countdown:
* If the countdown runs out before you answer, Claude Code denies the command and tells Claude what to do instead, so an unattended session keeps working.
* Press any key while the prompt is open to stop the countdown and keep the prompt waiting for your answer.
* After three of these prompts run out unanswered in a session, Claude Code stops showing them and denies further critical-path removals immediately. Sending a new message starts the count over.
-In `auto` mode, wherever Claude Code can’t show you a terminal prompt, it denies the command immediately, for example in [non-interactive runs](</docs/en/headless>) with `-p`, in [Agent SDK](</docs/en/agent-sdk/permissions>) sessions, and in the VS Code extension’s chat panel and the Desktop app. The denial tells Claude to report what it wanted to delete and leave the removal to you. Claude Code treats an `rm` or `rmdir` target as a critical path when it is any of the following:
-
- * The filesystem root
- * Top-level directories, meaning any direct child of the root, such as `/usr`, `/etc`, or `/data`
- * Your home directory
- * Windows drive roots and their top-level directories, such as `C:\` and `C:\Windows`
- * Your working directory and its parents
- * Your additional working directories and their parents, but only when the removal is a glob under one of them, such as `rm -rf <dir>/*`. `rm -rf <dir>` on the directory itself doesn’t trigger this check
-
-Claude Code also treats a glob or trailing slash directly under a shell variable, such as `rm -rf "$DIR"/*`, as a critical-path removal, because the command becomes a removal from the filesystem root when the variable is empty. The prompt for this variable case names the flagged `rm` and says how to rewrite it so the check passes:
-
- * For a variable such as `$DIR`, guard each expansion so the shell stops with an error when the variable is unset or empty, as in `rm -rf "${DIR:?}"/*`, or use a literal path
- * For a variable that is normally set, such as `$HOME`, use a literal path
-
-A removal whose expansions are all guarded that way passes this check, so in `bypassPermissions` mode it runs without a prompt unless another check in this section flags it. Claude Code also treats these targets as critical paths:
-
- * **A shell variable followed by one top-level directory name** , such as `rm -rf "$TMPDIR/mnt"`: when the variable expands empty, the command removes `/mnt`. This covers common top-level names such as `mnt`, `tmp`, `usr`, and `Users`.
- * **A variable that the same command assigns from a directory-printing substitution** , such as `D=$(pwd); rm -rf "$D"` or an assignment from `$(git rev-parse --show-toplevel)`: the value can name your working directory or repository root. A `"${D:?}"` guard doesn’t clear this check, because the variable isn’t empty; use a literal path instead.
- * **A backslash-only target** , such as `rm -rf "\\"`: Git Bash on Windows reads a lone backslash as the current drive’s root, so the check applies on every platform.
- * **Only the output of a command substitution** , such as `rm -rf "$(pwd)"`, when the `rm` is recursive: Claude Code can’t check the target before the command runs, so the prompt tells Claude to run the substitution on its own first and then remove the literal paths it prints. To turn off this one check, set [`CLAUDE_CODE_DISABLE_SUBSTITUTION_RM_PROMPT=1`](</docs/en/env-vars#variables>) in the environment that launches Claude Code.
-
-When a trailing command substitution can expand empty, as in `rm -rf ~/$(cmd)`, Claude Code checks the path that would remain, your home directory in this example. Hiding the removal inside a subshell with `(...)`, a brace group with `{ ...; }`, command substitution with `$(...)` or backticks, or process substitution with `<(...)`, doesn’t skip the check. Claude Code finds a critical-path removal whether it sits inside the nested form, as in `(rm -rf ~)` or `echo "$(rm -rf ~)"`, or elsewhere in the same command.
+In `auto` mode, wherever Claude Code can’t show you a terminal prompt, it denies the command immediately, for example in [non-interactive runs](</docs/en/headless>) with `-p`, in [Agent SDK](</docs/en/agent-sdk/permissions>) sessions, and in the VS Code extension’s chat panel and the Desktop app. The denial tells Claude to report what it wanted to delete and leave the removal to you. The `auto` and `bypassPermissions` handling requires Claude Code v2.1.281 or later. To turn it off, set [`CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUT=1`](</docs/en/env-vars#variables>) in the environment that launches Claude Code. In `auto` mode, critical-path removals then go to the classifier instead, and in `bypassPermissions` mode the prompt has no time limit.
###
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -239,7 +239,7 @@
* **Plan** : All plans.
* **Organization** : on Team and Enterprise, auto mode is available by default. Administrators can turn it off for the organization by setting `permissions.disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>).
- * **Model** : on the Anthropic API and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Claude Opus 4.6 or later, Sonnet 4.6 or later, or a [Fable model](</docs/en/model-config#work-with-fable>). On Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, only Claude Sonnet 5, Opus 4.7 or later, and the Fable models. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
+ * **Model** : on the Anthropic API and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Claude Opus 4.6 or later, Sonnet 4.6 or later, or a [Fable model](</docs/en/model-config#work-with-fable>). On Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, only Claude Sonnet 5 or later, Opus 4.7 or later, and the Fable models. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
* **Provider** : available by default on 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, first check these requirements and whether any settings file sets [`disableAutoMode`](</docs/en/settings-reference#disableautomode>). Anthropic may also have turned auto mode off server-side, or the server may have rejected auto mode for your account. A session that received either answer keeps auto mode off until the session ends, so start a new session later. A separate message that names a model and says auto mode “cannot determine the safety” of an action means a classifier request failed. That failure is usually transient, but on Amazon Bedrock it can repeat until your account can invoke the named model. See the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>) for the causes and what to do. If you set `defaultMode: "auto"` in [settings](</docs/en/settings-reference#all-settings>) and a terminal session starts in Manual mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. `auto` doesn’t take effect from those files. Move it to `~/.claude/settings.json`. For a conversation the VS Code extension started, check the extension’s own list in Switch permission modes instead.
@@ -250,7 +250,7 @@
Auto mode on Bedrock, Agent Platform, or Foundry
-On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode is available by default. With Claude Code v2.1.283 or later, it’s also the built-in starting permission mode for interactive terminal and [VS Code](</docs/en/vs-code>) sessions. To choose the starting permission mode yourself, set `permissions.defaultMode` as Start in a different permission mode describes, or pick a permission mode from the VS Code extension’s mode indicator. Only Claude Sonnet 5, Opus 4.7 or later, and the Fable models are supported on these providers. On any other model, the session starts in Manual instead. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. A session already running in auto mode leaves it when the setting reaches that session from an [admin-deployed source](</docs/en/managed-settings#which-managed-source-claude-code-uses>), and shows `auto mode disabled by settings`. Before v2.1.251, a running session kept auto mode until it ended. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
+On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode is available by default. With Claude Code v2.1.283 or later, it’s also the built-in starting permission mode for interactive terminal and [VS Code](</docs/en/vs-code>) sessions. To choose the starting permission mode yourself, set `permissions.defaultMode` as Start in a different permission mode describes, or pick a permission mode from the VS Code extension’s mode indicator. Only Claude Sonnet 5 or later, Opus 4.7 or later, and the Fable models are supported on these providers. On any other model, the session starts in Manual instead. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. A session already running in auto mode leaves it when the setting reaches that session from an [admin-deployed source](</docs/en/managed-settings#which-managed-source-claude-code-uses>), and shows `auto mode disabled by settings`. Before v2.1.251, a running session kept auto mode until it ended. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
###
@@ -370,11 +370,12 @@
The first read outside the working directories
-While [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) is off, file reads run without a prompt in auto mode, including reads outside the [working directories](</docs/en/permissions#working-directories>). The first time Claude uses the Read, Grep, or Glob tool on a path outside them, Claude Code asks you whether to keep allowing those reads. The prompt doesn’t appear in non-interactive `-p` runs or background sessions; reads there run as before. Whatever you answer, Claude keeps working:
-
- * **Keep allowing** : the read runs, later reads outside the working directories run as before, and Claude Code records your answer so the prompt doesn’t appear again
- * **Block from now on** : the read is refused, and Claude Code sets [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) to `true` in your user settings, which makes the file tools refuse such reads in every later session and every permission mode. To let Claude read such a path later, add its directory with `/add-dir` or remove the setting.
- * **Ask again next time** : the read is refused, and the next read outside the working directories prompts again
+While [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) is off, file reads run without a prompt in auto mode, including reads outside the [working directories](</docs/en/permissions#working-directories>). The first time Claude uses the Read, Grep, or Glob tool on a path outside them, Claude Code asks whether to allow that read. The prompt doesn’t appear in non-interactive `-p` runs or background sessions; reads there run as before. Whatever you answer, Claude keeps working:
+
+ * **Yes, and keep allowing any reads outside the working directories** : the read runs, later reads outside the working directories run as before, and Claude Code records your answer so the prompt doesn’t appear again
+ * **No, and block reads outside the working directories from now on** : the read is refused, and Claude Code sets [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) to `true` in your user settings, which makes the file tools refuse such reads in every later session and every permission mode. To let Claude read such a path later, add its directory with `/add-dir` or remove the setting.
+ * **No, and ask again next time** : the read is refused, and the next read outside the working directories prompts again
+ * **Yes, but ask again next time** : the read runs, nothing is saved, and the next read outside the working directories prompts again
###
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -181,7 +181,7 @@
Auto-approve file edits with acceptEdits mode
-`acceptEdits` mode lets Claude create and edit files in your working directory without prompting. The status bar shows `⏵⏵ accept edits on` while this mode is active. In addition to file edits, `acceptEdits` mode auto-approves common filesystem Bash commands: `mkdir`, `touch`, `rm`, `rmdir`, `mv`, `cp`, and `sed`. These commands are also auto-approved when prefixed with safe environment variables such as `LANG=C` or `NO_COLOR=1`, or process wrappers such as `timeout`, `nice`, or `nohup`. Like file edits, auto-approval applies only to paths inside your working directory or `additionalDirectories`. Paths outside that scope, writes to protected paths, `rm` and `rmdir` removals targeting a critical path, and all other Bash commands except the [built-in read-only set](</docs/en/permissions#read-only-commands>) still prompt. When the [PowerShell tool](</docs/en/tools-reference#powershell-tool>) is enabled, `acceptEdits` mode also auto-approves `Set-Content`, `Add-Content`, `Clear-Content`, and `Remove-Item` on in-scope paths, along with their common aliases. The same scope and protected-path rules apply, and `Remove-Item` gets its own check. A positional argument that contains a quote character, such as the apostrophe in `Set-Content .\notes.txt "It's done"`, still prompts even on in-scope paths, because Claude Code can’t statically validate an argument whose quoted and unquoted readings differ. Pass the content through a named parameter such as `-Value` to avoid the prompt. Use `acceptEdits` when you want to review changes in your editor or via `git diff` after the fact rather than approving each edit inline. Press `Shift+Tab` once from Manual mode to enter it, or start with it directly:
+`acceptEdits` mode lets Claude create and edit files in your working directory without prompting. The status bar shows `⏵⏵ accept edits on` while this mode is active. In addition to file edits, `acceptEdits` mode auto-approves common filesystem Bash commands: `mkdir`, `touch`, `rm`, `rmdir`, `mv`, `cp`, and `sed`. These commands are also auto-approved when prefixed with safe environment variables such as `LANG=C` or `NO_COLOR=1`, or process wrappers such as `timeout`, `nice`, or `nohup`. Like file edits, auto-approval applies only to paths inside your working directory or `additionalDirectories`. Each path also goes through the [symlink check](</docs/en/permissions#symlinks>), so a write that resolves outside that scope isn’t auto-approved either. Paths outside that scope, writes to protected paths, `rm` and `rmdir` removals targeting a critical path, and all other Bash commands except the [built-in read-only set](</docs/en/permissions#read-only-commands>) still prompt. When the [PowerShell tool](</docs/en/tools-reference#powershell-tool>) is enabled, `acceptEdits` mode also auto-approves `Set-Content`, `Add-Content`, `Clear-Content`, and `Remove-Item` on in-scope paths, along with their common aliases. The same scope and protected-path rules apply, and `Remove-Item` gets its own check. A positional argument that contains a quote character, such as the apostrophe in `Set-Content .\notes.txt "It's done"`, still prompts even on in-scope paths, because Claude Code can’t statically validate an argument whose quoted and unquoted readings differ. Pass the content through a named parameter such as `-Value` to avoid the prompt. Use `acceptEdits` when you want to review changes in your editor or via `git diff` after the fact rather than approving each edit inline. Press `Shift+Tab` once from Manual mode to enter it, or start with it directly:
claude --permission-mode acceptEdits
@@ -422,8 +422,10 @@
* MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>) prompt you directly even when an allow rule matches, and so do connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code
* A shell command that carries [per-command allowed domains](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) also routes to the classifier even when an allow rule matches, because a rule approves the command, not its hosts
* Ask rules that match on a command’s content, such as `Bash(git push *)`, fall back to a permission prompt
+ * A write that the [symlink check](</docs/en/permissions#symlinks>) resolves to a protected path prompts you when the path Claude requested isn’t itself protected
2. Read-only actions and file edits in your working directory are auto-approved, except writes to protected paths and the first read outside the working directories, which prompts you
* In a session with server-side classifier review, read-only and [sandboxed](</docs/en/sandboxing#sandbox-modes>) shell commands wait for that review and are blocked if it flags them
+ * A write inside your working directory that the [symlink check](</docs/en/permissions#symlinks>) resolves to a location outside it prompts you
3. Everything else goes to the classifier, apart from critical-path removals under their default handling. The connector tools and `requiresUserInteraction` MCP tools that prompt you directly in step 1 never reach the classifier either, so neither an org-required approval nor a consent step is auto-approved
4. If the classifier blocks, Claude receives the reason and tries an alternative. In most sessions the reason names the rule the classifier matched, such as `[Data Exfiltration]`, rather than giving a written explanation; see [Review denials](</docs/en/auto-mode-config#review-denials>)
@@ -502,7 +504,7 @@
`dontAsk`| Denied
`bypassPermissions`| Allowed
-In a session started with [`--restricted`](</docs/en/cli-reference#cli-flags>), which requires Claude Code v2.1.248 or later, the classifier can’t approve protected-path writes. [`permissions.allow`](</docs/en/permissions#manage-permissions>) rules in settings files do not pre-approve protected-path writes. The safety check runs before Claude Code evaluates allow rules from settings, so an entry such as `Edit(.claude/**)` in `~/.claude/settings.json` or `.claude/settings.json` does not change the per-mode outcome in the table above. In permission modes that prompt, the prompt for a write to the project’s `.claude/` folder or to `~/.claude/` can offer one of these session-scoped options:
+In a session started with [`--restricted`](</docs/en/cli-reference#cli-flags>), which requires Claude Code v2.1.248 or later, the classifier can’t approve protected-path writes. In the modes that route protected-path writes to the classifier, a write that the [symlink check](</docs/en/permissions#symlinks>) resolves to a protected path prompts you instead when the path Claude requested isn’t itself protected. [`permissions.allow`](</docs/en/permissions#manage-permissions>) rules in settings files do not pre-approve protected-path writes. The safety check runs before Claude Code evaluates allow rules from settings, so an entry such as `Edit(.claude/**)` in `~/.claude/settings.json` or `.claude/settings.json` does not change the per-mode outcome in the table above. In permission modes that prompt, the prompt for a write to the project’s `.claude/` folder or to `~/.claude/` can offer one of these session-scoped options:
* For the project’s `.claude/` folder: **Yes, and allow Claude to edit files in this project’s .claude folder for this session**
* For `~/.claude/`: **Yes, and allow Claude to edit files in its ~/.claude folder for this session**
Show diff (209 lines)
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -1,4 +1,4 @@
-A permission mode sets which actions Claude can take in a session without asking you first. In Manual mode, Claude Code stops and asks you before most actions that edit files, run shell commands, or reach the network. In auto mode, a second model, the classifier, reviews actions instead of you; how the classifier evaluates actions lists which actions it reviews and which skip it. On Pro, Max, and Team plans, the built-in starting permission mode is auto mode. Which mode a session starts in covers the surfaces and settings that change the starting permission mode. You can also change a running session’s permission mode at any time.
+A permission mode sets which actions Claude can take in a session without asking you first. In Manual mode, Claude Code stops and asks you before most actions that edit files, run shell commands, or reach the network. In auto mode, a second model, the classifier, reviews actions instead of you; how the classifier evaluates actions lists which actions it reviews and which skip it. With Claude Code v2.1.283 or later, auto mode is the built-in starting permission mode for interactive terminal and VS Code sessions. On earlier versions, it’s the built-in starting permission mode only on Pro, Max, and Team plans. Which mode a session starts in covers the surfaces and settings that change the starting permission mode. You can also change a running session’s permission mode at any time.
##
@@ -47,7 +47,7 @@
Review every action yourself| Manual mode: `claude --permission-mode default`| None| Sensitive work, unfamiliar code
Iterate locally with fewer prompts, without a classifier| Manual mode plus the Bash sandbox in [auto-allow mode](</docs/en/sandboxing#sandbox-modes>): `claude --permission-mode default`, then run `/sandbox` and select auto-allow| The built-in Bash sandbox, on macOS, Linux, and WSL2| Deny rules still apply, and ask rules that name a command, such as `Bash(git push *)`, still prompt. To turn the sandbox on from a settings file instead, set [`sandbox.enabled`](</docs/en/settings-reference#sandbox-enabled>) to `true`
Explore before changing anything| `claude --permission-mode plan`| None| Claude Code blocks edits until you approve a plan
-Work hands-off in auto mode| `claude --permission-mode auto`, the built-in starting permission mode on Pro, Max, and Team| None; a sandbox or container adds defense in depth| Requires a supported model, and your organization can turn auto mode off
+Work hands-off in auto mode| `claude --permission-mode auto`, the built-in starting permission mode with v2.1.283 or later| None; a sandbox or container adds defense in depth| Requires a supported model, and your organization can turn auto mode off
Run in CI with an exact allowlist| `claude -p "run the test suite" --permission-mode dontAsk --allowedTools "Bash(npm test)" "Read"`| None beyond what your CI runner provides| [Cloud sessions](</docs/en/claude-code-on-the-web>) ignore `dontAsk` from settings files
Run fully unattended inside a container| `claude -p "<prompt>" --dangerously-skip-permissions`| Required: a container, VM, or the [sandbox runtime](</docs/en/sandbox-environments#sandbox-runtime>); on Linux and macOS, run it as a non-root user| Cloud sessions ignore this mode from settings files. In this `-p` run, the few calls that would still prompt are denied instead
@@ -65,19 +65,15 @@
2. `permissions.defaultMode` in a [settings file](</docs/en/settings#where-settings-live>) If you set `"auto"` in `.claude/settings.json` or `.claude/settings.local.json`, the value doesn’t take effect, and Claude Code then uses the built-in default rather than a `defaultMode` from `~/.claude/settings.json`. If you set `"bypassPermissions"` in those two files, it doesn’t take effect either, and the session starts in Manual mode. The other values apply from any settings file.
3. The built-in default
-Conversations the VS Code extension starts follow the extension’s own list in Switch permission modes. For the permission mode Claude Code starts a resumed session in, see [permission mode on resume](</docs/en/sessions#permission-mode-on-resume>). The built-in `auto` default requires Claude Code v2.1.228 or later on macOS, Linux, and WSL, and v2.1.233 or later on native Windows. On earlier versions, the built-in default is Manual. The built-in default depends on how you run Claude Code, on your plan, and on whether Claude Code could fetch its feature flags. The first row that matches your session applies. The table covers sessions you start in a terminal or through the VS Code extension; for the desktop app and claude.ai, see the Desktop and Web tabs in Switch permission modes.
+Conversations the VS Code extension starts follow the extension’s own list in Switch permission modes. For the permission mode Claude Code starts a resumed session in, see [permission mode on resume](</docs/en/sessions#permission-mode-on-resume>). The built-in `auto` default requires Claude Code v2.1.228 or later on macOS, Linux, and WSL, and v2.1.233 or later on native Windows. On earlier versions, the built-in default is Manual. The built-in default depends on how you run Claude Code. The first row that matches your session applies. The table covers sessions you start in a terminal or through the VS Code extension; for the desktop app and claude.ai, see the Desktop and Web tabs in Switch permission modes.
How you run Claude Code| Built-in starting permission mode
---|---
Any settings file sets `disableAutoMode` to `"disable"`| `default`
-[Feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>) is off| `default`
-Your [first session after you install Claude Code or upgrade](</docs/en/env-vars#first-session-after-an-install-or-upgrade>) to a version that adds this default, unless, after a fresh install, Claude Code fetches the flags in time| `default`
`claude -p` or the [Agent SDK](</docs/en/agent-sdk/permissions>)| `default`
-Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), or a signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) session| `default`
-A Pro, Max, or Team plan, in a terminal or through the [VS Code extension](</docs/en/vs-code>)| `auto`
-An Enterprise plan or a Claude Console API key| `default`
-
-When feature-flag fetching is off, or in a [first session after an install or upgrade](</docs/en/env-vars#first-session-after-an-install-or-upgrade>) where the flags haven’t arrived yet, the VS Code extension ignores every settings file when choosing the starting permission mode. When the flag, a settings file, or the built-in default selects `auto` but auto mode isn’t available to the session, Claude Code starts the session in Manual instead. Auto mode is unavailable when the session doesn’t meet the availability requirements, such as a settings file turning it off or a model that doesn’t support it, or when Anthropic has temporarily turned it off server-side. The first time the built-in default starts one of your sessions in auto mode, Claude Code shows a notice that links to this page:
+In a terminal or through the [VS Code extension](</docs/en/vs-code>)| `auto` with Claude Code v2.1.283 or later; on earlier versions, `auto` on Pro, Max, or Team plans in sessions that [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), and `default` otherwise
+
+In your [first session after an install or upgrade](</docs/en/env-vars#first-session-after-an-install-or-upgrade>), Claude Code can choose the starting permission mode before its feature flags arrive. That session can start in a different permission mode than the table gives, and your next session matches the table. When the flag, a settings file, or the built-in default selects `auto` but auto mode isn’t available to the session, Claude Code starts the session in Manual instead. Auto mode is unavailable when the session doesn’t meet the availability requirements, such as a settings file turning it off or a model that doesn’t support it, or when Anthropic has temporarily turned it off server-side. The first time the built-in default starts one of your sessions in auto mode, Claude Code shows a notice that links to this page:
* In a terminal, once, at the top of the session
* In the VS Code extension, as a card on the new-conversation screen that stays until you dismiss it
@@ -153,10 +149,10 @@
1. `claudeCode.initialPermissionMode`
2. The mode you last picked from the mode indicator, if it was Manual, Edit automatically, or Auto. Picking Plan or Bypass permissions applies to that conversation only
- 3. `permissions.defaultMode` from [managed settings](</docs/en/managed-settings>) or `~/.claude/settings.json`, on Pro, Max, and Team plans with feature-flag fetching available
+ 3. `permissions.defaultMode` from [managed settings](</docs/en/managed-settings>) or `~/.claude/settings.json`
4. The built-in default for your plan, provider, and organization settings
-The extension never reads a project’s `.claude/settings.json` or `.claude/settings.local.json` for the starting permission mode, and in conversations that don’t meet item 3’s conditions it reads no settings file at all. When `claudeCode.claudeProcessWrapper` is set, items 3 and 4 don’t apply either: those conversations start in Manual unless item 1 or item 2 sets a permission mode.Auto appears in the mode indicator when auto mode is available.Bypass permissions requires the **Allow dangerously skip permissions** toggle in the extension settings. Without it, the permission mode doesn’t appear in the indicator, and a `bypassPermissions` value from item 1 or item 3 starts the conversation in Manual instead. Auto from any item likewise starts the conversation in Manual when auto mode isn’t available.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
+The extension never reads a project’s `.claude/settings.json` or `.claude/settings.local.json` for the starting permission mode. When `claudeCode.claudeProcessWrapper` is set, items 3 and 4 don’t apply: those conversations start in Manual unless item 1 or item 2 sets a permission mode.Before v2.1.283, item 3 applied only on Pro, Max, and Team plans in sessions that [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>).Auto appears in the mode indicator when auto mode is available.Bypass permissions requires the **Allow dangerously skip permissions** toggle in the extension settings. Without it, the permission mode doesn’t appear in the indicator, and a `bypassPermissions` value from item 1 or item 3 starts the conversation in Manual instead. Auto from any item likewise starts the conversation in Manual when auto mode isn’t available.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
The JetBrains plugin runs Claude Code in the IDE terminal, so switching permission modes works the same as in the CLI: press `Shift+Tab` to cycle, or pass `--permission-mode` when launching.
@@ -170,7 +166,7 @@
Use the mode dropdown next to the prompt box on [claude.ai/code](<https://claude.ai/code>) or in the mobile app. Permission prompts appear in claude.ai for approval. Which modes appear depends on where the session runs:
* **[Cloud sessions](</docs/en/claude-code-on-the-web>)** : Accept edits, Plan, and Auto. Accept edits corresponds to `default` mode: cloud sessions pre-approve file edits regardless of mode, so the dropdown shows Accept edits instead of Manual. Cloud sessions still honor `defaultMode: "acceptEdits"` from settings. Auto mode appears only when your organization allows it and the selected model supports it. Bypass permissions isn’t available.
- * **[Remote Control](</docs/en/remote-control>) sessions** on your local machine: Manual, Accept edits, and Plan. You can’t select Auto or Bypass permissions from the app.
+ * **[Remote Control](</docs/en/remote-control>) sessions** on your local machine: Manual, Accept edits, and Plan for a session you started yourself, and you can’t select Auto or Bypass permissions from the app. For a project thread running on your computer, see [Run a thread on your own computer](</docs/en/claude-projects#run-a-thread-on-your-own-computer>).
* Except for Bypass permissions, the dropdown shows the permission mode the local session is in, including one set from the terminal. It updates when the permission mode changes in the app or in the terminal. The session never reports Bypass permissions to claude.ai, so switching into it from the terminal doesn’t change what the dropdown shows.
* Sessions hosted by the [desktop app](</docs/en/desktop>) or the [VS Code extension](</docs/en/vs-code>) report permission mode changes to claude.ai as they happen, the same as sessions hosted in a terminal.
* Before v2.1.202, sessions connected with `/remote-control` or `claude --remote-control` didn’t report their permission mode at all, so claude.ai and the mobile app could show a permission mode the session wasn’t in. The mismatch affected only the label. Claude Code generated permission prompts from the session’s actual permission mode, and they still appeared in the app for approval.
@@ -195,7 +191,13 @@
Analyze before you edit with plan mode
-Plan mode tells Claude to research and propose changes without making them. Claude reads files, runs shell commands to explore, and writes a plan, but does not edit your source. Except in interactive terminal sessions with bypass permissions available, edits stay blocked until you approve the plan. When [auto mode](</docs/en/auto-mode-config>) is available and the `useAutoModeDuringPlan` setting is on, which it is by default, the classifier reviews shell commands during planning instead of prompting you. Approved commands run, and rejected ones are blocked. Otherwise, commands outside the [built-in read-only set](</docs/en/permissions#read-only-commands>) prompt for approval, including when the sandbox’s [auto-allow mode](</docs/en/sandboxing#sandbox-modes>) is enabled. In interactive terminal sessions with bypass permissions available, neither the classifier nor a prompt applies to planning commands; Skip all checks with bypassPermissions mode covers the few things that still prompt there. In v2.1.212 through v2.1.217, sessions without bypass permissions prompted for every command outside the read-only set, whether or not auto mode was available. Enter plan mode by pressing `Shift+Tab` or prefixing a single prompt with `/plan`. You can also start in plan mode from the CLI:
+Plan mode tells Claude to research and propose changes without making them. Claude reads files, runs shell commands to explore, and writes a plan, but does not edit your source. Except in interactive terminal sessions with bypass permissions available, edits stay blocked until you approve the plan. What happens to a shell command during planning depends on the session, and the first of these cases that matches applies:
+
+ * **Interactive terminal sessions with bypass permissions available** : neither the classifier nor a prompt applies to planning commands. Skip all checks with bypassPermissions mode covers the few things that still prompt there.
+ * **[Auto mode](</docs/en/auto-mode-config>) available and the `useAutoModeDuringPlan` setting on**, which it is by default: the classifier reviews shell commands other than critical-path removals instead of prompting you. Approved commands run, and rejected ones are blocked.
+ * **Auto mode not available, or`useAutoModeDuringPlan` off**: commands outside the [built-in read-only set](</docs/en/permissions#read-only-commands>) prompt for approval, including when the sandbox’s [auto-allow mode](</docs/en/sandboxing#sandbox-modes>) is enabled.
+
+Enter plan mode by pressing `Shift+Tab` or prefixing a single prompt with `/plan`. You can also start in plan mode from the CLI:
claude --permission-mode plan
@@ -229,7 +231,7 @@
Eliminate permission prompts with auto mode
-Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt. On Pro, Max, and Team plans, auto mode is the built-in starting permission mode. The classifier also reviews each message Claude sends to another agent with [`SendMessage`](</docs/en/tools-reference>), whether plain text or a structured [agent team](</docs/en/agent-teams>) message, before Claude Code delivers it, both in auto mode and in plan mode while the classifier reviews commands; the send review requires Claude Code v2.1.222 or later. The classifier also reviews and approves or blocks `rm` and `rmdir` removals targeting a critical path, such as `rm -rf /` and `rm -rf ~`, including when the removal sits inside command or process substitution. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior in a mode that still prompts you, set the [Proactive output style](</docs/en/output-styles>) instead.
+Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt. With Claude Code v2.1.283 or later, auto mode is the built-in starting permission mode for interactive terminal and VS Code sessions on every plan and provider. On earlier versions, it’s the built-in starting permission mode only on Pro, Max, and Team plans. The classifier also reviews each message Claude sends to another agent with [`SendMessage`](</docs/en/tools-reference>), whether plain text or a structured [agent team](</docs/en/agent-teams>) message, before Claude Code delivers it, both in auto mode and in plan mode while the classifier reviews commands; the send review requires Claude Code v2.1.222 or later. By default, the classifier doesn’t review `rm` and `rmdir` removals targeting a critical path, such as `rm -rf /` or `rm -rf ~`. Critical paths covers what happens to them in each permission mode. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior in a mode that still prompts you, set the [Proactive output style](</docs/en/output-styles>) instead.
Auto mode reduces permission prompts but does not guarantee safety. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations.
@@ -248,7 +250,7 @@
Auto mode on Bedrock, Agent Platform, or Foundry
-On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode appears in the `Shift+Tab` cycle by default. Appearing in the cycle doesn’t change the permission mode a session starts in: on these providers, terminal sessions start in your [`defaultMode`](</docs/en/settings-reference#permissions-defaultmode>), which is Manual unless you change it, and conversations in the [VS Code extension](</docs/en/vs-code>) start in Manual unless `claudeCode.initialPermissionMode` or a mode you picked in the extension sets one. Only Claude Sonnet 5, Opus 4.7 or later, and the Fable models are supported on these providers. To make auto mode the default starting permission mode, set `"permissions": {"defaultMode": "auto"}` in user or managed settings. In sessions the VS Code extension starts, select **Auto** from the mode indicator instead. Switch permission modes covers what outranks that pick. The [`/doctor`](</docs/en/commands#all-commands>) checkup proposes this user-settings default on these providers the same way it does on the Anthropic API. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. A session already running in auto mode leaves it when the setting reaches that session from an [admin-deployed source](</docs/en/managed-settings#which-managed-source-claude-code-uses>), and shows `auto mode disabled by settings`. Before v2.1.251, a running session kept auto mode until it ended. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
+On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode is available by default. With Claude Code v2.1.283 or later, it’s also the built-in starting permission mode for interactive terminal and [VS Code](</docs/en/vs-code>) sessions. To choose the starting permission mode yourself, set `permissions.defaultMode` as Start in a different permission mode describes, or pick a permission mode from the VS Code extension’s mode indicator. Only Claude Sonnet 5, Opus 4.7 or later, and the Fable models are supported on these providers. On any other model, the session starts in Manual instead. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. A session already running in auto mode leaves it when the setting reaches that session from an [admin-deployed source](</docs/en/managed-settings#which-managed-source-claude-code-uses>), and shows `auto mode disabled by settings`. Before v2.1.251, a running session kept auto mode until it ended. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
###
@@ -267,7 +269,7 @@
* **The server doesn’t review the session** : a response completes with no review results, or the server answers that it doesn’t review this session. The most common causes are an LLM gateway or proxy that drops the request for review or the results, and a platform, region, or credential that doesn’t have server-side checks yet. Claude Code falls back to its own classifier requests. Once that fallback holds for the rest of the session, it shows a [notice about classifier request charges](</docs/en/auto-mode-classifier-billing>) on accounts where those requests are billed.
* **The server gives no verdict for an action** : Claude Code denies the action rather than run it unreviewed. On any connection, this happens when the response ends before the review results arrive or the results arrive in a form Claude Code can’t read. An LLM gateway or proxy that cuts responses short or rewrites the results can cause either. On a direct connection to the Anthropic API, it also happens when the server’s check fails for the action, for example by timing out. [The server returned no safety verdict](</docs/en/errors#the-server-returned-no-safety-verdict>) covers the denial message, what happens when denials repeat, and what to do.
-To skip asking the server and always use Claude Code’s own classifier requests, set [`CLAUDE_CODE_AUTO_MODE_SERVER=0`](</docs/en/env-vars>). On a direct connection to the Anthropic API, the variable requires Claude Code v2.1.281 or later. Setting it to `1` there turns server review on in a session that doesn’t have it yet, such as a `-p` or Agent SDK session, unless you’ve also set `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1`. If you set `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1` and leave `CLAUDE_CODE_AUTO_MODE_SERVER` unset, Claude Code also stops asking the server.
+To skip asking the server and always use Claude Code’s own classifier requests, set [`CLAUDE_CODE_AUTO_MODE_SERVER=0`](</docs/en/env-vars>). On a direct connection to the Anthropic API, the variable requires Claude Code v2.1.281 or later. Setting it to `1` there turns server review on in a session that doesn’t have it yet, such as a `-p` or Agent SDK session, unless you’ve also set `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1`. If you set `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1` and leave `CLAUDE_CODE_AUTO_MODE_SERVER` unset, Claude Code also stops asking the server, except as [Disable pre-release capabilities](</docs/en/llm-gateway-protocol#disable-pre-release-capabilities>) describes.
###
@@ -331,7 +333,7 @@
Claude Code v2.1.205 and later also block these by default:
* Writing to Claude Code session transcripts, the `.jsonl` history files under `~/.claude/projects/` or your configured config directory, whether directly or through a shell command. The rule also covers the metadata lines Claude Code appends to each transcript entry for its own checks. Reading a transcript isn’t blocked
- * A recursive forced delete such as `rm -rf "$VAR"` or `Remove-Item -Recurse -Force $dir` whose target is a shell variable, or a glob rooted at one, that isn’t assigned anywhere in the conversation the classifier sees. The value came only from earlier command output, which the classifier never receives, so the classifier can’t verify the deletion target against the other deletion rules. The block clears when you name the exact path being deleted, or when Claude re-runs the delete with the resolved literal path written into the command. Deletes whose target the classifier can resolve aren’t affected. `Remove-Item` targets that are a bare `*` or end in `/*` or `\*` never reach the classifier: Claude Code denies them outright
+ * A recursive forced delete such as `rm -rf "$VAR"` or `Remove-Item -Recurse -Force $dir` whose target is a shell variable that isn’t assigned anywhere in the conversation the classifier sees, or a glob rooted at such a variable. The value came only from earlier command output, which the classifier never receives, so the classifier can’t verify the deletion target against the other deletion rules. The block clears when you name the exact path being deleted, or when Claude re-runs the delete with the resolved literal path written into the command. Deletes whose target the classifier can resolve aren’t affected. A glob directly under the variable, as in `rm -rf "$VAR"/*`, is a critical path instead. `Remove-Item` targets that are a bare `*` or end in `/*` or `\*` never reach the classifier: Claude Code denies them outright.
Claude Code v2.1.257 and later also block these by default:
@@ -415,13 +417,14 @@
Each action goes through a fixed decision order. The first matching step wins:
1. Actions matching your [allow, ask, or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately, with these exceptions:
- * Writes to protected paths route to the classifier even when an allow rule matches, and so do `rm` and `rmdir` removals targeting a critical path in Claude Code v2.1.218 and later
+ * Writes to protected paths route to the classifier even when an allow rule matches
+ * No allow rule approves `rm` and `rmdir` removals targeting a critical path
* MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>) prompt you directly even when an allow rule matches, and so do connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code
* A shell command that carries [per-command allowed domains](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) also routes to the classifier even when an allow rule matches, because a rule approves the command, not its hosts
* Ask rules that match on a command’s content, such as `Bash(git push *)`, fall back to a permission prompt
2. Read-only actions and file edits in your working directory are auto-approved, except writes to protected paths and the first read outside the working directories, which prompts you
* In a session with server-side classifier review, read-only and [sandboxed](</docs/en/sandboxing#sandbox-modes>) shell commands wait for that review and are blocked if it flags them
- 3. Everything else goes to the classifier. The connector tools and `requiresUserInteraction` MCP tools that prompt you directly in step 1 never reach the classifier, so neither an org-required approval nor a consent step is auto-approved
+ 3. Everything else goes to the classifier, apart from critical-path removals under their default handling. The connector tools and `requiresUserInteraction` MCP tools that prompt you directly in step 1 never reach the classifier either, so neither an org-required approval nor a consent step is auto-approved
4. If the classifier blocks, Claude receives the reason and tries an alternative. In most sessions the reason names the rule the classifier matched, such as `[Data Exfiltration]`, rather than giving a written explanation; see [Review denials](</docs/en/auto-mode-config#review-denials>)
On entering auto mode, broad allow rules that grant arbitrary code execution are dropped:
@@ -462,7 +465,7 @@
Skip all checks with bypassPermissions mode
-`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. The actions no mode auto-approves still prompt in this mode. Two [cross-session messaging](</docs/en/cross-session-messaging>) safeguards still apply in this mode, and in interactive terminal plan-mode sessions where bypass permissions are available:
+`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. The actions no mode auto-approves still prompt in this mode. The Remove-Item in PowerShell denies also apply in this mode. Two [cross-session messaging](</docs/en/cross-session-messaging>) safeguards still apply in this mode, and in interactive terminal plan-mode sessions where bypass permissions are available:
* The [`isolatePeerMachines`](</docs/en/settings-reference#isolatepeermachines>) approval prompt for messages to your sessions beyond this machine still appears.
* When no [`crossSessionInbound`](</docs/en/cross-session-messaging#control-inbound-messages>) value applies, Claude Code holds an inbound message from another of your sessions for your approval, and delivers without asking only when the sending session identifies itself as also bypassing permission prompts. If you leave the permission mode while messages are held, Claude Code re-applies the inbound rules and delivers any held message they now accept.
@@ -499,7 +502,12 @@
`dontAsk`| Denied
`bypassPermissions`| Allowed
-In a session started with [`--restricted`](</docs/en/cli-reference#cli-flags>), which requires Claude Code v2.1.248 or later, the classifier can’t approve protected-path writes. [`permissions.allow`](</docs/en/permissions#manage-permissions>) rules in settings files do not pre-approve protected-path writes. The safety check runs before Claude Code evaluates allow rules from settings, so an entry such as `Edit(.claude/**)` in `~/.claude/settings.json` or `.claude/settings.json` does not change the per-mode outcome in the table above. In modes that prompt, the prompt for a `.claude/` write offers **Yes, and allow Claude to edit its own settings for this session** , which approves later `.claude/` writes in that session without prompting again. Protected directories:
+In a session started with [`--restricted`](</docs/en/cli-reference#cli-flags>), which requires Claude Code v2.1.248 or later, the classifier can’t approve protected-path writes. [`permissions.allow`](</docs/en/permissions#manage-permissions>) rules in settings files do not pre-approve protected-path writes. The safety check runs before Claude Code evaluates allow rules from settings, so an entry such as `Edit(.claude/**)` in `~/.claude/settings.json` or `.claude/settings.json` does not change the per-mode outcome in the table above. In permission modes that prompt, the prompt for a write to the project’s `.claude/` folder or to `~/.claude/` can offer one of these session-scoped options:
+
+ * For the project’s `.claude/` folder: **Yes, and allow Claude to edit files in this project’s .claude folder for this session**
+ * For `~/.claude/`: **Yes, and allow Claude to edit files in its ~/.claude folder for this session**
+
+Protected directories:
* `.git`
* `.config/git`
@@ -535,12 +543,18 @@
Mode| What Claude Code does with a critical-path removal
---|---
`default`, `acceptEdits`| Asks you to approve it
-`plan`| Asks you to approve it. With auto mode available during planning and no bypass permissions available, sends it to the classifier instead
-`auto`| Sends it to the classifier
+`plan`| Asks you to approve it. When the classifier reviews commands during planning and no bypass permissions are available, handles it as in `auto` mode
+`auto`| Asks you to approve it in the terminal, with a time limit. Elsewhere, denies it
`dontAsk`| Denies it
-`bypassPermissions`| Asks you to approve it
-
-If an explicit [ask rule](</docs/en/permissions#manage-permissions>) matches the command, Claude Code asks you even in `auto` mode. In modes that ask, a [`PermissionRequest` hook](</docs/en/hooks#permissionrequest>) can answer the prompt the way it answers any other. Claude Code treats an `rm` or `rmdir` target as a critical path when it is any of the following:
+`bypassPermissions`| Asks you to approve it, with a time limit in the terminal
+
+If an explicit [ask rule](</docs/en/permissions#manage-permissions>) matches the command, Claude Code asks you instead, even in `auto` mode and without a time limit. In modes that ask, a [`PermissionRequest` hook](</docs/en/hooks#permissionrequest>) can answer the prompt. The `auto` and `bypassPermissions` handling requires Claude Code v2.1.281 or later. To turn it off, set [`CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUT=1`](</docs/en/env-vars#variables>) in the environment that launches Claude Code. In `auto` mode, critical-path removals then go to the classifier instead, and in `bypassPermissions` mode the prompt has no time limit. In `auto` and `bypassPermissions` modes, the terminal prompt shows a two-minute countdown:
+
+ * If the countdown runs out before you answer, Claude Code denies the command and tells Claude what to do instead, so an unattended session keeps working.
+ * Press any key while the prompt is open to stop the countdown and keep the prompt waiting for your answer.
+ * After three of these prompts run out unanswered in a session, Claude Code stops showing them and denies further critical-path removals immediately. Sending a new message starts the count over.
+
+In `auto` mode, wherever Claude Code can’t show you a terminal prompt, it denies the command immediately, for example in [non-interactive runs](</docs/en/headless>) with `-p`, in [Agent SDK](</docs/en/agent-sdk/permissions>) sessions, and in the VS Code extension’s chat panel and the Desktop app. The denial tells Claude to report what it wanted to delete and leave the removal to you. Claude Code treats an `rm` or `rmdir` target as a critical path when it is any of the following:
* The filesystem root
* Top-level directories, meaning any direct child of the root, such as `/usr`, `/etc`, or `/data`
@@ -554,7 +568,14 @@
* For a variable such as `$DIR`, guard each expansion so the shell stops with an error when the variable is unset or empty, as in `rm -rf "${DIR:?}"/*`, or use a literal path
* For a variable that is normally set, such as `$HOME`, use a literal path
-A removal whose expansions are all guarded that way isn’t a critical-path removal, so in `bypassPermissions` mode it runs without a prompt. Hiding the removal inside a subshell with `(...)`, a brace group with `{ ...; }`, command substitution with `$(...)` or backticks, or process substitution with `<(...)`, doesn’t skip the check. Claude Code finds a critical-path removal whether it sits inside the nested form, as in `(rm -rf ~)` or `echo "$(rm -rf ~)"`, or elsewhere in the same command.
+A removal whose expansions are all guarded that way passes this check, so in `bypassPermissions` mode it runs without a prompt unless another check in this section flags it. Claude Code also treats these targets as critical paths:
+
+ * **A shell variable followed by one top-level directory name** , such as `rm -rf "$TMPDIR/mnt"`: when the variable expands empty, the command removes `/mnt`. This covers common top-level names such as `mnt`, `tmp`, `usr`, and `Users`.
+ * **A variable that the same command assigns from a directory-printing substitution** , such as `D=$(pwd); rm -rf "$D"` or an assignment from `$(git rev-parse --show-toplevel)`: the value can name your working directory or repository root. A `"${D:?}"` guard doesn’t clear this check, because the variable isn’t empty; use a literal path instead.
+ * **A backslash-only target** , such as `rm -rf "\\"`: Git Bash on Windows reads a lone backslash as the current drive’s root, so the check applies on every platform.
+ * **Only the output of a command substitution** , such as `rm -rf "$(pwd)"`, when the `rm` is recursive: Claude Code can’t check the target before the command runs, so the prompt tells Claude to run the substitution on its own first and then remove the literal paths it prints. To turn off this one check, set [`CLAUDE_CODE_DISABLE_SUBSTITUTION_RM_PROMPT=1`](</docs/en/env-vars#variables>) in the environment that launches Claude Code.
+
+When a trailing command substitution can expand empty, as in `rm -rf ~/$(cmd)`, Claude Code checks the path that would remain, your home directory in this example. Hiding the removal inside a subshell with `(...)`, a brace group with `{ ...; }`, command substitution with `$(...)` or backticks, or process substitution with `<(...)`, doesn’t skip the check. Claude Code finds a critical-path removal whether it sits inside the nested form, as in `(rm -rf ~)` or `echo "$(rm -rf ~)"`, or elsewhere in the same command.
###
@@ -562,11 +583,13 @@
Remove-Item in PowerShell
-When you enable the [PowerShell tool](</docs/en/tools-reference#powershell-tool>), Claude Code gives `Remove-Item` its own check, separate from the `rm` critical-path list. The outcome depends on the target, and the first matching case applies:
+When you enable the [PowerShell tool](</docs/en/tools-reference#powershell-tool>), Claude Code gives `Remove-Item` and the `cmd` built-ins `rd`, `rmdir`, `del`, and `erase` their own checks, separate from the `rm` critical-path list. For `Remove-Item`, the outcome depends on the target, and the first matching case applies:
* **System paths** : the filesystem root and its top-level directories, drive roots and their top-level directories, and your home directory. Claude Code denies the command in every mode, without asking you.
* **Wildcards** : a bare `*`, or any target ending in `/*` or `\*`, including a glob under a shell variable such as `$dir/*`. Claude Code denies the command in every mode, without asking you, before the classifier sees it.
* **Your working directory or one of its parents, with`-Recurse`**: Claude Code treats the command like any other that needs approval in your permission mode, so it asks you in modes that ask, sends it to the classifier in `auto` mode, and denies it in `dontAsk` mode. `bypassPermissions` mode skips this check.
+
+The system-paths case also applies to `rd`, `rmdir`, `del`, and `erase` when Claude runs them through `cmd`, as in `cmd /c rd /s /q C:\Users`. By default, Claude Code denies such a command in every mode, without asking you. This `cmd` check requires Claude Code v2.1.283 or later. When judging a `cmd` target, Claude Code treats a PowerShell variable that follows literal text as empty. That makes `cmd /c rd /s /q "C:\$name"` a removal of `C:\`, so it is denied too. A trailing wildcard counts as the folder it empties, so `cmd /c del /q C:\*` is denied and `cmd /c del /q dist\*` in your project is not. To turn the `cmd` check off, set [`CLAUDE_CODE_DISABLE_POWERSHELL_CMD_RM_DENY=1`](</docs/en/env-vars#variables>) in the environment that launches Claude Code. Claude Code ignores this variable in a settings file’s `env` block. `Remove-Item` on a system path stays denied either way.
##
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -256,7 +256,18 @@
Server-side classifier review
-On Enterprise plans and accounts that use the Claude API, on [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry, and whenever you point `ANTHROPIC_BASE_URL` at an [LLM gateway or proxy](</docs/en/llm-gateway>), Claude Code in auto mode asks the server to review the actions that go to the classifier as part of the session’s model requests. Where the server reviews them, its verdicts decide those actions. Where it doesn’t, most often because an LLM gateway or proxy interferes with the traffic, or because the platform, region, or credential doesn’t have server-side checks yet, Claude Code falls back to its own classifier requests, and once that fallback holds for the rest of the session it shows a [notice about classifier request charges](</docs/en/auto-mode-classifier-billing>) on accounts where those requests are billed. To skip asking the server and always use Claude Code’s own classifier requests, set [`CLAUDE_CODE_AUTO_MODE_SERVER=0`](</docs/en/env-vars>). The variable isn’t read on a direct connection to the Anthropic API. If you set `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1` and leave `CLAUDE_CODE_AUTO_MODE_SERVER` unset, Claude Code also stops asking the server. Asking the server by default requires Claude Code v2.1.278 or later.
+In auto mode, Claude Code can ask the server to check the actions that the decision order sends for review, as part of the session’s model requests, in place of sending its own classifier requests. These sessions ask:
+
+ * **A direct connection to the Anthropic API** : in an interactive terminal session, on every claude.ai plan and on accounts that use the Claude API, as Anthropic rolls it out. Requires Claude Code v2.1.271 or later on Pro, Max, and Team plans, and v2.1.278 or later on Enterprise plans and Claude API accounts. From v2.1.282, a session that [doesn’t fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), for example because you turned telemetry off, asks the server by default in any kind of session.
+ * **A cloud provider, or an LLM gateway or proxy** : on [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry, and whenever you point `ANTHROPIC_BASE_URL` at an [LLM gateway or proxy](</docs/en/llm-gateway>), whatever your plan. Asking by default requires Claude Code v2.1.278 or later.
+ * **A signed-in[Claude apps gateway](</docs/en/claude-apps-gateway>) session**: requires Claude Code v2.1.280 or later
+
+Where the server reviews the actions, its verdicts decide them. Two other outcomes are possible:
+
+ * **The server doesn’t review the session** : a response completes with no review results, or the server answers that it doesn’t review this session. The most common causes are an LLM gateway or proxy that drops the request for review or the results, and a platform, region, or credential that doesn’t have server-side checks yet. Claude Code falls back to its own classifier requests. Once that fallback holds for the rest of the session, it shows a [notice about classifier request charges](</docs/en/auto-mode-classifier-billing>) on accounts where those requests are billed.
+ * **The server gives no verdict for an action** : Claude Code denies the action rather than run it unreviewed. On any connection, this happens when the response ends before the review results arrive or the results arrive in a form Claude Code can’t read. An LLM gateway or proxy that cuts responses short or rewrites the results can cause either. On a direct connection to the Anthropic API, it also happens when the server’s check fails for the action, for example by timing out. [The server returned no safety verdict](</docs/en/errors#the-server-returned-no-safety-verdict>) covers the denial message, what happens when denials repeat, and what to do.
+
+To skip asking the server and always use Claude Code’s own classifier requests, set [`CLAUDE_CODE_AUTO_MODE_SERVER=0`](</docs/en/env-vars>). On a direct connection to the Anthropic API, the variable requires Claude Code v2.1.281 or later. Setting it to `1` there turns server review on in a session that doesn’t have it yet, such as a `-p` or Agent SDK session, unless you’ve also set `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1`. If you set `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1` and leave `CLAUDE_CODE_AUTO_MODE_SERVER` unset, Claude Code also stops asking the server.
###
@@ -394,6 +405,7 @@
* **A blocked action** : Claude Code shows a notification and lists the action in `/permissions` under the **Recently denied** tab, where you can press `r` to retry it with a manual approval. When the classifier produces [no verdict on the action](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>), because a safety check separate from auto mode refused the classifier’s own request or its response didn’t parse, Claude Code denies the action without the notification or the **Recently denied** entry.
* **Repeated blocks** : if the classifier blocks an action 3 times in a row or 20 times total, auto mode pauses and Claude Code resumes prompting. Approving the prompted action resumes auto mode. These thresholds are not configurable. Any allowed action resets the consecutive counter, while the total counter persists for the session and resets only when its own limit triggers a fallback. Claude Code doesn’t count a denial toward either threshold when [a safety check separate from auto mode refuses the classifier’s own request](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>); the linked entry covers how Claude Code handles those denials.
* **Sessions that can’t prompt** : a [non-interactive](</docs/en/headless>) `-p` run without a [`--permission-prompt-tool`](</docs/en/cli-reference#cli-flags>) has no prompt to fall back to. When repeated blocks reach a threshold, the action doesn’t run and Claude keeps working. The same applies when [a safety check separate from auto mode refuses the classifier’s request](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>). Claude Code doesn’t stop the run in either case.
+ * **No verdict from the server** : under server-side classifier review, Claude Code denies an action the server gives no verdict for, and stops the turn after ten responses in a row with no verdict. See [The server returned no safety verdict](</docs/en/errors#the-server-returned-no-safety-verdict>).
* **A mode switch during a check** : if you switch permission modes while a classifier check is pending, Claude Code discards a verdict the new mode wouldn’t have requested rather than applying it: you’re prompted for approval instead, or the action is auto-denied in `dontAsk` mode.
Repeated blocks usually mean the classifier is missing context about your infrastructure. Use `/feedback` to report false positives, or have an administrator [configure trusted infrastructure](</docs/en/auto-mode-config>).
@@ -408,6 +420,7 @@
* A shell command that carries [per-command allowed domains](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) also routes to the classifier even when an allow rule matches, because a rule approves the command, not its hosts
* Ask rules that match on a command’s content, such as `Bash(git push *)`, fall back to a permission prompt
2. Read-only actions and file edits in your working directory are auto-approved, except writes to protected paths and the first read outside the working directories, which prompts you
+ * In a session with server-side classifier review, read-only and [sandboxed](</docs/en/sandboxing#sandbox-modes>) shell commands wait for that review and are blocked if it flags them
3. Everything else goes to the classifier. The connector tools and `requiresUserInteraction` MCP tools that prompt you directly in step 1 never reach the classifier, so neither an org-required approval nor a consent step is auto-approved
4. If the classifier blocks, Claude receives the reason and tries an alternative. In most sessions the reason names the rule the classifier matched, such as `[Data Exfiltration]`, rather than giving a written explanation; see [Review denials](</docs/en/auto-mode-config#review-denials>)
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -209,7 +209,7 @@
When the plan is ready, Claude presents it and asks how to proceed. From that prompt you can choose:
- * **Yes, and use auto mode** : approve and start in auto mode. When auto mode is unavailable, this option reads **Yes, auto-accept edits**. If you started the session with bypass permissions enabled, the option reads **Yes, and switch to BYPASS PERMISSIONS (no further prompts) for this session** instead.
+ * **Yes, and use auto mode** : approve and start in auto mode. If auto mode isn’t available to your session, for example because your organization turned it off, this option reads **Yes, auto-accept edits**. If you started the session with bypass permissions enabled, the option reads **Yes, and switch to BYPASS PERMISSIONS (no further prompts) for this session** instead.
* **Yes, manually approve edits** : approve and review each edit individually.
* **No, keep planning** : stay in plan mode and tell Claude what to change.
@@ -375,6 +375,18 @@
+Approvals you state in conversation
+
+If you tell Claude that a blocked action is allowed, the classifier reads that as your approval and can clear the block. How you worded it decides whether the action runs, and how far the approval reaches:
+
+ * **Name the action and its specifics** : your message has to name the action and the specific thing that makes it dangerous, such as the branch of a force push. Naming the verb alone clears nothing, so “you can force-push” leaves the block in place.
+ * **Expect it to cover one action** : an approval covers the destructive action you named, so a later action is blocked again unless you granted the approval as standing. To stop approving a routine pattern one action at a time, add it to [`autoMode.allow`](</docs/en/auto-mode-config#override-the-block-and-allow-rules>).
+ * **Some blocks stay in place** : [the classifier’s precedence order](</docs/en/auto-mode-config#override-the-block-and-allow-rules>) sets out which blocks your approval can reach. To run a step it won’t clear, leave auto mode and answer the permission prompt.
+
+###
+
+
+
When auto mode falls back
When auto mode can’t approve your session’s actions, what happens depends on the case:
@@ -416,8 +428,6 @@
1. Before a subagent starts, the delegated task description is evaluated, so a dangerous-looking task is blocked at spawn time.
2. While the subagent runs, each of its actions goes through the classifier with the same rules as the parent session, and any `permissionMode` in the subagent’s frontmatter is ignored.
3. When the subagent finishes, the classifier reviews its work and its final report before the parent reads the report. When the classifier flags the subagent’s work or report, or a separate API safety check refuses the review, the report is still delivered, prepended with a security warning. When the classifier is unavailable for the review, the report arrives with a note to verify the subagent’s work before acting on it.
-
-Step 1 requires Claude Code v2.1.178 or later. Earlier versions applied the classifier at steps 2 and 3, but did not evaluate the task description before the subagent started.
Cost and latency
@@ -526,7 +536,12 @@
* Your working directory and its parents
* Your additional working directories and their parents, but only when the removal is a glob under one of them, such as `rm -rf <dir>/*`. `rm -rf <dir>` on the directory itself doesn’t trigger this check
-Claude Code also treats a glob or trailing slash directly under a shell variable, such as `rm -rf "$DIR"/*`, as a critical-path removal, because the command becomes a removal from the filesystem root when the variable is empty. Hiding the removal inside a subshell with `(...)`, a brace group with `{ ...; }`, command substitution with `$(...)` or backticks, or process substitution with `<(...)`, doesn’t skip the check. Claude Code finds a critical-path removal whether it sits inside the nested form, as in `(rm -rf ~)` or `echo "$(rm -rf ~)"`, or elsewhere in the same command.
+Claude Code also treats a glob or trailing slash directly under a shell variable, such as `rm -rf "$DIR"/*`, as a critical-path removal, because the command becomes a removal from the filesystem root when the variable is empty. The prompt for this variable case names the flagged `rm` and says how to rewrite it so the check passes:
+
+ * For a variable such as `$DIR`, guard each expansion so the shell stops with an error when the variable is unset or empty, as in `rm -rf "${DIR:?}"/*`, or use a literal path
+ * For a variable that is normally set, such as `$HOME`, use a literal path
+
+A removal whose expansions are all guarded that way isn’t a critical-path removal, so in `bypassPermissions` mode it runs without a prompt. Hiding the removal inside a subshell with `(...)`, a brace group with `{ ...; }`, command substitution with `$(...)` or backticks, or process substitution with `<(...)`, doesn’t skip the check. Claude Code finds a critical-path removal whether it sits inside the nested form, as in `(rm -rf ~)` or `echo "$(rm -rf ~)"`, or elsewhere in the same command.
###
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -250,13 +250,13 @@
On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode appears in the `Shift+Tab` cycle by default. Appearing in the cycle doesn’t change the permission mode a session starts in: on these providers, terminal sessions start in your [`defaultMode`](</docs/en/settings-reference#permissions-defaultmode>), which is Manual unless you change it, and conversations in the [VS Code extension](</docs/en/vs-code>) start in Manual unless `claudeCode.initialPermissionMode` or a mode you picked in the extension sets one. Only Claude Sonnet 5, Opus 4.7 or later, and the Fable models are supported on these providers. To make auto mode the default starting permission mode, set `"permissions": {"defaultMode": "auto"}` in user or managed settings. In sessions the VS Code extension starts, select **Auto** from the mode indicator instead. Switch permission modes covers what outranks that pick. The [`/doctor`](</docs/en/commands#all-commands>) checkup proposes this user-settings default on these providers the same way it does on the Anthropic API. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. A session already running in auto mode leaves it when the setting reaches that session from an [admin-deployed source](</docs/en/managed-settings#which-managed-source-claude-code-uses>), and shows `auto mode disabled by settings`. Before v2.1.251, a running session kept auto mode until it ended. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
-####
+###
Server-side classifier review
-On Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry, Claude Code reviews auto mode actions with its own classifier requests by default. To have the platform’s server-side classifier review the actions that go to the classifier as part of the session’s model requests instead, set [`CLAUDE_CODE_AUTO_MODE_SERVER=1`](</docs/en/env-vars>). Where the platform runs the classifier, its verdicts decide those actions; where it doesn’t, Claude Code falls back to its own classifier requests. In v2.1.271 and v2.1.272, asking the platform was the default on these providers.
+On Enterprise plans and accounts that use the Claude API, on [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry, and whenever you point `ANTHROPIC_BASE_URL` at an [LLM gateway or proxy](</docs/en/llm-gateway>), Claude Code in auto mode asks the server to review the actions that go to the classifier as part of the session’s model requests. Where the server reviews them, its verdicts decide those actions. Where it doesn’t, most often because an LLM gateway or proxy interferes with the traffic, or because the platform, region, or credential doesn’t have server-side checks yet, Claude Code falls back to its own classifier requests, and once that fallback holds for the rest of the session it shows a [notice about classifier request charges](</docs/en/auto-mode-classifier-billing>) on accounts where those requests are billed. To skip asking the server and always use Claude Code’s own classifier requests, set [`CLAUDE_CODE_AUTO_MODE_SERVER=0`](</docs/en/env-vars>). The variable isn’t read on a direct connection to the Anthropic API. If you set `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1` and leave `CLAUDE_CODE_AUTO_MODE_SERVER` unset, Claude Code also stops asking the server. Asking the server by default requires Claude Code v2.1.278 or later.
###
@@ -421,7 +421,7 @@
Cost and latency
-The classifier runs on Claude Sonnet 5 by default rather than on your `/model` selection. A classifier model that Anthropic configures server-side takes precedence over that default. When your session’s model is Claude Sonnet 4.6, or when [`availableModels`](</docs/en/model-config#restrict-model-selection>) excludes Sonnet 5, the classifier runs on the session’s model instead, or on an Opus model when the session runs on a [Fable model](</docs/en/model-config#work-with-fable>); on providers other than the Anthropic API, that Opus fallback is the provider’s default Opus model.The session’s first auto-mode request validates the Sonnet 5 default: if the request succeeds, Sonnet 5 stays the session’s classifier model, and if it fails because the model isn’t available, the session uses the fallback instead. After that validation settles, the classifier’s model doesn’t change for the session.On Enterprise plans and on accounts that use the Claude API, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations. On Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry, you can move the review into the session’s model requests instead; see Server-side classifier review.Sandboxed network access adds no per-connection classifier requests. The classifier judges [the hosts a command names](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) together with the command in one review, and Claude Code checks each connection against the approved list without calling the classifier again.
+The classifier runs on Claude Sonnet 5 by default rather than on your `/model` selection. A classifier model that Anthropic configures server-side takes precedence over that default. When your session’s model is Claude Sonnet 4.6, or when [`availableModels`](</docs/en/model-config#restrict-model-selection>) excludes Sonnet 5, the classifier runs on the session’s model instead, or on an Opus model when the session runs on a [Fable model](</docs/en/model-config#work-with-fable>); on providers other than the Anthropic API, that Opus fallback is the provider’s default Opus model.The session’s first auto-mode request validates the Sonnet 5 default: if the request succeeds, Sonnet 5 stays the session’s classifier model, and if it fails because the model isn’t available, the session uses the fallback instead. After that validation settles, the classifier’s model doesn’t change for the session.On Enterprise plans and on accounts that use the Claude API, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations. Where the server reviews the actions as part of the session’s model requests, there are no separate classifier calls to count; see Server-side classifier review.Sandboxed network access adds no per-connection classifier requests. The classifier judges [the hosts a command names](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) together with the command in one review, and Claude Code checks each connection against the approved list without calling the classifier again.
##
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -526,7 +526,7 @@
* Your working directory and its parents
* Your additional working directories and their parents, but only when the removal is a glob under one of them, such as `rm -rf <dir>/*`. `rm -rf <dir>` on the directory itself doesn’t trigger this check
-Claude Code also treats a glob or trailing slash directly under a shell variable, such as `rm -rf "$DIR"/*`, as a critical-path removal, because the command becomes a removal from the filesystem root when the variable is empty. Hiding the removal inside command substitution with `$(...)` or backticks, or process substitution with `<(...)`, doesn’t skip the check. Claude Code finds a critical-path removal whether it sits inside the substitution, as in `echo "$(rm -rf ~)"`, or elsewhere in the same command.
+Claude Code also treats a glob or trailing slash directly under a shell variable, such as `rm -rf "$DIR"/*`, as a critical-path removal, because the command becomes a removal from the filesystem root when the variable is empty. Hiding the removal inside a subshell with `(...)`, a brace group with `{ ...; }`, command substitution with `$(...)` or backticks, or process substitution with `<(...)`, doesn’t skip the check. Claude Code finds a critical-path removal whether it sits inside the nested form, as in `(rm -rf ~)` or `echo "$(rm -rf ~)"`, or elsewhere in the same command.
###
Show diff (179 lines)
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -17,7 +17,7 @@
`dontAsk`| Reads and pre-approved tools; anything that would prompt is denied| Locked-down CI and scripts
`bypassPermissions`| Everything| Isolated containers and VMs only
-The mode that reviews every action is named **Manual** in the CLI, in `claude --help`, in the VS Code and JetBrains extensions, and in the desktop app. Its config value is `default`, which is what hooks and SDK integrations use. The CLI accepts `manual` as an alias wherever you type the value, for example `claude --permission-mode manual` or `"defaultMode": "manual"`. The Manual label and the `manual` alias require Claude Code v2.1.200 or later. The desktop app’s label doesn’t depend on your CLI version. Writes to protected paths are never auto-approved except in `bypassPermissions` mode and in plan-mode sessions where bypass permissions are available, meaning sessions started in a way that puts `bypassPermissions` in the mode cycle. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. Deny rules block in every mode, including `bypassPermissions`. Deny and ask rules don’t apply to [`EndConversation`](</docs/en/tools-reference#endconversation-tool-behavior>) as long as Claude still has at least one other tool it can call. Allow rules have no effect in `bypassPermissions`.
+The mode that reviews every action is named **Manual** in the CLI, in `claude --help`, in the VS Code and JetBrains extensions, and in the desktop app. Its config value is `default`, which is what hooks and SDK integrations use. The CLI accepts `manual` as an alias wherever you type the value, for example `claude --permission-mode manual` or `"defaultMode": "manual"`. The Manual label and the `manual` alias require Claude Code v2.1.200 or later. The desktop app’s label doesn’t depend on your CLI version. Writes to protected paths are never auto-approved except in `bypassPermissions` mode and in plan-mode sessions where bypass permissions are available, meaning interactive terminal sessions started in a way that puts `bypassPermissions` in the mode cycle. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. Deny rules block in every mode, including `bypassPermissions`. Deny and ask rules don’t apply to [`EndConversation`](</docs/en/tools-reference#endconversation-tool-behavior>) as long as Claude still has at least one other tool it can call. Allow rules have no effect in `bypassPermissions`.
###
@@ -32,7 +32,7 @@
* Tools that require user interaction: the built-in `AskUserQuestion` tool and MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>)
* `rm` and `rmdir` removals targeting a critical path, which no allow rule or `PreToolUse` hook `"allow"` approves
* The cross-session messaging safeguards
- * Reads outside the working directories while [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) is on: recognized file-reading Bash commands and any [unsandboxed retry](</docs/en/sandboxing#the-unsandboxed-retry-escape-hatch>) that needs approval to run outside the sandbox prompt even in auto mode and `bypassPermissions` mode. Requires Claude Code v2.1.257 or later
+ * Reads outside the working directories while [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) is on: recognized file-reading Bash commands prompt even in auto mode and `bypassPermissions` mode, and so does any [unsandboxed retry](</docs/en/sandboxing#the-unsandboxed-retry-escape-hatch>) that needs approval to run outside the sandbox. Requires Claude Code v2.1.257 or later. A command the shell parser can’t trace, such as one that changes directory more than once or runs a subshell, prompts the same way even when it names no outside path. This prompt doesn’t apply when the command runs in the [sandbox](</docs/en/sandboxing>) and the sandbox enforces the block.
##
@@ -48,10 +48,10 @@
Iterate locally with fewer prompts, without a classifier| Manual mode plus the Bash sandbox in [auto-allow mode](</docs/en/sandboxing#sandbox-modes>): `claude --permission-mode default`, then run `/sandbox` and select auto-allow| The built-in Bash sandbox, on macOS, Linux, and WSL2| Deny rules still apply, and ask rules that name a command, such as `Bash(git push *)`, still prompt. To turn the sandbox on from a settings file instead, set [`sandbox.enabled`](</docs/en/settings-reference#sandbox-enabled>) to `true`
Explore before changing anything| `claude --permission-mode plan`| None| Claude Code blocks edits until you approve a plan
Work hands-off in auto mode| `claude --permission-mode auto`, the built-in starting permission mode on Pro, Max, and Team| None; a sandbox or container adds defense in depth| Requires a supported model, and your organization can turn auto mode off
-Run in CI with an exact allowlist| `claude -p "run the test suite" --permission-mode dontAsk --allowedTools "Bash(npm test)" "Read"`| None beyond what your CI runner provides| [Claude Code on the web](</docs/en/claude-code-on-the-web>) ignores `dontAsk` from settings files
-Run fully unattended inside a container| `claude -p "<prompt>" --dangerously-skip-permissions`| Required: a container, VM, or the [sandbox runtime](</docs/en/sandbox-environments#sandbox-runtime>); on Linux and macOS, run it as a non-root user| Claude Code on the web ignores this mode from settings files. In this `-p` run, the few calls that would still prompt are denied instead
-
-The Bash sandbox and auto mode work independently and combine, except in plan mode, where [auto-allow doesn’t widen approvals](</docs/en/sandboxing#sandbox-modes>). For the full interaction, see [How sandboxing relates to permissions and permission modes](</docs/en/sandboxing#how-sandboxing-relates-to-permissions-and-permission-modes>) and [How isolation relates to permission modes](</docs/en/sandbox-environments#how-isolation-relates-to-permission-modes>).
+Run in CI with an exact allowlist| `claude -p "run the test suite" --permission-mode dontAsk --allowedTools "Bash(npm test)" "Read"`| None beyond what your CI runner provides| [Cloud sessions](</docs/en/claude-code-on-the-web>) ignore `dontAsk` from settings files
+Run fully unattended inside a container| `claude -p "<prompt>" --dangerously-skip-permissions`| Required: a container, VM, or the [sandbox runtime](</docs/en/sandbox-environments#sandbox-runtime>); on Linux and macOS, run it as a non-root user| Cloud sessions ignore this mode from settings files. In this `-p` run, the few calls that would still prompt are denied instead
+
+The Bash sandbox and auto mode work independently and combine, with the exceptions listed under [Sandbox modes](</docs/en/sandboxing#sandbox-modes>). For the full interaction, see [How sandboxing relates to permissions and permission modes](</docs/en/sandboxing#how-sandboxing-relates-to-permissions-and-permission-modes>) and [How isolation relates to permission modes](</docs/en/sandbox-environments#how-isolation-relates-to-permission-modes>).
##
@@ -169,7 +169,7 @@
Use the mode dropdown next to the prompt box on [claude.ai/code](<https://claude.ai/code>) or in the mobile app. Permission prompts appear in claude.ai for approval. Which modes appear depends on where the session runs:
- * **Cloud sessions** on [Claude Code on the web](</docs/en/claude-code-on-the-web>): Accept edits, Plan, and Auto. Accept edits corresponds to `default` mode: cloud sessions pre-approve file edits regardless of mode, so the dropdown shows Accept edits instead of Manual. Cloud sessions still honor `defaultMode: "acceptEdits"` from settings. Auto mode appears only when your organization allows it and the selected model supports it. Bypass permissions isn’t available.
+ * **[Cloud sessions](</docs/en/claude-code-on-the-web>)** : Accept edits, Plan, and Auto. Accept edits corresponds to `default` mode: cloud sessions pre-approve file edits regardless of mode, so the dropdown shows Accept edits instead of Manual. Cloud sessions still honor `defaultMode: "acceptEdits"` from settings. Auto mode appears only when your organization allows it and the selected model supports it. Bypass permissions isn’t available.
* **[Remote Control](</docs/en/remote-control>) sessions** on your local machine: Manual, Accept edits, and Plan. You can’t select Auto or Bypass permissions from the app.
* Except for Bypass permissions, the dropdown shows the permission mode the local session is in, including one set from the terminal. It updates when the permission mode changes in the app or in the terminal. The session never reports Bypass permissions to claude.ai, so switching into it from the terminal doesn’t change what the dropdown shows.
* Sessions hosted by the [desktop app](</docs/en/desktop>) or the [VS Code extension](</docs/en/vs-code>) report permission mode changes to claude.ai as they happen, the same as sessions hosted in a terminal.
@@ -195,7 +195,7 @@
Analyze before you edit with plan mode
-Plan mode tells Claude to research and propose changes without making them. Claude reads files, runs shell commands to explore, and writes a plan, but does not edit your source. Except in sessions with bypass permissions available, edits stay blocked until you approve the plan. When [auto mode](</docs/en/auto-mode-config>) is available and the `useAutoModeDuringPlan` setting is on, which it is by default, the classifier reviews shell commands during planning instead of prompting you. Approved commands run, and rejected ones are blocked. Otherwise, commands outside the [built-in read-only set](</docs/en/permissions#read-only-commands>) prompt for approval, including when the sandbox’s [auto-allow mode](</docs/en/sandboxing#sandbox-modes>) is enabled. In sessions with bypass permissions available, neither the classifier nor a prompt applies to planning commands; Skip all checks with bypassPermissions mode covers the few things that still prompt there. In v2.1.212 through v2.1.217, sessions without bypass permissions prompted for every command outside the read-only set, whether or not auto mode was available. Enter plan mode by pressing `Shift+Tab` or prefixing a single prompt with `/plan`. You can also start in plan mode from the CLI:
+Plan mode tells Claude to research and propose changes without making them. Claude reads files, runs shell commands to explore, and writes a plan, but does not edit your source. Except in interactive terminal sessions with bypass permissions available, edits stay blocked until you approve the plan. When [auto mode](</docs/en/auto-mode-config>) is available and the `useAutoModeDuringPlan` setting is on, which it is by default, the classifier reviews shell commands during planning instead of prompting you. Approved commands run, and rejected ones are blocked. Otherwise, commands outside the [built-in read-only set](</docs/en/permissions#read-only-commands>) prompt for approval, including when the sandbox’s [auto-allow mode](</docs/en/sandboxing#sandbox-modes>) is enabled. In interactive terminal sessions with bypass permissions available, neither the classifier nor a prompt applies to planning commands; Skip all checks with bypassPermissions mode covers the few things that still prompt there. In v2.1.212 through v2.1.217, sessions without bypass permissions prompted for every command outside the read-only set, whether or not auto mode was available. Enter plan mode by pressing `Shift+Tab` or prefixing a single prompt with `/plan`. You can also start in plan mode from the CLI:
claude --permission-mode plan
@@ -249,6 +249,14 @@
Auto mode on Bedrock, Agent Platform, or Foundry
On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode appears in the `Shift+Tab` cycle by default. Appearing in the cycle doesn’t change the permission mode a session starts in: on these providers, terminal sessions start in your [`defaultMode`](</docs/en/settings-reference#permissions-defaultmode>), which is Manual unless you change it, and conversations in the [VS Code extension](</docs/en/vs-code>) start in Manual unless `claudeCode.initialPermissionMode` or a mode you picked in the extension sets one. Only Claude Sonnet 5, Opus 4.7 or later, and the Fable models are supported on these providers. To make auto mode the default starting permission mode, set `"permissions": {"defaultMode": "auto"}` in user or managed settings. In sessions the VS Code extension starts, select **Auto** from the mode indicator instead. Switch permission modes covers what outranks that pick. The [`/doctor`](</docs/en/commands#all-commands>) checkup proposes this user-settings default on these providers the same way it does on the Anthropic API. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. A session already running in auto mode leaves it when the setting reaches that session from an [admin-deployed source](</docs/en/managed-settings#which-managed-source-claude-code-uses>), and shows `auto mode disabled by settings`. Before v2.1.251, a running session kept auto mode until it ended. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
+
+####
+
+
+
+Server-side classifier review
+
+On Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry, Claude Code reviews auto mode actions with its own classifier requests by default. To have the platform’s server-side classifier review the actions that go to the classifier as part of the session’s model requests instead, set [`CLAUDE_CODE_AUTO_MODE_SERVER=1`](</docs/en/env-vars>). Where the platform runs the classifier, its verdicts decide those actions; where it doesn’t, Claude Code falls back to its own classifier requests. In v2.1.271 and v2.1.272, asking the platform was the default on these providers.
###
@@ -266,7 +274,7 @@
* Modifying shared infrastructure
* Irreversibly destroying files that existed before the session
* Force push
- * Committing or pushing a change that would send secrets or sensitive data outside the repository when it runs, or widen what a deploy exposes. This covers a CI workflow or deploy configuration that hands a secret to a destination that doesn’t already receive it, a script or setup step that reads a secret store and sends the data out, and a config change that widens what a deploy publishes, such as a registry, visibility, artifact, or sourcemap setting. The check applies on any branch, applies even when the repository is public, and fires when the change lands, whether or not that landing triggers the pipeline; clearing it requires naming the execution effect, not only the commit or push. Before v2.1.211, this check was scoped to the default branch instead: a push there was blocked when it carried sensitive content, changes concealed or misdescribed relative to what you asked for, content ported in from outside the repository, or routed around a review you asked for
+ * Committing or pushing a change that would send secrets or sensitive data outside the repository when it runs, or widen what a deploy exposes. This covers a CI workflow or deploy configuration that passes a secret to a destination that doesn’t already receive it, a script or setup step that reads a secret store and sends the data out, and a config change that widens what a deploy publishes, such as a registry, visibility, artifact, or sourcemap setting. The check applies on any branch, applies even when the repository is public, and fires when the change is committed or pushed, whether or not that commit or push triggers the pipeline; clearing it requires naming the execution effect, not only the commit or push. Before v2.1.211, this check was scoped to the default branch instead: a push there was blocked when it carried sensitive content, changes concealed or misdescribed relative to what you asked for, content ported in from outside the repository, or routed around a review you asked for
* `git reset --hard`, `git checkout -- .`, `git restore .`, `git clean -fd`, `git stash drop`, or `git stash clear`, which the classifier presumes would discard uncommitted changes
* `git commit --amend` when the commit at HEAD was not created in this session
* From v2.1.198, `git commit --amend` when the commit at HEAD has already been pushed. A message-only reword is not blocked: `--amend -m` with nothing newly staged, on a commit that Claude created during this session
@@ -341,14 +349,7 @@
* Sending data to the trusted domains, buckets, and services you list in [`environment`](</docs/en/auto-mode-config#define-trusted-infrastructure>). This covers data flow only, not destructive or credential operations on the same infrastructure
* [Claude in Chrome](</docs/en/chrome>) navigation to a trusted internal domain, localhost, or a URL you named
-Sandbox network access requests are routed through the classifier rather than allowed by default. As of v2.1.198, the classifier reuses its verdict for a network host and port instead of re-running on every connection:
-
- * An allow is reused until new content enters the conversation, at which point that host is checked again
- * Claude Code v2.1.234 and later reuse a deny caused by the conversation outgrowing the classifier’s context window until new content enters the conversation, or until [compaction](</docs/en/costs#reduce-token-usage>) shrinks what the classifier reads. Claude Code then checks the host again
- * A deny that the classifier reached by evaluating the request lasts for the turn in the interactive CLI. In [non-interactive mode](</docs/en/headless>) and Agent SDK sessions, Claude Code reuses that deny for the rest of the run, because those sessions have no turn boundary
- * Changing your permission mode or rules drops all cached verdicts
-
-Run `claude auto-mode defaults` to print the full rule lists as JSON. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure auto mode](</docs/en/auto-mode-config>). Pushing to any branch of the repository you’re working in and creating a pull request that matches your request run without a prompt, unless the push or pull request falls under the blocked list, such as secrets or sensitive data leaving the repository, or a pull request that targets a different repository or organization. To require a human checkpoint before these commands while staying in auto mode, add `permissions.ask` rules, which match the command [as written](</docs/en/permissions#bash-rule-limits>): see [Common boundaries](</docs/en/auto-mode-config#common-boundaries>).
+Sandboxed commands don’t get network access by default. Claude names the hosts a command needs on the command itself, the classifier reviews them with the command, and an approved list opens those hosts for that one command alone. [Per-command allowed domains](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) covers what a list can and can’t open and what happens when a command reaches for an unlisted host. Run `claude auto-mode defaults` to print the full rule lists as JSON. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure auto mode](</docs/en/auto-mode-config>). Pushing to any branch of the repository you’re working in and creating a pull request that matches your request run without a prompt, unless the push or pull request falls under the blocked list, such as secrets or sensitive data leaving the repository, or a pull request that targets a different repository or organization. To require a human checkpoint before these commands while staying in auto mode, add `permissions.ask` rules, which match the command [as written](</docs/en/permissions#bash-rule-limits>): see [Common boundaries](</docs/en/auto-mode-config#common-boundaries>).
###
@@ -389,7 +390,11 @@
Each action goes through a fixed decision order. The first matching step wins:
- 1. Actions matching your [allow, ask, or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately. Writes to protected paths route to the classifier even when an allow rule matches, and so do `rm` and `rmdir` removals targeting a critical path in Claude Code v2.1.218 and later. MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>) prompt you directly even when an allow rule matches, and so do connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code. Ask rules that match on a command’s content, such as `Bash(git push *)`, fall back to a permission prompt
+ 1. Actions matching your [allow, ask, or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately, with these exceptions:
+ * Writes to protected paths route to the classifier even when an allow rule matches, and so do `rm` and `rmdir` removals targeting a critical path in Claude Code v2.1.218 and later
+ * MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>) prompt you directly even when an allow rule matches, and so do connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code
+ * A shell command that carries [per-command allowed domains](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) also routes to the classifier even when an allow rule matches, because a rule approves the command, not its hosts
+ * Ask rules that match on a command’s content, such as `Bash(git push *)`, fall back to a permission prompt
2. Read-only actions and file edits in your working directory are auto-approved, except writes to protected paths and the first read outside the working directories, which prompts you
3. Everything else goes to the classifier. The connector tools and `requiresUserInteraction` MCP tools that prompt you directly in step 1 never reach the classifier, so neither an org-required approval nor a consent step is auto-approved
4. If the classifier blocks, Claude receives the reason and tries an alternative. In most sessions the reason names the rule the classifier matched, such as `[Data Exfiltration]`, rather than giving a written explanation; see [Review denials](</docs/en/auto-mode-config#review-denials>)
@@ -402,7 +407,7 @@
* `Agent` allow rules
* [`Monitor`](</docs/en/tools-reference#monitor-tool>) allow rules, because Claude Code runs Monitor commands through the shell
-Narrow rules like `Bash(npm test)` stay in effect. Claude Code restores the dropped rules when you leave auto mode. Before v2.1.236, Claude Code left `Monitor` allow rules in effect in auto mode, so a rule that matched the whole tool approved Monitor commands without classifier review.Claude Code also runs `git status` itself before a command that would discard uncommitted work, such as `git reset --hard` or `rm -rf`, and shows the classifier whether staged, modified, or untracked work is present. Claude Code reports untracked files in that check even when the repository’s git configuration sets `status.showUntrackedFiles=no`.The classifier sees user messages, tool calls other than read-only lookups such as file reads and searches, and your CLAUDE.md content. Tool results are stripped, so hostile content in a file or web page can’t manipulate it directly. You can annotate a call’s result with a [PostToolUse hook’s `classifierContext` field](</docs/en/hooks#annotate-a-result-for-the-auto-mode-classifier>), which the classifier reads as application-provided context.A separate server-side probe scans incoming tool results and flags suspicious content before Claude reads it. For more on how these layers work together, see the [auto mode announcement](<https://claude.com/blog/auto-mode>) and the [engineering deep dive](<https://www.anthropic.com/engineering/claude-code-auto-mode>).
+Narrow rules like `Bash(npm test)` stay in effect. Claude Code restores the dropped rules when you leave auto mode. Before v2.1.236, Claude Code left `Monitor` allow rules in effect in auto mode, so a rule that matched the whole tool approved Monitor commands without classifier review.Claude Code also runs `git status` itself before a command that would discard uncommitted work, such as `git reset --hard` or `rm -rf`, and shows the classifier whether staged, modified, or untracked work is present. Claude Code reports untracked files in that check even when the repository’s git configuration sets `status.showUntrackedFiles=no`.In the classifier requests sent by Claude Code itself, the classifier sees user messages, tool calls other than read-only lookups such as file reads and searches, and your CLAUDE.md content. Tool results are stripped from those requests, so hostile content in a file or web page can’t manipulate the classifier directly.You can annotate a call’s result with a [PostToolUse hook’s `classifierContext` field](</docs/en/hooks#annotate-a-result-for-the-auto-mode-classifier>), which the classifier reads as application-provided context. The field requires Claude Code v2.1.236 or later.A separate server-side probe scans incoming tool results and flags suspicious content before Claude reads it. For more on how these layers work together, see the [auto mode announcement](<https://claude.com/blog/auto-mode>) and the [engineering deep dive](<https://www.anthropic.com/engineering/claude-code-auto-mode>).
How auto mode handles subagents
@@ -410,13 +415,13 @@
1. Before a subagent starts, the delegated task description is evaluated, so a dangerous-looking task is blocked at spawn time.
2. While the subagent runs, each of its actions goes through the classifier with the same rules as the parent session, and any `permissionMode` in the subagent’s frontmatter is ignored.
- 3. When the subagent finishes, the classifier reviews its full action history; if that return check flags a concern, a security warning is prepended to the subagent’s results. When a separate API safety check refuses the review request itself, Claude Code still returns the subagent’s results, prepended with a warning that the work is unreviewed and should be treated as untrusted.
+ 3. When the subagent finishes, the classifier reviews its work and its final report before the parent reads the report. When the classifier flags the subagent’s work or report, or a separate API safety check refuses the review, the report is still delivered, prepended with a security warning. When the classifier is unavailable for the review, the report arrives with a note to verify the subagent’s work before acting on it.
Step 1 requires Claude Code v2.1.178 or later. Earlier versions applied the classifier at steps 2 and 3, but did not evaluate the task description before the subagent started.
Cost and latency
-The classifier runs on Claude Sonnet 5 by default rather than on your `/model` selection. A classifier model that Anthropic configures server-side takes precedence over that default. When your session’s model is Claude Sonnet 4.6, or when [`availableModels`](</docs/en/model-config#restrict-model-selection>) excludes Sonnet 5, the classifier runs on the session’s model instead, or on an Opus model when the session runs on a [Fable model](</docs/en/model-config#work-with-fable>); on providers other than the Anthropic API, that Opus fallback is the provider’s default Opus model.The session’s first auto-mode request validates the Sonnet 5 default: if the request succeeds, Sonnet 5 stays the session’s classifier model, and if it fails because the model isn’t available, the session uses the fallback instead. After that validation settles, the classifier’s model doesn’t change for the session.On Enterprise plans and on accounts that use the Claude API, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations.The classifier reuses a sandbox network verdict for a host and port, so repeated connections to the same host don’t each add a check. What the classifier blocks by default describes how long an allow and a deny last.
+The classifier runs on Claude Sonnet 5 by default rather than on your `/model` selection. A classifier model that Anthropic configures server-side takes precedence over that default. When your session’s model is Claude Sonnet 4.6, or when [`availableModels`](</docs/en/model-config#restrict-model-selection>) excludes Sonnet 5, the classifier runs on the session’s model instead, or on an Opus model when the session runs on a [Fable model](</docs/en/model-config#work-with-fable>); on providers other than the Anthropic API, that Opus fallback is the provider’s default Opus model.The session’s first auto-mode request validates the Sonnet 5 default: if the request succeeds, Sonnet 5 stays the session’s classifier model, and if it fails because the model isn’t available, the session uses the fallback instead. After that validation settles, the classifier’s model doesn’t change for the session.On Enterprise plans and on accounts that use the Claude API, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations. On Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry, you can move the review into the session’s model requests instead; see Server-side classifier review.Sandboxed network access adds no per-connection classifier requests. The classifier judges [the hosts a command names](</docs/en/sandboxing#per-command-allowed-domains-in-auto-mode>) together with the command in one review, and Claude Code checks each connection against the approved list without calling the classifier again.
##
@@ -424,7 +429,7 @@
Allow only pre-approved tools with dontAsk mode
-If you set `dontAsk` mode, Claude Code auto-denies every tool call that would otherwise prompt you. Claude still runs actions that need no approval in Manual mode, such as file reads inside your working directories and [read-only Bash commands](</docs/en/permissions#read-only-commands>), plus actions matching your `permissions.allow` rules and calls approved by a [PreToolUse hook](</docs/en/permissions#extend-permissions-with-hooks>). Use this mode for CI pipelines or restricted environments where you pre-define what Claude may do; the session never waits for input. The status bar shows `⏵⏵ don't ask on` while this mode is active. Claude Code denies calls matching your explicit [`ask` rules](</docs/en/permissions#manage-permissions>) rather than prompting. It also denies the built-in `AskUserQuestion` tool even if your allow rules match it, and does the same to connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code. It denies MCP tools marked [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) the same way, because their approval card needs an answer this mode never collects; this requires Claude Code v2.1.199 or later. `rm` and `rmdir` removals targeting a critical path, such as `rm -rf /` and `rm -rf ~`, are denied even when an allow rule matches them or a `PreToolUse` hook allows them. Cloud sessions on [Claude Code on the web](</docs/en/claude-code-on-the-web>) ignore `defaultMode: "dontAsk"`; see bypassPermissions for details. Set it at startup with the flag:
+If you set `dontAsk` mode, Claude Code auto-denies every tool call that would otherwise prompt you. Claude still runs actions that need no approval in Manual mode, such as file reads inside your working directories and [read-only Bash commands](</docs/en/permissions#read-only-commands>), plus actions matching your `permissions.allow` rules and calls approved by a [PreToolUse hook](</docs/en/permissions#extend-permissions-with-hooks>). Use this mode for CI pipelines or restricted environments where you pre-define what Claude may do; the session never waits for input. The status bar shows `⏵⏵ don't ask on` while this mode is active. Claude Code denies calls matching your explicit [`ask` rules](</docs/en/permissions#manage-permissions>) rather than prompting. It also denies the built-in `AskUserQuestion` tool even if your allow rules match it, and does the same to connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code. It denies MCP tools marked [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) the same way, because their approval card needs an answer this mode never collects; this requires Claude Code v2.1.199 or later. `rm` and `rmdir` removals targeting a critical path, such as `rm -rf /` and `rm -rf ~`, are denied even when an allow rule matches them or a `PreToolUse` hook allows them. [Cloud sessions](</docs/en/claude-code-on-the-web>) ignore `defaultMode: "dontAsk"`; see bypassPermissions for details. Set it at startup with the flag:
claude --permission-mode dontAsk
@@ -434,12 +439,12 @@
Skip all checks with bypassPermissions mode
-`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. The actions no mode auto-approves still prompt in this mode. Two [cross-session messaging](</docs/en/cross-session-messaging>) safeguards still apply in this mode, and in plan-mode sessions where bypass permissions are available:
+`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. The actions no mode auto-approves still prompt in this mode. Two [cross-session messaging](</docs/en/cross-session-messaging>) safeguards still apply in this mode, and in interactive terminal plan-mode sessions where bypass permissions are available:
* The [`isolatePeerMachines`](</docs/en/settings-reference#isolatepeermachines>) approval prompt for messages to your sessions beyond this machine still appears.
* When no [`crossSessionInbound`](</docs/en/cross-session-messaging#control-inbound-messages>) value applies, Claude Code holds an inbound message from another of your sessions for your approval, and delivers without asking only when the sending session identifies itself as also bypassing permission prompts. If you leave the permission mode while messages are held, Claude Code re-applies the inbound rules and delivers any held message they now accept.
-In sessions with bypass permissions available, Claude Code also doesn’t enforce plan mode’s blocks. Claude is still instructed to plan without editing, but a file edit or shell command it attempts during planning runs without prompting. Explicit [ask rules](</docs/en/permissions#manage-permissions>) and `rm` and `rmdir` removals targeting a critical path still prompt.
+In interactive terminal sessions with bypass permissions available, Claude Code also doesn’t enforce plan mode’s blocks. Claude is still instructed to plan without editing, but a file edit or shell command it attempts during planning runs without prompting. Explicit [ask rules](</docs/en/permissions#manage-permissions>) and `rm` and `rmdir` removals targeting a critical path still prompt. Plan mode keeps its blocks wherever Claude Code runs without an interactive terminal, including [non-interactive runs](</docs/en/headless>) with `-p`, [Agent SDK](</docs/en/agent-sdk/permissions#plan-mode-plan>) sessions, and conversations in the [VS Code extension](</docs/en/vs-code>)’s chat panel. There, `--allow-dangerously-skip-permissions` makes `bypassPermissions` selectable later.
Only use this mode in isolated environments like containers, VMs, or dev containers without internet access, where Claude Code cannot damage your host system.
@@ -451,7 +456,7 @@
--dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons
-The check is skipped automatically inside a recognized sandbox. To run autonomously in a container, use the [dev container](</docs/en/devcontainer>) configuration, which runs Claude Code as a non-root user. [Claude Code on the web](</docs/en/claude-code-on-the-web>) does not honor `defaultMode: "bypassPermissions"` or `"dontAsk"` from your settings files, so a repository’s checked-in settings cannot start a cloud session in bypass-permissions mode. The setting is ignored silently and the session starts in the permission mode shown in the mode dropdown instead. See Switch permission modes for which modes cloud sessions offer.
+The check is skipped automatically inside a recognized sandbox. To run autonomously in a container, use the [dev container](</docs/en/devcontainer>) configuration, which runs Claude Code as a non-root user. [Cloud sessions](</docs/en/claude-code-on-the-web>) don’t honor `defaultMode: "bypassPermissions"` or `"dontAsk"` from your settings files, so a repository’s checked-in settings can’t start a cloud session in bypass-permissions mode. The setting is ignored silently and the session starts in the permission mode shown in the mode dropdown instead. See Switch permission modes for which modes cloud sessions offer.
`bypassPermissions` offers no protection against prompt injection or unintended actions. For background safety checks with far fewer permission prompts, use auto mode instead. Administrators can block this mode by setting `permissions.disableBypassPermissionsMode` to `"disable"` in [managed settings](</docs/en/managed-settings>).
@@ -461,12 +466,12 @@
Protected paths
-Writes to a small set of paths are never auto-approved, except in `bypassPermissions` mode and in planning sessions with bypass permissions available. This prevents accidental corruption of repository state and Claude’s own configuration.
+Writes to a small set of paths are never auto-approved, except in `bypassPermissions` mode and in interactive terminal sessions in plan mode with bypass permissions available. This prevents accidental corruption of repository state and Claude’s own configuration.
Mode| Protected-path writes
---|---
`default`, `acceptEdits`| Prompted
-`plan`| Allowed in sessions with bypass permissions available. Otherwise, routed to the classifier when auto mode is available during planning, and prompted when it isn’t
+`plan`| Allowed in interactive terminal sessions with bypass permissions available. Otherwise, routed to the classifier when auto mode is available during planning, and prompted when it isn’t
`auto`| Routed to the classifier
`dontAsk`| Denied
`bypassPermissions`| Allowed
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -14,7 +14,7 @@
`acceptEdits`| Reads, file edits, and common filesystem commands (`mkdir`, `touch`, `mv`, `cp`, etc.)| Iterating on code you’re reviewing
`plan`| Reads, plus classifier-approved commands when auto mode is available| Exploring a codebase before changing it
`auto`| Everything, with background safety checks| Long tasks, reducing prompt fatigue
-`dontAsk`| Only pre-approved tools| Locked-down CI and scripts
+`dontAsk`| Reads and pre-approved tools; anything that would prompt is denied| Locked-down CI and scripts
`bypassPermissions`| Everything| Isolated containers and VMs only
The mode that reviews every action is named **Manual** in the CLI, in `claude --help`, in the VS Code and JetBrains extensions, and in the desktop app. Its config value is `default`, which is what hooks and SDK integrations use. The CLI accepts `manual` as an alias wherever you type the value, for example `claude --permission-mode manual` or `"defaultMode": "manual"`. The Manual label and the `manual` alias require Claude Code v2.1.200 or later. The desktop app’s label doesn’t depend on your CLI version. Writes to protected paths are never auto-approved except in `bypassPermissions` mode and in plan-mode sessions where bypass permissions are available, meaning sessions started in a way that puts `bypassPermissions` in the mode cycle. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. Deny rules block in every mode, including `bypassPermissions`. Deny and ask rules don’t apply to [`EndConversation`](</docs/en/tools-reference#endconversation-tool-behavior>) as long as Claude still has at least one other tool it can call. Allow rules have no effect in `bypassPermissions`.
@@ -424,7 +424,7 @@
Allow only pre-approved tools with dontAsk mode
-If you set `dontAsk` mode, Claude Code auto-denies every tool call that would otherwise prompt you. Claude runs only actions matching your `permissions.allow` rules, [read-only Bash commands](</docs/en/permissions#read-only-commands>), and calls approved by a [PreToolUse hook](</docs/en/permissions#extend-permissions-with-hooks>). Use this mode for CI pipelines or restricted environments where you pre-define exactly what Claude may do; the session never waits for input. The status bar shows `⏵⏵ don't ask on` while this mode is active. Claude Code denies calls matching your explicit [`ask` rules](</docs/en/permissions#manage-permissions>) rather than prompting. It also denies the built-in `AskUserQuestion` tool even if your allow rules match it, and does the same to connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code. It denies MCP tools marked [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) the same way, because their approval card needs an answer this mode never collects; this requires Claude Code v2.1.199 or later. `rm` and `rmdir` removals targeting a critical path, such as `rm -rf /` and `rm -rf ~`, are denied even when an allow rule matches them or a `PreToolUse` hook allows them. Cloud sessions on [Claude Code on the web](</docs/en/claude-code-on-the-web>) ignore `defaultMode: "dontAsk"`; see bypassPermissions for details. Set it at startup with the flag:
+If you set `dontAsk` mode, Claude Code auto-denies every tool call that would otherwise prompt you. Claude still runs actions that need no approval in Manual mode, such as file reads inside your working directories and [read-only Bash commands](</docs/en/permissions#read-only-commands>), plus actions matching your `permissions.allow` rules and calls approved by a [PreToolUse hook](</docs/en/permissions#extend-permissions-with-hooks>). Use this mode for CI pipelines or restricted environments where you pre-define what Claude may do; the session never waits for input. The status bar shows `⏵⏵ don't ask on` while this mode is active. Claude Code denies calls matching your explicit [`ask` rules](</docs/en/permissions#manage-permissions>) rather than prompting. It also denies the built-in `AskUserQuestion` tool even if your allow rules match it, and does the same to connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code. It denies MCP tools marked [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) the same way, because their approval card needs an answer this mode never collects; this requires Claude Code v2.1.199 or later. `rm` and `rmdir` removals targeting a critical path, such as `rm -rf /` and `rm -rf ~`, are denied even when an allow rule matches them or a `PreToolUse` hook allows them. Cloud sessions on [Claude Code on the web](</docs/en/claude-code-on-the-web>) ignore `defaultMode: "dontAsk"`; see bypassPermissions for details. Set it at startup with the flag:
claude --permission-mode dontAsk
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -392,7 +392,7 @@
1. Actions matching your [allow, ask, or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately. Writes to protected paths route to the classifier even when an allow rule matches, and so do `rm` and `rmdir` removals targeting a critical path in Claude Code v2.1.218 and later. MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>) prompt you directly even when an allow rule matches, and so do connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code. Ask rules that match on a command’s content, such as `Bash(git push *)`, fall back to a permission prompt
2. Read-only actions and file edits in your working directory are auto-approved, except writes to protected paths and the first read outside the working directories, which prompts you
3. Everything else goes to the classifier. The connector tools and `requiresUserInteraction` MCP tools that prompt you directly in step 1 never reach the classifier, so neither an org-required approval nor a consent step is auto-approved
- 4. If the classifier blocks, Claude receives the reason and tries an alternative. In most sessions the reason is the fixed text `Blocked by classifier` rather than a written explanation, in Claude Code v2.1.208 and later; see [Review denials](</docs/en/auto-mode-config#review-denials>)
+ 4. If the classifier blocks, Claude receives the reason and tries an alternative. In most sessions the reason names the rule the classifier matched, such as `[Data Exfiltration]`, rather than giving a written explanation; see [Review denials](</docs/en/auto-mode-config#review-denials>)
On entering auto mode, broad allow rules that grant arbitrary code execution are dropped:
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -115,7 +115,7 @@
Switch permission modes
-Each interface has its own control for switching permission modes during a session and its own way of choosing the permission mode new sessions start in. Asking Claude in chat to change the permission mode doesn’t work. Select your interface to see its controls.
+Each interface has its own control for switching permission modes during a session and its own way of choosing the permission mode new sessions start in. Select your interface to see its controls.
* CLI
@@ -331,7 +331,7 @@
* Installing dependencies declared in your lock files or manifests
* Reading `.env` and sending credentials to their matching API
* Read-only HTTP requests
- * Pushing to any branch of the repository you’re working in, including the default branch. A non-default branch whose name marks it as a deploy or publication target, such as `production` or `gh-pages`, isn’t covered: the classifier judges a push there on its own terms. The push’s content is still checked against the other rules, [`permissions.deny` rules](</docs/en/permissions#manage-permissions>) can still block pushes to specific branches outright in every mode, and the remote’s own branch protection still applies. Before v2.1.211, only pushes to the branch you started on, branches Claude created, and routine pushes to the default branch were allowed by default, and before v2.1.203 any direct push to the default branch was blocked
+ * Pushing to any branch of the repository you’re working in, including the default branch. A non-default branch whose name marks it as a deploy or publication target, such as `production` or `gh-pages`, isn’t covered: the classifier judges a push there on its own terms. The push’s content is still checked against the other rules, [`permissions.deny` rules](</docs/en/permissions#manage-permissions>) can still block push commands [as written](</docs/en/permissions#bash-rule-limits>) in every mode, and the remote’s own branch protection still applies. Before v2.1.211, only pushes to the branch you started on, branches Claude created, and routine pushes to the default branch were allowed by default, and before v2.1.203 any direct push to the default branch was blocked
Claude Code v2.1.195 and later also allow these by default:
@@ -348,7 +348,7 @@
* A deny that the classifier reached by evaluating the request lasts for the turn in the interactive CLI. In [non-interactive mode](</docs/en/headless>) and Agent SDK sessions, Claude Code reuses that deny for the rest of the run, because those sessions have no turn boundary
* Changing your permission mode or rules drops all cached verdicts
-Run `claude auto-mode defaults` to print the full rule lists as JSON. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure auto mode](</docs/en/auto-mode-config>). Pushing to any branch of the repository you’re working in and creating a pull request that matches your request run without a prompt, unless the push or pull request falls under the blocked list, such as secrets or sensitive data leaving the repository, or a pull request that targets a different repository or organization. To require a human checkpoint before these actions while staying in auto mode, add `permissions.ask` rules: see [Common boundaries](</docs/en/auto-mode-config#common-boundaries>).
+Run `claude auto-mode defaults` to print the full rule lists as JSON. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure auto mode](</docs/en/auto-mode-config>). Pushing to any branch of the repository you’re working in and creating a pull request that matches your request run without a prompt, unless the push or pull request falls under the blocked list, such as secrets or sensitive data leaving the repository, or a pull request that targets a different repository or organization. To require a human checkpoint before these commands while staying in auto mode, add `permissions.ask` rules, which match the command [as written](</docs/en/permissions#bash-rule-limits>): see [Common boundaries](</docs/en/auto-mode-config#common-boundaries>).
###
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -321,7 +321,11 @@
* Reading credentials that belong to the host rather than to your task, such as node certificates or the node’s container-registry auth
* Connecting to or scanning sibling containers, pods, or VMs that Claude didn’t start, or the node beneath the container
-If Claude Code runs somewhere that is meant to allow one of these, describe that setup in a [Host containment entry](</docs/en/auto-mode-config#define-trusted-infrastructure>) in `autoMode.environment`. **Allowed by default** :
+If Claude Code runs somewhere that is meant to allow one of these, describe that setup in a [Host containment entry](</docs/en/auto-mode-config#define-trusted-infrastructure>) in `autoMode.environment`. Claude Code v2.1.261 and later also block these by default:
+
+ * Posting or writing a link to a public paste, diagram, or data-sharing service in a message, PR or issue text, a document, or anywhere else the link will be opened or fetched, when the URL itself carries the content being shared, unless you named that service
+
+**Allowed by default** :
* Local file operations in your working directory
* Installing dependencies declared in your lock files or manifests
@@ -344,7 +348,7 @@
* A deny that the classifier reached by evaluating the request lasts for the turn in the interactive CLI. In [non-interactive mode](</docs/en/headless>) and Agent SDK sessions, Claude Code reuses that deny for the rest of the run, because those sessions have no turn boundary
* Changing your permission mode or rules drops all cached verdicts
-Run `claude auto-mode defaults` to print the full rule lists as JSON. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure auto mode](</docs/en/auto-mode-config>). Pushing to any branch of the repository you’re working in and creating a pull request that matches your request run without a prompt, unless the change would send secrets or sensitive data outside the repository or the pull request targets a different repository or organization, the cases the blocked list covers. To require a human checkpoint before these actions while staying in auto mode, add `permissions.ask` rules: see [Common boundaries](</docs/en/auto-mode-config#common-boundaries>).
+Run `claude auto-mode defaults` to print the full rule lists as JSON. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure auto mode](</docs/en/auto-mode-config>). Pushing to any branch of the repository you’re working in and creating a pull request that matches your request run without a prompt, unless the push or pull request falls under the blocked list, such as secrets or sensitive data leaving the repository, or a pull request that targets a different repository or organization. To require a human checkpoint before these actions while staying in auto mode, add `permissions.ask` rules: see [Common boundaries](</docs/en/auto-mode-config#common-boundaries>).
###
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -314,7 +314,14 @@
* Writing to Claude Code session transcripts, the `.jsonl` history files under `~/.claude/projects/` or your configured config directory, whether directly or through a shell command. The rule also covers the metadata lines Claude Code appends to each transcript entry for its own checks. Reading a transcript isn’t blocked
* A recursive forced delete such as `rm -rf "$VAR"` or `Remove-Item -Recurse -Force $dir` whose target is a shell variable, or a glob rooted at one, that isn’t assigned anywhere in the conversation the classifier sees. The value came only from earlier command output, which the classifier never receives, so the classifier can’t verify the deletion target against the other deletion rules. The block clears when you name the exact path being deleted, or when Claude re-runs the delete with the resolved literal path written into the command. Deletes whose target the classifier can resolve aren’t affected. `Remove-Item` targets that are a bare `*` or end in `/*` or `\*` never reach the classifier: Claude Code denies them outright
-**Allowed by default** :
+Claude Code v2.1.257 and later also block these by default:
+
+ * Requesting credentials from the cloud instance-metadata endpoint, such as `169.254.169.254`, or explicitly authenticating a cloud, cluster, or registry call with the machine’s own service-account or node identity
+ * Reaching a public host by a route other than a direct request, such as a tunnel, a reverse shell, or a resolver or proxy configuration rewritten to point outside
+ * Reading credentials that belong to the host rather than to your task, such as node certificates or the node’s container-registry auth
+ * Connecting to or scanning sibling containers, pods, or VMs that Claude didn’t start, or the node beneath the container
+
+If Claude Code runs somewhere that is meant to allow one of these, describe that setup in a [Host containment entry](</docs/en/auto-mode-config#define-trusted-infrastructure>) in `autoMode.environment`. **Allowed by default** :
* Local file operations in your working directory
* Installing dependencies declared in your lock files or manifests
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -32,6 +32,7 @@
* Tools that require user interaction: the built-in `AskUserQuestion` tool and MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>)
* `rm` and `rmdir` removals targeting a critical path, which no allow rule or `PreToolUse` hook `"allow"` approves
* The cross-session messaging safeguards
+ * Reads outside the working directories while [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) is on: recognized file-reading Bash commands and any [unsandboxed retry](</docs/en/sandboxing#the-unsandboxed-retry-escape-hatch>) that needs approval to run outside the sandbox prompt even in auto mode and `bypassPermissions` mode. Requires Claude Code v2.1.257 or later
##
@@ -342,6 +343,18 @@
+The first read outside the working directories
+
+While [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) is off, file reads run without a prompt in auto mode, including reads outside the [working directories](</docs/en/permissions#working-directories>). The first time Claude uses the Read, Grep, or Glob tool on a path outside them, Claude Code asks you whether to keep allowing those reads. The prompt doesn’t appear in non-interactive `-p` runs or background sessions; reads there run as before. Whatever you answer, Claude keeps working:
+
+ * **Keep allowing** : the read runs, later reads outside the working directories run as before, and Claude Code records your answer so the prompt doesn’t appear again
+ * **Block from now on** : the read is refused, and Claude Code sets [`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) to `true` in your user settings, which makes the file tools refuse such reads in every later session and every permission mode. To let Claude read such a path later, add its directory with `/add-dir` or remove the setting.
+ * **Ask again next time** : the read is refused, and the next read outside the working directories prompts again
+
+###
+
+
+
Boundaries you state in conversation
The classifier treats boundaries you state in the conversation as a block signal. If you tell Claude “don’t push” or “wait until I review before deploying”, the classifier blocks matching actions even when the default rules would allow them. A boundary stays in force until you lift it in a later message. Claude’s own judgment that a condition was met does not lift it. Boundaries are not stored as rules. The classifier re-reads them from the transcript on each check, so a boundary can be lost if [context compaction](</docs/en/costs#reduce-token-usage>) removes the message that stated it. For a hard guarantee, add a [deny rule](</docs/en/permissions#permission-rule-syntax>) instead.
@@ -366,7 +379,7 @@
Each action goes through a fixed decision order. The first matching step wins:
1. Actions matching your [allow, ask, or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately. Writes to protected paths route to the classifier even when an allow rule matches, and so do `rm` and `rmdir` removals targeting a critical path in Claude Code v2.1.218 and later. MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>) prompt you directly even when an allow rule matches, and so do connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code. Ask rules that match on a command’s content, such as `Bash(git push *)`, fall back to a permission prompt
- 2. Read-only actions and file edits in your working directory are auto-approved, except writes to protected paths
+ 2. Read-only actions and file edits in your working directory are auto-approved, except writes to protected paths and the first read outside the working directories, which prompts you
3. Everything else goes to the classifier. The connector tools and `requiresUserInteraction` MCP tools that prompt you directly in step 1 never reach the classifier, so neither an org-required approval nor a consent step is auto-approved
4. If the classifier blocks, Claude receives the reason and tries an alternative. In most sessions the reason is the fixed text `Blocked by classifier` rather than a written explanation, in Claude Code v2.1.208 and later; see [Review denials](</docs/en/auto-mode-config#review-denials>)
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -61,7 +61,7 @@
When you start a new session in a terminal, Claude Code takes the permission mode from the first of these that applies:
1. The `--permission-mode` flag, or `--dangerously-skip-permissions`
- 2. `permissions.defaultMode` in a [settings file](</docs/en/settings#where-settings-live>). An `"auto"` value in `.claude/settings.json` or `.claude/settings.local.json` doesn’t take effect, and Claude Code then uses the built-in default rather than a `defaultMode` from `~/.claude/settings.json`. The other values apply from any settings file
+ 2. `permissions.defaultMode` in a [settings file](</docs/en/settings#where-settings-live>) If you set `"auto"` in `.claude/settings.json` or `.claude/settings.local.json`, the value doesn’t take effect, and Claude Code then uses the built-in default rather than a `defaultMode` from `~/.claude/settings.json`. If you set `"bypassPermissions"` in those two files, it doesn’t take effect either, and the session starts in Manual mode. The other values apply from any settings file.
3. The built-in default
Conversations the VS Code extension starts follow the extension’s own list in Switch permission modes. For the permission mode Claude Code starts a resumed session in, see [permission mode on resume](</docs/en/sessions#permission-mode-on-resume>). The built-in `auto` default requires Claude Code v2.1.228 or later on macOS, Linux, and WSL, and v2.1.233 or later on native Windows. On earlier versions, the built-in default is Manual. The built-in default depends on how you run Claude Code, on your plan, and on whether Claude Code could fetch its feature flags. The first row that matches your session applies. The table covers sessions you start in a terminal or through the VS Code extension; for the desktop app and claude.ai, see the Desktop and Web tabs in Switch permission modes.
@@ -95,7 +95,7 @@
---|---
One session you’re about to start| Pass the permission mode as a flag, for example `claude --permission-mode default`
Every terminal session you start on this machine| Set `permissions.defaultMode` in `~/.claude/settings.json`. For what the VS Code extension reads, see Switch permission modes
-Every terminal session you start in one project| Set `permissions.defaultMode` in the project’s `.claude/settings.json`. Sessions you start in a terminal honor every value except `auto`; sessions the VS Code extension starts don’t read project settings for the starting permission mode
+Every terminal session you start in one project| Set `permissions.defaultMode` in the project’s `.claude/settings.json`. Sessions you start in a terminal honor every value except `auto` and `bypassPermissions`; sessions the VS Code extension starts don’t read project settings for the starting permission mode
Every terminal session in your organization| Set `permissions.defaultMode` in [managed settings](</docs/en/managed-settings>). Terminal sessions start in that mode and people can still switch to auto mode; for what the VS Code extension reads, see Switch permission modes. To remove auto mode so nobody can select it, set `permissions.disableAutoMode` to `"disable"` instead
This example makes every terminal session on your machine start in Manual mode, whose config value is `default`. Save it in `~/.claude/settings.json`:
@@ -129,7 +129,7 @@
**During a session** : press `Shift+Tab` to cycle permission modes. From `auto`, the first press switches to `default`, and the cycle then runs `default` → `acceptEdits` → `plan` → back to `default`. Optional modes, described below, slot in after `plan`. The status bar shows the active mode as a gray `⏸ manual mode on` for `default`, or as `⏵⏵ accept edits on`, `⏸ plan mode on`, `⏵⏵ auto mode on`, `⏵⏵ don't ask on`, or `⏵⏵ bypass permissions on`.Not every mode is in the default cycle:
* `auto`: appears when auto mode is available; cycling to it switches permission modes without a confirmation prompt
- * `bypassPermissions`: appears after you start with `--permission-mode bypassPermissions`, `--dangerously-skip-permissions`, `--allow-dangerously-skip-permissions`, or `permissions.defaultMode: "bypassPermissions"` in [settings](</docs/en/settings-reference#permission-settings>); the `--allow-` variant adds the permission mode to the cycle without activating it
+ * `bypassPermissions`: appears after you start with `--permission-mode bypassPermissions`, `--dangerously-skip-permissions`, `--allow-dangerously-skip-permissions`, or `permissions.defaultMode: "bypassPermissions"` in [user, `--settings`, or managed settings](</docs/en/settings-reference#permissions-defaultmode>). The `--allow-` variant adds the permission mode to the cycle without activating it
* `dontAsk`: never appears in the cycle; set it with `--permission-mode dontAsk`
Enabled optional modes slot in after `plan`, with `bypassPermissions` first and `auto` last. If you have both enabled, you will cycle through `bypassPermissions` on the way to `auto`.**From a Bash permission prompt** : in the Manual and `acceptEdits` permission modes, when auto mode is available, Claude Code adds **Yes, and switch to auto mode** to a Bash command’s permission prompt. Select it to approve the command and switch the session to auto mode. [PowerShell tool](</docs/en/tools-reference#powershell-tool>) prompts don’t offer the option. Requires Claude Code v2.1.247 or later.Claude Code doesn’t add the option to prompts forced by one of your [`ask` rules](</docs/en/permissions#manage-permissions>) or by a [hook](</docs/en/hooks#pretooluse-decision-control>), because auto mode still shows you those prompts, so switching wouldn’t remove them.**At startup** : pass the permission mode as a flag.
@@ -236,7 +236,7 @@
* **Plan** : All plans.
* **Organization** : on Team and Enterprise, auto mode is available by default. Administrators can turn it off for the organization by setting `permissions.disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>).
- * **Model** : on the Anthropic API and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Claude Opus 4.6 or later, Sonnet 4.6 or later, or [Fable 5](</docs/en/model-config#work-with-fable-5>). On Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, only Claude Sonnet 5, Opus 4.7 or later, and Fable 5. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
+ * **Model** : on the Anthropic API and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Claude Opus 4.6 or later, Sonnet 4.6 or later, or a [Fable model](</docs/en/model-config#work-with-fable>). On Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, only Claude Sonnet 5, Opus 4.7 or later, and the Fable models. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
* **Provider** : available by default on 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, first check these requirements and whether any settings file sets [`disableAutoMode`](</docs/en/settings-reference#disableautomode>). Anthropic may also have turned auto mode off server-side, or the server may have rejected auto mode for your account. A session that received either answer keeps auto mode off until the session ends, so start a new session later. A separate message that names a model and says auto mode “cannot determine the safety” of an action means a classifier request failed. That failure is usually transient, but on Amazon Bedrock it can repeat until your account can invoke the named model. See the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>) for the causes and what to do. If you set `defaultMode: "auto"` in [settings](</docs/en/settings-reference#all-settings>) and a terminal session starts in Manual mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. `auto` doesn’t take effect from those files. Move it to `~/.claude/settings.json`. For a conversation the VS Code extension started, check the extension’s own list in Switch permission modes instead.
@@ -247,7 +247,7 @@
Auto mode on Bedrock, Agent Platform, or Foundry
-On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode appears in the `Shift+Tab` cycle by default. Appearing in the cycle doesn’t change the permission mode a session starts in: on these providers, terminal sessions start in your [`defaultMode`](</docs/en/settings-reference#permissions-defaultmode>), which is Manual unless you change it, and conversations in the [VS Code extension](</docs/en/vs-code>) start in Manual unless `claudeCode.initialPermissionMode` or a mode you picked in the extension sets one. Only Claude Sonnet 5, Opus 4.7 or later, and Fable 5 are supported on these providers. To make auto mode the default starting permission mode, set `"permissions": {"defaultMode": "auto"}` in user or managed settings. In sessions the VS Code extension starts, select **Auto** from the mode indicator instead. Switch permission modes covers what outranks that pick. The [`/doctor`](</docs/en/commands#all-commands>) checkup proposes this user-settings default on these providers the same way it does on the Anthropic API. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. A session already running in auto mode leaves it when the setting reaches that session from an [admin-deployed source](</docs/en/managed-settings#which-managed-source-claude-code-uses>), and shows `auto mode disabled by settings`. Before v2.1.251, a running session kept auto mode until it ended. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
+On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode appears in the `Shift+Tab` cycle by default. Appearing in the cycle doesn’t change the permission mode a session starts in: on these providers, terminal sessions start in your [`defaultMode`](</docs/en/settings-reference#permissions-defaultmode>), which is Manual unless you change it, and conversations in the [VS Code extension](</docs/en/vs-code>) start in Manual unless `claudeCode.initialPermissionMode` or a mode you picked in the extension sets one. Only Claude Sonnet 5, Opus 4.7 or later, and the Fable models are supported on these providers. To make auto mode the default starting permission mode, set `"permissions": {"defaultMode": "auto"}` in user or managed settings. In sessions the VS Code extension starts, select **Auto** from the mode indicator instead. Switch permission modes covers what outranks that pick. The [`/doctor`](</docs/en/commands#all-commands>) checkup proposes this user-settings default on these providers the same way it does on the Anthropic API. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. A session already running in auto mode leaves it when the setting reaches that session from an [admin-deployed source](</docs/en/managed-settings#which-managed-source-claude-code-uses>), and shows `auto mode disabled by settings`. Before v2.1.251, a running session kept auto mode until it ended. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
###
@@ -392,7 +392,7 @@
Cost and latency
-The classifier runs on Claude Sonnet 5 by default rather than on your `/model` selection. A classifier model that Anthropic configures server-side takes precedence over that default. When your session’s model is Claude Sonnet 4.6, or when [`availableModels`](</docs/en/model-config#restrict-model-selection>) excludes Sonnet 5, the classifier runs on the session’s model instead, or on an Opus model when the session runs on [Fable 5](</docs/en/model-config#work-with-fable-5>); on providers other than the Anthropic API, that Opus fallback is the provider’s default Opus model.The session’s first auto-mode request validates the Sonnet 5 default: if the request succeeds, Sonnet 5 stays the session’s classifier model, and if it fails because the model isn’t available, the session uses the fallback instead. After that validation settles, the classifier’s model doesn’t change for the session.On Enterprise plans and on accounts that use the Claude API, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations.The classifier reuses a sandbox network verdict for a host and port, so repeated connections to the same host don’t each add a check. What the classifier blocks by default describes how long an allow and a deny last.
+The classifier runs on Claude Sonnet 5 by default rather than on your `/model` selection. A classifier model that Anthropic configures server-side takes precedence over that default. When your session’s model is Claude Sonnet 4.6, or when [`availableModels`](</docs/en/model-config#restrict-model-selection>) excludes Sonnet 5, the classifier runs on the session’s model instead, or on an Opus model when the session runs on a [Fable model](</docs/en/model-config#work-with-fable>); on providers other than the Anthropic API, that Opus fallback is the provider’s default Opus model.The session’s first auto-mode request validates the Sonnet 5 default: if the request succeeds, Sonnet 5 stays the session’s classifier model, and if it fails because the model isn’t available, the session uses the fallback instead. After that validation settles, the classifier’s model doesn’t change for the session.On Enterprise plans and on accounts that use the Claude API, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations.The classifier reuses a sandbox network verdict for a host and port, so repeated connections to the same host don’t each add a check. What the classifier blocks by default describes how long an allow and a deny last.
##
@@ -419,7 +419,7 @@
Only use this mode in isolated environments like containers, VMs, or dev containers without internet access, where Claude Code cannot damage your host system.
-You can’t enter `bypassPermissions` from a session that was started without it enabled. Enable it at launch with `permissions.defaultMode: "bypassPermissions"` in [settings](</docs/en/settings-reference#permission-settings>) or with an enabling flag:
+You can’t enter `bypassPermissions` from a session you started without it enabled. Enable it at launch with [`permissions.defaultMode: "bypassPermissions"`](</docs/en/settings-reference#permissions-defaultmode>) or with an enabling flag:
claude --permission-mode bypassPermissions
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -70,13 +70,13 @@
---|---
Any settings file sets `disableAutoMode` to `"disable"`| `default`
[Feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>) is off| `default`
-Your [first session after you install Claude Code or upgrade](</docs/en/env-vars#first-session-after-an-install-or-upgrade>) to a version that adds this default, unless a non-interactive session picks the flags up in time| `default`
+Your [first session after you install Claude Code or upgrade](</docs/en/env-vars#first-session-after-an-install-or-upgrade>) to a version that adds this default, unless, after a fresh install, Claude Code fetches the flags in time| `default`
`claude -p` or the [Agent SDK](</docs/en/agent-sdk/permissions>)| `default`
Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), or a signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) session| `default`
A Pro, Max, or Team plan, in a terminal or through the [VS Code extension](</docs/en/vs-code>)| `auto`
An Enterprise plan or a Claude Console API key| `default`
-When feature-flag fetching is off, or in a [first session after an install or upgrade](</docs/en/env-vars#first-session-after-an-install-or-upgrade>) where the flags haven’t arrived yet, the VS Code extension ignores every settings file when choosing the starting permission mode. When the flag, a settings file, or the built-in default selects `auto` but auto mode isn’t available to the session, Claude Code starts the session in Manual instead. Auto mode is unavailable when a settings file turns it off or the model doesn’t support it. The first time the built-in default starts one of your sessions in auto mode, Claude Code shows a notice that links to this page:
+When feature-flag fetching is off, or in a [first session after an install or upgrade](</docs/en/env-vars#first-session-after-an-install-or-upgrade>) where the flags haven’t arrived yet, the VS Code extension ignores every settings file when choosing the starting permission mode. When the flag, a settings file, or the built-in default selects `auto` but auto mode isn’t available to the session, Claude Code starts the session in Manual instead. Auto mode is unavailable when the session doesn’t meet the availability requirements, such as a settings file turning it off or a model that doesn’t support it, or when Anthropic has temporarily turned it off server-side. The first time the built-in default starts one of your sessions in auto mode, Claude Code shows a notice that links to this page:
* In a terminal, once, at the top of the session
* In the VS Code extension, as a card on the new-conversation screen that stays until you dismiss it
@@ -128,7 +128,7 @@
**During a session** : press `Shift+Tab` to cycle permission modes. From `auto`, the first press switches to `default`, and the cycle then runs `default` → `acceptEdits` → `plan` → back to `default`. Optional modes, described below, slot in after `plan`. The status bar shows the active mode as a gray `⏸ manual mode on` for `default`, or as `⏵⏵ accept edits on`, `⏸ plan mode on`, `⏵⏵ auto mode on`, `⏵⏵ don't ask on`, or `⏵⏵ bypass permissions on`.Not every mode is in the default cycle:
- * `auto`: appears when your account meets the auto mode requirements; cycling to it switches permission modes without a confirmation prompt
+ * `auto`: appears when auto mode is available; cycling to it switches permission modes without a confirmation prompt
* `bypassPermissions`: appears after you start with `--permission-mode bypassPermissions`, `--dangerously-skip-permissions`, `--allow-dangerously-skip-permissions`, or `permissions.defaultMode: "bypassPermissions"` in [settings](</docs/en/settings-reference#permission-settings>); the `--allow-` variant adds the permission mode to the cycle without activating it
* `dontAsk`: never appears in the cycle; set it with `--permission-mode dontAsk`
@@ -155,13 +155,13 @@
3. `permissions.defaultMode` from [managed settings](</docs/en/managed-settings>) or `~/.claude/settings.json`, on Pro, Max, and Team plans with feature-flag fetching available
4. The built-in default for your plan, provider, and organization settings
-The extension never reads a project’s `.claude/settings.json` or `.claude/settings.local.json` for the starting permission mode, and in conversations that don’t meet item 3’s conditions it reads no settings file at all. When `claudeCode.claudeProcessWrapper` is set, items 3 and 4 don’t apply either: those conversations start in Manual unless item 1 or item 2 sets a permission mode.Auto mode appears in the mode indicator when your account meets every requirement listed in the auto mode section.Bypass permissions requires the **Allow dangerously skip permissions** toggle in the extension settings. Without it, the permission mode doesn’t appear in the indicator, and a `bypassPermissions` value from item 1 or item 3 starts the conversation in Manual instead. Auto from any item likewise starts the conversation in Manual when auto mode isn’t available.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
+The extension never reads a project’s `.claude/settings.json` or `.claude/settings.local.json` for the starting permission mode, and in conversations that don’t meet item 3’s conditions it reads no settings file at all. When `claudeCode.claudeProcessWrapper` is set, items 3 and 4 don’t apply either: those conversations start in Manual unless item 1 or item 2 sets a permission mode.Auto appears in the mode indicator when auto mode is available.Bypass permissions requires the **Allow dangerously skip permissions** toggle in the extension settings. Without it, the permission mode doesn’t appear in the indicator, and a `bypassPermissions` value from item 1 or item 3 starts the conversation in Manual instead. Auto from any item likewise starts the conversation in Manual when auto mode isn’t available.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
The JetBrains plugin runs Claude Code in the IDE terminal, so switching permission modes works the same as in the CLI: press `Shift+Tab` to cycle, or pass `--permission-mode` when launching.
**During a session** : in the Code tab, use the mode selector next to the send button. Not every mode appears in the selector:
- * **Auto** : appears when your account meets the auto mode requirements
+ * **Auto** : appears when auto mode is available
* **Bypass permissions** : requires the **Allow bypass permissions mode** toggle in Desktop settings on Pro and Max plans; on Team and Enterprise plans, organization policy controls it instead
The Cowork tab doesn’t use these modes. Cowork has its own permission modes, enabled separately, and the Cowork tab shows no mode selector at all until a mode beyond its default is enabled for your account. See the [Cowork docs](<https://claude.com/docs/cowork/overview>).For desktop-specific details, see [Choose a permission mode](</docs/en/desktop#choose-a-permission-mode>) in the Desktop guide.**As a default** : set `defaultMode` in [settings](</docs/en/settings#where-settings-live>). The desktop app reads the same settings files as the CLI and applies the permission mode to new local sessions.A mode you pick in the mode selector is remembered per folder and takes precedence over `defaultMode` for that folder. Plan is the exception: picking it applies to the current session only.For where `defaultMode` goes in a settings file, see the example under Start in a different permission mode.
@@ -239,7 +239,7 @@
* **Model** : on the Anthropic API and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Claude Opus 4.6 or later, Sonnet 4.6 or later, or [Fable 5](</docs/en/model-config#work-with-fable-5>). On Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, only Claude Sonnet 5, Opus 4.7 or later, and Fable 5. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
* **Provider** : available by default on 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, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action means a classifier request failed; that failure is usually transient, but on Amazon Bedrock it can repeat until your account can invoke the named model. See the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>) for the causes and what to do. If you set `defaultMode: "auto"` in [settings](</docs/en/settings-reference#all-settings>) and a terminal session starts in Manual mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. `auto` doesn’t take effect from those files. Move it to `~/.claude/settings.json`. For a conversation the VS Code extension started, check the extension’s own list in Switch permission modes instead.
+If Claude Code reports auto mode as unavailable, first check these requirements and whether any settings file sets [`disableAutoMode`](</docs/en/settings-reference#disableautomode>). Anthropic may also have turned auto mode off server-side, or the server may have rejected auto mode for your account. A session that received either answer keeps auto mode off until the session ends, so start a new session later. A separate message that names a model and says auto mode “cannot determine the safety” of an action means a classifier request failed. That failure is usually transient, but on Amazon Bedrock it can repeat until your account can invoke the named model. See the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>) for the causes and what to do. If you set `defaultMode: "auto"` in [settings](</docs/en/settings-reference#all-settings>) and a terminal session starts in Manual mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. `auto` doesn’t take effect from those files. Move it to `~/.claude/settings.json`. For a conversation the VS Code extension started, check the extension’s own list in Switch permission modes instead.
###
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -247,7 +247,7 @@
Auto mode on Bedrock, Agent Platform, or Foundry
-On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode appears in the `Shift+Tab` cycle by default. Appearing in the cycle doesn’t change the permission mode a session starts in: on these providers, terminal sessions start in your [`defaultMode`](</docs/en/settings-reference#permissions-defaultmode>), which is Manual unless you change it, and conversations in the [VS Code extension](</docs/en/vs-code>) start in Manual unless `claudeCode.initialPermissionMode` or a mode you picked in the extension sets one. Only Claude Sonnet 5, Opus 4.7 or later, and Fable 5 are supported on these providers. To make auto mode the default starting permission mode, set `"permissions": {"defaultMode": "auto"}` in user or managed settings. In sessions the VS Code extension starts, select **Auto** from the mode indicator instead. Switch permission modes covers what outranks that pick. The [`/doctor`](</docs/en/commands#all-commands>) checkup proposes this user-settings default on these providers the same way it does on the Anthropic API. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
+On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode appears in the `Shift+Tab` cycle by default. Appearing in the cycle doesn’t change the permission mode a session starts in: on these providers, terminal sessions start in your [`defaultMode`](</docs/en/settings-reference#permissions-defaultmode>), which is Manual unless you change it, and conversations in the [VS Code extension](</docs/en/vs-code>) start in Manual unless `claudeCode.initialPermissionMode` or a mode you picked in the extension sets one. Only Claude Sonnet 5, Opus 4.7 or later, and Fable 5 are supported on these providers. To make auto mode the default starting permission mode, set `"permissions": {"defaultMode": "auto"}` in user or managed settings. In sessions the VS Code extension starts, select **Auto** from the mode indicator instead. Switch permission modes covers what outranks that pick. The [`/doctor`](</docs/en/commands#all-commands>) checkup proposes this user-settings default on these providers the same way it does on the Anthropic API. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. A session already running in auto mode leaves it when the setting reaches that session from an [admin-deployed source](</docs/en/managed-settings#which-managed-source-claude-code-uses>), and shows `auto mode disabled by settings`. Before v2.1.251, a running session kept auto mode until it ended. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
###
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -447,7 +447,7 @@
`dontAsk`| Denied
`bypassPermissions`| Allowed
-[`permissions.allow`](</docs/en/permissions#manage-permissions>) rules in settings files do not pre-approve protected-path writes. The safety check runs before Claude Code evaluates allow rules from settings, so an entry such as `Edit(.claude/**)` in `~/.claude/settings.json` or `.claude/settings.json` does not change the per-mode outcome in the table above. In modes that prompt, the prompt for a `.claude/` write offers **Yes, and allow Claude to edit its own settings for this session** , which approves later `.claude/` writes in that session without prompting again. Protected directories:
+In a session started with [`--restricted`](</docs/en/cli-reference#cli-flags>), which requires Claude Code v2.1.248 or later, the classifier can’t approve protected-path writes. [`permissions.allow`](</docs/en/permissions#manage-permissions>) rules in settings files do not pre-approve protected-path writes. The safety check runs before Claude Code evaluates allow rules from settings, so an entry such as `Edit(.claude/**)` in `~/.claude/settings.json` or `.claude/settings.json` does not change the per-mode outcome in the table above. In modes that prompt, the prompt for a `.claude/` write offers **Yes, and allow Claude to edit its own settings for this session** , which approves later `.claude/` writes in that session without prompting again. Protected directories:
* `.git`
* `.config/git`
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -28,7 +28,7 @@
Claude Code doesn’t auto-approve the following in any mode, including `bypassPermissions`. Each bullet links to the section that says what happens instead in each mode:
* Tools matched by an explicit [ask rule](</docs/en/permissions#manage-permissions>)
- * Connector tools your organization [set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>)
+ * Connector tools your organization [set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>), in sessions where that setting reaches Claude Code
* Tools that require user interaction: the built-in `AskUserQuestion` tool and MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>)
* `rm` and `rmdir` removals targeting a critical path, which no allow rule or `PreToolUse` hook `"allow"` approves
* The cross-session messaging safeguards
@@ -39,14 +39,14 @@
Common setups
-Permission modes decide whether Claude asks before an action, and the [Bash sandbox](</docs/en/sandboxing>) and outer [isolation boundaries](</docs/en/sandbox-environments>) decide what an action can reach once it runs. Each row below pairs a goal with the flags or settings that get you there and the isolation it needs, as a starting point. Available modes lists what runs without a prompt in each mode, and the per-mode section each row links carries the full behavior.
+Permission modes decide whether Claude asks before an action, and the [Bash sandbox](</docs/en/sandboxing>) and outer [isolation boundaries](</docs/en/sandbox-environments>) decide what an action can reach once it runs. Each row below pairs a goal with the flags or settings that get you there and the isolation it needs, as a starting point. Available modes lists what runs without a prompt in each mode.
You want to| Start with| Isolation needed| Notes
---|---|---|---
Review every action yourself| Manual mode: `claude --permission-mode default`| None| Sensitive work, unfamiliar code
Iterate locally with fewer prompts, without a classifier| Manual mode plus the Bash sandbox in [auto-allow mode](</docs/en/sandboxing#sandbox-modes>): `claude --permission-mode default`, then run `/sandbox` and select auto-allow| The built-in Bash sandbox, on macOS, Linux, and WSL2| Deny rules still apply, and ask rules that name a command, such as `Bash(git push *)`, still prompt. To turn the sandbox on from a settings file instead, set [`sandbox.enabled`](</docs/en/settings-reference#sandbox-enabled>) to `true`
Explore before changing anything| `claude --permission-mode plan`| None| Claude Code blocks edits until you approve a plan
-Work hands-off with a classifier reviewing each action| `claude --permission-mode auto`, the built-in starting permission mode on Pro, Max, and Team| None; a sandbox or container adds defense in depth| Requires a supported model, and your organization can turn auto mode off
+Work hands-off in auto mode| `claude --permission-mode auto`, the built-in starting permission mode on Pro, Max, and Team| None; a sandbox or container adds defense in depth| Requires a supported model, and your organization can turn auto mode off
Run in CI with an exact allowlist| `claude -p "run the test suite" --permission-mode dontAsk --allowedTools "Bash(npm test)" "Read"`| None beyond what your CI runner provides| [Claude Code on the web](</docs/en/claude-code-on-the-web>) ignores `dontAsk` from settings files
Run fully unattended inside a container| `claude -p "<prompt>" --dangerously-skip-permissions`| Required: a container, VM, or the [sandbox runtime](</docs/en/sandbox-environments#sandbox-runtime>); on Linux and macOS, run it as a non-root user| Claude Code on the web ignores this mode from settings files. In this `-p` run, the few calls that would still prompt are denied instead
@@ -64,7 +64,7 @@
2. `permissions.defaultMode` in a [settings file](</docs/en/settings#where-settings-live>). An `"auto"` value in `.claude/settings.json` or `.claude/settings.local.json` doesn’t take effect, and Claude Code then uses the built-in default rather than a `defaultMode` from `~/.claude/settings.json`. The other values apply from any settings file
3. The built-in default
-Conversations the VS Code extension starts follow the extension’s own list in Switch permission modes. A session you resume keeps the permission mode it was in unless you pass `--permission-mode` or `--dangerously-skip-permissions`; [what a resumed session restores](</docs/en/sessions#what-a-resumed-session-restores>) lists the exceptions. The built-in `auto` default requires Claude Code v2.1.228 or later on macOS, Linux, and WSL, and v2.1.233 or later on native Windows. On earlier versions, the built-in default is Manual. The built-in default depends on how you run Claude Code, on your plan, and on whether Claude Code could fetch its feature flags. The first row that matches your session applies. The table covers sessions you start in a terminal or through the VS Code extension; for the desktop app and claude.ai, see the Desktop and Web tabs in Switch permission modes.
+Conversations the VS Code extension starts follow the extension’s own list in Switch permission modes. For the permission mode Claude Code starts a resumed session in, see [permission mode on resume](</docs/en/sessions#permission-mode-on-resume>). The built-in `auto` default requires Claude Code v2.1.228 or later on macOS, Linux, and WSL, and v2.1.233 or later on native Windows. On earlier versions, the built-in default is Manual. The built-in default depends on how you run Claude Code, on your plan, and on whether Claude Code could fetch its feature flags. The first row that matches your session applies. The table covers sessions you start in a terminal or through the VS Code extension; for the desktop app and claude.ai, see the Desktop and Web tabs in Switch permission modes.
How you run Claude Code| Built-in starting permission mode
---|---
@@ -132,7 +132,7 @@
* `bypassPermissions`: appears after you start with `--permission-mode bypassPermissions`, `--dangerously-skip-permissions`, `--allow-dangerously-skip-permissions`, or `permissions.defaultMode: "bypassPermissions"` in [settings](</docs/en/settings-reference#permission-settings>); the `--allow-` variant adds the permission mode to the cycle without activating it
* `dontAsk`: never appears in the cycle; set it with `--permission-mode dontAsk`
-Enabled optional modes slot in after `plan`, with `bypassPermissions` first and `auto` last. If you have both enabled, you will cycle through `bypassPermissions` on the way to `auto`.**At startup** : pass the permission mode as a flag.
+Enabled optional modes slot in after `plan`, with `bypassPermissions` first and `auto` last. If you have both enabled, you will cycle through `bypassPermissions` on the way to `auto`.**From a Bash permission prompt** : in the Manual and `acceptEdits` permission modes, when auto mode is available, Claude Code adds **Yes, and switch to auto mode** to a Bash command’s permission prompt. Select it to approve the command and switch the session to auto mode. [PowerShell tool](</docs/en/tools-reference#powershell-tool>) prompts don’t offer the option. Requires Claude Code v2.1.247 or later.Claude Code doesn’t add the option to prompts forced by one of your [`ask` rules](</docs/en/permissions#manage-permissions>) or by a [hook](</docs/en/hooks#pretooluse-decision-control>), because auto mode still shows you those prompts, so switching wouldn’t remove them.**At startup** : pass the permission mode as a flag.
claude --permission-mode plan
@@ -365,9 +365,9 @@
Each action goes through a fixed decision order. The first matching step wins:
- 1. Actions matching your [allow, ask, or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately. Writes to protected paths route to the classifier even when an allow rule matches, and so do `rm` and `rmdir` removals targeting a critical path in Claude Code v2.1.218 and later. Connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) and MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>) prompt you directly even when an allow rule matches. Ask rules that match on a command’s content, such as `Bash(git push *)`, fall back to a permission prompt
+ 1. Actions matching your [allow, ask, or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately. Writes to protected paths route to the classifier even when an allow rule matches, and so do `rm` and `rmdir` removals targeting a critical path in Claude Code v2.1.218 and later. MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>) prompt you directly even when an allow rule matches, and so do connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code. Ask rules that match on a command’s content, such as `Bash(git push *)`, fall back to a permission prompt
2. Read-only actions and file edits in your working directory are auto-approved, except writes to protected paths
- 3. Everything else goes to the classifier, except the org-set-to-`ask` connector tools and `requiresUserInteraction` MCP tools from step 1, which always prompt you directly, so neither an org-required approval nor a consent step is auto-approved
+ 3. Everything else goes to the classifier. The connector tools and `requiresUserInteraction` MCP tools that prompt you directly in step 1 never reach the classifier, so neither an org-required approval nor a consent step is auto-approved
4. If the classifier blocks, Claude receives the reason and tries an alternative. In most sessions the reason is the fixed text `Blocked by classifier` rather than a written explanation, in Claude Code v2.1.208 and later; see [Review denials](</docs/en/auto-mode-config#review-denials>)
On entering auto mode, broad allow rules that grant arbitrary code execution are dropped:
@@ -400,7 +400,7 @@
Allow only pre-approved tools with dontAsk mode
-If you set `dontAsk` mode, Claude Code auto-denies every tool call that would otherwise prompt you. Claude runs only actions matching your `permissions.allow` rules, [read-only Bash commands](</docs/en/permissions#read-only-commands>), and calls approved by a [PreToolUse hook](</docs/en/permissions#extend-permissions-with-hooks>). Use this mode for CI pipelines or restricted environments where you pre-define exactly what Claude may do; the session never waits for input. The status bar shows `⏵⏵ don't ask on` while this mode is active. Claude Code denies calls matching your explicit [`ask` rules](</docs/en/permissions#manage-permissions>) rather than prompting. It also denies the built-in `AskUserQuestion` tool and connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>), even if your allow rules match them. It denies MCP tools marked [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) the same way, because their approval card needs an answer this mode never collects; this requires Claude Code v2.1.199 or later. `rm` and `rmdir` removals targeting a critical path, such as `rm -rf /` and `rm -rf ~`, are denied even when an allow rule matches them or a `PreToolUse` hook allows them. Cloud sessions on [Claude Code on the web](</docs/en/claude-code-on-the-web>) ignore `defaultMode: "dontAsk"`; see bypassPermissions for details. Set it at startup with the flag:
+If you set `dontAsk` mode, Claude Code auto-denies every tool call that would otherwise prompt you. Claude runs only actions matching your `permissions.allow` rules, [read-only Bash commands](</docs/en/permissions#read-only-commands>), and calls approved by a [PreToolUse hook](</docs/en/permissions#extend-permissions-with-hooks>). Use this mode for CI pipelines or restricted environments where you pre-define exactly what Claude may do; the session never waits for input. The status bar shows `⏵⏵ don't ask on` while this mode is active. Claude Code denies calls matching your explicit [`ask` rules](</docs/en/permissions#manage-permissions>) rather than prompting. It also denies the built-in `AskUserQuestion` tool even if your allow rules match it, and does the same to connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) in sessions where that setting reaches Claude Code. It denies MCP tools marked [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) the same way, because their approval card needs an answer this mode never collects; this requires Claude Code v2.1.199 or later. `rm` and `rmdir` removals targeting a critical path, such as `rm -rf /` and `rm -rf ~`, are denied even when an allow rule matches them or a `PreToolUse` hook allows them. Cloud sessions on [Claude Code on the web](</docs/en/claude-code-on-the-web>) ignore `defaultMode: "dontAsk"`; see bypassPermissions for details. Set it at startup with the flag:
claude --permission-mode dontAsk
@@ -423,7 +423,7 @@
claude --permission-mode bypassPermissions
-The `--dangerously-skip-permissions` flag is equivalent. The first time you start an interactive session with this mode enabled, Claude Code shows a warning dialog asking you to accept responsibility for actions taken without permission checks. Claude Code saves your acceptance to user settings, so the dialog appears only once. If you decline, Claude Code exits. In [non-interactive mode](</docs/en/headless>) no dialog is shown, and a [background session](</docs/en/agent-view>) started with `--bg` is refused until you’ve accepted the dialog in an interactive session. On Linux and macOS, Claude Code refuses to start in this mode when running as root or under `sudo`:
+The `--dangerously-skip-permissions` flag is equivalent. Claude Code refuses `bypassPermissions` in a session you start with [`--restricted`](</docs/en/cli-reference#cli-flags>). `--restricted` requires Claude Code v2.1.248 or later. The first time you start an interactive session with this mode enabled, Claude Code shows a warning dialog asking you to accept responsibility for actions taken without permission checks. Claude Code saves your acceptance to user settings, so the dialog appears only once. If you decline, Claude Code exits. In [non-interactive mode](</docs/en/headless>) no dialog is shown, and a [background session](</docs/en/agent-view>) started with `--bg` is refused until you’ve accepted the dialog in an interactive session. On Linux and macOS, Claude Code refuses to start in this mode when running as root or under `sudo`:
--dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -356,7 +356,7 @@
* **A blocked action** : Claude Code shows a notification and lists the action in `/permissions` under the **Recently denied** tab, where you can press `r` to retry it with a manual approval. When the classifier produces [no verdict on the action](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>), because a safety check separate from auto mode refused the classifier’s own request or its response didn’t parse, Claude Code denies the action without the notification or the **Recently denied** entry.
* **Repeated blocks** : if the classifier blocks an action 3 times in a row or 20 times total, auto mode pauses and Claude Code resumes prompting. Approving the prompted action resumes auto mode. These thresholds are not configurable. Any allowed action resets the consecutive counter, while the total counter persists for the session and resets only when its own limit triggers a fallback. Claude Code doesn’t count a denial toward either threshold when [a safety check separate from auto mode refuses the classifier’s own request](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>); the linked entry covers how Claude Code handles those denials.
- * **Sessions that can’t prompt** : a [non-interactive](</docs/en/headless>) `-p` run without a [`--permission-prompt-tool`](</docs/en/cli-reference#cli-flags>) has no prompt to fall back to. When repeated blocks reach a threshold, the action doesn’t run and Claude keeps working, in the main conversation and in its subagents alike. The same applies when a safety check separate from auto mode refuses the classifier’s request. Claude Code doesn’t stop the run in either case.
+ * **Sessions that can’t prompt** : a [non-interactive](</docs/en/headless>) `-p` run without a [`--permission-prompt-tool`](</docs/en/cli-reference#cli-flags>) has no prompt to fall back to. When repeated blocks reach a threshold, the action doesn’t run and Claude keeps working. The same applies when [a safety check separate from auto mode refuses the classifier’s request](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>). Claude Code doesn’t stop the run in either case.
* **A mode switch during a check** : if you switch permission modes while a classifier check is pending, Claude Code discards a verdict the new mode wouldn’t have requested rather than applying it: you’re prompted for approval instead, or the action is auto-denied in `dontAsk` mode.
Repeated blocks usually mean the classifier is missing context about your infrastructure. Use `/feedback` to report false positives, or have an administrator [configure trusted infrastructure](</docs/en/auto-mode-config>).
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -69,13 +69,14 @@
How you run Claude Code| Built-in starting permission mode
---|---
Any settings file sets `disableAutoMode` to `"disable"`| `default`
-[Feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>) is off, or this is your [first session after you install Claude Code or upgrade to a version that adds this default](</docs/en/env-vars#first-session-after-an-install-or-upgrade>)| `default`
+[Feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>) is off| `default`
+Your [first session after you install Claude Code or upgrade](</docs/en/env-vars#first-session-after-an-install-or-upgrade>) to a version that adds this default, unless a non-interactive session picks the flags up in time| `default`
`claude -p` or the [Agent SDK](</docs/en/agent-sdk/permissions>)| `default`
Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), or a signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) session| `default`
A Pro, Max, or Team plan, in a terminal or through the [VS Code extension](</docs/en/vs-code>)| `auto`
An Enterprise plan or a Claude Console API key| `default`
-In those same two cases, feature-flag fetching off or the first session after an install or upgrade, the VS Code extension ignores every settings file when choosing the starting permission mode and uses `default`. When the flag, a settings file, or the built-in default selects `auto` but auto mode isn’t available to the session, Claude Code starts the session in Manual instead. Auto mode is unavailable when a settings file turns it off or the model doesn’t support it. The first time the built-in default starts one of your sessions in auto mode, Claude Code shows a notice that links to this page:
+When feature-flag fetching is off, or in a [first session after an install or upgrade](</docs/en/env-vars#first-session-after-an-install-or-upgrade>) where the flags haven’t arrived yet, the VS Code extension ignores every settings file when choosing the starting permission mode. When the flag, a settings file, or the built-in default selects `auto` but auto mode isn’t available to the session, Claude Code starts the session in Manual instead. Auto mode is unavailable when a settings file turns it off or the model doesn’t support it. The first time the built-in default starts one of your sessions in auto mode, Claude Code shows a notice that links to this page:
* In a terminal, once, at the top of the session
* In the VS Code extension, as a card on the new-conversation screen that stays until you dismiss it
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -163,13 +163,7 @@
* **Auto** : appears when your account meets the auto mode requirements
* **Bypass permissions** : requires the **Allow bypass permissions mode** toggle in Desktop settings on Pro and Max plans; on Team and Enterprise plans, organization policy controls it instead
-The Cowork tab doesn’t use these modes. Cowork has its own permission modes, enabled separately, and the Cowork tab shows no mode selector at all until a mode beyond its default is enabled for your account. See the [Cowork docs](<https://claude.com/docs/cowork/overview>).For desktop-specific details, see [Choose a permission mode](</docs/en/desktop#choose-a-permission-mode>) in the Desktop guide.**As a default** : set `defaultMode` in [settings](</docs/en/settings#where-settings-live>). The desktop app reads the same settings files as the CLI and applies the permission mode to new local sessions.A mode you pick in the mode selector is remembered per folder and takes precedence over `defaultMode` for that folder. Plan is the exception: picking it applies to the current session only.This example sets Plan mode as the default for new local sessions:
-
- {
- "permissions": {
- "defaultMode": "plan"
- }
- }
+The Cowork tab doesn’t use these modes. Cowork has its own permission modes, enabled separately, and the Cowork tab shows no mode selector at all until a mode beyond its default is enabled for your account. See the [Cowork docs](<https://claude.com/docs/cowork/overview>).For desktop-specific details, see [Choose a permission mode](</docs/en/desktop#choose-a-permission-mode>) in the Desktop guide.**As a default** : set `defaultMode` in [settings](</docs/en/settings#where-settings-live>). The desktop app reads the same settings files as the CLI and applies the permission mode to new local sessions.A mode you pick in the mode selector is remembered per folder and takes precedence over `defaultMode` for that folder. Plan is the exception: picking it applies to the current session only.For where `defaultMode` goes in a settings file, see the example under Start in a different permission mode.
Use the mode dropdown next to the prompt box on [claude.ai/code](<https://claude.ai/code>) or in the mobile app. Permission prompts appear in claude.ai for approval. Which modes appear depends on where the session runs:
@@ -225,13 +219,7 @@
Set plan mode as the default
-To make plan mode the default for a project’s terminal sessions, set `defaultMode` in `.claude/settings.json`. Conversations the [VS Code extension](</docs/en/vs-code>) starts don’t read project settings for the starting permission mode. There, set `claudeCode.initialPermissionMode` to `plan` in your VS Code user settings instead. This example sets the project default:
-
- {
- "permissions": {
- "defaultMode": "plan"
- }
- }
+To make plan mode the default for a project’s terminal sessions, set `defaultMode` to `plan` in `.claude/settings.json`, placed as the example under Start in a different permission mode shows. Conversations the [VS Code extension](</docs/en/vs-code>) starts don’t read project settings for the starting permission mode. There, set `claudeCode.initialPermissionMode` to `plan` in your VS Code user settings instead.
##
@@ -250,7 +238,7 @@
* **Model** : on the Anthropic API and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Claude Opus 4.6 or later, Sonnet 4.6 or later, or [Fable 5](</docs/en/model-config#work-with-fable-5>). On Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, only Claude Sonnet 5, Opus 4.7 or later, and Fable 5. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
* **Provider** : available by default on 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, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action means a classifier request failed; that failure is usually transient, but on Amazon Bedrock it can repeat until your account can invoke the named model. See the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>) for the causes and what to do. If you set `defaultMode: "auto"` in [settings](</docs/en/settings-reference#all-settings>) and a terminal session starts in Manual mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. In Claude Code v2.1.142 and later, `auto` doesn’t take effect from those files. Move it to `~/.claude/settings.json`. For a conversation the VS Code extension started, check the extension’s own list in Switch permission modes instead.
+If Claude Code reports auto mode as unavailable, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action means a classifier request failed; that failure is usually transient, but on Amazon Bedrock it can repeat until your account can invoke the named model. See the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>) for the causes and what to do. If you set `defaultMode: "auto"` in [settings](</docs/en/settings-reference#all-settings>) and a terminal session starts in Manual mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. `auto` doesn’t take effect from those files. Move it to `~/.claude/settings.json`. For a conversation the VS Code extension started, check the extension’s own list in Switch permission modes instead.
###
Show diff (114 lines)
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -44,7 +44,7 @@
You want to| Start with| Isolation needed| Notes
---|---|---|---
Review every action yourself| Manual mode: `claude --permission-mode default`| None| Sensitive work, unfamiliar code
-Iterate locally with fewer prompts, without a classifier| Manual mode plus the Bash sandbox in [auto-allow mode](</docs/en/sandboxing#sandbox-modes>): `claude --permission-mode default`, then run `/sandbox` and select auto-allow| The built-in Bash sandbox, on macOS, Linux, and WSL2| Deny rules still apply, and ask rules that name a command, such as `Bash(git push *)`, still prompt. To turn the sandbox on from a settings file instead, set [`sandbox.enabled`](</docs/en/settings#sandbox-settings>) to `true`
+Iterate locally with fewer prompts, without a classifier| Manual mode plus the Bash sandbox in [auto-allow mode](</docs/en/sandboxing#sandbox-modes>): `claude --permission-mode default`, then run `/sandbox` and select auto-allow| The built-in Bash sandbox, on macOS, Linux, and WSL2| Deny rules still apply, and ask rules that name a command, such as `Bash(git push *)`, still prompt. To turn the sandbox on from a settings file instead, set [`sandbox.enabled`](</docs/en/settings-reference#sandbox-enabled>) to `true`
Explore before changing anything| `claude --permission-mode plan`| None| Claude Code blocks edits until you approve a plan
Work hands-off with a classifier reviewing each action| `claude --permission-mode auto`, the built-in starting permission mode on Pro, Max, and Team| None; a sandbox or container adds defense in depth| Requires a supported model, and your organization can turn auto mode off
Run in CI with an exact allowlist| `claude -p "run the test suite" --permission-mode dontAsk --allowedTools "Bash(npm test)" "Read"`| None beyond what your CI runner provides| [Claude Code on the web](</docs/en/claude-code-on-the-web>) ignores `dontAsk` from settings files
@@ -61,7 +61,7 @@
When you start a new session in a terminal, Claude Code takes the permission mode from the first of these that applies:
1. The `--permission-mode` flag, or `--dangerously-skip-permissions`
- 2. `permissions.defaultMode` in a [settings file](</docs/en/settings#settings-files>). An `"auto"` value in `.claude/settings.json` or `.claude/settings.local.json` doesn’t take effect, and Claude Code then uses the built-in default rather than a `defaultMode` from `~/.claude/settings.json`. The other values apply from any settings file
+ 2. `permissions.defaultMode` in a [settings file](</docs/en/settings#where-settings-live>). An `"auto"` value in `.claude/settings.json` or `.claude/settings.local.json` doesn’t take effect, and Claude Code then uses the built-in default rather than a `defaultMode` from `~/.claude/settings.json`. The other values apply from any settings file
3. The built-in default
Conversations the VS Code extension starts follow the extension’s own list in Switch permission modes. A session you resume keeps the permission mode it was in unless you pass `--permission-mode` or `--dangerously-skip-permissions`; [what a resumed session restores](</docs/en/sessions#what-a-resumed-session-restores>) lists the exceptions. The built-in `auto` default requires Claude Code v2.1.228 or later on macOS, Linux, and WSL, and v2.1.233 or later on native Windows. On earlier versions, the built-in default is Manual. The built-in default depends on how you run Claude Code, on your plan, and on whether Claude Code could fetch its feature flags. The first row that matches your session applies. The table covers sessions you start in a terminal or through the VS Code extension; for the desktop app and claude.ai, see the Desktop and Web tabs in Switch permission modes.
@@ -95,7 +95,7 @@
One session you’re about to start| Pass the permission mode as a flag, for example `claude --permission-mode default`
Every terminal session you start on this machine| Set `permissions.defaultMode` in `~/.claude/settings.json`. For what the VS Code extension reads, see Switch permission modes
Every terminal session you start in one project| Set `permissions.defaultMode` in the project’s `.claude/settings.json`. Sessions you start in a terminal honor every value except `auto`; sessions the VS Code extension starts don’t read project settings for the starting permission mode
-Every terminal session in your organization| Set `permissions.defaultMode` in [managed settings](</docs/en/permissions#managed-settings>). Terminal sessions start in that mode and people can still switch to auto mode; for what the VS Code extension reads, see Switch permission modes. To remove auto mode so nobody can select it, set `permissions.disableAutoMode` to `"disable"` instead
+Every terminal session in your organization| Set `permissions.defaultMode` in [managed settings](</docs/en/managed-settings>). Terminal sessions start in that mode and people can still switch to auto mode; for what the VS Code extension reads, see Switch permission modes. To remove auto mode so nobody can select it, set `permissions.disableAutoMode` to `"disable"` instead
This example makes every terminal session on your machine start in Manual mode, whose config value is `default`. Save it in `~/.claude/settings.json`:
@@ -128,7 +128,7 @@
**During a session** : press `Shift+Tab` to cycle permission modes. From `auto`, the first press switches to `default`, and the cycle then runs `default` → `acceptEdits` → `plan` → back to `default`. Optional modes, described below, slot in after `plan`. The status bar shows the active mode as a gray `⏸ manual mode on` for `default`, or as `⏵⏵ accept edits on`, `⏸ plan mode on`, `⏵⏵ auto mode on`, `⏵⏵ don't ask on`, or `⏵⏵ bypass permissions on`.Not every mode is in the default cycle:
* `auto`: appears when your account meets the auto mode requirements; cycling to it switches permission modes without a confirmation prompt
- * `bypassPermissions`: appears after you start with `--permission-mode bypassPermissions`, `--dangerously-skip-permissions`, `--allow-dangerously-skip-permissions`, or `permissions.defaultMode: "bypassPermissions"` in [settings](</docs/en/settings#permission-settings>); the `--allow-` variant adds the permission mode to the cycle without activating it
+ * `bypassPermissions`: appears after you start with `--permission-mode bypassPermissions`, `--dangerously-skip-permissions`, `--allow-dangerously-skip-permissions`, or `permissions.defaultMode: "bypassPermissions"` in [settings](</docs/en/settings-reference#permission-settings>); the `--allow-` variant adds the permission mode to the cycle without activating it
* `dontAsk`: never appears in the cycle; set it with `--permission-mode dontAsk`
Enabled optional modes slot in after `plan`, with `bypassPermissions` first and `auto` last. If you have both enabled, you will cycle through `bypassPermissions` on the way to `auto`.**At startup** : pass the permission mode as a flag.
@@ -151,7 +151,7 @@
1. `claudeCode.initialPermissionMode`
2. The mode you last picked from the mode indicator, if it was Manual, Edit automatically, or Auto. Picking Plan or Bypass permissions applies to that conversation only
- 3. `permissions.defaultMode` from [managed settings](</docs/en/permissions#managed-settings>) or `~/.claude/settings.json`, on Pro, Max, and Team plans with feature-flag fetching available
+ 3. `permissions.defaultMode` from [managed settings](</docs/en/managed-settings>) or `~/.claude/settings.json`, on Pro, Max, and Team plans with feature-flag fetching available
4. The built-in default for your plan, provider, and organization settings
The extension never reads a project’s `.claude/settings.json` or `.claude/settings.local.json` for the starting permission mode, and in conversations that don’t meet item 3’s conditions it reads no settings file at all. When `claudeCode.claudeProcessWrapper` is set, items 3 and 4 don’t apply either: those conversations start in Manual unless item 1 or item 2 sets a permission mode.Auto mode appears in the mode indicator when your account meets every requirement listed in the auto mode section.Bypass permissions requires the **Allow dangerously skip permissions** toggle in the extension settings. Without it, the permission mode doesn’t appear in the indicator, and a `bypassPermissions` value from item 1 or item 3 starts the conversation in Manual instead. Auto from any item likewise starts the conversation in Manual when auto mode isn’t available.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
@@ -163,7 +163,7 @@
* **Auto** : appears when your account meets the auto mode requirements
* **Bypass permissions** : requires the **Allow bypass permissions mode** toggle in Desktop settings on Pro and Max plans; on Team and Enterprise plans, organization policy controls it instead
-The Cowork tab doesn’t use these modes. Cowork has its own permission modes, enabled separately, and the Cowork tab shows no mode selector at all until a mode beyond its default is enabled for your account. See the [Cowork docs](<https://claude.com/docs/cowork/overview>).For desktop-specific details, see [Choose a permission mode](</docs/en/desktop#choose-a-permission-mode>) in the Desktop guide.**As a default** : set `defaultMode` in [settings](</docs/en/settings#settings-files>). The desktop app reads the same settings files as the CLI and applies the permission mode to new local sessions.A mode you pick in the mode selector is remembered per folder and takes precedence over `defaultMode` for that folder. Plan is the exception: picking it applies to the current session only.This example sets Plan mode as the default for new local sessions:
+The Cowork tab doesn’t use these modes. Cowork has its own permission modes, enabled separately, and the Cowork tab shows no mode selector at all until a mode beyond its default is enabled for your account. See the [Cowork docs](<https://claude.com/docs/cowork/overview>).For desktop-specific details, see [Choose a permission mode](</docs/en/desktop#choose-a-permission-mode>) in the Desktop guide.**As a default** : set `defaultMode` in [settings](</docs/en/settings#where-settings-live>). The desktop app reads the same settings files as the CLI and applies the permission mode to new local sessions.A mode you pick in the mode selector is remembered per folder and takes precedence over `defaultMode` for that folder. Plan is the exception: picking it applies to the current session only.This example sets Plan mode as the default for new local sessions:
{
"permissions": {
@@ -217,7 +217,7 @@
* **Yes, manually approve edits** : approve and review each edit individually.
* **No, keep planning** : stay in plan mode and tell Claude what to change.
-Approving a plan exits plan mode and switches the session to the permission mode each approve option describes, so Claude starts editing. To plan again, cycle back to plan mode with `Shift+Tab`, or prefix your next prompt with `/plan`. Press `Ctrl+G` to open the proposed plan in your default text editor and edit it directly before Claude proceeds. When [`showClearContextOnPlanAccept`](</docs/en/settings#available-settings>) is enabled, the list gains a first option that approves the plan and clears the planning context. Accepting a plan also names the session from the plan content automatically, unless you’ve already set a name with `--name` or `/rename`.
+Approving a plan exits plan mode and switches the session to the permission mode each approve option describes, so Claude starts editing. To plan again, cycle back to plan mode with `Shift+Tab`, or prefix your next prompt with `/plan`. Press `Ctrl+G` to open the proposed plan in your default text editor and edit it directly before Claude proceeds. When [`showClearContextOnPlanAccept`](</docs/en/settings-reference#showclearcontextonplanaccept>) is enabled, the list gains a first option that approves the plan and clears the planning context. Accepting a plan also gives the session a [generated title](</docs/en/sessions#name-your-sessions>) based on the plan, unless you’ve already named the session.
###
@@ -246,11 +246,11 @@
Auto mode is available only when your account meets all of these requirements:
* **Plan** : All plans.
- * **Organization** : on Team and Enterprise, auto mode is available by default. Administrators can turn it off for the organization by setting `permissions.disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>).
+ * **Organization** : on Team and Enterprise, auto mode is available by default. Administrators can turn it off for the organization by setting `permissions.disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>).
* **Model** : on the Anthropic API and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Claude Opus 4.6 or later, Sonnet 4.6 or later, or [Fable 5](</docs/en/model-config#work-with-fable-5>). On Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, only Claude Sonnet 5, Opus 4.7 or later, and Fable 5. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
* **Provider** : available by default on 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, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action means a classifier request failed; that failure is usually transient, but on Amazon Bedrock it can repeat until your account can invoke the named model. See the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>) for the causes and what to do. If you set `defaultMode: "auto"` in [settings](</docs/en/settings#available-settings>) and a terminal session starts in Manual mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. In Claude Code v2.1.142 and later, `auto` doesn’t take effect from those files. Move it to `~/.claude/settings.json`. For a conversation the VS Code extension started, check the extension’s own list in Switch permission modes instead.
+If Claude Code reports auto mode as unavailable, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action means a classifier request failed; that failure is usually transient, but on Amazon Bedrock it can repeat until your account can invoke the named model. See the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>) for the causes and what to do. If you set `defaultMode: "auto"` in [settings](</docs/en/settings-reference#all-settings>) and a terminal session starts in Manual mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. In Claude Code v2.1.142 and later, `auto` doesn’t take effect from those files. Move it to `~/.claude/settings.json`. For a conversation the VS Code extension started, check the extension’s own list in Switch permission modes instead.
###
@@ -258,7 +258,7 @@
Auto mode on Bedrock, Agent Platform, or Foundry
-On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode appears in the `Shift+Tab` cycle by default. Appearing in the cycle doesn’t change the permission mode a session starts in: on these providers, terminal sessions start in your [`defaultMode`](</docs/en/settings#available-settings>), which is Manual unless you change it, and conversations in the [VS Code extension](</docs/en/vs-code>) start in Manual unless `claudeCode.initialPermissionMode` or a mode you picked in the extension sets one. Only Claude Sonnet 5, Opus 4.7 or later, and Fable 5 are supported on these providers. To make auto mode the default starting permission mode, set `"permissions": {"defaultMode": "auto"}` in user or managed settings. In sessions the VS Code extension starts, select **Auto** from the mode indicator instead. Switch permission modes covers what outranks that pick. The [`/doctor`](</docs/en/commands#all-commands>) checkup proposes this user-settings default on these providers the same way it does on the Anthropic API. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
+On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode appears in the `Shift+Tab` cycle by default. Appearing in the cycle doesn’t change the permission mode a session starts in: on these providers, terminal sessions start in your [`defaultMode`](</docs/en/settings-reference#permissions-defaultmode>), which is Manual unless you change it, and conversations in the [VS Code extension](</docs/en/vs-code>) start in Manual unless `claudeCode.initialPermissionMode` or a mode you picked in the extension sets one. Only Claude Sonnet 5, Opus 4.7 or later, and Fable 5 are supported on these providers. To make auto mode the default starting permission mode, set `"permissions": {"defaultMode": "auto"}` in user or managed settings. In sessions the VS Code extension starts, select **Auto** from the mode indicator instead. Switch permission modes covers what outranks that pick. The [`/doctor`](</docs/en/commands#all-commands>) checkup proposes this user-settings default on these providers the same way it does on the Anthropic API. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
###
@@ -423,14 +423,14 @@
`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. The actions no mode auto-approves still prompt in this mode. Two [cross-session messaging](</docs/en/cross-session-messaging>) safeguards still apply in this mode, and in plan-mode sessions where bypass permissions are available:
- * The [`isolatePeerMachines`](</docs/en/settings#available-settings>) approval prompt for messages to your sessions beyond this machine still appears.
+ * The [`isolatePeerMachines`](</docs/en/settings-reference#isolatepeermachines>) approval prompt for messages to your sessions beyond this machine still appears.
* When no [`crossSessionInbound`](</docs/en/cross-session-messaging#control-inbound-messages>) value applies, Claude Code holds an inbound message from another of your sessions for your approval, and delivers without asking only when the sending session identifies itself as also bypassing permission prompts. If you leave the permission mode while messages are held, Claude Code re-applies the inbound rules and delivers any held message they now accept.
In sessions with bypass permissions available, Claude Code also doesn’t enforce plan mode’s blocks. Claude is still instructed to plan without editing, but a file edit or shell command it attempts during planning runs without prompting. Explicit [ask rules](</docs/en/permissions#manage-permissions>) and `rm` and `rmdir` removals targeting a critical path still prompt.
Only use this mode in isolated environments like containers, VMs, or dev containers without internet access, where Claude Code cannot damage your host system.
-You can’t enter `bypassPermissions` from a session that was started without it enabled. Enable it at launch with `permissions.defaultMode: "bypassPermissions"` in [settings](</docs/en/settings#permission-settings>) or with an enabling flag:
+You can’t enter `bypassPermissions` from a session that was started without it enabled. Enable it at launch with `permissions.defaultMode: "bypassPermissions"` in [settings](</docs/en/settings-reference#permission-settings>) or with an enabling flag:
claude --permission-mode bypassPermissions
@@ -440,7 +440,7 @@
The check is skipped automatically inside a recognized sandbox. To run autonomously in a container, use the [dev container](</docs/en/devcontainer>) configuration, which runs Claude Code as a non-root user. [Claude Code on the web](</docs/en/claude-code-on-the-web>) does not honor `defaultMode: "bypassPermissions"` or `"dontAsk"` from your settings files, so a repository’s checked-in settings cannot start a cloud session in bypass-permissions mode. The setting is ignored silently and the session starts in the permission mode shown in the mode dropdown instead. See Switch permission modes for which modes cloud sessions offer.
-`bypassPermissions` offers no protection against prompt injection or unintended actions. For background safety checks with far fewer permission prompts, use auto mode instead. Administrators can block this mode by setting `permissions.disableBypassPermissionsMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>).
+`bypassPermissions` offers no protection against prompt injection or unintended actions. For background safety checks with far fewer permission prompts, use auto mode instead. Administrators can block this mode by setting `permissions.disableBypassPermissionsMode` to `"disable"` in [managed settings](</docs/en/managed-settings>).
##
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -387,8 +387,9 @@
* Wildcarded interpreters like `Bash(python*)`
* Package-manager run commands
* `Agent` allow rules
-
-Narrow rules like `Bash(npm test)` carry over. Dropped rules are restored when you leave auto mode.The classifier sees user messages, tool calls, and your CLAUDE.md content. Tool results are stripped, so hostile content in a file or web page cannot manipulate it directly. A separate server-side probe scans incoming tool results and flags suspicious content before Claude reads it. For more on how these layers work together, see the [auto mode announcement](<https://claude.com/blog/auto-mode>) and the [engineering deep dive](<https://www.anthropic.com/engineering/claude-code-auto-mode>).
+ * [`Monitor`](</docs/en/tools-reference#monitor-tool>) allow rules, because Claude Code runs Monitor commands through the shell
+
+Narrow rules like `Bash(npm test)` stay in effect. Claude Code restores the dropped rules when you leave auto mode. Before v2.1.236, Claude Code left `Monitor` allow rules in effect in auto mode, so a rule that matched the whole tool approved Monitor commands without classifier review.Claude Code also runs `git status` itself before a command that would discard uncommitted work, such as `git reset --hard` or `rm -rf`, and shows the classifier whether staged, modified, or untracked work is present. Claude Code reports untracked files in that check even when the repository’s git configuration sets `status.showUntrackedFiles=no`.The classifier sees user messages, tool calls other than read-only lookups such as file reads and searches, and your CLAUDE.md content. Tool results are stripped, so hostile content in a file or web page can’t manipulate it directly. You can annotate a call’s result with a [PostToolUse hook’s `classifierContext` field](</docs/en/hooks#annotate-a-result-for-the-auto-mode-classifier>), which the classifier reads as application-provided context.A separate server-side probe scans incoming tool results and flags suspicious content before Claude reads it. For more on how these layers work together, see the [auto mode announcement](<https://claude.com/blog/auto-mode>) and the [engineering deep dive](<https://www.anthropic.com/engineering/claude-code-auto-mode>).
How auto mode handles subagents
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -174,7 +174,10 @@
Use the mode dropdown next to the prompt box on [claude.ai/code](<https://claude.ai/code>) or in the mobile app. Permission prompts appear in claude.ai for approval. Which modes appear depends on where the session runs:
* **Cloud sessions** on [Claude Code on the web](</docs/en/claude-code-on-the-web>): Accept edits, Plan, and Auto. Accept edits corresponds to `default` mode: cloud sessions pre-approve file edits regardless of mode, so the dropdown shows Accept edits instead of Manual. Cloud sessions still honor `defaultMode: "acceptEdits"` from settings. Auto mode appears only when your organization allows it and the selected model supports it. Bypass permissions isn’t available.
- * **[Remote Control](</docs/en/remote-control>) sessions** on your local machine: Manual, Accept edits, and Plan. You can’t select Auto or Bypass permissions from the app. The dropdown shows the permission mode the local session is in, including a mode set from the terminal, and updates when the permission mode changes in the app or in the terminal. The one exception is Bypass permissions: the session never reports that mode to claude.ai, so switching into it from the terminal doesn’t change what the dropdown shows. Before v2.1.202, sessions connected with `/remote-control` or `claude --remote-control` didn’t report their mode at all, so claude.ai and the mobile app could show a mode the session wasn’t in. The mismatch affected only the label: Claude Code generated permission prompts from the session’s actual mode, and they still appeared in the app for approval.
+ * **[Remote Control](</docs/en/remote-control>) sessions** on your local machine: Manual, Accept edits, and Plan. You can’t select Auto or Bypass permissions from the app.
+ * Except for Bypass permissions, the dropdown shows the permission mode the local session is in, including one set from the terminal. It updates when the permission mode changes in the app or in the terminal. The session never reports Bypass permissions to claude.ai, so switching into it from the terminal doesn’t change what the dropdown shows.
+ * Sessions hosted by the [desktop app](</docs/en/desktop>) or the [VS Code extension](</docs/en/vs-code>) report permission mode changes to claude.ai as they happen, the same as sessions hosted in a terminal.
+ * Before v2.1.202, sessions connected with `/remote-control` or `claude --remote-control` didn’t report their permission mode at all, so claude.ai and the mobile app could show a permission mode the session wasn’t in. The mismatch affected only the label. Claude Code generated permission prompts from the session’s actual permission mode, and they still appeared in the app for approval.
For Remote Control, the local machine running the session must be signed in with your claude.ai account; API keys aren’t supported. You can also set the starting permission mode when launching that local session:
@@ -210,7 +213,7 @@
When the plan is ready, Claude presents it and asks how to proceed. From that prompt you can choose:
- * **Yes, and use auto mode** : approve and start in auto mode. When auto mode is unavailable, this option reads **Yes, auto-accept edits**. Sessions started with bypass permissions enabled show **Yes, and bypass permissions** instead.
+ * **Yes, and use auto mode** : approve and start in auto mode. When auto mode is unavailable, this option reads **Yes, auto-accept edits**. If you started the session with bypass permissions enabled, the option reads **Yes, and switch to BYPASS PERMISSIONS (no further prompts) for this session** instead.
* **Yes, manually approve edits** : approve and review each edit individually.
* **No, keep planning** : stay in plan mode and tell Claude what to change.
Show diff (115 lines)
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -1,4 +1,4 @@
-A permission mode sets which actions Claude can take in a session without asking you first. In Manual mode, Claude Code stops and asks you before most actions that edit files, run shell commands, or reach the network. In auto mode, a second model, the classifier, reviews actions instead of you; how the classifier evaluates actions lists which actions it reviews and which skip it. On Pro, Max, and Team plans, the built-in starting mode is auto mode. Which mode a session starts in covers the surfaces and settings that change the starting mode. You can also change a running session’s permission mode at any time.
+A permission mode sets which actions Claude can take in a session without asking you first. In Manual mode, Claude Code stops and asks you before most actions that edit files, run shell commands, or reach the network. In auto mode, a second model, the classifier, reviews actions instead of you; how the classifier evaluates actions lists which actions it reviews and which skip it. On Pro, Max, and Team plans, the built-in starting permission mode is auto mode. Which mode a session starts in covers the surfaces and settings that change the starting permission mode. You can also change a running session’s permission mode at any time.
##
@@ -46,7 +46,7 @@
Review every action yourself| Manual mode: `claude --permission-mode default`| None| Sensitive work, unfamiliar code
Iterate locally with fewer prompts, without a classifier| Manual mode plus the Bash sandbox in [auto-allow mode](</docs/en/sandboxing#sandbox-modes>): `claude --permission-mode default`, then run `/sandbox` and select auto-allow| The built-in Bash sandbox, on macOS, Linux, and WSL2| Deny rules still apply, and ask rules that name a command, such as `Bash(git push *)`, still prompt. To turn the sandbox on from a settings file instead, set [`sandbox.enabled`](</docs/en/settings#sandbox-settings>) to `true`
Explore before changing anything| `claude --permission-mode plan`| None| Claude Code blocks edits until you approve a plan
-Work hands-off with a classifier reviewing each action| `claude --permission-mode auto`, the built-in starting mode on Pro, Max, and Team| None; a sandbox or container adds defense in depth| Requires a supported model, and your organization can turn auto mode off
+Work hands-off with a classifier reviewing each action| `claude --permission-mode auto`, the built-in starting permission mode on Pro, Max, and Team| None; a sandbox or container adds defense in depth| Requires a supported model, and your organization can turn auto mode off
Run in CI with an exact allowlist| `claude -p "run the test suite" --permission-mode dontAsk --allowedTools "Bash(npm test)" "Read"`| None beyond what your CI runner provides| [Claude Code on the web](</docs/en/claude-code-on-the-web>) ignores `dontAsk` from settings files
Run fully unattended inside a container| `claude -p "<prompt>" --dangerously-skip-permissions`| Required: a container, VM, or the [sandbox runtime](</docs/en/sandbox-environments#sandbox-runtime>); on Linux and macOS, run it as a non-root user| Claude Code on the web ignores this mode from settings files. In this `-p` run, the few calls that would still prompt are denied instead
@@ -66,7 +66,7 @@
Conversations the VS Code extension starts follow the extension’s own list in Switch permission modes. A session you resume keeps the permission mode it was in unless you pass `--permission-mode` or `--dangerously-skip-permissions`; [what a resumed session restores](</docs/en/sessions#what-a-resumed-session-restores>) lists the exceptions. The built-in `auto` default requires Claude Code v2.1.228 or later on macOS, Linux, and WSL, and v2.1.233 or later on native Windows. On earlier versions, the built-in default is Manual. The built-in default depends on how you run Claude Code, on your plan, and on whether Claude Code could fetch its feature flags. The first row that matches your session applies. The table covers sessions you start in a terminal or through the VS Code extension; for the desktop app and claude.ai, see the Desktop and Web tabs in Switch permission modes.
-How you run Claude Code| Built-in starting mode
+How you run Claude Code| Built-in starting permission mode
---|---
Any settings file sets `disableAutoMode` to `"disable"`| `default`
[Feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>) is off, or this is your [first session after you install Claude Code or upgrade to a version that adds this default](</docs/en/env-vars#first-session-after-an-install-or-upgrade>)| `default`
@@ -75,7 +75,7 @@
A Pro, Max, or Team plan, in a terminal or through the [VS Code extension](</docs/en/vs-code>)| `auto`
An Enterprise plan or a Claude Console API key| `default`
-In those same two cases, feature-flag fetching off or the first session after an install or upgrade, the VS Code extension ignores every settings file when choosing the starting mode and uses `default`. When the flag, a settings file, or the built-in default selects `auto` but auto mode isn’t available to the session, Claude Code starts the session in Manual instead. Auto mode is unavailable when a settings file turns it off or the model doesn’t support it. The first time the built-in default starts one of your sessions in auto mode, Claude Code shows a notice that links to this page:
+In those same two cases, feature-flag fetching off or the first session after an install or upgrade, the VS Code extension ignores every settings file when choosing the starting permission mode and uses `default`. When the flag, a settings file, or the built-in default selects `auto` but auto mode isn’t available to the session, Claude Code starts the session in Manual instead. Auto mode is unavailable when a settings file turns it off or the model doesn’t support it. The first time the built-in default starts one of your sessions in auto mode, Claude Code shows a notice that links to this page:
* In a terminal, once, at the top of the session
* In the VS Code extension, as a card on the new-conversation screen that stays until you dismiss it
@@ -94,7 +94,7 @@
---|---
One session you’re about to start| Pass the permission mode as a flag, for example `claude --permission-mode default`
Every terminal session you start on this machine| Set `permissions.defaultMode` in `~/.claude/settings.json`. For what the VS Code extension reads, see Switch permission modes
-Every terminal session you start in one project| Set `permissions.defaultMode` in the project’s `.claude/settings.json`. Sessions you start in a terminal honor every value except `auto`; sessions the VS Code extension starts don’t read project settings for the starting mode
+Every terminal session you start in one project| Set `permissions.defaultMode` in the project’s `.claude/settings.json`. Sessions you start in a terminal honor every value except `auto`; sessions the VS Code extension starts don’t read project settings for the starting permission mode
Every terminal session in your organization| Set `permissions.defaultMode` in [managed settings](</docs/en/permissions#managed-settings>). Terminal sessions start in that mode and people can still switch to auto mode; for what the VS Code extension reads, see Switch permission modes. To remove auto mode so nobody can select it, set `permissions.disableAutoMode` to `"disable"` instead
This example makes every terminal session on your machine start in Manual mode, whose config value is `default`. Save it in `~/.claude/settings.json`:
@@ -113,7 +113,7 @@
Switch permission modes
-Each interface has its own control for switching modes during a session and its own way of choosing the permission mode new sessions start in. Asking Claude in chat to change the permission mode doesn’t work. Select your interface to see its controls.
+Each interface has its own control for switching permission modes during a session and its own way of choosing the permission mode new sessions start in. Asking Claude in chat to change the permission mode doesn’t work. Select your interface to see its controls.
* CLI
@@ -125,9 +125,9 @@
* Web and mobile
-**During a session** : press `Shift+Tab` to cycle modes. From `auto`, the first press switches to `default`, and the cycle then runs `default` → `acceptEdits` → `plan` → back to `default`. Optional modes, described below, slot in after `plan`. The status bar shows the active mode as a gray `⏸ manual mode on` for `default`, or as `⏵⏵ accept edits on`, `⏸ plan mode on`, `⏵⏵ auto mode on`, `⏵⏵ don't ask on`, or `⏵⏵ bypass permissions on`.Not every mode is in the default cycle:
-
- * `auto`: appears when your account meets the auto mode requirements; cycling to it switches modes without a confirmation prompt
+**During a session** : press `Shift+Tab` to cycle permission modes. From `auto`, the first press switches to `default`, and the cycle then runs `default` → `acceptEdits` → `plan` → back to `default`. Optional modes, described below, slot in after `plan`. The status bar shows the active mode as a gray `⏸ manual mode on` for `default`, or as `⏵⏵ accept edits on`, `⏸ plan mode on`, `⏵⏵ auto mode on`, `⏵⏵ don't ask on`, or `⏵⏵ bypass permissions on`.Not every mode is in the default cycle:
+
+ * `auto`: appears when your account meets the auto mode requirements; cycling to it switches permission modes without a confirmation prompt
* `bypassPermissions`: appears after you start with `--permission-mode bypassPermissions`, `--dangerously-skip-permissions`, `--allow-dangerously-skip-permissions`, or `permissions.defaultMode: "bypassPermissions"` in [settings](</docs/en/settings#permission-settings>); the `--allow-` variant adds the permission mode to the cycle without activating it
* `dontAsk`: never appears in the cycle; set it with `--permission-mode dontAsk`
@@ -154,9 +154,9 @@
3. `permissions.defaultMode` from [managed settings](</docs/en/permissions#managed-settings>) or `~/.claude/settings.json`, on Pro, Max, and Team plans with feature-flag fetching available
4. The built-in default for your plan, provider, and organization settings
-The extension never reads a project’s `.claude/settings.json` or `.claude/settings.local.json` for the starting mode, and in conversations that don’t meet item 3’s conditions it reads no settings file at all. When `claudeCode.claudeProcessWrapper` is set, items 3 and 4 don’t apply either: those conversations start in Manual unless item 1 or item 2 sets a mode.Auto mode appears in the mode indicator when your account meets every requirement listed in the auto mode section.Bypass permissions requires the **Allow dangerously skip permissions** toggle in the extension settings. Without it, the permission mode doesn’t appear in the indicator, and a `bypassPermissions` value from item 1 or item 3 starts the conversation in Manual instead. Auto from any item likewise starts the conversation in Manual when auto mode isn’t available.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
-
-The JetBrains plugin runs Claude Code in the IDE terminal, so switching modes works the same as in the CLI: press `Shift+Tab` to cycle, or pass `--permission-mode` when launching.
+The extension never reads a project’s `.claude/settings.json` or `.claude/settings.local.json` for the starting permission mode, and in conversations that don’t meet item 3’s conditions it reads no settings file at all. When `claudeCode.claudeProcessWrapper` is set, items 3 and 4 don’t apply either: those conversations start in Manual unless item 1 or item 2 sets a permission mode.Auto mode appears in the mode indicator when your account meets every requirement listed in the auto mode section.Bypass permissions requires the **Allow dangerously skip permissions** toggle in the extension settings. Without it, the permission mode doesn’t appear in the indicator, and a `bypassPermissions` value from item 1 or item 3 starts the conversation in Manual instead. Auto from any item likewise starts the conversation in Manual when auto mode isn’t available.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
+
+The JetBrains plugin runs Claude Code in the IDE terminal, so switching permission modes works the same as in the CLI: press `Shift+Tab` to cycle, or pass `--permission-mode` when launching.
**During a session** : in the Code tab, use the mode selector next to the send button. Not every mode appears in the selector:
@@ -176,7 +176,7 @@
* **Cloud sessions** on [Claude Code on the web](</docs/en/claude-code-on-the-web>): Accept edits, Plan, and Auto. Accept edits corresponds to `default` mode: cloud sessions pre-approve file edits regardless of mode, so the dropdown shows Accept edits instead of Manual. Cloud sessions still honor `defaultMode: "acceptEdits"` from settings. Auto mode appears only when your organization allows it and the selected model supports it. Bypass permissions isn’t available.
* **[Remote Control](</docs/en/remote-control>) sessions** on your local machine: Manual, Accept edits, and Plan. You can’t select Auto or Bypass permissions from the app. The dropdown shows the permission mode the local session is in, including a mode set from the terminal, and updates when the permission mode changes in the app or in the terminal. The one exception is Bypass permissions: the session never reports that mode to claude.ai, so switching into it from the terminal doesn’t change what the dropdown shows. Before v2.1.202, sessions connected with `/remote-control` or `claude --remote-control` didn’t report their mode at all, so claude.ai and the mobile app could show a mode the session wasn’t in. The mismatch affected only the label: Claude Code generated permission prompts from the session’s actual mode, and they still appeared in the app for approval.
-For Remote Control, the local machine running the session must be signed in with your claude.ai account; API keys aren’t supported. You can also set the starting mode when launching that local session:
+For Remote Control, the local machine running the session must be signed in with your claude.ai account; API keys aren’t supported. You can also set the starting permission mode when launching that local session:
claude remote-control --permission-mode acceptEdits
@@ -222,7 +222,7 @@
Set plan mode as the default
-To make plan mode the default for a project’s terminal sessions, set `defaultMode` in `.claude/settings.json`. Conversations the [VS Code extension](</docs/en/vs-code>) starts don’t read project settings for the starting mode. There, set `claudeCode.initialPermissionMode` to `plan` in your VS Code user settings instead. This example sets the project default:
+To make plan mode the default for a project’s terminal sessions, set `defaultMode` in `.claude/settings.json`. Conversations the [VS Code extension](</docs/en/vs-code>) starts don’t read project settings for the starting permission mode. There, set `claudeCode.initialPermissionMode` to `plan` in your VS Code user settings instead. This example sets the project default:
{
"permissions": {
@@ -236,7 +236,7 @@
Eliminate permission prompts with auto mode
-Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt. On Pro, Max, and Team plans, auto mode is the built-in starting mode. The classifier also reviews each message Claude sends to another agent with [`SendMessage`](</docs/en/tools-reference>), whether plain text or a structured [agent team](</docs/en/agent-teams>) message, before Claude Code delivers it, both in auto mode and in plan mode while the classifier reviews commands; the send review requires Claude Code v2.1.222 or later. The classifier also reviews and approves or blocks `rm` and `rmdir` removals targeting a critical path, such as `rm -rf /` and `rm -rf ~`, including when the removal sits inside command or process substitution. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior in a mode that still prompts you, set the [Proactive output style](</docs/en/output-styles>) instead.
+Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt. On Pro, Max, and Team plans, auto mode is the built-in starting permission mode. The classifier also reviews each message Claude sends to another agent with [`SendMessage`](</docs/en/tools-reference>), whether plain text or a structured [agent team](</docs/en/agent-teams>) message, before Claude Code delivers it, both in auto mode and in plan mode while the classifier reviews commands; the send review requires Claude Code v2.1.222 or later. The classifier also reviews and approves or blocks `rm` and `rmdir` removals targeting a critical path, such as `rm -rf /` and `rm -rf ~`, including when the removal sits inside command or process substitution. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior in a mode that still prompts you, set the [Proactive output style](</docs/en/output-styles>) instead.
Auto mode reduces permission prompts but does not guarantee safety. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations.
@@ -255,7 +255,7 @@
Auto mode on Bedrock, Agent Platform, or Foundry
-On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode appears in the `Shift+Tab` cycle by default. Appearing in the cycle doesn’t change the permission mode a session starts in: on these providers, terminal sessions start in your [`defaultMode`](</docs/en/settings#available-settings>), which is Manual unless you change it, and conversations in the [VS Code extension](</docs/en/vs-code>) start in Manual unless `claudeCode.initialPermissionMode` or a mode you picked in the extension sets one. Only Claude Sonnet 5, Opus 4.7 or later, and Fable 5 are supported on these providers. To make auto mode the default starting mode, set `"permissions": {"defaultMode": "auto"}` in user or managed settings. In sessions the VS Code extension starts, select **Auto** from the mode indicator instead. Switch permission modes covers what outranks that pick. The [`/doctor`](</docs/en/commands#all-commands>) checkup proposes this user-settings default on these providers the same way it does on the Anthropic API. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
+On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode appears in the `Shift+Tab` cycle by default. Appearing in the cycle doesn’t change the permission mode a session starts in: on these providers, terminal sessions start in your [`defaultMode`](</docs/en/settings#available-settings>), which is Manual unless you change it, and conversations in the [VS Code extension](</docs/en/vs-code>) start in Manual unless `claudeCode.initialPermissionMode` or a mode you picked in the extension sets one. Only Claude Sonnet 5, Opus 4.7 or later, and Fable 5 are supported on these providers. To make auto mode the default starting permission mode, set `"permissions": {"defaultMode": "auto"}` in user or managed settings. In sessions the VS Code extension starts, select **Auto** from the mode indicator instead. Switch permission modes covers what outranks that pick. The [`/doctor`](</docs/en/commands#all-commands>) checkup proposes this user-settings default on these providers the same way it does on the Anthropic API. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
###
Show diff (250 lines)
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -1,4 +1,4 @@
-A permission mode sets which actions Claude can take in a session without asking you first. In Manual mode, Claude Code stops and asks you before most actions that edit files, run shell commands, or reach the network. In auto mode, a second model, the classifier, reviews actions instead of you; how the classifier evaluates actions lists which ones it sees. On Pro, Max, and Team plans, the built-in starting mode is auto mode. Which mode a session starts in covers the surfaces and settings that change the starting mode. You can also change a running session’s permission mode at any time.
+A permission mode sets which actions Claude can take in a session without asking you first. In Manual mode, Claude Code stops and asks you before most actions that edit files, run shell commands, or reach the network. In auto mode, a second model, the classifier, reviews actions instead of you; how the classifier evaluates actions lists which actions it reviews and which skip it. On Pro, Max, and Team plans, the built-in starting mode is auto mode. Which mode a session starts in covers the surfaces and settings that change the starting mode. You can also change a running session’s permission mode at any time.
##
@@ -17,13 +17,40 @@
`dontAsk`| Only pre-approved tools| Locked-down CI and scripts
`bypassPermissions`| Everything| Isolated containers and VMs only
-The mode that reviews every action is named **Manual** in the CLI, in `claude --help`, in the VS Code and JetBrains extensions, and in the desktop app. Its config value is `default`, which is what hooks and SDK integrations use. The CLI accepts `manual` as an alias wherever you type the value, for example `claude --permission-mode manual` or `"defaultMode": "manual"`. The Manual label and the `manual` alias require Claude Code v2.1.200 or later. The desktop app’s label doesn’t depend on your CLI version. Writes to protected paths are never auto-approved except in `bypassPermissions` mode and in planning sessions with bypass permissions available. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. These controls apply in every mode, including `bypassPermissions`:
-
- * deny rules and explicit ask rules, which apply to every tool but can’t block [`EndConversation`](</docs/en/tools-reference#endconversation-tool-behavior>) while any other tool remains
- * the [org `ask` setting on connector tools](</docs/en/mcp#organization-controls-on-connector-tools>)
- * the [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>) marker
-
-Allow rules have no effect in `bypassPermissions` because everything else is already approved.
+The mode that reviews every action is named **Manual** in the CLI, in `claude --help`, in the VS Code and JetBrains extensions, and in the desktop app. Its config value is `default`, which is what hooks and SDK integrations use. The CLI accepts `manual` as an alias wherever you type the value, for example `claude --permission-mode manual` or `"defaultMode": "manual"`. The Manual label and the `manual` alias require Claude Code v2.1.200 or later. The desktop app’s label doesn’t depend on your CLI version. Writes to protected paths are never auto-approved except in `bypassPermissions` mode and in plan-mode sessions where bypass permissions are available, meaning sessions started in a way that puts `bypassPermissions` in the mode cycle. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. Deny rules block in every mode, including `bypassPermissions`. Deny and ask rules don’t apply to [`EndConversation`](</docs/en/tools-reference#endconversation-tool-behavior>) as long as Claude still has at least one other tool it can call. Allow rules have no effect in `bypassPermissions`.
+
+###
+
+
+
+Actions no mode auto-approves
+
+Claude Code doesn’t auto-approve the following in any mode, including `bypassPermissions`. Each bullet links to the section that says what happens instead in each mode:
+
+ * Tools matched by an explicit [ask rule](</docs/en/permissions#manage-permissions>)
+ * Connector tools your organization [set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>)
+ * Tools that require user interaction: the built-in `AskUserQuestion` tool and MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>)
+ * `rm` and `rmdir` removals targeting a critical path, which no allow rule or `PreToolUse` hook `"allow"` approves
+ * The cross-session messaging safeguards
+
+##
+
+
+
+Common setups
+
+Permission modes decide whether Claude asks before an action, and the [Bash sandbox](</docs/en/sandboxing>) and outer [isolation boundaries](</docs/en/sandbox-environments>) decide what an action can reach once it runs. Each row below pairs a goal with the flags or settings that get you there and the isolation it needs, as a starting point. Available modes lists what runs without a prompt in each mode, and the per-mode section each row links carries the full behavior.
+
+You want to| Start with| Isolation needed| Notes
+---|---|---|---
+Review every action yourself| Manual mode: `claude --permission-mode default`| None| Sensitive work, unfamiliar code
+Iterate locally with fewer prompts, without a classifier| Manual mode plus the Bash sandbox in [auto-allow mode](</docs/en/sandboxing#sandbox-modes>): `claude --permission-mode default`, then run `/sandbox` and select auto-allow| The built-in Bash sandbox, on macOS, Linux, and WSL2| Deny rules still apply, and ask rules that name a command, such as `Bash(git push *)`, still prompt. To turn the sandbox on from a settings file instead, set [`sandbox.enabled`](</docs/en/settings#sandbox-settings>) to `true`
+Explore before changing anything| `claude --permission-mode plan`| None| Claude Code blocks edits until you approve a plan
+Work hands-off with a classifier reviewing each action| `claude --permission-mode auto`, the built-in starting mode on Pro, Max, and Team| None; a sandbox or container adds defense in depth| Requires a supported model, and your organization can turn auto mode off
+Run in CI with an exact allowlist| `claude -p "run the test suite" --permission-mode dontAsk --allowedTools "Bash(npm test)" "Read"`| None beyond what your CI runner provides| [Claude Code on the web](</docs/en/claude-code-on-the-web>) ignores `dontAsk` from settings files
+Run fully unattended inside a container| `claude -p "<prompt>" --dangerously-skip-permissions`| Required: a container, VM, or the [sandbox runtime](</docs/en/sandbox-environments#sandbox-runtime>); on Linux and macOS, run it as a non-root user| Claude Code on the web ignores this mode from settings files. In this `-p` run, the few calls that would still prompt are denied instead
+
+The Bash sandbox and auto mode work independently and combine, except in plan mode, where [auto-allow doesn’t widen approvals](</docs/en/sandboxing#sandbox-modes>). For the full interaction, see [How sandboxing relates to permissions and permission modes](</docs/en/sandboxing#how-sandboxing-relates-to-permissions-and-permission-modes>) and [How isolation relates to permission modes](</docs/en/sandbox-environments#how-isolation-relates-to-permission-modes>).
##
@@ -48,12 +75,12 @@
A Pro, Max, or Team plan, in a terminal or through the [VS Code extension](</docs/en/vs-code>)| `auto`
An Enterprise plan or a Claude Console API key| `default`
-When feature-flag fetching is off, or in that first session after an install or upgrade, the VS Code extension also reads no settings file for the starting mode. When any of the three steps selects `auto` but auto mode isn’t available to the session, Claude Code starts the session in Manual instead. Auto mode is unavailable when a settings file turns it off or the model doesn’t support it. The first time the built-in default starts one of your sessions in auto mode, Claude Code shows a notice that links to this page:
+In those same two cases, feature-flag fetching off or the first session after an install or upgrade, the VS Code extension ignores every settings file when choosing the starting mode and uses `default`. When the flag, a settings file, or the built-in default selects `auto` but auto mode isn’t available to the session, Claude Code starts the session in Manual instead. Auto mode is unavailable when a settings file turns it off or the model doesn’t support it. The first time the built-in default starts one of your sessions in auto mode, Claude Code shows a notice that links to this page:
* In a terminal, once, at the top of the session
* In the VS Code extension, as a card on the new-conversation screen that stays until you dismiss it
-On Pro, Max, and Team plans, if your `~/.claude/settings.json` sets a different `defaultMode` and no other settings file sets one, your terminal sessions keep starting in that mode, and Claude Code asks once, in the terminal or in the extension, whether to change the setting to auto mode. If you decline, your setting stays as it is.
+On Pro, Max, and Team plans, if your `~/.claude/settings.json` sets a `defaultMode` other than `auto` and no other settings file sets one, your sessions keep starting in that mode. Claude Code asks once, in the terminal or in the VS Code extension, whether to change the setting to auto mode. If you decline, your setting stays as it is.
###
@@ -98,7 +125,7 @@
* Web and mobile
-**During a session** : press `Shift+Tab` to cycle modes. From `auto`, the first press switches to `default`, and the cycle then runs `default` → `acceptEdits` → `plan`. The status bar shows the active mode as a gray `⏸ manual mode on` for `default`, or as `⏵⏵ accept edits on`, `⏸ plan mode on`, `⏵⏵ auto mode on`, `⏵⏵ don't ask on`, or `⏵⏵ bypass permissions on`.Not every mode is in the default cycle:
+**During a session** : press `Shift+Tab` to cycle modes. From `auto`, the first press switches to `default`, and the cycle then runs `default` → `acceptEdits` → `plan` → back to `default`. Optional modes, described below, slot in after `plan`. The status bar shows the active mode as a gray `⏸ manual mode on` for `default`, or as `⏵⏵ accept edits on`, `⏸ plan mode on`, `⏵⏵ auto mode on`, `⏵⏵ don't ask on`, or `⏵⏵ bypass permissions on`.Not every mode is in the default cycle:
* `auto`: appears when your account meets the auto mode requirements; cycling to it switches modes without a confirmation prompt
* `bypassPermissions`: appears after you start with `--permission-mode bypassPermissions`, `--dangerously-skip-permissions`, `--allow-dangerously-skip-permissions`, or `permissions.defaultMode: "bypassPermissions"` in [settings](</docs/en/settings#permission-settings>); the `--allow-` variant adds the permission mode to the cycle without activating it
@@ -120,14 +147,14 @@
Auto| `auto`
Bypass permissions| `bypassPermissions`
-**As a default** : to pin the permission mode conversations start in, set `claudeCode.initialPermissionMode` in your VS Code user settings to `default`, `manual`, `acceptEdits`, `plan`, or `bypassPermissions`, or, for Auto, leave `claudeCode.initialPermissionMode` unset and pick Auto from the mode indicator once. The extension starts each new conversation in the first of these that applies:
+**As a default** : to pin the permission mode conversations start in, set `claudeCode.initialPermissionMode` in your VS Code user settings to `default`, `manual`, `acceptEdits`, `plan`, or `bypassPermissions`. The setting doesn’t accept `auto`; to start in Auto, leave it unset and pick **Auto** from the mode indicator once, as item 2 below describes. The extension starts each new conversation in the first of these that applies:
1. `claudeCode.initialPermissionMode`
2. The mode you last picked from the mode indicator, if it was Manual, Edit automatically, or Auto. Picking Plan or Bypass permissions applies to that conversation only
3. `permissions.defaultMode` from [managed settings](</docs/en/permissions#managed-settings>) or `~/.claude/settings.json`, on Pro, Max, and Team plans with feature-flag fetching available
4. The built-in default for your plan, provider, and organization settings
-The extension never reads a project’s `.claude/settings.json` or `.claude/settings.local.json` for the starting mode, and in conversations that don’t meet item 3’s conditions it reads no settings file at all. When `claudeCode.claudeProcessWrapper` is set, items 3 and 4 don’t apply either: those conversations start in Manual unless item 1 or item 2 sets a mode.Auto mode appears in the mode indicator when your account meets every requirement listed in the auto mode section. The `claudeCode.initialPermissionMode` setting doesn’t accept `auto`. To start conversations in auto mode where it isn’t the built-in default, leave `claudeCode.initialPermissionMode` unset and select **Auto** from the mode indicator.Bypass permissions requires the **Allow dangerously skip permissions** toggle in the extension settings. Without it, the permission mode doesn’t appear in the indicator, and a `bypassPermissions` value from item 1 or item 3 starts the conversation in Manual instead. Auto from any item likewise starts the conversation in Manual when auto mode isn’t available.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
+The extension never reads a project’s `.claude/settings.json` or `.claude/settings.local.json` for the starting mode, and in conversations that don’t meet item 3’s conditions it reads no settings file at all. When `claudeCode.claudeProcessWrapper` is set, items 3 and 4 don’t apply either: those conversations start in Manual unless item 1 or item 2 sets a mode.Auto mode appears in the mode indicator when your account meets every requirement listed in the auto mode section.Bypass permissions requires the **Allow dangerously skip permissions** toggle in the extension settings. Without it, the permission mode doesn’t appear in the indicator, and a `bypassPermissions` value from item 1 or item 3 starts the conversation in Manual instead. Auto from any item likewise starts the conversation in Manual when auto mode isn’t available.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
The JetBrains plugin runs Claude Code in the IDE terminal, so switching modes works the same as in the CLI: press `Shift+Tab` to cycle, or pass `--permission-mode` when launching.
@@ -149,7 +176,7 @@
* **Cloud sessions** on [Claude Code on the web](</docs/en/claude-code-on-the-web>): Accept edits, Plan, and Auto. Accept edits corresponds to `default` mode: cloud sessions pre-approve file edits regardless of mode, so the dropdown shows Accept edits instead of Manual. Cloud sessions still honor `defaultMode: "acceptEdits"` from settings. Auto mode appears only when your organization allows it and the selected model supports it. Bypass permissions isn’t available.
* **[Remote Control](</docs/en/remote-control>) sessions** on your local machine: Manual, Accept edits, and Plan. You can’t select Auto or Bypass permissions from the app. The dropdown shows the permission mode the local session is in, including a mode set from the terminal, and updates when the permission mode changes in the app or in the terminal. The one exception is Bypass permissions: the session never reports that mode to claude.ai, so switching into it from the terminal doesn’t change what the dropdown shows. Before v2.1.202, sessions connected with `/remote-control` or `claude --remote-control` didn’t report their mode at all, so claude.ai and the mobile app could show a mode the session wasn’t in. The mismatch affected only the label: Claude Code generated permission prompts from the session’s actual mode, and they still appeared in the app for approval.
-For Remote Control, the host must be signed in with your claude.ai account; API keys are not supported. You can also set the starting mode when launching the host:
+For Remote Control, the local machine running the session must be signed in with your claude.ai account; API keys aren’t supported. You can also set the starting mode when launching that local session:
claude remote-control --permission-mode acceptEdits
@@ -159,7 +186,7 @@
Auto-approve file edits with acceptEdits mode
-`acceptEdits` mode lets Claude create and edit files in your working directory without prompting. The status bar shows `⏵⏵ accept edits on` while this mode is active. In addition to file edits, `acceptEdits` mode auto-approves common filesystem Bash commands: `mkdir`, `touch`, `rm`, `rmdir`, `mv`, `cp`, and `sed`. These commands are also auto-approved when prefixed with safe environment variables such as `LANG=C` or `NO_COLOR=1`, or process wrappers such as `timeout`, `nice`, or `nohup`. Like file edits, auto-approval applies only to paths inside your working directory or `additionalDirectories`. Paths outside that scope, writes to protected paths, and all other Bash commands except the [built-in read-only set](</docs/en/permissions#read-only-commands>) still prompt. When the [PowerShell tool](</docs/en/tools-reference#powershell-tool>) is enabled, `acceptEdits` mode also auto-approves `Set-Content`, `Add-Content`, `Clear-Content`, and `Remove-Item` on in-scope paths, along with their common aliases. The same scope and protected-path rules apply. A positional argument that contains a quote character, such as the apostrophe in `Set-Content .\notes.txt "It's done"`, still prompts even on in-scope paths, because Claude Code can’t statically validate an argument whose quoted and unquoted readings differ. Pass the content through a named parameter such as `-Value` to avoid the prompt. Use `acceptEdits` when you want to review changes in your editor or via `git diff` after the fact rather than approving each edit inline. Press `Shift+Tab` once from Manual mode to enter it, or start with it directly:
+`acceptEdits` mode lets Claude create and edit files in your working directory without prompting. The status bar shows `⏵⏵ accept edits on` while this mode is active. In addition to file edits, `acceptEdits` mode auto-approves common filesystem Bash commands: `mkdir`, `touch`, `rm`, `rmdir`, `mv`, `cp`, and `sed`. These commands are also auto-approved when prefixed with safe environment variables such as `LANG=C` or `NO_COLOR=1`, or process wrappers such as `timeout`, `nice`, or `nohup`. Like file edits, auto-approval applies only to paths inside your working directory or `additionalDirectories`. Paths outside that scope, writes to protected paths, `rm` and `rmdir` removals targeting a critical path, and all other Bash commands except the [built-in read-only set](</docs/en/permissions#read-only-commands>) still prompt. When the [PowerShell tool](</docs/en/tools-reference#powershell-tool>) is enabled, `acceptEdits` mode also auto-approves `Set-Content`, `Add-Content`, `Clear-Content`, and `Remove-Item` on in-scope paths, along with their common aliases. The same scope and protected-path rules apply, and `Remove-Item` gets its own check. A positional argument that contains a quote character, such as the apostrophe in `Set-Content .\notes.txt "It's done"`, still prompts even on in-scope paths, because Claude Code can’t statically validate an argument whose quoted and unquoted readings differ. Pass the content through a named parameter such as `-Value` to avoid the prompt. Use `acceptEdits` when you want to review changes in your editor or via `git diff` after the fact rather than approving each edit inline. Press `Shift+Tab` once from Manual mode to enter it, or start with it directly:
claude --permission-mode acceptEdits
@@ -169,7 +196,7 @@
Analyze before you edit with plan mode
-Plan mode tells Claude to research and propose changes without making them. Claude reads files, runs shell commands to explore, and writes a plan, but does not edit your source. Except in sessions with bypass permissions available, edits stay blocked until you approve the plan. When [auto mode](</docs/en/auto-mode-config>) is available and the `useAutoModeDuringPlan` setting is on, which it is by default, the classifier reviews shell commands during planning instead of prompting you. Approved commands run, and rejected ones are blocked. Otherwise, commands outside the [built-in read-only set](</docs/en/permissions#read-only-commands>) prompt for approval, including when the sandbox’s [auto-allow mode](</docs/en/sandboxing#sandbox-modes>) is enabled. Sessions with bypass permissions available skip both paths; that section covers what still prompts there. In sessions without them, commands outside the read-only set prompted either way in v2.1.212 through v2.1.217. Enter plan mode by pressing `Shift+Tab` or prefixing a single prompt with `/plan`. You can also start in plan mode from the CLI:
+Plan mode tells Claude to research and propose changes without making them. Claude reads files, runs shell commands to explore, and writes a plan, but does not edit your source. Except in sessions with bypass permissions available, edits stay blocked until you approve the plan. When [auto mode](</docs/en/auto-mode-config>) is available and the `useAutoModeDuringPlan` setting is on, which it is by default, the classifier reviews shell commands during planning instead of prompting you. Approved commands run, and rejected ones are blocked. Otherwise, commands outside the [built-in read-only set](</docs/en/permissions#read-only-commands>) prompt for approval, including when the sandbox’s [auto-allow mode](</docs/en/sandboxing#sandbox-modes>) is enabled. In sessions with bypass permissions available, neither the classifier nor a prompt applies to planning commands; Skip all checks with bypassPermissions mode covers the few things that still prompt there. In v2.1.212 through v2.1.217, sessions without bypass permissions prompted for every command outside the read-only set, whether or not auto mode was available. Enter plan mode by pressing `Shift+Tab` or prefixing a single prompt with `/plan`. You can also start in plan mode from the CLI:
claude --permission-mode plan
@@ -209,7 +236,7 @@
Eliminate permission prompts with auto mode
-Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt. On Pro, Max, and Team plans, auto mode is the built-in starting mode. The classifier also reviews each message Claude sends to another agent with [`SendMessage`](</docs/en/tools-reference>), plain or structured, before Claude Code delivers it, both in auto mode and in plan mode while the classifier reviews commands; the send review requires Claude Code v2.1.222 or later. The classifier also decides removals targeting the filesystem root or home directory, such as `rm -rf /` and `rm -rf ~`, including when the removal sits inside command or process substitution. Before v2.1.218, the plain forms prompted for approval instead, and the substitution forms prompted in v2.1.208 through v2.1.217. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior in a mode that still prompts you, set the [Proactive output style](</docs/en/output-styles>) instead.
+Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt. On Pro, Max, and Team plans, auto mode is the built-in starting mode. The classifier also reviews each message Claude sends to another agent with [`SendMessage`](</docs/en/tools-reference>), whether plain text or a structured [agent team](</docs/en/agent-teams>) message, before Claude Code delivers it, both in auto mode and in plan mode while the classifier reviews commands; the send review requires Claude Code v2.1.222 or later. The classifier also reviews and approves or blocks `rm` and `rmdir` removals targeting a critical path, such as `rm -rf /` and `rm -rf ~`, including when the removal sits inside command or process substitution. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior in a mode that still prompts you, set the [Proactive output style](</docs/en/output-styles>) instead.
Auto mode reduces permission prompts but does not guarantee safety. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations.
@@ -291,8 +318,8 @@
Claude Code v2.1.205 and later also block these by default:
- * Writing to Claude Code session transcripts, the `.jsonl` history files under `~/.claude/projects/` or your configured config directory, whether directly or through a shell command. The rule also covers the metadata lines Claude Code appends to each transcript entry for its own checks. A transcript is session state that Claude Code writes, not a working file, and a tampered entry reaches every later check once you resume the session, so auto mode blocks these writes as defense in depth. Reading a transcript isn’t blocked
- * A recursive forced delete such as `rm -rf "$VAR"` or `Remove-Item -Recurse -Force $dir` whose target is a shell variable, or a glob rooted at one, that isn’t assigned anywhere in the conversation the classifier sees. The value came only from earlier command output, which the classifier never receives, so the classifier can’t verify the deletion target against the other deletion rules. The classifier reads the conversation rather than command output by design, so it blocks the call instead of guessing at the target. The block clears when you name the exact path being deleted, or when Claude re-runs the delete with the resolved literal path written into the command. Deletes whose target the classifier can resolve aren’t affected
+ * Writing to Claude Code session transcripts, the `.jsonl` history files under `~/.claude/projects/` or your configured config directory, whether directly or through a shell command. The rule also covers the metadata lines Claude Code appends to each transcript entry for its own checks. Reading a transcript isn’t blocked
+ * A recursive forced delete such as `rm -rf "$VAR"` or `Remove-Item -Recurse -Force $dir` whose target is a shell variable, or a glob rooted at one, that isn’t assigned anywhere in the conversation the classifier sees. The value came only from earlier command output, which the classifier never receives, so the classifier can’t verify the deletion target against the other deletion rules. The block clears when you name the exact path being deleted, or when Claude re-runs the delete with the resolved literal path written into the command. Deletes whose target the classifier can resolve aren’t affected. `Remove-Item` targets that are a bare `*` or end in `/*` or `\*` never reach the classifier: Claude Code denies them outright
**Allowed by default** :
@@ -313,11 +340,11 @@
Sandbox network access requests are routed through the classifier rather than allowed by default. As of v2.1.198, the classifier reuses its verdict for a network host and port instead of re-running on every connection:
* An allow is reused until new content enters the conversation, at which point that host is checked again
- * In the interactive CLI, a deny is dropped when the turn ends
- * In [non-interactive mode](</docs/en/headless>) and Agent SDK sessions there is no turn boundary, so a deny is reused for the rest of the run
+ * Claude Code v2.1.234 and later reuse a deny caused by the conversation outgrowing the classifier’s context window until new content enters the conversation, or until [compaction](</docs/en/costs#reduce-token-usage>) shrinks what the classifier reads. Claude Code then checks the host again
+ * A deny that the classifier reached by evaluating the request lasts for the turn in the interactive CLI. In [non-interactive mode](</docs/en/headless>) and Agent SDK sessions, Claude Code reuses that deny for the rest of the run, because those sessions have no turn boundary
* Changing your permission mode or rules drops all cached verdicts
-Run `claude auto-mode defaults` to print the full rule lists as JSON. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure auto mode](</docs/en/auto-mode-config>). Pushing to any branch of the repository you’re working in and creating a pull request that matches your request run without a prompt, with the two exceptions the lists above cover. To require a human checkpoint before these actions while staying in auto mode, add `permissions.ask` rules: see [Common boundaries](</docs/en/auto-mode-config#common-boundaries>).
+Run `claude auto-mode defaults` to print the full rule lists as JSON. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure auto mode](</docs/en/auto-mode-config>). Pushing to any branch of the repository you’re working in and creating a pull request that matches your request run without a prompt, unless the change would send secrets or sensitive data outside the repository or the pull request targets a different repository or organization, the cases the blocked list covers. To require a human checkpoint before these actions while staying in auto mode, add `permissions.ask` rules: see [Common boundaries](</docs/en/auto-mode-config#common-boundaries>).
###
@@ -346,9 +373,9 @@
Each action goes through a fixed decision order. The first matching step wins:
- 1. Actions matching your [allow, ask, or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately. Writes to protected paths route to the classifier even when an allow rule matches. Connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) and MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>) prompt you directly even when an allow rule matches. Content-scoped ask rules fall back to a permission prompt
+ 1. Actions matching your [allow, ask, or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately. Writes to protected paths route to the classifier even when an allow rule matches, and so do `rm` and `rmdir` removals targeting a critical path in Claude Code v2.1.218 and later. Connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) and MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>) prompt you directly even when an allow rule matches. Ask rules that match on a command’s content, such as `Bash(git push *)`, fall back to a permission prompt
2. Read-only actions and file edits in your working directory are auto-approved, except writes to protected paths
- 3. Everything else goes to the classifier. A connector tool [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) skips the classifier and prompts you directly, so an org-required approval is never auto-approved. As of v2.1.199, an MCP tool marked with [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) also skips the classifier and prompts you directly, so a consent step is never auto-approved on the tool author’s behalf
+ 3. Everything else goes to the classifier, except the org-set-to-`ask` connector tools and `requiresUserInteraction` MCP tools from step 1, which always prompt you directly, so neither an org-required approval nor a consent step is auto-approved
4. If the classifier blocks, Claude receives the reason and tries an alternative. In most sessions the reason is the fixed text `Blocked by classifier` rather than a written explanation, in Claude Code v2.1.208 and later; see [Review denials](</docs/en/auto-mode-config#review-denials>)
On entering auto mode, broad allow rules that grant arbitrary code execution are dropped:
@@ -380,7 +407,7 @@
Allow only pre-approved tools with dontAsk mode
-If you set `dontAsk` mode, Claude Code auto-denies every tool call that would otherwise prompt you. Claude runs only actions matching your `permissions.allow` rules, [read-only Bash commands](</docs/en/permissions#read-only-commands>), and calls approved by a [PreToolUse hook](</docs/en/permissions#extend-permissions-with-hooks>). Use this mode for CI pipelines or restricted environments where you pre-define exactly what Claude may do; the session never waits for input. The status bar shows `⏵⏵ don't ask on` while this mode is active. Claude Code denies calls matching your explicit [`ask` rules](</docs/en/permissions#manage-permissions>) rather than prompting. It also denies the built-in `AskUserQuestion` tool and connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>), even if your allow rules match them. It denies MCP tools marked [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) the same way, because their approval card needs an answer this mode never collects; this requires Claude Code v2.1.199 or later. Cloud sessions on [Claude Code on the web](</docs/en/claude-code-on-the-web>) ignore `defaultMode: "dontAsk"`; see bypassPermissions for details. Set it at startup with the flag:
+If you set `dontAsk` mode, Claude Code auto-denies every tool call that would otherwise prompt you. Claude runs only actions matching your `permissions.allow` rules, [read-only Bash commands](</docs/en/permissions#read-only-commands>), and calls approved by a [PreToolUse hook](</docs/en/permissions#extend-permissions-with-hooks>). Use this mode for CI pipelines or restricted environments where you pre-define exactly what Claude may do; the session never waits for input. The status bar shows `⏵⏵ don't ask on` while this mode is active. Claude Code denies calls matching your explicit [`ask` rules](</docs/en/permissions#manage-permissions>) rather than prompting. It also denies the built-in `AskUserQuestion` tool and connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>), even if your allow rules match them. It denies MCP tools marked [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) the same way, because their approval card needs an answer this mode never collects; this requires Claude Code v2.1.199 or later. `rm` and `rmdir` removals targeting a critical path, such as `rm -rf /` and `rm -rf ~`, are denied even when an allow rule matches them or a `PreToolUse` hook allows them. Cloud sessions on [Claude Code on the web](</docs/en/claude-code-on-the-web>) ignore `defaultMode: "dontAsk"`; see bypassPermissions for details. Set it at startup with the flag:
claude --permission-mode dontAsk
@@ -390,12 +417,12 @@
Skip all checks with bypassPermissions mode
-`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. Explicit [ask rules](</docs/en/permissions#manage-permissions>) and connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) still force a prompt in this mode. MCP tools marked with [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) also still prompt; this requires Claude Code v2.1.199 or later. Removals targeting the filesystem root or home directory, such as `rm -rf /` and `rm -rf ~`, still prompt as a circuit breaker against model error. The circuit breaker also fires when the command contains command substitution with `$(...)` or backticks, or process substitution with `<(...)`, whether the removal sits inside the substitution, as in `echo "$(rm -rf ~)"`, or elsewhere in the same command. The plain form, typed as its own command, has prompted in this mode since the circuit breaker was introduced; before v2.1.208, commands containing those forms didn’t prompt. Two [cross-session messaging](</docs/en/cross-session-messaging>) safeguards still apply in this mode, and in plan-mode sessions where bypass permissions are available:
+`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. The actions no mode auto-approves still prompt in this mode. Two [cross-session messaging](</docs/en/cross-session-messaging>) safeguards still apply in this mode, and in plan-mode sessions where bypass permissions are available:
* The [`isolatePeerMachines`](</docs/en/settings#available-settings>) approval prompt for messages to your sessions beyond this machine still appears.
* When no [`crossSessionInbound`](</docs/en/cross-session-messaging#control-inbound-messages>) value applies, Claude Code holds an inbound message from another of your sessions for your approval, and delivers without asking only when the sending session identifies itself as also bypassing permission prompts. If you leave the permission mode while messages are held, Claude Code re-applies the inbound rules and delivers any held message they now accept.
-In sessions with bypass permissions available, Claude Code also doesn’t enforce plan mode’s blocks. Claude is still instructed to plan without editing, but a file edit or shell command it attempts during planning runs without prompting. Explicit [ask rules](</docs/en/permissions#manage-permissions>) and the removal circuit breaker above still prompt.
+In sessions with bypass permissions available, Claude Code also doesn’t enforce plan mode’s blocks. Claude is still instructed to plan without editing, but a file edit or shell command it attempts during planning runs without prompting. Explicit [ask rules](</docs/en/permissions#manage-permissions>) and `rm` and `rmdir` removals targeting a critical path still prompt.
Only use this mode in isolated environments like containers, VMs, or dev containers without internet access, where Claude Code cannot damage your host system.
@@ -422,7 +449,7 @@
Mode| Protected-path writes
---|---
`default`, `acceptEdits`| Prompted
-`plan`| Prompted. In sessions with bypass permissions available, allowed. Otherwise, with auto mode available during planning, routed to the classifier
+`plan`| Allowed in sessions with bypass permissions available. Otherwise, routed to the classifier when auto mode is available during planning, and prompted when it isn’t
`auto`| Routed to the classifier
`dontAsk`| Denied
`bypassPermissions`| Allowed
@@ -456,6 +483,45 @@
+Critical paths
+
+Claude Code never lets a [`permissions.allow`](</docs/en/permissions#manage-permissions>) rule or a [`PreToolUse` hook](</docs/en/permissions#extend-permissions-with-hooks>) that returns `"allow"` approve an `rm` or `rmdir` command that targets a critical path, even in modes that skip other prompts. This circuit breaker guards against model error. A matching deny rule still blocks the command outright. What happens instead depends on your permission mode:
+
+Mode| What Claude Code does with a critical-path removal
+---|---
+`default`, `acceptEdits`| Asks you to approve it
+`plan`| Asks you to approve it. With auto mode available during planning and no bypass permissions available, sends it to the classifier instead
+`auto`| Sends it to the classifier
+`dontAsk`| Denies it
+`bypassPermissions`| Asks you to approve it
+
+If an explicit [ask rule](</docs/en/permissions#manage-permissions>) matches the command, Claude Code asks you even in `auto` mode. In modes that ask, a [`PermissionRequest` hook](</docs/en/hooks#permissionrequest>) can answer the prompt the way it answers any other. Claude Code treats an `rm` or `rmdir` target as a critical path when it is any of the following:
+
+ * The filesystem root
+ * Top-level directories, meaning any direct child of the root, such as `/usr`, `/etc`, or `/data`
+ * Your home directory
+ * Windows drive roots and their top-level directories, such as `C:\` and `C:\Windows`
+ * Your working directory and its parents
+ * Your additional working directories and their parents, but only when the removal is a glob under one of them, such as `rm -rf <dir>/*`. `rm -rf <dir>` on the directory itself doesn’t trigger this check
+
+Claude Code also treats a glob or trailing slash directly under a shell variable, such as `rm -rf "$DIR"/*`, as a critical-path removal, because the command becomes a removal from the filesystem root when the variable is empty. Hiding the removal inside command substitution with `$(...)` or backticks, or process substitution with `<(...)`, doesn’t skip the check. Claude Code finds a critical-path removal whether it sits inside the substitution, as in `echo "$(rm -rf ~)"`, or elsewhere in the same command.
+
+###
+
+
+
+Remove-Item in PowerShell
+
+When you enable the [PowerShell tool](</docs/en/tools-reference#powershell-tool>), Claude Code gives `Remove-Item` its own check, separate from the `rm` critical-path list. The outcome depends on the target, and the first matching case applies:
+
+ * **System paths** : the filesystem root and its top-level directories, drive roots and their top-level directories, and your home directory. Claude Code denies the command in every mode, without asking you.
+ * **Wildcards** : a bare `*`, or any target ending in `/*` or `\*`, including a glob under a shell variable such as `$dir/*`. Claude Code denies the command in every mode, without asking you, before the classifier sees it.
+ * **Your working directory or one of its parents, with`-Recurse`**: Claude Code treats the command like any other that needs approval in your permission mode, so it asks you in modes that ask, sends it to the classifier in `auto` mode, and denies it in `dontAsk` mode. `bypassPermissions` mode skips this check.
+
+##
+
+
+
See also
* [Permissions](</docs/en/permissions>): allow, ask, and deny rules; managed policies
Show diff (230 lines)
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -1,4 +1,4 @@
-When Claude wants to edit a file, run a shell command, or make a network request, it pauses and asks you to approve the action. Permission modes control how often that pause happens. The mode you pick shapes the flow of a session: Manual mode has you review each action as it comes, while looser modes let Claude work in longer uninterrupted stretches and report back when done. Pick more oversight for sensitive work, or fewer interruptions when you trust the direction.
+A permission mode sets which actions Claude can take in a session without asking you first. In Manual mode, Claude Code stops and asks you before most actions that edit files, run shell commands, or reach the network. In auto mode, a second model, the classifier, reviews actions instead of you; how the classifier evaluates actions lists which ones it sees. On Pro, Max, and Team plans, the built-in starting mode is auto mode. Which mode a session starts in covers the surfaces and settings that change the starting mode. You can also change a running session’s permission mode at any time.
##
@@ -6,11 +6,11 @@
Available modes
-Each mode makes a different tradeoff between convenience and oversight. The table below shows what Claude can do without a permission prompt in each mode.
+Each mode makes a different tradeoff between convenience and oversight. The table below shows what Claude can do without a permission prompt in each mode. Manual mode appears under its config value, `default`.
Mode| What runs without asking| Best for
---|---|---
-`default`| Reads only| Getting started, sensitive work
+`default`| Reads only| Reviewing every action yourself, sensitive work
`acceptEdits`| Reads, file edits, and common filesystem commands (`mkdir`, `touch`, `mv`, `cp`, etc.)| Iterating on code you’re reviewing
`plan`| Reads, plus classifier-approved commands when auto mode is available| Exploring a codebase before changing it
`auto`| Everything, with background safety checks| Long tasks, reducing prompt fatigue
@@ -29,41 +29,88 @@
-Switch permission modes
-
-You can switch modes mid-session, at startup, or as a persistent default. The mode is set through these controls, not by asking Claude in chat. Select your interface below to see how to change it.
-
- * CLI
-
- * VS Code
-
- * JetBrains
-
- * Desktop
-
- * Web and mobile
-
-**During a session** : press `Shift+Tab` to cycle `default` → `acceptEdits` → `plan`. The status bar shows the active mode as `⏸ plan mode on`, `⏵⏵ accept edits on`, `⏵⏵ auto mode on`, `⏵⏵ don't ask on`, or `⏵⏵ bypass permissions on`. Manual mode, `default` in that cycle, shows a gray `⏸ manual mode on` badge.Not every mode is in the default cycle:
-
- * `auto`: appears when your account meets the auto mode requirements; cycling to it switches modes without a confirmation prompt
- * `bypassPermissions`: appears after you start with `--permission-mode bypassPermissions`, `--dangerously-skip-permissions`, `--allow-dangerously-skip-permissions`, or `permissions.defaultMode: "bypassPermissions"` in [settings](</docs/en/settings#permission-settings>); the `--allow-` variant adds the mode to the cycle without activating it
- * `dontAsk`: never appears in the cycle; set it with `--permission-mode dontAsk`
-
-Enabled optional modes slot in after `plan`, with `bypassPermissions` first and `auto` last. If you have both enabled, you will cycle through `bypassPermissions` on the way to `auto`.**At startup** : pass the mode as a flag.
-
- claude --permission-mode plan
-
-**As a default** : set `defaultMode` in a [settings file](</docs/en/settings#settings-files>) such as `~/.claude/settings.json`:
+Which mode a session starts in
+
+When you start a new session in a terminal, Claude Code takes the permission mode from the first of these that applies:
+
+ 1. The `--permission-mode` flag, or `--dangerously-skip-permissions`
+ 2. `permissions.defaultMode` in a [settings file](</docs/en/settings#settings-files>). An `"auto"` value in `.claude/settings.json` or `.claude/settings.local.json` doesn’t take effect, and Claude Code then uses the built-in default rather than a `defaultMode` from `~/.claude/settings.json`. The other values apply from any settings file
+ 3. The built-in default
+
+Conversations the VS Code extension starts follow the extension’s own list in Switch permission modes. A session you resume keeps the permission mode it was in unless you pass `--permission-mode` or `--dangerously-skip-permissions`; [what a resumed session restores](</docs/en/sessions#what-a-resumed-session-restores>) lists the exceptions. The built-in `auto` default requires Claude Code v2.1.228 or later on macOS, Linux, and WSL, and v2.1.233 or later on native Windows. On earlier versions, the built-in default is Manual. The built-in default depends on how you run Claude Code, on your plan, and on whether Claude Code could fetch its feature flags. The first row that matches your session applies. The table covers sessions you start in a terminal or through the VS Code extension; for the desktop app and claude.ai, see the Desktop and Web tabs in Switch permission modes.
+
+How you run Claude Code| Built-in starting mode
+---|---
+Any settings file sets `disableAutoMode` to `"disable"`| `default`
+[Feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>) is off, or this is your [first session after you install Claude Code or upgrade to a version that adds this default](</docs/en/env-vars#first-session-after-an-install-or-upgrade>)| `default`
+`claude -p` or the [Agent SDK](</docs/en/agent-sdk/permissions>)| `default`
+Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), or a signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) session| `default`
+A Pro, Max, or Team plan, in a terminal or through the [VS Code extension](</docs/en/vs-code>)| `auto`
+An Enterprise plan or a Claude Console API key| `default`
+
+When feature-flag fetching is off, or in that first session after an install or upgrade, the VS Code extension also reads no settings file for the starting mode. When any of the three steps selects `auto` but auto mode isn’t available to the session, Claude Code starts the session in Manual instead. Auto mode is unavailable when a settings file turns it off or the model doesn’t support it. The first time the built-in default starts one of your sessions in auto mode, Claude Code shows a notice that links to this page:
+
+ * In a terminal, once, at the top of the session
+ * In the VS Code extension, as a card on the new-conversation screen that stays until you dismiss it
+
+On Pro, Max, and Team plans, if your `~/.claude/settings.json` sets a different `defaultMode` and no other settings file sets one, your terminal sessions keep starting in that mode, and Claude Code asks once, in the terminal or in the extension, whether to change the setting to auto mode. If you decline, your setting stays as it is.
+
+###
+
+
+
+Start in a different permission mode
+
+You can set the starting permission mode for one session, or as a default for every session on a machine, in a project, or in an organization. When more than one settings file sets `permissions.defaultMode`, [settings precedence](</docs/en/settings#settings-precedence>) decides, so a project or managed value outranks `~/.claude/settings.json`. To change the permission mode of a session that’s already running, see Switch permission modes.
+
+To set the starting permission mode for| Do this
+---|---
+One session you’re about to start| Pass the permission mode as a flag, for example `claude --permission-mode default`
+Every terminal session you start on this machine| Set `permissions.defaultMode` in `~/.claude/settings.json`. For what the VS Code extension reads, see Switch permission modes
+Every terminal session you start in one project| Set `permissions.defaultMode` in the project’s `.claude/settings.json`. Sessions you start in a terminal honor every value except `auto`; sessions the VS Code extension starts don’t read project settings for the starting mode
+Every terminal session in your organization| Set `permissions.defaultMode` in [managed settings](</docs/en/permissions#managed-settings>). Terminal sessions start in that mode and people can still switch to auto mode; for what the VS Code extension reads, see Switch permission modes. To remove auto mode so nobody can select it, set `permissions.disableAutoMode` to `"disable"` instead
+
+This example makes every terminal session on your machine start in Manual mode, whose config value is `default`. Save it in `~/.claude/settings.json`:
{
"permissions": {
- "defaultMode": "acceptEdits"
+ "defaultMode": "default"
}
}
-The same `--permission-mode` flag works with `-p` for [non-interactive runs](</docs/en/headless>).
-
-**During a session** : click the mode indicator at the bottom of the prompt box.**As a default** : set `claudeCode.initialPermissionMode` in your VS Code user settings, or use the Claude Code extension settings panel.The mode indicator shows these labels, mapped to the mode each one applies:
+The next session you start shows `⏸ manual mode on` in the status bar.
+
+##
+
+
+
+Switch permission modes
+
+Each interface has its own control for switching modes during a session and its own way of choosing the permission mode new sessions start in. Asking Claude in chat to change the permission mode doesn’t work. Select your interface to see its controls.
+
+ * CLI
+
+ * VS Code
+
+ * JetBrains
+
+ * Desktop
+
+ * Web and mobile
+
+**During a session** : press `Shift+Tab` to cycle modes. From `auto`, the first press switches to `default`, and the cycle then runs `default` → `acceptEdits` → `plan`. The status bar shows the active mode as a gray `⏸ manual mode on` for `default`, or as `⏵⏵ accept edits on`, `⏸ plan mode on`, `⏵⏵ auto mode on`, `⏵⏵ don't ask on`, or `⏵⏵ bypass permissions on`.Not every mode is in the default cycle:
+
+ * `auto`: appears when your account meets the auto mode requirements; cycling to it switches modes without a confirmation prompt
+ * `bypassPermissions`: appears after you start with `--permission-mode bypassPermissions`, `--dangerously-skip-permissions`, `--allow-dangerously-skip-permissions`, or `permissions.defaultMode: "bypassPermissions"` in [settings](</docs/en/settings#permission-settings>); the `--allow-` variant adds the permission mode to the cycle without activating it
+ * `dontAsk`: never appears in the cycle; set it with `--permission-mode dontAsk`
+
+Enabled optional modes slot in after `plan`, with `bypassPermissions` first and `auto` last. If you have both enabled, you will cycle through `bypassPermissions` on the way to `auto`.**At startup** : pass the permission mode as a flag.
+
+ claude --permission-mode plan
+
+**As a default** : set `permissions.defaultMode` at the scope you want, as described in Start in a different permission mode.The same `--permission-mode` flag works with `-p` for [non-interactive runs](</docs/en/headless>).
+
+**During a session** : click the mode indicator at the bottom of the prompt box. It uses these labels for the modes on this page:
UI label| Mode
---|---
@@ -73,7 +120,14 @@
Auto| `auto`
Bypass permissions| `bypassPermissions`
-Auto mode appears in the mode indicator when your account meets every requirement listed in the auto mode section. The `claudeCode.initialPermissionMode` setting does not accept `auto`. To switch a session into auto mode, select **Auto** from the mode indicator.Bypass permissions requires the **Allow dangerously skip permissions** toggle in the extension settings before it appears in the mode indicator.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
+**As a default** : to pin the permission mode conversations start in, set `claudeCode.initialPermissionMode` in your VS Code user settings to `default`, `manual`, `acceptEdits`, `plan`, or `bypassPermissions`, or, for Auto, leave `claudeCode.initialPermissionMode` unset and pick Auto from the mode indicator once. The extension starts each new conversation in the first of these that applies:
+
+ 1. `claudeCode.initialPermissionMode`
+ 2. The mode you last picked from the mode indicator, if it was Manual, Edit automatically, or Auto. Picking Plan or Bypass permissions applies to that conversation only
+ 3. `permissions.defaultMode` from [managed settings](</docs/en/permissions#managed-settings>) or `~/.claude/settings.json`, on Pro, Max, and Team plans with feature-flag fetching available
+ 4. The built-in default for your plan, provider, and organization settings
+
+The extension never reads a project’s `.claude/settings.json` or `.claude/settings.local.json` for the starting mode, and in conversations that don’t meet item 3’s conditions it reads no settings file at all. When `claudeCode.claudeProcessWrapper` is set, items 3 and 4 don’t apply either: those conversations start in Manual unless item 1 or item 2 sets a mode.Auto mode appears in the mode indicator when your account meets every requirement listed in the auto mode section. The `claudeCode.initialPermissionMode` setting doesn’t accept `auto`. To start conversations in auto mode where it isn’t the built-in default, leave `claudeCode.initialPermissionMode` unset and select **Auto** from the mode indicator.Bypass permissions requires the **Allow dangerously skip permissions** toggle in the extension settings. Without it, the permission mode doesn’t appear in the indicator, and a `bypassPermissions` value from item 1 or item 3 starts the conversation in Manual instead. Auto from any item likewise starts the conversation in Manual when auto mode isn’t available.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
The JetBrains plugin runs Claude Code in the IDE terminal, so switching modes works the same as in the CLI: press `Shift+Tab` to cycle, or pass `--permission-mode` when launching.
@@ -82,7 +136,7 @@
* **Auto** : appears when your account meets the auto mode requirements
* **Bypass permissions** : requires the **Allow bypass permissions mode** toggle in Desktop settings on Pro and Max plans; on Team and Enterprise plans, organization policy controls it instead
-The Cowork tab doesn’t use these modes. Cowork has its own permission modes, enabled separately, and the Cowork tab shows no mode selector at all until a mode beyond its default is enabled for your account. See the [Cowork docs](<https://claude.com/docs/cowork/overview>).For desktop-specific details, see [Choose a permission mode](</docs/en/desktop#choose-a-permission-mode>) in the Desktop guide.**As a default** : set `defaultMode` in [settings](</docs/en/settings#settings-files>). The desktop app reads the same settings files as the CLI and applies the mode to new local sessions.A mode you pick in the mode selector is remembered per folder and takes precedence over `defaultMode` for that folder. Plan is the exception: picking it applies to the current session only.This example sets Plan mode as the default for new local sessions:
+The Cowork tab doesn’t use these modes. Cowork has its own permission modes, enabled separately, and the Cowork tab shows no mode selector at all until a mode beyond its default is enabled for your account. See the [Cowork docs](<https://claude.com/docs/cowork/overview>).For desktop-specific details, see [Choose a permission mode](</docs/en/desktop#choose-a-permission-mode>) in the Desktop guide.**As a default** : set `defaultMode` in [settings](</docs/en/settings#settings-files>). The desktop app reads the same settings files as the CLI and applies the permission mode to new local sessions.A mode you pick in the mode selector is remembered per folder and takes precedence over `defaultMode` for that folder. Plan is the exception: picking it applies to the current session only.This example sets Plan mode as the default for new local sessions:
{
"permissions": {
@@ -93,7 +147,7 @@
Use the mode dropdown next to the prompt box on [claude.ai/code](<https://claude.ai/code>) or in the mobile app. Permission prompts appear in claude.ai for approval. Which modes appear depends on where the session runs:
* **Cloud sessions** on [Claude Code on the web](</docs/en/claude-code-on-the-web>): Accept edits, Plan, and Auto. Accept edits corresponds to `default` mode: cloud sessions pre-approve file edits regardless of mode, so the dropdown shows Accept edits instead of Manual. Cloud sessions still honor `defaultMode: "acceptEdits"` from settings. Auto mode appears only when your organization allows it and the selected model supports it. Bypass permissions isn’t available.
- * **[Remote Control](</docs/en/remote-control>) sessions** on your local machine: Manual, Accept edits, and Plan. You can’t select Auto or Bypass permissions from the app. The dropdown shows the mode the local session is in, including a mode set from the terminal, and updates when the mode changes in the app or in the terminal. The one exception is Bypass permissions: the session never reports that mode to claude.ai, so switching into it from the terminal doesn’t change what the dropdown shows. Before v2.1.202, sessions connected with `/remote-control` or `claude --remote-control` didn’t report their mode at all, so claude.ai and the mobile app could show a mode the session wasn’t in. The mismatch affected only the label: Claude Code generated permission prompts from the session’s actual mode, and they still appeared in the app for approval.
+ * **[Remote Control](</docs/en/remote-control>) sessions** on your local machine: Manual, Accept edits, and Plan. You can’t select Auto or Bypass permissions from the app. The dropdown shows the permission mode the local session is in, including a mode set from the terminal, and updates when the permission mode changes in the app or in the terminal. The one exception is Bypass permissions: the session never reports that mode to claude.ai, so switching into it from the terminal doesn’t change what the dropdown shows. Before v2.1.202, sessions connected with `/remote-control` or `claude --remote-control` didn’t report their mode at all, so claude.ai and the mobile app could show a mode the session wasn’t in. The mismatch affected only the label: Claude Code generated permission prompts from the session’s actual mode, and they still appeared in the app for approval.
For Remote Control, the host must be signed in with your claude.ai account; API keys are not supported. You can also set the starting mode when launching the host:
@@ -141,7 +195,7 @@
Set plan mode as the default
-In a session the [VS Code extension](</docs/en/vs-code>) started, a settings-file `defaultMode` doesn’t set the starting mode. Set `claudeCode.initialPermissionMode` to `plan` in your VS Code user settings instead. Elsewhere, to make plan mode the default for a project, set `defaultMode` in `.claude/settings.json`:
+To make plan mode the default for a project’s terminal sessions, set `defaultMode` in `.claude/settings.json`. Conversations the [VS Code extension](</docs/en/vs-code>) starts don’t read project settings for the starting mode. There, set `claudeCode.initialPermissionMode` to `plan` in your VS Code user settings instead. This example sets the project default:
{
"permissions": {
@@ -155,9 +209,7 @@
Eliminate permission prompts with auto mode
-Starting August 14, 2026, auto mode becomes the default permission mode for new sessions on Pro, Max, and Team plans. You can switch modes at any time. A default you set yourself stays in place unless you accept the one-time switch prompt, and a default your organization manages is unchanged. For details, see [the announcement](<https://claude.com/blog/auto-mode-default-in-claude-code>) on the blog.
-
-Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt. The classifier also reviews each message Claude sends to another agent with [`SendMessage`](</docs/en/tools-reference>), plain or structured, before Claude Code delivers it, both in auto mode and in plan mode while the classifier reviews commands; the send review requires Claude Code v2.1.222 or later. The classifier also decides removals targeting the filesystem root or home directory, such as `rm -rf /` and `rm -rf ~`, including when the removal sits inside command or process substitution. Before v2.1.218, the plain forms prompted for approval instead, and the substitution forms prompted in v2.1.208 through v2.1.217. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior while keeping permission prompts, set the [Proactive output style](</docs/en/output-styles>) instead.
+Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt. On Pro, Max, and Team plans, auto mode is the built-in starting mode. The classifier also reviews each message Claude sends to another agent with [`SendMessage`](</docs/en/tools-reference>), plain or structured, before Claude Code delivers it, both in auto mode and in plan mode while the classifier reviews commands; the send review requires Claude Code v2.1.222 or later. The classifier also decides removals targeting the filesystem root or home directory, such as `rm -rf /` and `rm -rf ~`, including when the removal sits inside command or process substitution. Before v2.1.218, the plain forms prompted for approval instead, and the substitution forms prompted in v2.1.208 through v2.1.217. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior in a mode that still prompts you, set the [Proactive output style](</docs/en/output-styles>) instead.
Auto mode reduces permission prompts but does not guarantee safety. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations.
@@ -168,7 +220,7 @@
* **Model** : on the Anthropic API and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Claude Opus 4.6 or later, Sonnet 4.6 or later, or [Fable 5](</docs/en/model-config#work-with-fable-5>). On Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, only Claude Sonnet 5, Opus 4.7 or later, and Fable 5. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
* **Provider** : available by default on 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, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action means a classifier request failed; that failure is usually transient, but on Amazon Bedrock it can repeat until your account can invoke the named model. See the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>) for the causes and what to do. If you set `defaultMode: "auto"` in [settings](</docs/en/settings#available-settings>) and the session starts in `default` mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. Claude Code v2.1.142 and later ignore `auto` from those files so a repository cannot grant itself auto mode. Move it to `~/.claude/settings.json`. In a session the [VS Code extension](</docs/en/vs-code>) started, a settings-file `defaultMode` doesn’t set the starting mode: select the mode from the extension’s mode indicator instead.
+If Claude Code reports auto mode as unavailable, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action means a classifier request failed; that failure is usually transient, but on Amazon Bedrock it can repeat until your account can invoke the named model. See the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>) for the causes and what to do. If you set `defaultMode: "auto"` in [settings](</docs/en/settings#available-settings>) and a terminal session starts in Manual mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. In Claude Code v2.1.142 and later, `auto` doesn’t take effect from those files. Move it to `~/.claude/settings.json`. For a conversation the VS Code extension started, check the extension’s own list in Switch permission modes instead.
###
@@ -176,7 +228,7 @@
Auto mode on Bedrock, Agent Platform, or Foundry
-On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode appears in the `Shift+Tab` cycle by default. Appearing in the cycle doesn’t change the mode a session starts in. Except in sessions the [VS Code extension](</docs/en/vs-code>) starts, where the extension resolves the starting mode, sessions still start in your [`defaultMode`](</docs/en/settings#available-settings>), which is Manual unless you change it. Only Claude Sonnet 5, Opus 4.7 or later, and Fable 5 are supported on these providers. To make auto mode the default starting mode, set `"permissions": {"defaultMode": "auto"}` in user or managed settings. In sessions the VS Code extension starts, select **Auto** from the mode indicator instead. The [`/doctor`](</docs/en/commands#all-commands>) checkup proposes this user-settings default on these providers the same way it does on the Anthropic API. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>). This removes `auto` from the `Shift+Tab` cycle and rejects `--permission-mode auto` at startup. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
+On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode appears in the `Shift+Tab` cycle by default. Appearing in the cycle doesn’t change the permission mode a session starts in: on these providers, terminal sessions start in your [`defaultMode`](</docs/en/settings#available-settings>), which is Manual unless you change it, and conversations in the [VS Code extension](</docs/en/vs-code>) start in Manual unless `claudeCode.initialPermissionMode` or a mode you picked in the extension sets one. Only Claude Sonnet 5, Opus 4.7 or later, and Fable 5 are supported on these providers. To make auto mode the default starting mode, set `"permissions": {"defaultMode": "auto"}` in user or managed settings. In sessions the VS Code extension starts, select **Auto** from the mode indicator instead. Switch permission modes covers what outranks that pick. The [`/doctor`](</docs/en/commands#all-commands>) checkup proposes this user-settings default on these providers the same way it does on the Anthropic API. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
###
@@ -341,7 +393,7 @@
`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. Explicit [ask rules](</docs/en/permissions#manage-permissions>) and connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) still force a prompt in this mode. MCP tools marked with [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) also still prompt; this requires Claude Code v2.1.199 or later. Removals targeting the filesystem root or home directory, such as `rm -rf /` and `rm -rf ~`, still prompt as a circuit breaker against model error. The circuit breaker also fires when the command contains command substitution with `$(...)` or backticks, or process substitution with `<(...)`, whether the removal sits inside the substitution, as in `echo "$(rm -rf ~)"`, or elsewhere in the same command. The plain form, typed as its own command, has prompted in this mode since the circuit breaker was introduced; before v2.1.208, commands containing those forms didn’t prompt. Two [cross-session messaging](</docs/en/cross-session-messaging>) safeguards still apply in this mode, and in plan-mode sessions where bypass permissions are available:
* The [`isolatePeerMachines`](</docs/en/settings#available-settings>) approval prompt for messages to your sessions beyond this machine still appears.
- * When no [`crossSessionInbound`](</docs/en/cross-session-messaging#control-inbound-messages>) value applies, Claude Code holds an inbound message from another of your sessions for your approval, and delivers without asking only when the sending session identifies itself as also bypassing permission prompts. If you leave the mode while messages are held, Claude Code re-applies the inbound rules and delivers any held message they now accept.
+ * When no [`crossSessionInbound`](</docs/en/cross-session-messaging#control-inbound-messages>) value applies, Claude Code holds an inbound message from another of your sessions for your approval, and delivers without asking only when the sending session identifies itself as also bypassing permission prompts. If you leave the permission mode while messages are held, Claude Code re-applies the inbound rules and delivers any held message they now accept.
In sessions with bypass permissions available, Claude Code also doesn’t enforce plan mode’s blocks. Claude is still instructed to plan without editing, but a file edit or shell command it attempts during planning runs without prompting. Explicit [ask rules](</docs/en/permissions#manage-permissions>) and the removal circuit breaker above still prompt.
@@ -355,7 +407,7 @@
--dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons
-The check is skipped automatically inside a recognized sandbox. To run autonomously in a container, use the [dev container](</docs/en/devcontainer>) configuration, which runs Claude Code as a non-root user. [Claude Code on the web](</docs/en/claude-code-on-the-web>) does not honor `defaultMode: "bypassPermissions"` or `"dontAsk"` from your settings files, so a repository’s checked-in settings cannot start a cloud session in bypass-permissions mode. The setting is ignored silently and the session starts in the mode shown in the mode dropdown instead. See Switch permission modes for which modes cloud sessions offer.
+The check is skipped automatically inside a recognized sandbox. To run autonomously in a container, use the [dev container](</docs/en/devcontainer>) configuration, which runs Claude Code as a non-root user. [Claude Code on the web](</docs/en/claude-code-on-the-web>) does not honor `defaultMode: "bypassPermissions"` or `"dontAsk"` from your settings files, so a repository’s checked-in settings cannot start a cloud session in bypass-permissions mode. The setting is ignored silently and the session starts in the permission mode shown in the mode dropdown instead. See Switch permission modes for which modes cloud sessions offer.
`bypassPermissions` offers no protection against prompt injection or unintended actions. For background safety checks with far fewer permission prompts, use auto mode instead. Administrators can block this mode by setting `permissions.disableBypassPermissionsMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>).
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -194,7 +194,7 @@
* Modifying shared infrastructure
* Irreversibly destroying files that existed before the session
* Force push
- * Committing or pushing a change that would send secrets or sensitive data outside the repository when it runs, or widen what a deploy exposes. This covers a CI workflow or deploy configuration that hands a secret to a destination that doesn’t already receive it, a script or setup step that reads a secret store and sends the data out, and a config change that widens what a deploy publishes, such as a registry, visibility, artifact, or sourcemap setting. The check applies on any branch, applies even when the repository is public, and fires when the change lands, whether or not that landing triggers the pipeline; clearing it requires naming the execution effect, not only the commit or push. Before v2.1.211, this check was scoped to the default branch instead: a push there was blocked when it carried sensitive content, changes concealed or misdescribed relative to what you asked for, content ported in from outside the repository, or routed around a review you asked for, and before v2.1.203 any direct push to the default branch was blocked
+ * Committing or pushing a change that would send secrets or sensitive data outside the repository when it runs, or widen what a deploy exposes. This covers a CI workflow or deploy configuration that hands a secret to a destination that doesn’t already receive it, a script or setup step that reads a secret store and sends the data out, and a config change that widens what a deploy publishes, such as a registry, visibility, artifact, or sourcemap setting. The check applies on any branch, applies even when the repository is public, and fires when the change lands, whether or not that landing triggers the pipeline; clearing it requires naming the execution effect, not only the commit or push. Before v2.1.211, this check was scoped to the default branch instead: a push there was blocked when it carried sensitive content, changes concealed or misdescribed relative to what you asked for, content ported in from outside the repository, or routed around a review you asked for
* `git reset --hard`, `git checkout -- .`, `git restore .`, `git clean -fd`, `git stash drop`, or `git stash clear`, which the classifier presumes would discard uncommitted changes
* `git commit --amend` when the commit at HEAD was not created in this session
* From v2.1.198, `git commit --amend` when the commit at HEAD has already been pushed. A message-only reword is not blocked: `--amend -m` with nothing newly staged, on a commit that Claude created during this session
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -63,7 +63,7 @@
The same `--permission-mode` flag works with `-p` for [non-interactive runs](</docs/en/headless>).
-**During a session** : click the mode indicator at the bottom of the prompt box.**As a default** : set `claudeCode.initialPermissionMode` in VS Code settings, or use the Claude Code extension settings panel.The mode indicator shows these labels, mapped to the mode each one applies:
+**During a session** : click the mode indicator at the bottom of the prompt box.**As a default** : set `claudeCode.initialPermissionMode` in your VS Code user settings, or use the Claude Code extension settings panel.The mode indicator shows these labels, mapped to the mode each one applies:
UI label| Mode
---|---
@@ -73,7 +73,7 @@
Auto| `auto`
Bypass permissions| `bypassPermissions`
-Auto mode appears in the mode indicator when your account meets every requirement listed in the auto mode section. The `claudeCode.initialPermissionMode` setting does not accept `auto`. To start in auto mode by default, set `defaultMode` in your [user settings](</docs/en/settings#settings-files>) instead. Claude Code ignores `defaultMode: "auto"` in project and local settings.Bypass permissions requires the **Allow dangerously skip permissions** toggle in the extension settings before it appears in the mode indicator.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
+Auto mode appears in the mode indicator when your account meets every requirement listed in the auto mode section. The `claudeCode.initialPermissionMode` setting does not accept `auto`. To switch a session into auto mode, select **Auto** from the mode indicator.Bypass permissions requires the **Allow dangerously skip permissions** toggle in the extension settings before it appears in the mode indicator.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
The JetBrains plugin runs Claude Code in the IDE terminal, so switching modes works the same as in the CLI: press `Shift+Tab` to cycle, or pass `--permission-mode` when launching.
@@ -141,7 +141,7 @@
Set plan mode as the default
-To make plan mode the default for a project, set `defaultMode` in `.claude/settings.json`:
+In a session the [VS Code extension](</docs/en/vs-code>) started, a settings-file `defaultMode` doesn’t set the starting mode. Set `claudeCode.initialPermissionMode` to `plan` in your VS Code user settings instead. Elsewhere, to make plan mode the default for a project, set `defaultMode` in `.claude/settings.json`:
{
"permissions": {
@@ -168,7 +168,7 @@
* **Model** : on the Anthropic API and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Claude Opus 4.6 or later, Sonnet 4.6 or later, or [Fable 5](</docs/en/model-config#work-with-fable-5>). On Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, only Claude Sonnet 5, Opus 4.7 or later, and Fable 5. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
* **Provider** : available by default on 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, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action means a classifier request failed; that failure is usually transient, but on Amazon Bedrock it can repeat until your account can invoke the named model. See the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>) for the causes and what to do. If you set `defaultMode: "auto"` in [settings](</docs/en/settings#available-settings>) and the session starts in `default` mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. Claude Code v2.1.142 and later ignore `auto` from those files so a repository cannot grant itself auto mode. Move it to `~/.claude/settings.json`.
+If Claude Code reports auto mode as unavailable, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action means a classifier request failed; that failure is usually transient, but on Amazon Bedrock it can repeat until your account can invoke the named model. See the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>) for the causes and what to do. If you set `defaultMode: "auto"` in [settings](</docs/en/settings#available-settings>) and the session starts in `default` mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. Claude Code v2.1.142 and later ignore `auto` from those files so a repository cannot grant itself auto mode. Move it to `~/.claude/settings.json`. In a session the [VS Code extension](</docs/en/vs-code>) started, a settings-file `defaultMode` doesn’t set the starting mode: select the mode from the extension’s mode indicator instead.
###
@@ -176,7 +176,7 @@
Auto mode on Bedrock, Agent Platform, or Foundry
-On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode appears in the `Shift+Tab` cycle by default. Appearing in the cycle doesn’t change the mode a session starts in: sessions still start in your [`defaultMode`](</docs/en/settings#available-settings>), which is Manual unless you change it. Only Claude Sonnet 5, Opus 4.7 or later, and Fable 5 are supported on these providers. To make auto mode the default starting mode, set `"permissions": {"defaultMode": "auto"}` in user or managed settings. The [`/doctor`](</docs/en/commands#all-commands>) checkup proposes this user-settings default on these providers the same way it does on the Anthropic API. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>). This removes `auto` from the `Shift+Tab` cycle and rejects `--permission-mode auto` at startup. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
+On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode appears in the `Shift+Tab` cycle by default. Appearing in the cycle doesn’t change the mode a session starts in. Except in sessions the [VS Code extension](</docs/en/vs-code>) starts, where the extension resolves the starting mode, sessions still start in your [`defaultMode`](</docs/en/settings#available-settings>), which is Manual unless you change it. Only Claude Sonnet 5, Opus 4.7 or later, and Fable 5 are supported on these providers. To make auto mode the default starting mode, set `"permissions": {"defaultMode": "auto"}` in user or managed settings. In sessions the VS Code extension starts, select **Auto** from the mode indicator instead. The [`/doctor`](</docs/en/commands#all-commands>) checkup proposes this user-settings default on these providers the same way it does on the Anthropic API. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>). This removes `auto` from the `Shift+Tab` cycle and rejects `--permission-mode auto` at startup. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
###
@@ -281,7 +281,14 @@
When auto mode falls back
-Each denied action shows a notification and appears in `/permissions` under the Recently denied tab, where you can press `r` to retry it with a manual approval. If the classifier blocks an action 3 times in a row or 20 times total, auto mode pauses and Claude Code resumes prompting. Approving the prompted action resumes auto mode. These thresholds are not configurable. Any allowed action resets the consecutive counter, while the total counter persists for the session and resets only when its own limit triggers a fallback. In [non-interactive mode](</docs/en/headless>) with the `-p` flag, repeated blocks abort the session since there is no user to prompt. Repeated blocks usually mean the classifier is missing context about your infrastructure. Use `/feedback` to report false positives, or have an administrator [configure trusted infrastructure](</docs/en/auto-mode-config>). If you switch permission modes while a classifier check is pending, Claude Code discards a verdict the new mode wouldn’t have requested rather than applying it: you’re prompted for approval instead, or the action is auto-denied in `dontAsk` mode.
+When auto mode can’t approve your session’s actions, what happens depends on the case:
+
+ * **A blocked action** : Claude Code shows a notification and lists the action in `/permissions` under the **Recently denied** tab, where you can press `r` to retry it with a manual approval. When the classifier produces [no verdict on the action](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>), because a safety check separate from auto mode refused the classifier’s own request or its response didn’t parse, Claude Code denies the action without the notification or the **Recently denied** entry.
+ * **Repeated blocks** : if the classifier blocks an action 3 times in a row or 20 times total, auto mode pauses and Claude Code resumes prompting. Approving the prompted action resumes auto mode. These thresholds are not configurable. Any allowed action resets the consecutive counter, while the total counter persists for the session and resets only when its own limit triggers a fallback. Claude Code doesn’t count a denial toward either threshold when [a safety check separate from auto mode refuses the classifier’s own request](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>); the linked entry covers how Claude Code handles those denials.
+ * **Sessions that can’t prompt** : a [non-interactive](</docs/en/headless>) `-p` run without a [`--permission-prompt-tool`](</docs/en/cli-reference#cli-flags>) has no prompt to fall back to. When repeated blocks reach a threshold, the action doesn’t run and Claude keeps working, in the main conversation and in its subagents alike. The same applies when a safety check separate from auto mode refuses the classifier’s request. Claude Code doesn’t stop the run in either case.
+ * **A mode switch during a check** : if you switch permission modes while a classifier check is pending, Claude Code discards a verdict the new mode wouldn’t have requested rather than applying it: you’re prompted for approval instead, or the action is auto-denied in `dontAsk` mode.
+
+Repeated blocks usually mean the classifier is missing context about your infrastructure. Use `/feedback` to report false positives, or have an administrator [configure trusted infrastructure](</docs/en/auto-mode-config>).
How the classifier evaluates actions
@@ -307,7 +314,7 @@
1. Before a subagent starts, the delegated task description is evaluated, so a dangerous-looking task is blocked at spawn time.
2. While the subagent runs, each of its actions goes through the classifier with the same rules as the parent session, and any `permissionMode` in the subagent’s frontmatter is ignored.
- 3. When the subagent finishes, the classifier reviews its full action history; if that return check flags a concern, a security warning is prepended to the subagent’s results.
+ 3. When the subagent finishes, the classifier reviews its full action history; if that return check flags a concern, a security warning is prepended to the subagent’s results. When a separate API safety check refuses the review request itself, Claude Code still returns the subagent’s results, prepended with a warning that the work is unreviewed and should be treated as untrusted.
Step 1 requires Claude Code v2.1.178 or later. Earlier versions applied the classifier at steps 2 and 3, but did not evaluate the task description before the subagent started.
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -157,7 +157,7 @@
Starting August 14, 2026, auto mode becomes the default permission mode for new sessions on Pro, Max, and Team plans. You can switch modes at any time. A default you set yourself stays in place unless you accept the one-time switch prompt, and a default your organization manages is unchanged. For details, see [the announcement](<https://claude.com/blog/auto-mode-default-in-claude-code>) on the blog.
-Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt. The classifier also decides removals targeting the filesystem root or home directory, such as `rm -rf /` and `rm -rf ~`, including when the removal sits inside command or process substitution. Before v2.1.218, the plain forms prompted for approval instead, and the substitution forms prompted in v2.1.208 through v2.1.217. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior while keeping permission prompts, set the [Proactive output style](</docs/en/output-styles>) instead.
+Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt. The classifier also reviews each message Claude sends to another agent with [`SendMessage`](</docs/en/tools-reference>), plain or structured, before Claude Code delivers it, both in auto mode and in plan mode while the classifier reviews commands; the send review requires Claude Code v2.1.222 or later. The classifier also decides removals targeting the filesystem root or home directory, such as `rm -rf /` and `rm -rf ~`, including when the removal sits inside command or process substitution. Before v2.1.218, the plain forms prompted for approval instead, and the substitution forms prompted in v2.1.208 through v2.1.217. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior while keeping permission prompts, set the [Proactive output style](</docs/en/output-styles>) instead.
Auto mode reduces permission prompts but does not guarantee safety. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations.
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -77,12 +77,12 @@
The JetBrains plugin runs Claude Code in the IDE terminal, so switching modes works the same as in the CLI: press `Shift+Tab` to cycle, or pass `--permission-mode` when launching.
-**During a session** : use the mode selector next to the send button. Not every mode appears in the selector:
+**During a session** : in the Code tab, use the mode selector next to the send button. Not every mode appears in the selector:
* **Auto** : appears when your account meets the auto mode requirements
* **Bypass permissions** : requires the **Allow bypass permissions mode** toggle in Desktop settings on Pro and Max plans; on Team and Enterprise plans, organization policy controls it instead
-For desktop-specific details, see [Choose a permission mode](</docs/en/desktop#choose-a-permission-mode>) in the Desktop guide.**As a default** : set `defaultMode` in [settings](</docs/en/settings#settings-files>). The desktop app reads the same settings files as the CLI and applies the mode to new local sessions.A mode you pick in the mode selector is remembered per folder and takes precedence over `defaultMode` for that folder. Plan is the exception: picking it applies to the current session only.This example sets Plan mode as the default for new local sessions:
+The Cowork tab doesn’t use these modes. Cowork has its own permission modes, enabled separately, and the Cowork tab shows no mode selector at all until a mode beyond its default is enabled for your account. See the [Cowork docs](<https://claude.com/docs/cowork/overview>).For desktop-specific details, see [Choose a permission mode](</docs/en/desktop#choose-a-permission-mode>) in the Desktop guide.**As a default** : set `defaultMode` in [settings](</docs/en/settings#settings-files>). The desktop app reads the same settings files as the CLI and applies the mode to new local sessions.A mode you pick in the mode selector is remembered per folder and takes precedence over `defaultMode` for that folder. Plan is the exception: picking it applies to the current session only.This example sets Plan mode as the default for new local sessions:
{
"permissions": {
@@ -154,6 +154,8 @@
Eliminate permission prompts with auto mode
+
+Starting August 14, 2026, auto mode becomes the default permission mode for new sessions on Pro, Max, and Team plans. You can switch modes at any time. A default you set yourself stays in place unless you accept the one-time switch prompt, and a default your organization manages is unchanged. For details, see [the announcement](<https://claude.com/blog/auto-mode-default-in-claude-code>) on the blog.
Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt. The classifier also decides removals targeting the filesystem root or home directory, such as `rm -rf /` and `rm -rf ~`, including when the removal sits inside command or process substitution. Before v2.1.218, the plain forms prompted for approval instead, and the substitution forms prompted in v2.1.208 through v2.1.217. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior while keeping permission prompts, set the [Proactive output style](</docs/en/output-styles>) instead.
@@ -311,7 +313,7 @@
Cost and latency
-The classifier runs on Claude Sonnet 5 by default rather than on your `/model` selection. A classifier model that Anthropic configures server-side takes precedence over that default. When your session’s model is Claude Sonnet 4.6, or when [`availableModels`](</docs/en/model-config#restrict-model-selection>) excludes Sonnet 5, the classifier runs on the session’s model instead, or on an Opus model when the session runs on [Fable 5](</docs/en/model-config#work-with-fable-5>); on providers other than the Anthropic API, that Opus fallback is the provider’s default Opus model.The session’s first auto-mode request validates the Sonnet 5 default: if the request succeeds, Sonnet 5 stays the session’s classifier model, and if it fails because the model isn’t available, the session uses the fallback instead. After that validation settles, the classifier’s model doesn’t change for the session.Classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations.The classifier reuses a sandbox network verdict for a host and port, so repeated connections to the same host don’t each add a check. What the classifier blocks by default describes how long an allow and a deny last.
+The classifier runs on Claude Sonnet 5 by default rather than on your `/model` selection. A classifier model that Anthropic configures server-side takes precedence over that default. When your session’s model is Claude Sonnet 4.6, or when [`availableModels`](</docs/en/model-config#restrict-model-selection>) excludes Sonnet 5, the classifier runs on the session’s model instead, or on an Opus model when the session runs on [Fable 5](</docs/en/model-config#work-with-fable-5>); on providers other than the Anthropic API, that Opus fallback is the provider’s default Opus model.The session’s first auto-mode request validates the Sonnet 5 default: if the request succeeds, Sonnet 5 stays the session’s classifier model, and if it fails because the model isn’t available, the session uses the fallback instead. After that validation settles, the classifier’s model doesn’t change for the session.On Enterprise plans and on accounts that use the Claude API, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations.The classifier reuses a sandbox network verdict for a host and port, so repeated connections to the same host don’t each add a check. What the classifier blocks by default describes how long an allow and a deny last.
##
@@ -329,7 +331,12 @@
Skip all checks with bypassPermissions mode
-`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. Explicit [ask rules](</docs/en/permissions#manage-permissions>) and connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) still force a prompt in this mode. MCP tools marked with [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) also still prompt; this requires Claude Code v2.1.199 or later. Removals targeting the filesystem root or home directory, such as `rm -rf /` and `rm -rf ~`, still prompt as a circuit breaker against model error. The circuit breaker also fires when the command contains command substitution with `$(...)` or backticks, or process substitution with `<(...)`, whether the removal sits inside the substitution, as in `echo "$(rm -rf ~)"`, or elsewhere in the same command. The plain form, typed as its own command, has prompted in this mode since the circuit breaker was introduced; before v2.1.208, commands containing those forms didn’t prompt. In sessions with bypass permissions available, Claude Code also doesn’t enforce plan mode’s blocks. Claude is still instructed to plan without editing, but a file edit or shell command it attempts during planning runs without prompting. Explicit [ask rules](</docs/en/permissions#manage-permissions>) and the removal circuit breaker above still prompt.
+`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. Explicit [ask rules](</docs/en/permissions#manage-permissions>) and connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) still force a prompt in this mode. MCP tools marked with [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) also still prompt; this requires Claude Code v2.1.199 or later. Removals targeting the filesystem root or home directory, such as `rm -rf /` and `rm -rf ~`, still prompt as a circuit breaker against model error. The circuit breaker also fires when the command contains command substitution with `$(...)` or backticks, or process substitution with `<(...)`, whether the removal sits inside the substitution, as in `echo "$(rm -rf ~)"`, or elsewhere in the same command. The plain form, typed as its own command, has prompted in this mode since the circuit breaker was introduced; before v2.1.208, commands containing those forms didn’t prompt. Two [cross-session messaging](</docs/en/cross-session-messaging>) safeguards still apply in this mode, and in plan-mode sessions where bypass permissions are available:
+
+ * The [`isolatePeerMachines`](</docs/en/settings#available-settings>) approval prompt for messages to your sessions beyond this machine still appears.
+ * When no [`crossSessionInbound`](</docs/en/cross-session-messaging#control-inbound-messages>) value applies, Claude Code holds an inbound message from another of your sessions for your approval, and delivers without asking only when the sending session identifies itself as also bypassing permission prompts. If you leave the mode while messages are held, Claude Code re-applies the inbound rules and delivers any held message they now accept.
+
+In sessions with bypass permissions available, Claude Code also doesn’t enforce plan mode’s blocks. Claude is still instructed to plan without editing, but a file edit or shell command it attempts during planning runs without prompting. Explicit [ask rules](</docs/en/permissions#manage-permissions>) and the removal circuit breaker above still prompt.
Only use this mode in isolated environments like containers, VMs, or dev containers without internet access, where Claude Code cannot damage your host system.
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -17,7 +17,7 @@
`dontAsk`| Only pre-approved tools| Locked-down CI and scripts
`bypassPermissions`| Everything| Isolated containers and VMs only
-The mode that reviews every action is named **Manual** in the CLI, in `claude --help`, in the VS Code and JetBrains extensions, and in the desktop app. Its config value is `default`, which is what hooks and SDK integrations use. The CLI accepts `manual` as an alias wherever you type the value, for example `claude --permission-mode manual` or `"defaultMode": "manual"`. The Manual label and the `manual` alias require Claude Code v2.1.200 or later. The desktop app’s label doesn’t depend on your CLI version. Writes to protected paths are never auto-approved except in `bypassPermissions` mode and in planning sessions with bypass permissions available, guarding repository state and Claude’s own configuration against accidental corruption. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. These controls apply in every mode, including `bypassPermissions`:
+The mode that reviews every action is named **Manual** in the CLI, in `claude --help`, in the VS Code and JetBrains extensions, and in the desktop app. Its config value is `default`, which is what hooks and SDK integrations use. The CLI accepts `manual` as an alias wherever you type the value, for example `claude --permission-mode manual` or `"defaultMode": "manual"`. The Manual label and the `manual` alias require Claude Code v2.1.200 or later. The desktop app’s label doesn’t depend on your CLI version. Writes to protected paths are never auto-approved except in `bypassPermissions` mode and in planning sessions with bypass permissions available. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. These controls apply in every mode, including `bypassPermissions`:
* deny rules and explicit ask rules, which apply to every tool but can’t block [`EndConversation`](</docs/en/tools-reference#endconversation-tool-behavior>) while any other tool remains
* the [org `ask` setting on connector tools](</docs/en/mcp#organization-controls-on-connector-tools>)
@@ -43,7 +43,7 @@
* Web and mobile
-**During a session** : press `Shift+Tab` to cycle `default` → `acceptEdits` → `plan`. The status bar shows the active mode as `⏸ plan mode on`, `⏵⏵ accept edits on`, `⏵⏵ auto mode on`, `⏵⏵ don't ask on`, or `⏵⏵ bypass permissions on`. Manual mode, `default` in that cycle, shows a gray `⏸ manual mode on` badge. Before v2.1.203, the status bar showed no badge in Manual mode.Not every mode is in the default cycle:
+**During a session** : press `Shift+Tab` to cycle `default` → `acceptEdits` → `plan`. The status bar shows the active mode as `⏸ plan mode on`, `⏵⏵ accept edits on`, `⏵⏵ auto mode on`, `⏵⏵ don't ask on`, or `⏵⏵ bypass permissions on`. Manual mode, `default` in that cycle, shows a gray `⏸ manual mode on` badge.Not every mode is in the default cycle:
* `auto`: appears when your account meets the auto mode requirements; cycling to it switches modes without a confirmation prompt
* `bypassPermissions`: appears after you start with `--permission-mode bypassPermissions`, `--dangerously-skip-permissions`, `--allow-dangerously-skip-permissions`, or `permissions.defaultMode: "bypassPermissions"` in [settings](</docs/en/settings#permission-settings>); the `--allow-` variant adds the mode to the cycle without activating it
@@ -73,7 +73,7 @@
Auto| `auto`
Bypass permissions| `bypassPermissions`
-Before v2.1.205, the extension labeled `plan` as Plan mode and `auto` as Auto mode.Auto mode appears in the mode indicator when your account meets every requirement listed in the auto mode section. The `claudeCode.initialPermissionMode` setting does not accept `auto`. To start in auto mode by default, set `defaultMode` in your [user settings](</docs/en/settings#settings-files>) instead. Claude Code ignores `defaultMode: "auto"` in project and local settings.Bypass permissions requires the **Allow dangerously skip permissions** toggle in the extension settings before it appears in the mode indicator.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
+Auto mode appears in the mode indicator when your account meets every requirement listed in the auto mode section. The `claudeCode.initialPermissionMode` setting does not accept `auto`. To start in auto mode by default, set `defaultMode` in your [user settings](</docs/en/settings#settings-files>) instead. Claude Code ignores `defaultMode: "auto"` in project and local settings.Bypass permissions requires the **Allow dangerously skip permissions** toggle in the extension settings before it appears in the mode indicator.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
The JetBrains plugin runs Claude Code in the IDE terminal, so switching modes works the same as in the CLI: press `Shift+Tab` to cycle, or pass `--permission-mode` when launching.
@@ -164,7 +164,7 @@
* **Plan** : All plans.
* **Organization** : on Team and Enterprise, auto mode is available by default. Administrators can turn it off for the organization by setting `permissions.disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>).
* **Model** : on the Anthropic API and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Claude Opus 4.6 or later, Sonnet 4.6 or later, or [Fable 5](</docs/en/model-config#work-with-fable-5>). On Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, only Claude Sonnet 5, Opus 4.7 or later, and Fable 5. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
- * **Provider** : available by default on the Anthropic API, Claude Platform on AWS, Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in Claude apps gateway sessions. In v2.1.158 through v2.1.206, auto mode was off on all of these providers except the Anthropic API and Claude Platform on AWS until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`; v2.1.207 removed the requirement.
+ * **Provider** : available by default on 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, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action means a classifier request failed; that failure is usually transient, but on Amazon Bedrock it can repeat until your account can invoke the named model. See the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>) for the causes and what to do. If you set `defaultMode: "auto"` in [settings](</docs/en/settings#available-settings>) and the session starts in `default` mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. Claude Code v2.1.142 and later ignore `auto` from those files so a repository cannot grant itself auto mode. Move it to `~/.claude/settings.json`.
@@ -263,7 +263,7 @@
* In [non-interactive mode](</docs/en/headless>) and Agent SDK sessions there is no turn boundary, so a deny is reused for the rest of the run
* Changing your permission mode or rules drops all cached verdicts
-Run `claude auto-mode defaults` to print the full rule lists as JSON. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure auto mode](</docs/en/auto-mode-config>). Pushing to any branch of the repository you’re working in and creating a pull request that matches your request run without a prompt, with the two exceptions the lists above cover: the classifier judges a push to a deploy-named branch such as `production` or `gh-pages` on its own terms, and still blocks a push whose content carries risk. To require a human checkpoint before these actions while staying in auto mode, add `permissions.ask` rules: see [Common boundaries](</docs/en/auto-mode-config#common-boundaries>).
+Run `claude auto-mode defaults` to print the full rule lists as JSON. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure auto mode](</docs/en/auto-mode-config>). Pushing to any branch of the repository you’re working in and creating a pull request that matches your request run without a prompt, with the two exceptions the lists above cover. To require a human checkpoint before these actions while staying in auto mode, add `permissions.ask` rules: see [Common boundaries](</docs/en/auto-mode-config#common-boundaries>).
###
@@ -329,7 +329,7 @@
Skip all checks with bypassPermissions mode
-`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. Before v2.1.126, protected-path writes still prompted in this mode. Explicit [ask rules](</docs/en/permissions#manage-permissions>) and connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) still force a prompt in this mode. MCP tools marked with [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) also still prompt; this requires Claude Code v2.1.199 or later. Removals targeting the filesystem root or home directory, such as `rm -rf /` and `rm -rf ~`, still prompt as a circuit breaker against model error. The circuit breaker also fires when the command contains command substitution with `$(...)` or backticks, or process substitution with `<(...)`, whether the removal sits inside the substitution, as in `echo "$(rm -rf ~)"`, or elsewhere in the same command. The plain form, typed as its own command, has prompted in this mode since the circuit breaker was introduced; before v2.1.208, commands containing those forms didn’t prompt. In sessions with bypass permissions available, Claude Code also doesn’t enforce plan mode’s blocks. Claude is still instructed to plan without editing, but a file edit or shell command it attempts during planning runs without prompting. Explicit [ask rules](</docs/en/permissions#manage-permissions>) and the removal circuit breaker above still prompt.
+`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. Explicit [ask rules](</docs/en/permissions#manage-permissions>) and connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) still force a prompt in this mode. MCP tools marked with [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) also still prompt; this requires Claude Code v2.1.199 or later. Removals targeting the filesystem root or home directory, such as `rm -rf /` and `rm -rf ~`, still prompt as a circuit breaker against model error. The circuit breaker also fires when the command contains command substitution with `$(...)` or backticks, or process substitution with `<(...)`, whether the removal sits inside the substitution, as in `echo "$(rm -rf ~)"`, or elsewhere in the same command. The plain form, typed as its own command, has prompted in this mode since the circuit breaker was introduced; before v2.1.208, commands containing those forms didn’t prompt. In sessions with bypass permissions available, Claude Code also doesn’t enforce plan mode’s blocks. Claude is still instructed to plan without editing, but a file edit or shell command it attempts during planning runs without prompting. Explicit [ask rules](</docs/en/permissions#manage-permissions>) and the removal circuit breaker above still prompt.
Only use this mode in isolated environments like containers, VMs, or dev containers without internet access, where Claude Code cannot damage your host system.
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -105,7 +105,7 @@
Auto-approve file edits with acceptEdits mode
-`acceptEdits` mode lets Claude create and edit files in your working directory without prompting. The status bar shows `⏵⏵ accept edits on` while this mode is active. In addition to file edits, `acceptEdits` mode auto-approves common filesystem Bash commands: `mkdir`, `touch`, `rm`, `rmdir`, `mv`, `cp`, and `sed`. These commands are also auto-approved when prefixed with safe environment variables such as `LANG=C` or `NO_COLOR=1`, or process wrappers such as `timeout`, `nice`, or `nohup`. Like file edits, auto-approval applies only to paths inside your working directory or `additionalDirectories`. Paths outside that scope, writes to protected paths, and all other Bash commands except the [built-in read-only set](</docs/en/permissions#read-only-commands>) still prompt. When the [PowerShell tool](</docs/en/tools-reference#powershell-tool>) is enabled, `acceptEdits` mode also auto-approves `Set-Content`, `Add-Content`, `Clear-Content`, and `Remove-Item` on in-scope paths, along with their common aliases. The same scope and protected-path rules apply. Use `acceptEdits` when you want to review changes in your editor or via `git diff` after the fact rather than approving each edit inline. Press `Shift+Tab` once from Manual mode to enter it, or start with it directly:
+`acceptEdits` mode lets Claude create and edit files in your working directory without prompting. The status bar shows `⏵⏵ accept edits on` while this mode is active. In addition to file edits, `acceptEdits` mode auto-approves common filesystem Bash commands: `mkdir`, `touch`, `rm`, `rmdir`, `mv`, `cp`, and `sed`. These commands are also auto-approved when prefixed with safe environment variables such as `LANG=C` or `NO_COLOR=1`, or process wrappers such as `timeout`, `nice`, or `nohup`. Like file edits, auto-approval applies only to paths inside your working directory or `additionalDirectories`. Paths outside that scope, writes to protected paths, and all other Bash commands except the [built-in read-only set](</docs/en/permissions#read-only-commands>) still prompt. When the [PowerShell tool](</docs/en/tools-reference#powershell-tool>) is enabled, `acceptEdits` mode also auto-approves `Set-Content`, `Add-Content`, `Clear-Content`, and `Remove-Item` on in-scope paths, along with their common aliases. The same scope and protected-path rules apply. A positional argument that contains a quote character, such as the apostrophe in `Set-Content .\notes.txt "It's done"`, still prompts even on in-scope paths, because Claude Code can’t statically validate an argument whose quoted and unquoted readings differ. Pass the content through a named parameter such as `-Value` to avoid the prompt. Use `acceptEdits` when you want to review changes in your editor or via `git diff` after the fact rather than approving each edit inline. Press `Shift+Tab` once from Manual mode to enter it, or start with it directly:
claude --permission-mode acceptEdits
@@ -131,7 +131,6 @@
* **Yes, and use auto mode** : approve and start in auto mode. When auto mode is unavailable, this option reads **Yes, auto-accept edits**. Sessions started with bypass permissions enabled show **Yes, and bypass permissions** instead.
* **Yes, manually approve edits** : approve and review each edit individually.
- * **No, refine with Ultraplan on Claude Code on the web** : send the plan to [Ultraplan](</docs/en/ultraplan>) for browser-based review.
* **No, keep planning** : stay in plan mode and tell Claude what to change.
Approving a plan exits plan mode and switches the session to the permission mode each approve option describes, so Claude starts editing. To plan again, cycle back to plan mode with `Shift+Tab`, or prefix your next prompt with `/plan`. Press `Ctrl+G` to open the proposed plan in your default text editor and edit it directly before Claude proceeds. When [`showClearContextOnPlanAccept`](</docs/en/settings#available-settings>) is enabled, the list gains a first option that approves the plan and clears the planning context. Accepting a plan also names the session from the plan content automatically, unless you’ve already set a name with `--name` or `/rename`.
@@ -280,7 +279,7 @@
When auto mode falls back
-Each denied action shows a notification and appears in `/permissions` under the Recently denied tab, where you can press `r` to retry it with a manual approval. If the classifier blocks an action 3 times in a row or 20 times total, auto mode pauses and Claude Code resumes prompting. Approving the prompted action resumes auto mode. These thresholds are not configurable. Any allowed action resets the consecutive counter, while the total counter persists for the session and resets only when its own limit triggers a fallback. In [non-interactive mode](</docs/en/headless>) with the `-p` flag, repeated blocks abort the session since there is no user to prompt. Repeated blocks usually mean the classifier is missing context about your infrastructure. Use `/feedback` to report false positives, or have an administrator [configure trusted infrastructure](</docs/en/auto-mode-config>).
+Each denied action shows a notification and appears in `/permissions` under the Recently denied tab, where you can press `r` to retry it with a manual approval. If the classifier blocks an action 3 times in a row or 20 times total, auto mode pauses and Claude Code resumes prompting. Approving the prompted action resumes auto mode. These thresholds are not configurable. Any allowed action resets the consecutive counter, while the total counter persists for the session and resets only when its own limit triggers a fallback. In [non-interactive mode](</docs/en/headless>) with the `-p` flag, repeated blocks abort the session since there is no user to prompt. Repeated blocks usually mean the classifier is missing context about your infrastructure. Use `/feedback` to report false positives, or have an administrator [configure trusted infrastructure](</docs/en/auto-mode-config>). If you switch permission modes while a classifier check is pending, Claude Code discards a verdict the new mode wouldn’t have requested rather than applying it: you’re prompted for approval instead, or the action is auto-denied in `dontAsk` mode.
How the classifier evaluates actions
@@ -396,7 +395,6 @@
* [Permissions](</docs/en/permissions>): allow, ask, and deny rules; managed policies
* [Configure auto mode](</docs/en/auto-mode-config>): tell the classifier which infrastructure your organization trusts
* [Hooks](</docs/en/hooks>): custom permission logic via `PreToolUse` and `PermissionRequest` hooks
- * [Ultraplan](</docs/en/ultraplan>): run plan mode in a Claude Code on the web session with browser-based review
* [Security](</docs/en/security>): safeguards and best practices
* [Sandboxing](</docs/en/sandboxing>): filesystem and network isolation for Bash commands
* [Non-interactive mode](</docs/en/headless>): run Claude Code with the `-p` flag
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -92,7 +92,7 @@
Use the mode dropdown next to the prompt box on [claude.ai/code](<https://claude.ai/code>) or in the mobile app. Permission prompts appear in claude.ai for approval. Which modes appear depends on where the session runs:
- * **Cloud sessions** on [Claude Code on the web](</docs/en/claude-code-on-the-web>): Accept edits, Plan, and Auto. Accept edits corresponds to `default` mode: the cloud environment pre-approves file edits regardless of mode, so the dropdown shows Accept edits instead of Manual. Cloud sessions still honor `defaultMode: "acceptEdits"` from settings. Auto mode appears only when your organization allows it and the selected model supports it. Bypass permissions isn’t available.
+ * **Cloud sessions** on [Claude Code on the web](</docs/en/claude-code-on-the-web>): Accept edits, Plan, and Auto. Accept edits corresponds to `default` mode: cloud sessions pre-approve file edits regardless of mode, so the dropdown shows Accept edits instead of Manual. Cloud sessions still honor `defaultMode: "acceptEdits"` from settings. Auto mode appears only when your organization allows it and the selected model supports it. Bypass permissions isn’t available.
* **[Remote Control](</docs/en/remote-control>) sessions** on your local machine: Manual, Accept edits, and Plan. You can’t select Auto or Bypass permissions from the app. The dropdown shows the mode the local session is in, including a mode set from the terminal, and updates when the mode changes in the app or in the terminal. The one exception is Bypass permissions: the session never reports that mode to claude.ai, so switching into it from the terminal doesn’t change what the dropdown shows. Before v2.1.202, sessions connected with `/remote-control` or `claude --remote-control` didn’t report their mode at all, so claude.ai and the mobile app could show a mode the session wasn’t in. The mismatch affected only the label: Claude Code generated permission prompts from the session’s actual mode, and they still appeared in the app for approval.
For Remote Control, the host must be signed in with your claude.ai account; API keys are not supported. You can also set the starting mode when launching the host:
@@ -163,7 +163,7 @@
Auto mode is available only when your account meets all of these requirements:
* **Plan** : All plans.
- * **Owner** : on Team and Enterprise, an Owner must enable it in [Claude Code admin settings](<https://claude.ai/admin-settings/claude-code>) before users can turn it on. Administrators can also turn auto mode off by setting `permissions.disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>). For the desktop app’s Code tab, `disableAutoMode` is the organization-level control, and the admin settings toggle doesn’t apply.
+ * **Organization** : on Team and Enterprise, auto mode is available by default. Administrators can turn it off for the organization by setting `permissions.disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>).
* **Model** : on the Anthropic API and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Claude Opus 4.6 or later, Sonnet 4.6 or later, or [Fable 5](</docs/en/model-config#work-with-fable-5>). On Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, only Claude Sonnet 5, Opus 4.7 or later, and Fable 5. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
* **Provider** : available by default on the Anthropic API, Claude Platform on AWS, Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in Claude apps gateway sessions. In v2.1.158 through v2.1.206, auto mode was off on all of these providers except the Anthropic API and Claude Platform on AWS until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`; v2.1.207 removed the requirement.
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -12,12 +12,12 @@
---|---|---
`default`| Reads only| Getting started, sensitive work
`acceptEdits`| Reads, file edits, and common filesystem commands (`mkdir`, `touch`, `mv`, `cp`, etc.)| Iterating on code you’re reviewing
-`plan`| Reads only| Exploring a codebase before changing it
+`plan`| Reads, plus classifier-approved commands when auto mode is available| Exploring a codebase before changing it
`auto`| Everything, with background safety checks| Long tasks, reducing prompt fatigue
`dontAsk`| Only pre-approved tools| Locked-down CI and scripts
`bypassPermissions`| Everything| Isolated containers and VMs only
-The mode that reviews every action is named **Manual** in the CLI, in `claude --help`, in the VS Code and JetBrains extensions, and in the desktop app. Its config value is `default`, which is what hooks and SDK integrations use. The CLI accepts `manual` as an alias wherever you type the value, for example `claude --permission-mode manual` or `"defaultMode": "manual"`. The Manual label and the `manual` alias require Claude Code v2.1.200 or later. The desktop app’s label doesn’t depend on your CLI version. In every mode except `bypassPermissions`, writes to protected paths are never auto-approved, guarding repository state and Claude’s own configuration against accidental corruption. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. These controls apply in every mode, including `bypassPermissions`:
+The mode that reviews every action is named **Manual** in the CLI, in `claude --help`, in the VS Code and JetBrains extensions, and in the desktop app. Its config value is `default`, which is what hooks and SDK integrations use. The CLI accepts `manual` as an alias wherever you type the value, for example `claude --permission-mode manual` or `"defaultMode": "manual"`. The Manual label and the `manual` alias require Claude Code v2.1.200 or later. The desktop app’s label doesn’t depend on your CLI version. Writes to protected paths are never auto-approved except in `bypassPermissions` mode and in planning sessions with bypass permissions available, guarding repository state and Claude’s own configuration against accidental corruption. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. These controls apply in every mode, including `bypassPermissions`:
* deny rules and explicit ask rules, which apply to every tool but can’t block [`EndConversation`](</docs/en/tools-reference#endconversation-tool-behavior>) while any other tool remains
* the [org `ask` setting on connector tools](</docs/en/mcp#organization-controls-on-connector-tools>)
@@ -115,7 +115,7 @@
Analyze before you edit with plan mode
-Plan mode tells Claude to research and propose changes without making them. Claude reads files, runs shell commands to explore, and writes a plan, but does not edit your source. Permission prompts apply as they do in Manual mode unless [auto mode](</docs/en/auto-mode-config>) is available and `useAutoModeDuringPlan` is on, which is the default. With auto mode active, the classifier approves read-only commands such as searches and file reads without prompting. Edits stay blocked either way until you approve the plan. Shell commands outside the [built-in read-only set](</docs/en/permissions#read-only-commands>), including file-modifying ones such as `touch` and `rm`, prompt for approval in plan mode, including when auto mode is active during planning and when the sandbox’s [auto-allow mode](</docs/en/sandboxing#sandbox-modes>) is enabled. Enter plan mode by pressing `Shift+Tab` or prefixing a single prompt with `/plan`. You can also start in plan mode from the CLI:
+Plan mode tells Claude to research and propose changes without making them. Claude reads files, runs shell commands to explore, and writes a plan, but does not edit your source. Except in sessions with bypass permissions available, edits stay blocked until you approve the plan. When [auto mode](</docs/en/auto-mode-config>) is available and the `useAutoModeDuringPlan` setting is on, which it is by default, the classifier reviews shell commands during planning instead of prompting you. Approved commands run, and rejected ones are blocked. Otherwise, commands outside the [built-in read-only set](</docs/en/permissions#read-only-commands>) prompt for approval, including when the sandbox’s [auto-allow mode](</docs/en/sandboxing#sandbox-modes>) is enabled. Sessions with bypass permissions available skip both paths; that section covers what still prompts there. In sessions without them, commands outside the read-only set prompted either way in v2.1.212 through v2.1.217. Enter plan mode by pressing `Shift+Tab` or prefixing a single prompt with `/plan`. You can also start in plan mode from the CLI:
claude --permission-mode plan
@@ -156,7 +156,7 @@
Eliminate permission prompts with auto mode
-Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt. Removals targeting the filesystem root or home directory, such as `rm -rf /` and `rm -rf ~`, prompt for approval instead of going to the classifier. This prompt also fires when the command contains command substitution with `$(...)` or backticks, or process substitution with `<(...)`, whether the removal sits inside the substitution, as in `echo "$(rm -rf ~)"`, or elsewhere in the same command. Before v2.1.208, commands containing those forms went to the classifier instead of prompting. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior while keeping permission prompts, set the [Proactive output style](</docs/en/output-styles>) instead.
+Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt. The classifier also decides removals targeting the filesystem root or home directory, such as `rm -rf /` and `rm -rf ~`, including when the removal sits inside command or process substitution. Before v2.1.218, the plain forms prompted for approval instead, and the substitution forms prompted in v2.1.208 through v2.1.217. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior while keeping permission prompts, set the [Proactive output style](</docs/en/output-styles>) instead.
Auto mode reduces permission prompts but does not guarantee safety. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations.
@@ -164,7 +164,7 @@
* **Plan** : All plans.
* **Owner** : on Team and Enterprise, an Owner must enable it in [Claude Code admin settings](<https://claude.ai/admin-settings/claude-code>) before users can turn it on. Administrators can also turn auto mode off by setting `permissions.disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>). For the desktop app’s Code tab, `disableAutoMode` is the organization-level control, and the admin settings toggle doesn’t apply.
- * **Model** : on the Anthropic API and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Claude Opus 4.6 or later, Sonnet 4.6 or later, or [Fable 5](</docs/en/model-config#work-with-fable-5>). On Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, only Claude Sonnet 5, Opus 4.7, Opus 4.8, and Fable 5. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
+ * **Model** : on the Anthropic API and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Claude Opus 4.6 or later, Sonnet 4.6 or later, or [Fable 5](</docs/en/model-config#work-with-fable-5>). On Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, only Claude Sonnet 5, Opus 4.7 or later, and Fable 5. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
* **Provider** : available by default on the Anthropic API, Claude Platform on AWS, Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in Claude apps gateway sessions. In v2.1.158 through v2.1.206, auto mode was off on all of these providers except the Anthropic API and Claude Platform on AWS until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`; v2.1.207 removed the requirement.
If Claude Code reports auto mode as unavailable, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action means a classifier request failed; that failure is usually transient, but on Amazon Bedrock it can repeat until your account can invoke the named model. See the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>) for the causes and what to do. If you set `defaultMode: "auto"` in [settings](</docs/en/settings#available-settings>) and the session starts in `default` mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. Claude Code v2.1.142 and later ignore `auto` from those files so a repository cannot grant itself auto mode. Move it to `~/.claude/settings.json`.
@@ -175,7 +175,7 @@
Auto mode on Bedrock, Agent Platform, or Foundry
-On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode appears in the `Shift+Tab` cycle by default. Appearing in the cycle doesn’t change the mode a session starts in: sessions still start in your [`defaultMode`](</docs/en/settings#available-settings>), which is Manual unless you change it. Only Claude Sonnet 5, Opus 4.7, Opus 4.8, and Fable 5 are supported on these providers. To make auto mode the default starting mode, set `"permissions": {"defaultMode": "auto"}` in user or managed settings. The [`/doctor`](</docs/en/commands#all-commands>) checkup proposes this user-settings default on these providers the same way it does on the Anthropic API. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>). This removes `auto` from the `Shift+Tab` cycle and rejects `--permission-mode auto` at startup. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
+On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode appears in the `Shift+Tab` cycle by default. Appearing in the cycle doesn’t change the mode a session starts in: sessions still start in your [`defaultMode`](</docs/en/settings#available-settings>), which is Manual unless you change it. Only Claude Sonnet 5, Opus 4.7 or later, and Fable 5 are supported on these providers. To make auto mode the default starting mode, set `"permissions": {"defaultMode": "auto"}` in user or managed settings. The [`/doctor`](</docs/en/commands#all-commands>) checkup proposes this user-settings default on these providers the same way it does on the Anthropic API. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>). This removes `auto` from the `Shift+Tab` cycle and rejects `--permission-mode auto` at startup. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
###
@@ -289,7 +289,7 @@
1. Actions matching your [allow, ask, or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately. Writes to protected paths route to the classifier even when an allow rule matches. Connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) and MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>) prompt you directly even when an allow rule matches. Content-scoped ask rules fall back to a permission prompt
2. Read-only actions and file edits in your working directory are auto-approved, except writes to protected paths
3. Everything else goes to the classifier. A connector tool [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) skips the classifier and prompts you directly, so an org-required approval is never auto-approved. As of v2.1.199, an MCP tool marked with [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) also skips the classifier and prompts you directly, so a consent step is never auto-approved on the tool author’s behalf
- 4. If the classifier blocks, Claude receives the reason and tries an alternative
+ 4. If the classifier blocks, Claude receives the reason and tries an alternative. In most sessions the reason is the fixed text `Blocked by classifier` rather than a written explanation, in Claude Code v2.1.208 and later; see [Review denials](</docs/en/auto-mode-config#review-denials>)
On entering auto mode, broad allow rules that grant arbitrary code execution are dropped:
@@ -330,7 +330,7 @@
Skip all checks with bypassPermissions mode
-`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. Before v2.1.126, protected-path writes still prompted in this mode. Explicit [ask rules](</docs/en/permissions#manage-permissions>) and connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) still force a prompt in this mode. MCP tools marked with [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) also still prompt; this requires Claude Code v2.1.199 or later. Removals targeting the filesystem root or home directory, such as `rm -rf /` and `rm -rf ~`, still prompt as a circuit breaker against model error. The circuit breaker also fires when the command contains command substitution with `$(...)` or backticks, or process substitution with `<(...)`, whether the removal sits inside the substitution, as in `echo "$(rm -rf ~)"`, or elsewhere in the same command. The plain form, typed as its own command, has prompted in this mode since the circuit breaker was introduced; before v2.1.208, commands containing those forms didn’t prompt.
+`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. Before v2.1.126, protected-path writes still prompted in this mode. Explicit [ask rules](</docs/en/permissions#manage-permissions>) and connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) still force a prompt in this mode. MCP tools marked with [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) also still prompt; this requires Claude Code v2.1.199 or later. Removals targeting the filesystem root or home directory, such as `rm -rf /` and `rm -rf ~`, still prompt as a circuit breaker against model error. The circuit breaker also fires when the command contains command substitution with `$(...)` or backticks, or process substitution with `<(...)`, whether the removal sits inside the substitution, as in `echo "$(rm -rf ~)"`, or elsewhere in the same command. The plain form, typed as its own command, has prompted in this mode since the circuit breaker was introduced; before v2.1.208, commands containing those forms didn’t prompt. In sessions with bypass permissions available, Claude Code also doesn’t enforce plan mode’s blocks. Claude is still instructed to plan without editing, but a file edit or shell command it attempts during planning runs without prompting. Explicit [ask rules](</docs/en/permissions#manage-permissions>) and the removal circuit breaker above still prompt.
Only use this mode in isolated environments like containers, VMs, or dev containers without internet access, where Claude Code cannot damage your host system.
@@ -352,11 +352,12 @@
Protected paths
-Writes to a small set of paths are never auto-approved, in every mode except `bypassPermissions`. This prevents accidental corruption of repository state and Claude’s own configuration.
+Writes to a small set of paths are never auto-approved, except in `bypassPermissions` mode and in planning sessions with bypass permissions available. This prevents accidental corruption of repository state and Claude’s own configuration.
Mode| Protected-path writes
---|---
-`default`, `acceptEdits`, `plan`| Prompted
+`default`, `acceptEdits`| Prompted
+`plan`| Prompted. In sessions with bypass permissions available, allowed. Otherwise, with auto mode available during planning, routed to the classifier
`auto`| Routed to the classifier
`dontAsk`| Denied
`bypassPermissions`| Allowed
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -167,7 +167,7 @@
* **Model** : on the Anthropic API and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Claude Opus 4.6 or later, Sonnet 4.6 or later, or [Fable 5](</docs/en/model-config#work-with-fable-5>). On Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, only Claude Sonnet 5, Opus 4.7, Opus 4.8, and Fable 5. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
* **Provider** : available by default on the Anthropic API, Claude Platform on AWS, Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in Claude apps gateway sessions. In v2.1.158 through v2.1.206, auto mode was off on all of these providers except the Anthropic API and Claude Platform on AWS until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`; v2.1.207 removed the requirement.
-If Claude Code reports auto mode as unavailable, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action is a transient classifier outage; see the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>). If you set `defaultMode: "auto"` in [settings](</docs/en/settings#available-settings>) and the session starts in `default` mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. Claude Code v2.1.142 and later ignore `auto` from those files so a repository cannot grant itself auto mode. Move it to `~/.claude/settings.json`.
+If Claude Code reports auto mode as unavailable, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action means a classifier request failed; that failure is usually transient, but on Amazon Bedrock it can repeat until your account can invoke the named model. See the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>) for the causes and what to do. If you set `defaultMode: "auto"` in [settings](</docs/en/settings#available-settings>) and the session starts in `default` mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. Claude Code v2.1.142 and later ignore `auto` from those files so a repository cannot grant itself auto mode. Move it to `~/.claude/settings.json`.
###
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -17,7 +17,13 @@
`dontAsk`| Only pre-approved tools| Locked-down CI and scripts
`bypassPermissions`| Everything| Isolated containers and VMs only
-The mode that reviews every action is named **Manual** in the CLI, in `claude --help`, in the VS Code and JetBrains extensions, and in the desktop app. Its config value is `default`, which is what hooks and SDK integrations use. The CLI accepts `manual` as an alias wherever you type the value, for example `claude --permission-mode manual` or `"defaultMode": "manual"`. The Manual label and the `manual` alias require Claude Code v2.1.200 or later. The desktop app’s label doesn’t depend on your CLI version. In every mode except `bypassPermissions`, writes to protected paths are never auto-approved, guarding repository state and Claude’s own configuration against accidental corruption. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. Deny rules, explicit ask rules, the [org `ask` setting on connector tools](</docs/en/mcp#organization-controls-on-connector-tools>), and the [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>) marker apply in every mode, including `bypassPermissions`. Allow rules have no effect in that mode because everything else is already approved.
+The mode that reviews every action is named **Manual** in the CLI, in `claude --help`, in the VS Code and JetBrains extensions, and in the desktop app. Its config value is `default`, which is what hooks and SDK integrations use. The CLI accepts `manual` as an alias wherever you type the value, for example `claude --permission-mode manual` or `"defaultMode": "manual"`. The Manual label and the `manual` alias require Claude Code v2.1.200 or later. The desktop app’s label doesn’t depend on your CLI version. In every mode except `bypassPermissions`, writes to protected paths are never auto-approved, guarding repository state and Claude’s own configuration against accidental corruption. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. These controls apply in every mode, including `bypassPermissions`:
+
+ * deny rules and explicit ask rules, which apply to every tool but can’t block [`EndConversation`](</docs/en/tools-reference#endconversation-tool-behavior>) while any other tool remains
+ * the [org `ask` setting on connector tools](</docs/en/mcp#organization-controls-on-connector-tools>)
+ * the [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>) marker
+
+Allow rules have no effect in `bypassPermissions` because everything else is already approved.
##
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -37,7 +37,7 @@
* Web and mobile
-**During a session** : press `Shift+Tab` to cycle `default` → `acceptEdits` → `plan`. The current mode appears in the status bar. Manual mode, `default` in that cycle, shows a gray `⏸ manual mode on` badge. Before v2.1.203, the status bar showed no badge in Manual mode.Not every mode is in the default cycle:
+**During a session** : press `Shift+Tab` to cycle `default` → `acceptEdits` → `plan`. The status bar shows the active mode as `⏸ plan mode on`, `⏵⏵ accept edits on`, `⏵⏵ auto mode on`, `⏵⏵ don't ask on`, or `⏵⏵ bypass permissions on`. Manual mode, `default` in that cycle, shows a gray `⏸ manual mode on` badge. Before v2.1.203, the status bar showed no badge in Manual mode.Not every mode is in the default cycle:
* `auto`: appears when your account meets the auto mode requirements; cycling to it switches modes without a confirmation prompt
* `bypassPermissions`: appears after you start with `--permission-mode bypassPermissions`, `--dangerously-skip-permissions`, `--allow-dangerously-skip-permissions`, or `permissions.defaultMode: "bypassPermissions"` in [settings](</docs/en/settings#permission-settings>); the `--allow-` variant adds the mode to the cycle without activating it
@@ -89,7 +89,7 @@
* **Cloud sessions** on [Claude Code on the web](</docs/en/claude-code-on-the-web>): Accept edits, Plan, and Auto. Accept edits corresponds to `default` mode: the cloud environment pre-approves file edits regardless of mode, so the dropdown shows Accept edits instead of Manual. Cloud sessions still honor `defaultMode: "acceptEdits"` from settings. Auto mode appears only when your organization allows it and the selected model supports it. Bypass permissions isn’t available.
* **[Remote Control](</docs/en/remote-control>) sessions** on your local machine: Manual, Accept edits, and Plan. You can’t select Auto or Bypass permissions from the app. The dropdown shows the mode the local session is in, including a mode set from the terminal, and updates when the mode changes in the app or in the terminal. The one exception is Bypass permissions: the session never reports that mode to claude.ai, so switching into it from the terminal doesn’t change what the dropdown shows. Before v2.1.202, sessions connected with `/remote-control` or `claude --remote-control` didn’t report their mode at all, so claude.ai and the mobile app could show a mode the session wasn’t in. The mismatch affected only the label: Claude Code generated permission prompts from the session’s actual mode, and they still appeared in the app for approval.
-For Remote Control, you can also set the starting mode when launching the host:
+For Remote Control, the host must be signed in with your claude.ai account; API keys are not supported. You can also set the starting mode when launching the host:
claude remote-control --permission-mode acceptEdits
@@ -109,7 +109,7 @@
Analyze before you edit with plan mode
-Plan mode tells Claude to research and propose changes without making them. Claude reads files, runs shell commands to explore, and writes a plan, but does not edit your source. Permission prompts apply as they do in Manual mode unless [auto mode](</docs/en/auto-mode-config>) is available and `useAutoModeDuringPlan` is on, which is the default. With auto mode active, the classifier approves read-only commands such as searches and file reads without prompting. Edits stay blocked either way until you approve the plan. Enter plan mode by pressing `Shift+Tab` or prefixing a single prompt with `/plan`. You can also start in plan mode from the CLI:
+Plan mode tells Claude to research and propose changes without making them. Claude reads files, runs shell commands to explore, and writes a plan, but does not edit your source. Permission prompts apply as they do in Manual mode unless [auto mode](</docs/en/auto-mode-config>) is available and `useAutoModeDuringPlan` is on, which is the default. With auto mode active, the classifier approves read-only commands such as searches and file reads without prompting. Edits stay blocked either way until you approve the plan. Shell commands outside the [built-in read-only set](</docs/en/permissions#read-only-commands>), including file-modifying ones such as `touch` and `rm`, prompt for approval in plan mode, including when auto mode is active during planning and when the sandbox’s [auto-allow mode](</docs/en/sandboxing#sandbox-modes>) is enabled. Enter plan mode by pressing `Shift+Tab` or prefixing a single prompt with `/plan`. You can also start in plan mode from the CLI:
claude --permission-mode plan
Show diff (114 lines)
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -40,14 +40,14 @@
**During a session** : press `Shift+Tab` to cycle `default` → `acceptEdits` → `plan`. The current mode appears in the status bar. Manual mode, `default` in that cycle, shows a gray `⏸ manual mode on` badge. Before v2.1.203, the status bar showed no badge in Manual mode.Not every mode is in the default cycle:
* `auto`: appears when your account meets the auto mode requirements; cycling to it switches modes without a confirmation prompt
- * `bypassPermissions`: appears after you start with `--permission-mode bypassPermissions`, `--dangerously-skip-permissions`, or `--allow-dangerously-skip-permissions`; the `--allow-` variant adds the mode to the cycle without activating it
+ * `bypassPermissions`: appears after you start with `--permission-mode bypassPermissions`, `--dangerously-skip-permissions`, `--allow-dangerously-skip-permissions`, or `permissions.defaultMode: "bypassPermissions"` in [settings](</docs/en/settings#permission-settings>); the `--allow-` variant adds the mode to the cycle without activating it
* `dontAsk`: never appears in the cycle; set it with `--permission-mode dontAsk`
Enabled optional modes slot in after `plan`, with `bypassPermissions` first and `auto` last. If you have both enabled, you will cycle through `bypassPermissions` on the way to `auto`.**At startup** : pass the mode as a flag.
claude --permission-mode plan
-**As a default** : set `defaultMode` in [settings](</docs/en/settings#settings-files>).
+**As a default** : set `defaultMode` in a [settings file](</docs/en/settings#settings-files>) such as `~/.claude/settings.json`:
{
"permissions": {
@@ -121,15 +121,14 @@
Review and approve a plan
-When the plan is ready, Claude presents it and asks how to proceed. From that prompt you can:
-
- * Approve and start in auto mode
- * Approve and accept edits
- * Approve and review each edit manually
- * Keep planning with feedback
- * Refine with [Ultraplan](</docs/en/ultraplan>) for browser-based review
-
-Approving a plan exits plan mode and switches the session to the permission mode each approve option describes, so Claude starts editing. To plan again, cycle back to plan mode with `Shift+Tab`, or prefix your next prompt with `/plan`. Press `Ctrl+G` to open the proposed plan in your default text editor and edit it directly before Claude proceeds. When [`showClearContextOnPlanAccept`](</docs/en/settings#available-settings>) is enabled, each approve option also offers to clear the planning context first. Accepting a plan also names the session from the plan content automatically, unless you’ve already set a name with `--name` or `/rename`.
+When the plan is ready, Claude presents it and asks how to proceed. From that prompt you can choose:
+
+ * **Yes, and use auto mode** : approve and start in auto mode. When auto mode is unavailable, this option reads **Yes, auto-accept edits**. Sessions started with bypass permissions enabled show **Yes, and bypass permissions** instead.
+ * **Yes, manually approve edits** : approve and review each edit individually.
+ * **No, refine with Ultraplan on Claude Code on the web** : send the plan to [Ultraplan](</docs/en/ultraplan>) for browser-based review.
+ * **No, keep planning** : stay in plan mode and tell Claude what to change.
+
+Approving a plan exits plan mode and switches the session to the permission mode each approve option describes, so Claude starts editing. To plan again, cycle back to plan mode with `Shift+Tab`, or prefix your next prompt with `/plan`. Press `Ctrl+G` to open the proposed plan in your default text editor and edit it directly before Claude proceeds. When [`showClearContextOnPlanAccept`](</docs/en/settings#available-settings>) is enabled, the list gains a first option that approves the plan and clears the planning context. Accepting a plan also names the session from the plan content automatically, unless you’ve already set a name with `--name` or `/rename`.
###
@@ -159,8 +158,8 @@
* **Plan** : All plans.
* **Owner** : on Team and Enterprise, an Owner must enable it in [Claude Code admin settings](<https://claude.ai/admin-settings/claude-code>) before users can turn it on. Administrators can also turn auto mode off by setting `permissions.disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>). For the desktop app’s Code tab, `disableAutoMode` is the organization-level control, and the admin settings toggle doesn’t apply.
- * **Model** : on the Anthropic API, Claude Opus 4.6 or later, or Sonnet 4.6 or later. On Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, only Claude Sonnet 5, Opus 4.7, and Opus 4.8. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
- * **Provider** : available by default on the Anthropic API, Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in Claude apps gateway sessions. In v2.1.158 through v2.1.206, auto mode was off on all of these providers except the Anthropic API until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`; v2.1.207 removed the requirement.
+ * **Model** : on the Anthropic API and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Claude Opus 4.6 or later, Sonnet 4.6 or later, or [Fable 5](</docs/en/model-config#work-with-fable-5>). On Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, only Claude Sonnet 5, Opus 4.7, Opus 4.8, and Fable 5. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
+ * **Provider** : available by default on the Anthropic API, Claude Platform on AWS, Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in Claude apps gateway sessions. In v2.1.158 through v2.1.206, auto mode was off on all of these providers except the Anthropic API and Claude Platform on AWS until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`; v2.1.207 removed the requirement.
If Claude Code reports auto mode as unavailable, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action is a transient classifier outage; see the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>). If you set `defaultMode: "auto"` in [settings](</docs/en/settings#available-settings>) and the session starts in `default` mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. Claude Code v2.1.142 and later ignore `auto` from those files so a repository cannot grant itself auto mode. Move it to `~/.claude/settings.json`.
@@ -170,7 +169,7 @@
Auto mode on Bedrock, Agent Platform, or Foundry
-On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode appears in the `Shift+Tab` cycle by default. Appearing in the cycle doesn’t change the mode a session starts in: sessions still start in your [`defaultMode`](</docs/en/settings#available-settings>), which is Manual unless you change it. Only Claude Sonnet 5, Opus 4.7, and Opus 4.8 are supported on these providers. To make auto mode the default starting mode, set `"permissions": {"defaultMode": "auto"}` in user or managed settings. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>). This removes `auto` from the `Shift+Tab` cycle and rejects `--permission-mode auto` at startup. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
+On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode appears in the `Shift+Tab` cycle by default. Appearing in the cycle doesn’t change the mode a session starts in: sessions still start in your [`defaultMode`](</docs/en/settings#available-settings>), which is Manual unless you change it. Only Claude Sonnet 5, Opus 4.7, Opus 4.8, and Fable 5 are supported on these providers. To make auto mode the default starting mode, set `"permissions": {"defaultMode": "auto"}` in user or managed settings. The [`/doctor`](</docs/en/commands#all-commands>) checkup proposes this user-settings default on these providers the same way it does on the Anthropic API. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>). This removes `auto` from the `Shift+Tab` cycle and rejects `--permission-mode auto` at startup. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
###
@@ -188,7 +187,7 @@
* Modifying shared infrastructure
* Irreversibly destroying files that existed before the session
* Force push
- * Pushing to the repository’s default branch when the push carries sensitive content such as secrets or personal or entrusted data, carries changes concealed or misdescribed relative to what you asked for, carries content ported in or first read from outside the repository, or routes around a pull request, review, or check you asked for. A plain push to the default branch isn’t blocked on its own, and clearing a flagged push requires naming the flagged content or the bypassed review, not only the push. The classifier is one layer: [`permissions.deny` rules](</docs/en/permissions#manage-permissions>) apply in every mode and can block pushes to the default branch outright, and the remote’s own branch protection still applies. Before v2.1.203, any direct push to the default branch was blocked
+ * Committing or pushing a change that would send secrets or sensitive data outside the repository when it runs, or widen what a deploy exposes. This covers a CI workflow or deploy configuration that hands a secret to a destination that doesn’t already receive it, a script or setup step that reads a secret store and sends the data out, and a config change that widens what a deploy publishes, such as a registry, visibility, artifact, or sourcemap setting. The check applies on any branch, applies even when the repository is public, and fires when the change lands, whether or not that landing triggers the pipeline; clearing it requires naming the execution effect, not only the commit or push. Before v2.1.211, this check was scoped to the default branch instead: a push there was blocked when it carried sensitive content, changes concealed or misdescribed relative to what you asked for, content ported in from outside the repository, or routed around a review you asked for, and before v2.1.203 any direct push to the default branch was blocked
* `git reset --hard`, `git checkout -- .`, `git restore .`, `git clean -fd`, `git stash drop`, or `git stash clear`, which the classifier presumes would discard uncommitted changes
* `git commit --amend` when the commit at HEAD was not created in this session
* From v2.1.198, `git commit --amend` when the commit at HEAD has already been pushed. A message-only reword is not blocked: `--amend -m` with nothing newly staged, on a commit that Claude created during this session
@@ -242,8 +241,7 @@
* Installing dependencies declared in your lock files or manifests
* Reading `.env` and sending credentials to their matching API
* Read-only HTTP requests
- * Pushing to the branch you started on or one Claude created
- * Routine pushes to the repository default branch. Before v2.1.203, any direct push to the default branch was blocked
+ * Pushing to any branch of the repository you’re working in, including the default branch. A non-default branch whose name marks it as a deploy or publication target, such as `production` or `gh-pages`, isn’t covered: the classifier judges a push there on its own terms. The push’s content is still checked against the other rules, [`permissions.deny` rules](</docs/en/permissions#manage-permissions>) can still block pushes to specific branches outright in every mode, and the remote’s own branch protection still applies. Before v2.1.211, only pushes to the branch you started on, branches Claude created, and routine pushes to the default branch were allowed by default, and before v2.1.203 any direct push to the default branch was blocked
Claude Code v2.1.195 and later also allow these by default:
@@ -260,7 +258,7 @@
* In [non-interactive mode](</docs/en/headless>) and Agent SDK sessions there is no turn boundary, so a deny is reused for the rest of the run
* Changing your permission mode or rules drops all cached verdicts
-Run `claude auto-mode defaults` to see the full rule lists. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure auto mode](</docs/en/auto-mode-config>). Pushing to your working branch, making a routine push to the repository default branch, and creating a pull request that matches your request all run without a prompt. The classifier blocks a push only when it carries risk, such as a force push or content that routes around a review you set up. To require a human checkpoint before these actions while staying in auto mode, add `permissions.ask` rules: see [Common boundaries](</docs/en/auto-mode-config#common-boundaries>).
+Run `claude auto-mode defaults` to print the full rule lists as JSON. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure auto mode](</docs/en/auto-mode-config>). Pushing to any branch of the repository you’re working in and creating a pull request that matches your request run without a prompt, with the two exceptions the lists above cover: the classifier judges a push to a deploy-named branch such as `production` or `gh-pages` on its own terms, and still blocks a push whose content carries risk. To require a human checkpoint before these actions while staying in auto mode, add `permissions.ask` rules: see [Common boundaries](</docs/en/auto-mode-config#common-boundaries>).
###
@@ -308,7 +306,7 @@
Cost and latency
-The classifier runs on a server-configured model that is independent of your `/model` selection, so switching models does not change classifier availability. Classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations. As of v2.1.198, a sandbox network verdict for a host and port is reused instead of re-classified on every connection, so repeated connections to the same host don’t each add a check. What the classifier blocks by default describes how long an allow and a deny last.
+The classifier runs on Claude Sonnet 5 by default rather than on your `/model` selection. A classifier model that Anthropic configures server-side takes precedence over that default. When your session’s model is Claude Sonnet 4.6, or when [`availableModels`](</docs/en/model-config#restrict-model-selection>) excludes Sonnet 5, the classifier runs on the session’s model instead, or on an Opus model when the session runs on [Fable 5](</docs/en/model-config#work-with-fable-5>); on providers other than the Anthropic API, that Opus fallback is the provider’s default Opus model.The session’s first auto-mode request validates the Sonnet 5 default: if the request succeeds, Sonnet 5 stays the session’s classifier model, and if it fails because the model isn’t available, the session uses the fallback instead. After that validation settles, the classifier’s model doesn’t change for the session.Classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations.The classifier reuses a sandbox network verdict for a host and port, so repeated connections to the same host don’t each add a check. What the classifier blocks by default describes how long an allow and a deny last.
##
@@ -330,11 +328,11 @@
Only use this mode in isolated environments like containers, VMs, or dev containers without internet access, where Claude Code cannot damage your host system.
-You cannot enter `bypassPermissions` from a session that was started without one of the enabling flags; restart with one to enable it:
+You can’t enter `bypassPermissions` from a session that was started without it enabled. Enable it at launch with `permissions.defaultMode: "bypassPermissions"` in [settings](</docs/en/settings#permission-settings>) or with an enabling flag:
claude --permission-mode bypassPermissions
-The `--dangerously-skip-permissions` flag is equivalent. On Linux and macOS, Claude Code refuses to start in this mode when running as root or under `sudo`:
+The `--dangerously-skip-permissions` flag is equivalent. The first time you start an interactive session with this mode enabled, Claude Code shows a warning dialog asking you to accept responsibility for actions taken without permission checks. Claude Code saves your acceptance to user settings, so the dialog appears only once. If you decline, Claude Code exits. In [non-interactive mode](</docs/en/headless>) no dialog is shown, and a [background session](</docs/en/agent-view>) started with `--bg` is refused until you’ve accepted the dialog in an interactive session. On Linux and macOS, Claude Code refuses to start in this mode when running as root or under `sudo`:
--dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -17,7 +17,7 @@
`dontAsk`| Only pre-approved tools| Locked-down CI and scripts
`bypassPermissions`| Everything| Isolated containers and VMs only
-The mode that reviews every action is named **Manual** in the CLI, in `claude --help`, in the VS Code and JetBrains extensions, and in the desktop app. Its config value is `default`, which is what hooks and SDK integrations use. The CLI accepts `manual` as an alias wherever you type the value, for example `claude --permission-mode manual` or `"defaultMode": "manual"`. The Manual label and the `manual` alias require Claude Code v2.1.200 or later. The desktop app’s label doesn’t depend on your CLI version. In every mode except `bypassPermissions`, writes to protected paths are never auto-approved, guarding repository state and Claude’s own configuration against accidental corruption. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. Deny rules and explicit ask rules apply in every mode, including `bypassPermissions`. Allow rules have no effect in that mode because everything else is already approved.
+The mode that reviews every action is named **Manual** in the CLI, in `claude --help`, in the VS Code and JetBrains extensions, and in the desktop app. Its config value is `default`, which is what hooks and SDK integrations use. The CLI accepts `manual` as an alias wherever you type the value, for example `claude --permission-mode manual` or `"defaultMode": "manual"`. The Manual label and the `manual` alias require Claude Code v2.1.200 or later. The desktop app’s label doesn’t depend on your CLI version. In every mode except `bypassPermissions`, writes to protected paths are never auto-approved, guarding repository state and Claude’s own configuration against accidental corruption. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. Deny rules, explicit ask rules, the [org `ask` setting on connector tools](</docs/en/mcp#organization-controls-on-connector-tools>), and the [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>) marker apply in every mode, including `bypassPermissions`. Allow rules have no effect in that mode because everything else is already approved.
##
@@ -99,7 +99,7 @@
Auto-approve file edits with acceptEdits mode
-`acceptEdits` mode lets Claude create and edit files in your working directory without prompting. The status bar shows `⏵⏵ accept edits on` while this mode is active. In addition to file edits, `acceptEdits` mode auto-approves common filesystem Bash commands: `mkdir`, `touch`, `rm`, `rmdir`, `mv`, `cp`, and `sed`. These commands are also auto-approved when prefixed with safe environment variables such as `LANG=C` or `NO_COLOR=1`, or process wrappers such as `timeout`, `nice`, or `nohup`. Like file edits, auto-approval applies only to paths inside your working directory or `additionalDirectories`. Paths outside that scope, writes to protected paths, and all other Bash commands still prompt. When the [PowerShell tool](</docs/en/tools-reference#powershell-tool>) is enabled, `acceptEdits` mode also auto-approves `Set-Content`, `Add-Content`, `Clear-Content`, and `Remove-Item` on in-scope paths, along with their common aliases. The same scope and protected-path rules apply. Use `acceptEdits` when you want to review changes in your editor or via `git diff` after the fact rather than approving each edit inline. Press `Shift+Tab` once from Manual mode to enter it, or start with it directly:
+`acceptEdits` mode lets Claude create and edit files in your working directory without prompting. The status bar shows `⏵⏵ accept edits on` while this mode is active. In addition to file edits, `acceptEdits` mode auto-approves common filesystem Bash commands: `mkdir`, `touch`, `rm`, `rmdir`, `mv`, `cp`, and `sed`. These commands are also auto-approved when prefixed with safe environment variables such as `LANG=C` or `NO_COLOR=1`, or process wrappers such as `timeout`, `nice`, or `nohup`. Like file edits, auto-approval applies only to paths inside your working directory or `additionalDirectories`. Paths outside that scope, writes to protected paths, and all other Bash commands except the [built-in read-only set](</docs/en/permissions#read-only-commands>) still prompt. When the [PowerShell tool](</docs/en/tools-reference#powershell-tool>) is enabled, `acceptEdits` mode also auto-approves `Set-Content`, `Add-Content`, `Clear-Content`, and `Remove-Item` on in-scope paths, along with their common aliases. The same scope and protected-path rules apply. Use `acceptEdits` when you want to review changes in your editor or via `git diff` after the fact rather than approving each edit inline. Press `Shift+Tab` once from Manual mode to enter it, or start with it directly:
claude --permission-mode acceptEdits
@@ -282,9 +282,9 @@
Each action goes through a fixed decision order. The first matching step wins:
- 1. Actions matching your [allow, ask, or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately, except writes to protected paths, which route to the classifier even when an allow rule matches. Content-scoped ask rules fall back to a permission prompt
+ 1. Actions matching your [allow, ask, or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately. Writes to protected paths route to the classifier even when an allow rule matches. Connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) and MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>) prompt you directly even when an allow rule matches. Content-scoped ask rules fall back to a permission prompt
2. Read-only actions and file edits in your working directory are auto-approved, except writes to protected paths
- 3. Everything else goes to the classifier. As of v2.1.199, an MCP tool marked with [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) skips the classifier and prompts you directly, so a consent step is never auto-approved on the tool author’s behalf
+ 3. Everything else goes to the classifier. A connector tool [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) skips the classifier and prompts you directly, so an org-required approval is never auto-approved. As of v2.1.199, an MCP tool marked with [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) also skips the classifier and prompts you directly, so a consent step is never auto-approved on the tool author’s behalf
4. If the classifier blocks, Claude receives the reason and tries an alternative
On entering auto mode, broad allow rules that grant arbitrary code execution are dropped:
@@ -316,7 +316,7 @@
Allow only pre-approved tools with dontAsk mode
-`dontAsk` mode auto-denies every tool call that would otherwise prompt. The status bar shows `⏵⏵ don't ask on` while this mode is active. Only actions matching your `permissions.allow` rules and [read-only Bash commands](</docs/en/permissions#read-only-commands>) can execute; explicit [`ask` rules](</docs/en/permissions#manage-permissions>) are denied rather than prompting. As of v2.1.199, an MCP tool marked with [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) is also denied in this mode even when an allow rule matches it, because its approval card needs an answer this mode never collects. This makes the mode fully non-interactive for CI pipelines or restricted environments where you pre-define exactly what Claude may do. Cloud sessions on [Claude Code on the web](</docs/en/claude-code-on-the-web>) ignore `defaultMode: "dontAsk"`; see bypassPermissions for details. Set it at startup with the flag:
+If you set `dontAsk` mode, Claude Code auto-denies every tool call that would otherwise prompt you. Claude runs only actions matching your `permissions.allow` rules, [read-only Bash commands](</docs/en/permissions#read-only-commands>), and calls approved by a [PreToolUse hook](</docs/en/permissions#extend-permissions-with-hooks>). Use this mode for CI pipelines or restricted environments where you pre-define exactly what Claude may do; the session never waits for input. The status bar shows `⏵⏵ don't ask on` while this mode is active. Claude Code denies calls matching your explicit [`ask` rules](</docs/en/permissions#manage-permissions>) rather than prompting. It also denies the built-in `AskUserQuestion` tool and connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>), even if your allow rules match them. It denies MCP tools marked [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) the same way, because their approval card needs an answer this mode never collects; this requires Claude Code v2.1.199 or later. Cloud sessions on [Claude Code on the web](</docs/en/claude-code-on-the-web>) ignore `defaultMode: "dontAsk"`; see bypassPermissions for details. Set it at startup with the flag:
claude --permission-mode dontAsk
@@ -326,7 +326,7 @@
Skip all checks with bypassPermissions mode
-`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. Before v2.1.126, protected-path writes still prompted in this mode. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt in this mode. MCP tools marked with [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) also still prompt; this requires Claude Code v2.1.199 or later. Removals targeting the filesystem root or home directory, such as `rm -rf /` and `rm -rf ~`, still prompt as a circuit breaker against model error. The circuit breaker also fires when the command contains command substitution with `$(...)` or backticks, or process substitution with `<(...)`, whether the removal sits inside the substitution, as in `echo "$(rm -rf ~)"`, or elsewhere in the same command. The plain form, typed as its own command, has prompted in this mode since the circuit breaker was introduced; before v2.1.208, commands containing those forms didn’t prompt.
+`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. Before v2.1.126, protected-path writes still prompted in this mode. Explicit [ask rules](</docs/en/permissions#manage-permissions>) and connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>) still force a prompt in this mode. MCP tools marked with [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) also still prompt; this requires Claude Code v2.1.199 or later. Removals targeting the filesystem root or home directory, such as `rm -rf /` and `rm -rf ~`, still prompt as a circuit breaker against model error. The circuit breaker also fires when the command contains command substitution with `$(...)` or backticks, or process substitution with `<(...)`, whether the removal sits inside the substitution, as in `echo "$(rm -rf ~)"`, or elsewhere in the same command. The plain form, typed as its own command, has prompted in this mode since the circuit breaker was introduced; before v2.1.208, commands containing those forms didn’t prompt.
Only use this mode in isolated environments like containers, VMs, or dev containers without internet access, where Claude Code cannot damage your host system.
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -151,7 +151,7 @@
Eliminate permission prompts with auto mode
-Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior while keeping permission prompts, set the [Proactive output style](</docs/en/output-styles>) instead.
+Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt. Removals targeting the filesystem root or home directory, such as `rm -rf /` and `rm -rf ~`, prompt for approval instead of going to the classifier. This prompt also fires when the command contains command substitution with `$(...)` or backticks, or process substitution with `<(...)`, whether the removal sits inside the substitution, as in `echo "$(rm -rf ~)"`, or elsewhere in the same command. Before v2.1.208, commands containing those forms went to the classifier instead of prompting. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior while keeping permission prompts, set the [Proactive output style](</docs/en/output-styles>) instead.
Auto mode reduces permission prompts but does not guarantee safety. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations.
@@ -326,7 +326,11 @@
Skip all checks with bypassPermissions mode
-`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately. As of v2.1.126 this includes writes to protected paths, which earlier versions still prompted for. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt in this mode, and removals targeting the filesystem root or home directory, such as `rm -rf /` and `rm -rf ~`, still prompt as a circuit breaker against model error. As of v2.1.199, MCP tools marked with [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) also still prompt. Only use this mode in isolated environments like containers, VMs, or dev containers without internet access, where Claude Code cannot damage your host system. You cannot enter `bypassPermissions` from a session that was started without one of the enabling flags; restart with one to enable it:
+`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. Before v2.1.126, protected-path writes still prompted in this mode. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt in this mode. MCP tools marked with [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) also still prompt; this requires Claude Code v2.1.199 or later. Removals targeting the filesystem root or home directory, such as `rm -rf /` and `rm -rf ~`, still prompt as a circuit breaker against model error. The circuit breaker also fires when the command contains command substitution with `$(...)` or backticks, or process substitution with `<(...)`, whether the removal sits inside the substitution, as in `echo "$(rm -rf ~)"`, or elsewhere in the same command. The plain form, typed as its own command, has prompted in this mode since the circuit breaker was introduced; before v2.1.208, commands containing those forms didn’t prompt.
+
+Only use this mode in isolated environments like containers, VMs, or dev containers without internet access, where Claude Code cannot damage your host system.
+
+You cannot enter `bypassPermissions` from a session that was started without one of the enabling flags; restart with one to enable it:
claude --permission-mode bypassPermissions
Show diff (116 lines)
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -10,14 +10,14 @@
Mode| What runs without asking| Best for
---|---|---
-`default`| Reads only. Labeled **Manual** in the CLI and IDE extensions| Getting started, sensitive work
+`default`| Reads only| Getting started, sensitive work
`acceptEdits`| Reads, file edits, and common filesystem commands (`mkdir`, `touch`, `mv`, `cp`, etc.)| Iterating on code you’re reviewing
`plan`| Reads only| Exploring a codebase before changing it
`auto`| Everything, with background safety checks| Long tasks, reducing prompt fatigue
`dontAsk`| Only pre-approved tools| Locked-down CI and scripts
`bypassPermissions`| Everything| Isolated containers and VMs only
-The mode that reviews every action is named **Manual** in the CLI, in `claude --help`, and in the VS Code and JetBrains extensions. Its config value is `default`, which is what hooks and SDK integrations use. The CLI accepts `manual` as an alias wherever you type the value, for example `claude --permission-mode manual` or `"defaultMode": "manual"`. The Manual label and the `manual` alias require Claude Code v2.1.200 or later. In every mode except `bypassPermissions`, writes to protected paths are never auto-approved, guarding repository state and Claude’s own configuration against accidental corruption. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. Deny rules and explicit ask rules apply in every mode, including `bypassPermissions`. Allow rules have no effect in that mode because everything else is already approved.
+The mode that reviews every action is named **Manual** in the CLI, in `claude --help`, in the VS Code and JetBrains extensions, and in the desktop app. Its config value is `default`, which is what hooks and SDK integrations use. The CLI accepts `manual` as an alias wherever you type the value, for example `claude --permission-mode manual` or `"defaultMode": "manual"`. The Manual label and the `manual` alias require Claude Code v2.1.200 or later. The desktop app’s label doesn’t depend on your CLI version. In every mode except `bypassPermissions`, writes to protected paths are never auto-approved, guarding repository state and Claude’s own configuration against accidental corruption. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. Deny rules and explicit ask rules apply in every mode, including `bypassPermissions`. Allow rules have no effect in that mode because everything else is already approved.
##
@@ -71,7 +71,18 @@
The JetBrains plugin runs Claude Code in the IDE terminal, so switching modes works the same as in the CLI: press `Shift+Tab` to cycle, or pass `--permission-mode` when launching.
-Use the mode selector next to the send button. Auto and Bypass permissions appear only after you enable them in Desktop settings. See the [Desktop guide](</docs/en/desktop#choose-a-permission-mode>).
+**During a session** : use the mode selector next to the send button. Not every mode appears in the selector:
+
+ * **Auto** : appears when your account meets the auto mode requirements
+ * **Bypass permissions** : requires the **Allow bypass permissions mode** toggle in Desktop settings on Pro and Max plans; on Team and Enterprise plans, organization policy controls it instead
+
+For desktop-specific details, see [Choose a permission mode](</docs/en/desktop#choose-a-permission-mode>) in the Desktop guide.**As a default** : set `defaultMode` in [settings](</docs/en/settings#settings-files>). The desktop app reads the same settings files as the CLI and applies the mode to new local sessions.A mode you pick in the mode selector is remembered per folder and takes precedence over `defaultMode` for that folder. Plan is the exception: picking it applies to the current session only.This example sets Plan mode as the default for new local sessions:
+
+ {
+ "permissions": {
+ "defaultMode": "plan"
+ }
+ }
Use the mode dropdown next to the prompt box on [claude.ai/code](<https://claude.ai/code>) or in the mobile app. Permission prompts appear in claude.ai for approval. Which modes appear depends on where the session runs:
@@ -98,7 +109,7 @@
Analyze before you edit with plan mode
-Plan mode tells Claude to research and propose changes without making them. Claude reads files, runs shell commands to explore, and writes a plan, but does not edit your source. Permission prompts still apply as they do in Manual mode. Enter plan mode by pressing `Shift+Tab` or prefixing a single prompt with `/plan`. You can also start in plan mode from the CLI:
+Plan mode tells Claude to research and propose changes without making them. Claude reads files, runs shell commands to explore, and writes a plan, but does not edit your source. Permission prompts apply as they do in Manual mode unless [auto mode](</docs/en/auto-mode-config>) is available and `useAutoModeDuringPlan` is on, which is the default. With auto mode active, the classifier approves read-only commands such as searches and file reads without prompting. Edits stay blocked either way until you approve the plan. Enter plan mode by pressing `Shift+Tab` or prefixing a single prompt with `/plan`. You can also start in plan mode from the CLI:
claude --permission-mode plan
@@ -140,8 +151,6 @@
Eliminate permission prompts with auto mode
-Auto mode requires Claude Code v2.1.83 or later.
-
Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior while keeping permission prompts, set the [Proactive output style](</docs/en/output-styles>) instead.
Auto mode reduces permission prompts but does not guarantee safety. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations.
@@ -149,9 +158,9 @@
Auto mode is available only when your account meets all of these requirements:
* **Plan** : All plans.
- * **Owner** : on Team and Enterprise, an Owner must enable it in [Claude Code admin settings](<https://claude.ai/admin-settings/claude-code>) before users can turn it on. Administrators can also lock it off by setting `permissions.disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>).
+ * **Owner** : on Team and Enterprise, an Owner must enable it in [Claude Code admin settings](<https://claude.ai/admin-settings/claude-code>) before users can turn it on. Administrators can also turn auto mode off by setting `permissions.disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>). For the desktop app’s Code tab, `disableAutoMode` is the organization-level control, and the admin settings toggle doesn’t apply.
* **Model** : on the Anthropic API, Claude Opus 4.6 or later, or Sonnet 4.6 or later. On Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, only Claude Sonnet 5, Opus 4.7, and Opus 4.8. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
- * **Provider** : available by default on the Anthropic API. On Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in Claude apps gateway sessions, auto mode is off until you set `CLAUDE_CODE_ENABLE_AUTO_MODE`.
+ * **Provider** : available by default on the Anthropic API, Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in Claude apps gateway sessions. In v2.1.158 through v2.1.206, auto mode was off on all of these providers except the Anthropic API until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`; v2.1.207 removed the requirement.
If Claude Code reports auto mode as unavailable, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action is a transient classifier outage; see the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>). If you set `defaultMode: "auto"` in [settings](</docs/en/settings#available-settings>) and the session starts in `default` mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. Claude Code v2.1.142 and later ignore `auto` from those files so a repository cannot grant itself auto mode. Move it to `~/.claude/settings.json`.
@@ -159,17 +168,9 @@
-Enable auto mode on Bedrock, Agent Platform, or Foundry
-
-On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode does not appear in the `Shift+Tab` cycle until `CLAUDE_CODE_ENABLE_AUTO_MODE` is set to `1`. The variable works in Claude Code v2.1.158 and later. Only Claude Sonnet 5, Opus 4.7, and Opus 4.8 are supported on these providers. To enable it for one developer, add the variable to the `env` block in `~/.claude/settings.json`:
-
- {
- "env": {
- "CLAUDE_CODE_ENABLE_AUTO_MODE": "1"
- }
- }
-
-To enable it for your organization, add the same `env` block to [managed settings](</docs/en/settings#settings-files>). Once the variable is set, auto mode appears in the `Shift+Tab` cycle for every session. To make it the default starting mode, also set `"permissions": {"defaultMode": "auto"}` in user or managed settings. On these providers, Claude Code ignores `defaultMode: "auto"` unless `CLAUDE_CODE_ENABLE_AUTO_MODE` is also set. To prevent developers from enabling auto mode, set `disableAutoMode` to `"disable"` in managed settings. This overrides the enable variable. If you connect through an [LLM gateway](</docs/en/llm-gateway>) configured with `ANTHROPIC_BASE_URL`, auto mode may already be reachable without the enable variable, because the gateway routes requests through the Anthropic API. This does not apply to a signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) session, which is its own provider class and requires the enable variable. The `disableAutoMode` setting applies the same way in either configuration.
+Auto mode on Bedrock, Agent Platform, or Foundry
+
+On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode appears in the `Shift+Tab` cycle by default. Appearing in the cycle doesn’t change the mode a session starts in: sessions still start in your [`defaultMode`](</docs/en/settings#available-settings>), which is Manual unless you change it. Only Claude Sonnet 5, Opus 4.7, and Opus 4.8 are supported on these providers. To make auto mode the default starting mode, set `"permissions": {"defaultMode": "auto"}` in user or managed settings. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>). This removes `auto` from the `Shift+Tab` cycle and rejects `--permission-mode auto` at startup. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
###
@@ -242,6 +243,7 @@
* Reading `.env` and sending credentials to their matching API
* Read-only HTTP requests
* Pushing to the branch you started on or one Claude created
+ * Routine pushes to the repository default branch. Before v2.1.203, any direct push to the default branch was blocked
Claude Code v2.1.195 and later also allow these by default:
@@ -258,7 +260,7 @@
* In [non-interactive mode](</docs/en/headless>) and Agent SDK sessions there is no turn boundary, so a deny is reused for the rest of the run
* Changing your permission mode or rules drops all cached verdicts
-Run `claude auto-mode defaults` to see the full rule lists. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure auto mode](</docs/en/auto-mode-config>).
+Run `claude auto-mode defaults` to see the full rule lists. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure auto mode](</docs/en/auto-mode-config>). Pushing to your working branch, making a routine push to the repository default branch, and creating a pull request that matches your request all run without a prompt. The classifier blocks a push only when it carries risk, such as a force push or content that routes around a review you set up. To require a human checkpoint before these actions while staying in auto mode, add `permissions.ask` rules: see [Common boundaries](</docs/en/auto-mode-config#common-boundaries>).
###
@@ -280,7 +282,7 @@
Each action goes through a fixed decision order. The first matching step wins:
- 1. Actions matching your [allow or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately, except writes to protected paths, which route to the classifier even when an allow rule matches
+ 1. Actions matching your [allow, ask, or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately, except writes to protected paths, which route to the classifier even when an allow rule matches. Content-scoped ask rules fall back to a permission prompt
2. Read-only actions and file edits in your working directory are auto-approved, except writes to protected paths
3. Everything else goes to the classifier. As of v2.1.199, an MCP tool marked with [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) skips the classifier and prompts you directly, so a consent step is never auto-approved on the tool author’s behalf
4. If the classifier blocks, Claude receives the reason and tries an alternative
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -144,7 +144,7 @@
Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior while keeping permission prompts, set the [Proactive output style](</docs/en/output-styles>) instead.
-Auto mode is a research preview. It reduces permission prompts but does not guarantee safety. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations.
+Auto mode reduces permission prompts but does not guarantee safety. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations.
Auto mode is available only when your account meets all of these requirements:
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -63,11 +63,11 @@
---|---
Manual| `default`
Edit automatically| `acceptEdits`
-Plan mode| `plan`
-Auto mode| `auto`
+Plan| `plan`
+Auto| `auto`
Bypass permissions| `bypassPermissions`
-Auto mode appears in the mode indicator when your account meets every requirement listed in the auto mode section. The `claudeCode.initialPermissionMode` setting does not accept `auto`. To start in auto mode by default, set `defaultMode` in your [user settings](</docs/en/settings#settings-files>) instead. Claude Code ignores `defaultMode: "auto"` in project and local settings.Bypass permissions requires the **Allow dangerously skip permissions** toggle in the extension settings before it appears in the mode indicator.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
+Before v2.1.205, the extension labeled `plan` as Plan mode and `auto` as Auto mode.Auto mode appears in the mode indicator when your account meets every requirement listed in the auto mode section. The `claudeCode.initialPermissionMode` setting does not accept `auto`. To start in auto mode by default, set `defaultMode` in your [user settings](</docs/en/settings#settings-files>) instead. Claude Code ignores `defaultMode: "auto"` in project and local settings.Bypass permissions requires the **Allow dangerously skip permissions** toggle in the extension settings before it appears in the mode indicator.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
The JetBrains plugin runs Claude Code in the IDE terminal, so switching modes works the same as in the CLI: press `Shift+Tab` to cycle, or pass `--permission-mode` when launching.
@@ -75,8 +75,8 @@
Use the mode dropdown next to the prompt box on [claude.ai/code](<https://claude.ai/code>) or in the mobile app. Permission prompts appear in claude.ai for approval. Which modes appear depends on where the session runs:
- * **Cloud sessions** on [Claude Code on the web](</docs/en/claude-code-on-the-web>): Accept edits, Plan mode, and Auto mode. Accept edits corresponds to `default` mode: the cloud environment pre-approves file edits regardless of mode, so the dropdown shows Accept edits instead of Ask permissions. `defaultMode: "acceptEdits"` from settings is still honored. Auto mode appears only when your organization allows it and the selected model supports it. Bypass permissions is not available.
- * **[Remote Control](</docs/en/remote-control>) sessions** on your local machine: Ask permissions, Auto accept edits, and Plan mode. You can’t select Auto or Bypass permissions from the app. The dropdown shows the mode the local session is in, including a mode set from the terminal, and updates when the mode changes in the app or in the terminal. The one exception is Bypass permissions: the session never reports that mode to claude.ai, so switching into it from the terminal doesn’t change what the dropdown shows. Before v2.1.202, sessions connected with `/remote-control` or `claude --remote-control` didn’t report their mode at all, so claude.ai and the mobile app could show a mode the session wasn’t in. The mismatch affected only the label: permission prompts were generated from the session’s actual mode and still appeared in the app for approval.
+ * **Cloud sessions** on [Claude Code on the web](</docs/en/claude-code-on-the-web>): Accept edits, Plan, and Auto. Accept edits corresponds to `default` mode: the cloud environment pre-approves file edits regardless of mode, so the dropdown shows Accept edits instead of Manual. Cloud sessions still honor `defaultMode: "acceptEdits"` from settings. Auto mode appears only when your organization allows it and the selected model supports it. Bypass permissions isn’t available.
+ * **[Remote Control](</docs/en/remote-control>) sessions** on your local machine: Manual, Accept edits, and Plan. You can’t select Auto or Bypass permissions from the app. The dropdown shows the mode the local session is in, including a mode set from the terminal, and updates when the mode changes in the app or in the terminal. The one exception is Bypass permissions: the session never reports that mode to claude.ai, so switching into it from the terminal doesn’t change what the dropdown shows. Before v2.1.202, sessions connected with `/remote-control` or `claude --remote-control` didn’t report their mode at all, so claude.ai and the mobile app could show a mode the session wasn’t in. The mismatch affected only the label: Claude Code generated permission prompts from the session’s actual mode, and they still appeared in the app for approval.
For Remote Control, you can also set the starting mode when launching the host:
@@ -230,6 +230,11 @@
* Content from a sensitive local store, or from a file whose name, path, or type marks it as sensitive, entering a commit, a push, PR or issue text, a gist or paste, or a package publish, unless you named both the source and the destination. Session transcripts and conversation logs, credential and configuration dot-folders such as SSH keys, cloud credentials, browser profiles, and shell history, and user-data exports all count, and the repository being private doesn’t clear it
+Claude Code v2.1.205 and later also block these by default:
+
+ * Writing to Claude Code session transcripts, the `.jsonl` history files under `~/.claude/projects/` or your configured config directory, whether directly or through a shell command. The rule also covers the metadata lines Claude Code appends to each transcript entry for its own checks. A transcript is session state that Claude Code writes, not a working file, and a tampered entry reaches every later check once you resume the session, so auto mode blocks these writes as defense in depth. Reading a transcript isn’t blocked
+ * A recursive forced delete such as `rm -rf "$VAR"` or `Remove-Item -Recurse -Force $dir` whose target is a shell variable, or a glob rooted at one, that isn’t assigned anywhere in the conversation the classifier sees. The value came only from earlier command output, which the classifier never receives, so the classifier can’t verify the deletion target against the other deletion rules. The classifier reads the conversation rather than command output by design, so it blocks the call instead of guessing at the target. The block clears when you name the exact path being deleted, or when Claude re-runs the delete with the resolved literal path written into the command. Deletes whose target the classifier can resolve aren’t affected
+
**Allowed by default** :
* Local file operations in your working directory
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -37,7 +37,7 @@
* Web and mobile
-**During a session** : press `Shift+Tab` to cycle `default` → `acceptEdits` → `plan`. The current mode appears in the status bar. Not every mode is in the default cycle:
+**During a session** : press `Shift+Tab` to cycle `default` → `acceptEdits` → `plan`. The current mode appears in the status bar. Manual mode, `default` in that cycle, shows a gray `⏸ manual mode on` badge. Before v2.1.203, the status bar showed no badge in Manual mode.Not every mode is in the default cycle:
* `auto`: appears when your account meets the auto mode requirements; cycling to it switches modes without a confirmation prompt
* `bypassPermissions`: appears after you start with `--permission-mode bypassPermissions`, `--dangerously-skip-permissions`, or `--allow-dangerously-skip-permissions`; the `--allow-` variant adds the mode to the cycle without activating it
@@ -186,7 +186,8 @@
* Granting IAM or repo permissions
* Modifying shared infrastructure
* Irreversibly destroying files that existed before the session
- * Force push, or pushing directly to `main`
+ * Force push
+ * Pushing to the repository’s default branch when the push carries sensitive content such as secrets or personal or entrusted data, carries changes concealed or misdescribed relative to what you asked for, carries content ported in or first read from outside the repository, or routes around a pull request, review, or check you asked for. A plain push to the default branch isn’t blocked on its own, and clearing a flagged push requires naming the flagged content or the bypassed review, not only the push. The classifier is one layer: [`permissions.deny` rules](</docs/en/permissions#manage-permissions>) apply in every mode and can block pushes to the default branch outright, and the remote’s own branch protection still applies. Before v2.1.203, any direct push to the default branch was blocked
* `git reset --hard`, `git checkout -- .`, `git restore .`, `git clean -fd`, `git stash drop`, or `git stash clear`, which the classifier presumes would discard uncommitted changes
* `git commit --amend` when the commit at HEAD was not created in this session
* From v2.1.198, `git commit --amend` when the commit at HEAD has already been pushed. A message-only reword is not blocked: `--amend -m` with nothing newly staged, on a commit that Claude created during this session
@@ -213,7 +214,7 @@
Claude Code v2.1.198 and later also block these by default:
* Deleting files in `/tmp`, `$TMPDIR`, or another shared scratch or cache directory by wildcard, glob, or age filter rather than by a specific named path
- * Including sensitive details in content sent, uploaded, published, or written to other people or shared systems, when your own message didn’t authorize those details for that recipient. PR and issue bodies, commit messages, and comments count as this kind of outbound content when the repository is outside the trust boundary or public, including your organization’s own public repositories; internal file paths, code names, live API response data such as emails or account identifiers, and infrastructure identifiers count as sensitive details. The PR, issue, and commit-message scoping requires Claude Code v2.1.200 or later
+ * Including sensitive details in content sent, uploaded, published, or written to other people or shared systems, when your own message didn’t authorize those details for that recipient. PR and issue bodies, commit messages, and comments count as this kind of outbound content when the repository is outside the trust boundary or public, including your organization’s own public repositories; internal file paths, code names, live API response data such as emails or account identifiers, and infrastructure identifiers count as sensitive details. The PR, issue, and commit-message scoping requires Claude Code v2.1.200 or later. Live personal data from an API response in a PR or issue body, such as an email address, an account or organization identifier, or a usage metric, requires you to name those details and the recipient regardless of the repository’s visibility or trust boundary. That check requires Claude Code v2.1.203 or later
* Sending keystrokes to Claude Code’s own tmux pane to drive its own interface, which the classifier treats as Claude changing its own permissions or oversight
Claude Code v2.1.200 and later also block these by default:
@@ -222,8 +223,12 @@
* Deleting or tearing down a stateful resource Claude didn’t create in the session, when no more specific deletion rule applies and you didn’t name that resource
* Repointing an API base URL, proxy endpoint, webhook receiver, or registry mirror at a third-party host that doesn’t fit the task, including in example files like `.env.example`
* Changing where pushes go with `git remote set-url` or `git remote add`, unless you named the new remote
- * Pushing secrets to a repository known to be public, or pushing other sensitive or confidential material there that isn’t part of that repository’s own work. When a repository’s visibility isn’t established, the classifier doesn’t block on that alone; it judges the content against the other rules instead
+ * Pushing secrets or personal or entrusted data to a repository known to be public, or pushing confidential material there that isn’t part of that repository’s own work. A dotfiles repository’s own subject matter is the one exception for personal or entrusted data, and content from a private repository reaching any public surface is blocked the same way; both refinements require Claude Code v2.1.203 or later. Before v2.1.203, personal data was grouped with confidential material and blocked only when it wasn’t part of that repository’s own work. When a repository’s visibility isn’t established, the classifier doesn’t block on that alone; it judges the content against the other rules instead
* Opening a pull request against a different repository or organization, forking with `gh repo fork`, or pushing to a third-party repository, unless you named that external target
+
+Claude Code v2.1.203 and later also block these by default:
+
+ * Content from a sensitive local store, or from a file whose name, path, or type marks it as sensitive, entering a commit, a push, PR or issue text, a gist or paste, or a package publish, unless you named both the source and the destination. Session transcripts and conversation logs, credential and configuration dot-folders such as SSH keys, cloud credentials, browser profiles, and shell history, and user-data exports all count, and the repository being private doesn’t clear it
**Allowed by default** :
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -76,7 +76,7 @@
Use the mode dropdown next to the prompt box on [claude.ai/code](<https://claude.ai/code>) or in the mobile app. Permission prompts appear in claude.ai for approval. Which modes appear depends on where the session runs:
* **Cloud sessions** on [Claude Code on the web](</docs/en/claude-code-on-the-web>): Accept edits, Plan mode, and Auto mode. Accept edits corresponds to `default` mode: the cloud environment pre-approves file edits regardless of mode, so the dropdown shows Accept edits instead of Ask permissions. `defaultMode: "acceptEdits"` from settings is still honored. Auto mode appears only when your organization allows it and the selected model supports it. Bypass permissions is not available.
- * **[Remote Control](</docs/en/remote-control>) sessions** on your local machine: Ask permissions, Auto accept edits, and Plan mode. Auto and Bypass permissions are not available.
+ * **[Remote Control](</docs/en/remote-control>) sessions** on your local machine: Ask permissions, Auto accept edits, and Plan mode. You can’t select Auto or Bypass permissions from the app. The dropdown shows the mode the local session is in, including a mode set from the terminal, and updates when the mode changes in the app or in the terminal. The one exception is Bypass permissions: the session never reports that mode to claude.ai, so switching into it from the terminal doesn’t change what the dropdown shows. Before v2.1.202, sessions connected with `/remote-control` or `claude --remote-control` didn’t report their mode at all, so claude.ai and the mobile app could show a mode the session wasn’t in. The mismatch affected only the label: permission prompts were generated from the session’s actual mode and still appeared in the app for approval.
For Remote Control, you can also set the starting mode when launching the host:
Show diff (104 lines)
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -1,4 +1,4 @@
-When Claude wants to edit a file, run a shell command, or make a network request, it pauses and asks you to approve the action. Permission modes control how often that pause happens. The mode you pick shapes the flow of a session: default mode has you review each action as it comes, while looser modes let Claude work in longer uninterrupted stretches and report back when done. Pick more oversight for sensitive work, or fewer interruptions when you trust the direction.
+When Claude wants to edit a file, run a shell command, or make a network request, it pauses and asks you to approve the action. Permission modes control how often that pause happens. The mode you pick shapes the flow of a session: Manual mode has you review each action as it comes, while looser modes let Claude work in longer uninterrupted stretches and report back when done. Pick more oversight for sensitive work, or fewer interruptions when you trust the direction.
##
@@ -10,14 +10,14 @@
Mode| What runs without asking| Best for
---|---|---
-`default`| Reads only| Getting started, sensitive work
+`default`| Reads only. Labeled **Manual** in the CLI and IDE extensions| Getting started, sensitive work
`acceptEdits`| Reads, file edits, and common filesystem commands (`mkdir`, `touch`, `mv`, `cp`, etc.)| Iterating on code you’re reviewing
`plan`| Reads only| Exploring a codebase before changing it
`auto`| Everything, with background safety checks| Long tasks, reducing prompt fatigue
`dontAsk`| Only pre-approved tools| Locked-down CI and scripts
`bypassPermissions`| Everything| Isolated containers and VMs only
-In every mode except `bypassPermissions`, writes to protected paths are never auto-approved, guarding repository state and Claude’s own configuration against accidental corruption. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. Deny rules and explicit ask rules apply in every mode, including `bypassPermissions`. Allow rules have no effect in that mode because everything else is already approved.
+The mode that reviews every action is named **Manual** in the CLI, in `claude --help`, and in the VS Code and JetBrains extensions. Its config value is `default`, which is what hooks and SDK integrations use. The CLI accepts `manual` as an alias wherever you type the value, for example `claude --permission-mode manual` or `"defaultMode": "manual"`. The Manual label and the `manual` alias require Claude Code v2.1.200 or later. In every mode except `bypassPermissions`, writes to protected paths are never auto-approved, guarding repository state and Claude’s own configuration against accidental corruption. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. Deny rules and explicit ask rules apply in every mode, including `bypassPermissions`. Allow rules have no effect in that mode because everything else is already approved.
##
@@ -61,7 +61,7 @@
UI label| Mode
---|---
-Ask before edits| `default`
+Manual| `default`
Edit automatically| `acceptEdits`
Plan mode| `plan`
Auto mode| `auto`
@@ -88,7 +88,7 @@
Auto-approve file edits with acceptEdits mode
-`acceptEdits` mode lets Claude create and edit files in your working directory without prompting. The status bar shows `⏵⏵ accept edits on` while this mode is active. In addition to file edits, `acceptEdits` mode auto-approves common filesystem Bash commands: `mkdir`, `touch`, `rm`, `rmdir`, `mv`, `cp`, and `sed`. These commands are also auto-approved when prefixed with safe environment variables such as `LANG=C` or `NO_COLOR=1`, or process wrappers such as `timeout`, `nice`, or `nohup`. Like file edits, auto-approval applies only to paths inside your working directory or `additionalDirectories`. Paths outside that scope, writes to protected paths, and all other Bash commands still prompt. When the [PowerShell tool](</docs/en/tools-reference#powershell-tool>) is enabled, `acceptEdits` mode also auto-approves `Set-Content`, `Add-Content`, `Clear-Content`, and `Remove-Item` on in-scope paths, along with their common aliases. The same scope and protected-path rules apply. Use `acceptEdits` when you want to review changes in your editor or via `git diff` after the fact rather than approving each edit inline. Press `Shift+Tab` once from default mode to enter it, or start with it directly:
+`acceptEdits` mode lets Claude create and edit files in your working directory without prompting. The status bar shows `⏵⏵ accept edits on` while this mode is active. In addition to file edits, `acceptEdits` mode auto-approves common filesystem Bash commands: `mkdir`, `touch`, `rm`, `rmdir`, `mv`, `cp`, and `sed`. These commands are also auto-approved when prefixed with safe environment variables such as `LANG=C` or `NO_COLOR=1`, or process wrappers such as `timeout`, `nice`, or `nohup`. Like file edits, auto-approval applies only to paths inside your working directory or `additionalDirectories`. Paths outside that scope, writes to protected paths, and all other Bash commands still prompt. When the [PowerShell tool](</docs/en/tools-reference#powershell-tool>) is enabled, `acceptEdits` mode also auto-approves `Set-Content`, `Add-Content`, `Clear-Content`, and `Remove-Item` on in-scope paths, along with their common aliases. The same scope and protected-path rules apply. Use `acceptEdits` when you want to review changes in your editor or via `git diff` after the fact rather than approving each edit inline. Press `Shift+Tab` once from Manual mode to enter it, or start with it directly:
claude --permission-mode acceptEdits
@@ -98,7 +98,7 @@
Analyze before you edit with plan mode
-Plan mode tells Claude to research and propose changes without making them. Claude reads files, runs shell commands to explore, and writes a plan, but does not edit your source. Permission prompts still apply the same as default mode. Enter plan mode by pressing `Shift+Tab` or prefixing a single prompt with `/plan`. You can also start in plan mode from the CLI:
+Plan mode tells Claude to research and propose changes without making them. Claude reads files, runs shell commands to explore, and writes a plan, but does not edit your source. Permission prompts still apply as they do in Manual mode. Enter plan mode by pressing `Shift+Tab` or prefixing a single prompt with `/plan`. You can also start in plan mode from the CLI:
claude --permission-mode plan
@@ -150,8 +150,8 @@
* **Plan** : All plans.
* **Owner** : on Team and Enterprise, an Owner must enable it in [Claude Code admin settings](<https://claude.ai/admin-settings/claude-code>) before users can turn it on. Administrators can also lock it off by setting `permissions.disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>).
- * **Model** : on the Anthropic API, Claude Opus 4.6 or later, or Sonnet 4.6 or later. On Amazon Bedrock, Google Cloud Vertex AI, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, only Claude Sonnet 5, Opus 4.7, and Opus 4.8. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
- * **Provider** : available by default on the Anthropic API. On Amazon Bedrock, Google Cloud Vertex AI, Microsoft Foundry, and signed-in Claude apps gateway sessions, auto mode is off until you set `CLAUDE_CODE_ENABLE_AUTO_MODE`.
+ * **Model** : on the Anthropic API, Claude Opus 4.6 or later, or Sonnet 4.6 or later. On Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, only Claude Sonnet 5, Opus 4.7, and Opus 4.8. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
+ * **Provider** : available by default on the Anthropic API. On Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in Claude apps gateway sessions, auto mode is off until you set `CLAUDE_CODE_ENABLE_AUTO_MODE`.
If Claude Code reports auto mode as unavailable, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action is a transient classifier outage; see the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>). If you set `defaultMode: "auto"` in [settings](</docs/en/settings#available-settings>) and the session starts in `default` mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. Claude Code v2.1.142 and later ignore `auto` from those files so a repository cannot grant itself auto mode. Move it to `~/.claude/settings.json`.
@@ -159,9 +159,9 @@
-Enable auto mode on Bedrock, Vertex AI, or Foundry
-
-On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud Vertex AI](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode does not appear in the `Shift+Tab` cycle until `CLAUDE_CODE_ENABLE_AUTO_MODE` is set to `1`. The variable works in Claude Code v2.1.158 and later. Only Claude Sonnet 5, Opus 4.7, and Opus 4.8 are supported on these providers. To enable it for one developer, add the variable to the `env` block in `~/.claude/settings.json`:
+Enable auto mode on Bedrock, Agent Platform, or Foundry
+
+On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode does not appear in the `Shift+Tab` cycle until `CLAUDE_CODE_ENABLE_AUTO_MODE` is set to `1`. The variable works in Claude Code v2.1.158 and later. Only Claude Sonnet 5, Opus 4.7, and Opus 4.8 are supported on these providers. To enable it for one developer, add the variable to the `env` block in `~/.claude/settings.json`:
{
"env": {
@@ -177,7 +177,7 @@
What the classifier blocks by default
-The classifier trusts your working directory and your repo’s configured remotes. Everything else is treated as external until you [configure trusted infrastructure](</docs/en/auto-mode-config>). **Blocked by default** :
+The classifier trusts your working directory and the remotes that were configured for it when the session started. A remote added or repointed during the session with `git remote add` or `git remote set-url` isn’t trusted, and everything else is treated as external until you [configure trusted infrastructure](</docs/en/auto-mode-config>). Before v2.1.200, remotes added mid-session were also trusted. **Blocked by default** :
* Downloading and executing code, like `curl | bash`
* Sending sensitive data to external endpoints
@@ -213,8 +213,17 @@
Claude Code v2.1.198 and later also block these by default:
* Deleting files in `/tmp`, `$TMPDIR`, or another shared scratch or cache directory by wildcard, glob, or age filter rather than by a specific named path
- * Including sensitive details in content sent, uploaded, published, or written to other people or shared systems, when your own message didn’t authorize those details for that recipient
+ * Including sensitive details in content sent, uploaded, published, or written to other people or shared systems, when your own message didn’t authorize those details for that recipient. PR and issue bodies, commit messages, and comments count as this kind of outbound content when the repository is outside the trust boundary or public, including your organization’s own public repositories; internal file paths, code names, live API response data such as emails or account identifiers, and infrastructure identifiers count as sensitive details. The PR, issue, and commit-message scoping requires Claude Code v2.1.200 or later
* Sending keystrokes to Claude Code’s own tmux pane to drive its own interface, which the classifier treats as Claude changing its own permissions or oversight
+
+Claude Code v2.1.200 and later also block these by default:
+
+ * Commenting out, deleting, or force-passing a test or assertion that guards security behavior, such as auth, access control, input validation, or sandboxing
+ * Deleting or tearing down a stateful resource Claude didn’t create in the session, when no more specific deletion rule applies and you didn’t name that resource
+ * Repointing an API base URL, proxy endpoint, webhook receiver, or registry mirror at a third-party host that doesn’t fit the task, including in example files like `.env.example`
+ * Changing where pushes go with `git remote set-url` or `git remote add`, unless you named the new remote
+ * Pushing secrets to a repository known to be public, or pushing other sensitive or confidential material there that isn’t part of that repository’s own work. When a repository’s visibility isn’t established, the classifier doesn’t block on that alone; it judges the content against the other rules instead
+ * Opening a pull request against a different repository or organization, forking with `gh repo fork`, or pushing to a third-party repository, unless you named that external target
**Allowed by default** :
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -189,6 +189,7 @@
* Force push, or pushing directly to `main`
* `git reset --hard`, `git checkout -- .`, `git restore .`, `git clean -fd`, `git stash drop`, or `git stash clear`, which the classifier presumes would discard uncommitted changes
* `git commit --amend` when the commit at HEAD was not created in this session
+ * From v2.1.198, `git commit --amend` when the commit at HEAD has already been pushed. A message-only reword is not blocked: `--amend -m` with nothing newly staged, on a commit that Claude created during this session
* `terraform destroy`, `pulumi destroy`, `cdk destroy`, or `terragrunt destroy`, and applying a plan that destroys resources
Claude Code v2.1.195 and later block more categories by default. Several depend on [environment](</docs/en/auto-mode-config#define-trusted-infrastructure>) entries, such as sensitive remote targets and protected IaC scopes, that you can narrow to concrete names.
@@ -203,10 +204,17 @@
* Interactive shells or port-forwards into a sensitive remote target
* Opening a tunnel or reverse shell that makes a local service reachable from the public internet
* Printing a live credential or token into the transcript or a file
- * Accessing a PII or regulated-data location, or copying data out of one
- * Routing a package install around your internal package registry to a public registry
+ * Accessing a location listed as a sensitive data location in your [environment](</docs/en/auto-mode-config#define-trusted-infrastructure>), or copying data out of one. As of v2.1.198 this also blocks sending data from one to an audience the entry excludes
+ * Routing a package install around your internal package registry to a public registry. As of v2.1.198, this also applies when you’ve told Claude an internal registry or mirror exists in the conversation, not only when one is listed in your environment
* Running a command with a flag that disarms a safety guard, like `--insecure`
+ * Launching an autonomous agent loop that runs without human approval or a sandbox, such as one started with `--dangerously-skip-permissions` or `--no-sandbox`. As of v2.1.198 this also covers running a third-party agent or eval harness with isolation and per-action approval disabled, such as a runner started with `--yes-always`
* [Claude in Chrome](</docs/en/chrome>) browser actions that could send page content, cookies, or credentials off-origin
+
+Claude Code v2.1.198 and later also block these by default:
+
+ * Deleting files in `/tmp`, `$TMPDIR`, or another shared scratch or cache directory by wildcard, glob, or age filter rather than by a specific named path
+ * Including sensitive details in content sent, uploaded, published, or written to other people or shared systems, when your own message didn’t authorize those details for that recipient
+ * Sending keystrokes to Claude Code’s own tmux pane to drive its own interface, which the classifier treats as Claude changing its own permissions or oversight
**Allowed by default** :
@@ -224,7 +232,14 @@
* Sending data to the trusted domains, buckets, and services you list in [`environment`](</docs/en/auto-mode-config#define-trusted-infrastructure>). This covers data flow only, not destructive or credential operations on the same infrastructure
* [Claude in Chrome](</docs/en/chrome>) navigation to a trusted internal domain, localhost, or a URL you named
-Sandbox network access requests are routed through the classifier rather than allowed by default. Run `claude auto-mode defaults` to see the full rule lists. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure auto mode](</docs/en/auto-mode-config>).
+Sandbox network access requests are routed through the classifier rather than allowed by default. As of v2.1.198, the classifier reuses its verdict for a network host and port instead of re-running on every connection:
+
+ * An allow is reused until new content enters the conversation, at which point that host is checked again
+ * In the interactive CLI, a deny is dropped when the turn ends
+ * In [non-interactive mode](</docs/en/headless>) and Agent SDK sessions there is no turn boundary, so a deny is reused for the rest of the run
+ * Changing your permission mode or rules drops all cached verdicts
+
+Run `claude auto-mode defaults` to see the full rule lists. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure auto mode](</docs/en/auto-mode-config>).
###
@@ -248,7 +263,7 @@
1. Actions matching your [allow or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately, except writes to protected paths, which route to the classifier even when an allow rule matches
2. Read-only actions and file edits in your working directory are auto-approved, except writes to protected paths
- 3. Everything else goes to the classifier
+ 3. Everything else goes to the classifier. As of v2.1.199, an MCP tool marked with [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) skips the classifier and prompts you directly, so a consent step is never auto-approved on the tool author’s behalf
4. If the classifier blocks, Claude receives the reason and tries an alternative
On entering auto mode, broad allow rules that grant arbitrary code execution are dropped:
@@ -272,7 +287,7 @@
Cost and latency
-The classifier runs on a server-configured model that is independent of your `/model` selection, so switching models does not change classifier availability. Classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations.
+The classifier runs on a server-configured model that is independent of your `/model` selection, so switching models does not change classifier availability. Classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations. As of v2.1.198, a sandbox network verdict for a host and port is reused instead of re-classified on every connection, so repeated connections to the same host don’t each add a check. What the classifier blocks by default describes how long an allow and a deny last.
##
@@ -280,7 +295,7 @@
Allow only pre-approved tools with dontAsk mode
-`dontAsk` mode auto-denies every tool call that would otherwise prompt. Only actions matching your `permissions.allow` rules and [read-only Bash commands](</docs/en/permissions#read-only-commands>) can execute; explicit [`ask` rules](</docs/en/permissions#manage-permissions>) are denied rather than prompting. This makes the mode fully non-interactive for CI pipelines or restricted environments where you pre-define exactly what Claude may do. Cloud sessions on [Claude Code on the web](</docs/en/claude-code-on-the-web>) ignore `defaultMode: "dontAsk"`; see bypassPermissions for details. Set it at startup with the flag:
+`dontAsk` mode auto-denies every tool call that would otherwise prompt. The status bar shows `⏵⏵ don't ask on` while this mode is active. Only actions matching your `permissions.allow` rules and [read-only Bash commands](</docs/en/permissions#read-only-commands>) can execute; explicit [`ask` rules](</docs/en/permissions#manage-permissions>) are denied rather than prompting. As of v2.1.199, an MCP tool marked with [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) is also denied in this mode even when an allow rule matches it, because its approval card needs an answer this mode never collects. This makes the mode fully non-interactive for CI pipelines or restricted environments where you pre-define exactly what Claude may do. Cloud sessions on [Claude Code on the web](</docs/en/claude-code-on-the-web>) ignore `defaultMode: "dontAsk"`; see bypassPermissions for details. Set it at startup with the flag:
claude --permission-mode dontAsk
@@ -290,7 +305,7 @@
Skip all checks with bypassPermissions mode
-`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately. As of v2.1.126 this includes writes to protected paths, which earlier versions still prompted for. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt in this mode, and removals targeting the filesystem root or home directory, such as `rm -rf /` and `rm -rf ~`, still prompt as a circuit breaker against model error. Only use this mode in isolated environments like containers, VMs, or dev containers without internet access, where Claude Code cannot damage your host system. You cannot enter `bypassPermissions` from a session that was started without one of the enabling flags; restart with one to enable it:
+`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately. As of v2.1.126 this includes writes to protected paths, which earlier versions still prompted for. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt in this mode, and removals targeting the filesystem root or home directory, such as `rm -rf /` and `rm -rf ~`, still prompt as a circuit breaker against model error. As of v2.1.199, MCP tools marked with [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) also still prompt. Only use this mode in isolated environments like containers, VMs, or dev containers without internet access, where Claude Code cannot damage your host system. You cannot enter `bypassPermissions` from a session that was started without one of the enabling flags; restart with one to enable it:
claude --permission-mode bypassPermissions
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -150,7 +150,7 @@
* **Plan** : All plans.
* **Owner** : on Team and Enterprise, an Owner must enable it in [Claude Code admin settings](<https://claude.ai/admin-settings/claude-code>) before users can turn it on. Administrators can also lock it off by setting `permissions.disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>).
- * **Model** : on the Anthropic API, Claude Opus 4.6 or later, or Sonnet 4.6. On Amazon Bedrock, Google Cloud Vertex AI, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, only Claude Opus 4.7 and Opus 4.8. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
+ * **Model** : on the Anthropic API, Claude Opus 4.6 or later, or Sonnet 4.6 or later. On Amazon Bedrock, Google Cloud Vertex AI, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, only Claude Sonnet 5, Opus 4.7, and Opus 4.8. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
* **Provider** : available by default on the Anthropic API. On Amazon Bedrock, Google Cloud Vertex AI, Microsoft Foundry, and signed-in Claude apps gateway sessions, auto mode is off until you set `CLAUDE_CODE_ENABLE_AUTO_MODE`.
If Claude Code reports auto mode as unavailable, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action is a transient classifier outage; see the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>). If you set `defaultMode: "auto"` in [settings](</docs/en/settings#available-settings>) and the session starts in `default` mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. Claude Code v2.1.142 and later ignore `auto` from those files so a repository cannot grant itself auto mode. Move it to `~/.claude/settings.json`.
@@ -161,7 +161,7 @@
Enable auto mode on Bedrock, Vertex AI, or Foundry
-On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud Vertex AI](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode does not appear in the `Shift+Tab` cycle until `CLAUDE_CODE_ENABLE_AUTO_MODE` is set to `1`. The variable works in Claude Code v2.1.158 and later. Only Claude Opus 4.7 and Opus 4.8 are supported on these providers. To enable it for one developer, add the variable to the `env` block in `~/.claude/settings.json`:
+On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud Vertex AI](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode does not appear in the `Shift+Tab` cycle until `CLAUDE_CODE_ENABLE_AUTO_MODE` is set to `1`. The variable works in Claude Code v2.1.158 and later. Only Claude Sonnet 5, Opus 4.7, and Opus 4.8 are supported on these providers. To enable it for one developer, add the variable to the `env` block in `~/.claude/settings.json`:
{
"env": {
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -39,7 +39,7 @@
**During a session** : press `Shift+Tab` to cycle `default` → `acceptEdits` → `plan`. The current mode appears in the status bar. Not every mode is in the default cycle:
- * `auto`: appears when your account meets the auto mode requirements; cycling to auto shows an opt-in prompt until you accept it, or select **No, don’t ask again** to remove auto from the cycle
+ * `auto`: appears when your account meets the auto mode requirements; cycling to it switches modes without a confirmation prompt
* `bypassPermissions`: appears after you start with `--permission-mode bypassPermissions`, `--dangerously-skip-permissions`, or `--allow-dangerously-skip-permissions`; the `--allow-` variant adds the mode to the cycle without activating it
* `dontAsk`: never appears in the cycle; set it with `--permission-mode dontAsk`
@@ -150,8 +150,8 @@
* **Plan** : All plans.
* **Owner** : on Team and Enterprise, an Owner must enable it in [Claude Code admin settings](<https://claude.ai/admin-settings/claude-code>) before users can turn it on. Administrators can also lock it off by setting `permissions.disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>).
- * **Model** : on the Anthropic API, Claude Opus 4.6 or later, or Sonnet 4.6. On Amazon Bedrock, Google Cloud Vertex AI, and Microsoft Foundry, only Claude Opus 4.7 and Opus 4.8. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
- * **Provider** : available by default on the Anthropic API. On Amazon Bedrock, Google Cloud Vertex AI, and Microsoft Foundry, auto mode is off until you set `CLAUDE_CODE_ENABLE_AUTO_MODE`.
+ * **Model** : on the Anthropic API, Claude Opus 4.6 or later, or Sonnet 4.6. On Amazon Bedrock, Google Cloud Vertex AI, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, only Claude Opus 4.7 and Opus 4.8. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
+ * **Provider** : available by default on the Anthropic API. On Amazon Bedrock, Google Cloud Vertex AI, Microsoft Foundry, and signed-in Claude apps gateway sessions, auto mode is off until you set `CLAUDE_CODE_ENABLE_AUTO_MODE`.
If Claude Code reports auto mode as unavailable, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action is a transient classifier outage; see the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>). If you set `defaultMode: "auto"` in [settings](</docs/en/settings#available-settings>) and the session starts in `default` mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. Claude Code v2.1.142 and later ignore `auto` from those files so a repository cannot grant itself auto mode. Move it to `~/.claude/settings.json`.
@@ -161,7 +161,7 @@
Enable auto mode on Bedrock, Vertex AI, or Foundry
-On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud Vertex AI](</docs/en/google-vertex-ai>), and [Microsoft Foundry](</docs/en/microsoft-foundry>), auto mode does not appear in the `Shift+Tab` cycle until `CLAUDE_CODE_ENABLE_AUTO_MODE` is set to `1`. The variable works in Claude Code v2.1.158 and later. Only Claude Opus 4.7 and Opus 4.8 are supported on these providers. To enable it for one developer, add the variable to the `env` block in `~/.claude/settings.json`:
+On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud Vertex AI](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode does not appear in the `Shift+Tab` cycle until `CLAUDE_CODE_ENABLE_AUTO_MODE` is set to `1`. The variable works in Claude Code v2.1.158 and later. Only Claude Opus 4.7 and Opus 4.8 are supported on these providers. To enable it for one developer, add the variable to the `env` block in `~/.claude/settings.json`:
{
"env": {
@@ -169,7 +169,7 @@
}
}
-To enable it for your organization, add the same `env` block to [managed settings](</docs/en/settings#settings-files>). Once the variable is set, auto mode appears in the `Shift+Tab` cycle for every session. To make it the default starting mode, also set `"permissions": {"defaultMode": "auto"}` in user or managed settings. On these providers, Claude Code ignores `defaultMode: "auto"` unless `CLAUDE_CODE_ENABLE_AUTO_MODE` is also set. To prevent developers from enabling auto mode, set `disableAutoMode` to `"disable"` in managed settings. This overrides the enable variable. If you connect through an [LLM gateway](</docs/en/llm-gateway>) configured with `ANTHROPIC_BASE_URL`, auto mode may already be reachable without the enable variable, because the gateway routes requests through the Anthropic API. The `disableAutoMode` setting applies the same way in that configuration.
+To enable it for your organization, add the same `env` block to [managed settings](</docs/en/settings#settings-files>). Once the variable is set, auto mode appears in the `Shift+Tab` cycle for every session. To make it the default starting mode, also set `"permissions": {"defaultMode": "auto"}` in user or managed settings. On these providers, Claude Code ignores `defaultMode: "auto"` unless `CLAUDE_CODE_ENABLE_AUTO_MODE` is also set. To prevent developers from enabling auto mode, set `disableAutoMode` to `"disable"` in managed settings. This overrides the enable variable. If you connect through an [LLM gateway](</docs/en/llm-gateway>) configured with `ANTHROPIC_BASE_URL`, auto mode may already be reachable without the enable variable, because the gateway routes requests through the Anthropic API. This does not apply to a signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) session, which is its own provider class and requires the enable variable. The `disableAutoMode` setting applies the same way in either configuration.
###
@@ -191,6 +191,23 @@
* `git commit --amend` when the commit at HEAD was not created in this session
* `terraform destroy`, `pulumi destroy`, `cdk destroy`, or `terragrunt destroy`, and applying a plan that destroys resources
+Claude Code v2.1.195 and later block more categories by default. Several depend on [environment](</docs/en/auto-mode-config#define-trusted-infrastructure>) entries, such as sensitive remote targets and protected IaC scopes, that you can narrow to concrete names.
+
+ * Writing to a secret manager, or changing DNS records or TLS certificates
+ * Merging a pull request no human has approved, approving Claude’s own pull request, or disabling CI checks
+ * Posting a comment that is itself a command to automation, such as `atlantis apply` or a bot’s `/deploy` or `/merge`
+ * Toggling, ramping, or deleting a production feature flag
+ * Applying infrastructure changes to a protected IaC scope, or draining and removing cluster nodes
+ * Writes to a shared compute cluster that reach beyond the resource you named, such as a label selector or `--all` that catches other users’ jobs
+ * Creating Kubernetes resources that run on every node or intercept cluster traffic, such as DaemonSets and admission webhooks
+ * Interactive shells or port-forwards into a sensitive remote target
+ * Opening a tunnel or reverse shell that makes a local service reachable from the public internet
+ * Printing a live credential or token into the transcript or a file
+ * Accessing a PII or regulated-data location, or copying data out of one
+ * Routing a package install around your internal package registry to a public registry
+ * Running a command with a flag that disarms a safety guard, like `--insecure`
+ * [Claude in Chrome](</docs/en/chrome>) browser actions that could send page content, cookies, or credentials off-origin
+
**Allowed by default** :
* Local file operations in your working directory
@@ -198,6 +215,14 @@
* Reading `.env` and sending credentials to their matching API
* Read-only HTTP requests
* Pushing to the branch you started on or one Claude created
+
+Claude Code v2.1.195 and later also allow these by default:
+
+ * Deleting the exact jobs Claude created earlier in the same session
+ * Reading, reviewing, or writing security-related code, configs, and threat models as part of your task
+ * Messages between agents working together in the same multi-agent session
+ * Sending data to the trusted domains, buckets, and services you list in [`environment`](</docs/en/auto-mode-config#define-trusted-infrastructure>). This covers data flow only, not destructive or credential operations on the same infrastructure
+ * [Claude in Chrome](</docs/en/chrome>) navigation to a trusted internal domain, localhost, or a URL you named
Sandbox network access requests are routed through the classifier rather than allowed by default. Run `claude auto-mode defaults` to see the full rule lists. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure auto mode](</docs/en/auto-mode-config>).
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -149,7 +149,7 @@
Auto mode is available only when your account meets all of these requirements:
* **Plan** : All plans.
- * **Admin** : on Team and Enterprise, an admin must enable it in [Claude Code admin settings](<https://claude.ai/admin-settings/claude-code>) before users can turn it on. Admins can also lock it off by setting `permissions.disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>).
+ * **Owner** : on Team and Enterprise, an Owner must enable it in [Claude Code admin settings](<https://claude.ai/admin-settings/claude-code>) before users can turn it on. Administrators can also lock it off by setting `permissions.disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>).
* **Model** : on the Anthropic API, Claude Opus 4.6 or later, or Sonnet 4.6. On Amazon Bedrock, Google Cloud Vertex AI, and Microsoft Foundry, only Claude Opus 4.7 and Opus 4.8. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
* **Provider** : available by default on the Anthropic API. On Amazon Bedrock, Google Cloud Vertex AI, and Microsoft Foundry, auto mode is off until you set `CLAUDE_CODE_ENABLE_AUTO_MODE`.
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -138,13 +138,13 @@
-Eliminate prompts with auto mode
+Eliminate permission prompts with auto mode
Auto mode requires Claude Code v2.1.83 or later.
Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior while keeping permission prompts, set the [Proactive output style](</docs/en/output-styles>) instead.
-Auto mode is a research preview. It reduces prompts but does not guarantee safety. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations.
+Auto mode is a research preview. It reduces permission prompts but does not guarantee safety. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations.
Auto mode is available only when your account meets all of these requirements:
@@ -275,7 +275,7 @@
The check is skipped automatically inside a recognized sandbox. To run autonomously in a container, use the [dev container](</docs/en/devcontainer>) configuration, which runs Claude Code as a non-root user. [Claude Code on the web](</docs/en/claude-code-on-the-web>) does not honor `defaultMode: "bypassPermissions"` or `"dontAsk"` from your settings files, so a repository’s checked-in settings cannot start a cloud session in bypass-permissions mode. The setting is ignored silently and the session starts in the mode shown in the mode dropdown instead. See Switch permission modes for which modes cloud sessions offer.
-`bypassPermissions` offers no protection against prompt injection or unintended actions. For background safety checks with far fewer prompts, use auto mode instead. Administrators can block this mode by setting `permissions.disableBypassPermissionsMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>).
+`bypassPermissions` offers no protection against prompt injection or unintended actions. For background safety checks with far fewer permission prompts, use auto mode instead. Administrators can block this mode by setting `permissions.disableBypassPermissionsMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>).
##
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -187,6 +187,9 @@
* Modifying shared infrastructure
* Irreversibly destroying files that existed before the session
* Force push, or pushing directly to `main`
+ * `git reset --hard`, `git checkout -- .`, `git restore .`, `git clean -fd`, `git stash drop`, or `git stash clear`, which the classifier presumes would discard uncommitted changes
+ * `git commit --amend` when the commit at HEAD was not created in this session
+ * `terraform destroy`, `pulumi destroy`, `cdk destroy`, or `terragrunt destroy`, and applying a plan that destroys resources
**Allowed by default** :
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -239,6 +239,8 @@
1. Before a subagent starts, the delegated task description is evaluated, so a dangerous-looking task is blocked at spawn time.
2. While the subagent runs, each of its actions goes through the classifier with the same rules as the parent session, and any `permissionMode` in the subagent’s frontmatter is ignored.
3. When the subagent finishes, the classifier reviews its full action history; if that return check flags a concern, a security warning is prepended to the subagent’s results.
+
+Step 1 requires Claude Code v2.1.178 or later. Earlier versions applied the classifier at steps 2 and 3, but did not evaluate the task description before the subagent started.
Cost and latency
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -17,7 +17,7 @@
`dontAsk`| Only pre-approved tools| Locked-down CI and scripts
`bypassPermissions`| Everything| Isolated containers and VMs only
-In every mode except `bypassPermissions`, writes to protected paths are never auto-approved, guarding repository state and Claude’s own configuration against accidental corruption. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools in any mode except `bypassPermissions`, which skips the permission layer entirely.
+In every mode except `bypassPermissions`, writes to protected paths are never auto-approved, guarding repository state and Claude’s own configuration against accidental corruption. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. Deny rules and explicit ask rules apply in every mode, including `bypassPermissions`. Allow rules have no effect in that mode because everything else is already approved.
##
@@ -75,7 +75,7 @@
Use the mode dropdown next to the prompt box on [claude.ai/code](<https://claude.ai/code>) or in the mobile app. Permission prompts appear in claude.ai for approval. Which modes appear depends on where the session runs:
- * **Cloud sessions** on [Claude Code on the web](</docs/en/claude-code-on-the-web>): Auto accept edits and Plan mode. Ask permissions, Auto, and Bypass permissions are not available.
+ * **Cloud sessions** on [Claude Code on the web](</docs/en/claude-code-on-the-web>): Accept edits, Plan mode, and Auto mode. Accept edits corresponds to `default` mode: the cloud environment pre-approves file edits regardless of mode, so the dropdown shows Accept edits instead of Ask permissions. `defaultMode: "acceptEdits"` from settings is still honored. Auto mode appears only when your organization allows it and the selected model supports it. Bypass permissions is not available.
* **[Remote Control](</docs/en/remote-control>) sessions** on your local machine: Ask permissions, Auto accept edits, and Plan mode. Auto and Bypass permissions are not available.
For Remote Control, you can also set the starting mode when launching the host:
@@ -142,7 +142,7 @@
Auto mode requires Claude Code v2.1.83 or later.
-Auto mode lets Claude execute without permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior while keeping permission prompts, set the [Proactive output style](</docs/en/output-styles>) instead.
+Auto mode lets Claude execute without routine permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior while keeping permission prompts, set the [Proactive output style](</docs/en/output-styles>) instead.
Auto mode is a research preview. It reduces prompts but does not guarantee safety. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations.
@@ -250,7 +250,7 @@
Allow only pre-approved tools with dontAsk mode
-`dontAsk` mode auto-denies every tool call that would otherwise prompt. Only actions matching your `permissions.allow` rules and [read-only Bash commands](</docs/en/permissions#read-only-commands>) can execute; explicit `ask` rules are denied rather than prompting. This makes the mode fully non-interactive for CI pipelines or restricted environments where you pre-define exactly what Claude may do. Set it at startup with the flag:
+`dontAsk` mode auto-denies every tool call that would otherwise prompt. Only actions matching your `permissions.allow` rules and [read-only Bash commands](</docs/en/permissions#read-only-commands>) can execute; explicit [`ask` rules](</docs/en/permissions#manage-permissions>) are denied rather than prompting. This makes the mode fully non-interactive for CI pipelines or restricted environments where you pre-define exactly what Claude may do. Cloud sessions on [Claude Code on the web](</docs/en/claude-code-on-the-web>) ignore `defaultMode: "dontAsk"`; see bypassPermissions for details. Set it at startup with the flag:
claude --permission-mode dontAsk
@@ -260,7 +260,7 @@
Skip all checks with bypassPermissions mode
-`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately. As of v2.1.126 this includes writes to protected paths, which earlier versions still prompted for. Removals targeting the filesystem root or home directory, such as `rm -rf /` and `rm -rf ~`, still prompt as a circuit breaker against model error. Only use this mode in isolated environments like containers, VMs, or dev containers without internet access, where Claude Code cannot damage your host system. You cannot enter `bypassPermissions` from a session that was started without one of the enabling flags; restart with one to enable it:
+`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately. As of v2.1.126 this includes writes to protected paths, which earlier versions still prompted for. Explicit [ask rules](</docs/en/permissions#manage-permissions>) still force a prompt in this mode, and removals targeting the filesystem root or home directory, such as `rm -rf /` and `rm -rf ~`, still prompt as a circuit breaker against model error. Only use this mode in isolated environments like containers, VMs, or dev containers without internet access, where Claude Code cannot damage your host system. You cannot enter `bypassPermissions` from a session that was started without one of the enabling flags; restart with one to enable it:
claude --permission-mode bypassPermissions
@@ -268,9 +268,9 @@
--dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons
-The check is skipped automatically inside a recognized sandbox. To run autonomously in a container, use the [dev container](</docs/en/devcontainer>) configuration, which runs Claude Code as a non-root user.
-
-`bypassPermissions` offers no protection against prompt injection or unintended actions. For background safety checks without prompts, use auto mode instead. Administrators can block this mode by setting `permissions.disableBypassPermissionsMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>).
+The check is skipped automatically inside a recognized sandbox. To run autonomously in a container, use the [dev container](</docs/en/devcontainer>) configuration, which runs Claude Code as a non-root user. [Claude Code on the web](</docs/en/claude-code-on-the-web>) does not honor `defaultMode: "bypassPermissions"` or `"dontAsk"` from your settings files, so a repository’s checked-in settings cannot start a cloud session in bypass-permissions mode. The setting is ignored silently and the session starts in the mode shown in the mode dropdown instead. See Switch permission modes for which modes cloud sessions offer.
+
+`bypassPermissions` offers no protection against prompt injection or unintended actions. For background safety checks with far fewer prompts, use auto mode instead. Administrators can block this mode by setting `permissions.disableBypassPermissionsMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>).
##
@@ -287,7 +287,7 @@
`dontAsk`| Denied
`bypassPermissions`| Allowed
-Protected directories:
+[`permissions.allow`](</docs/en/permissions#manage-permissions>) rules in settings files do not pre-approve protected-path writes. The safety check runs before Claude Code evaluates allow rules from settings, so an entry such as `Edit(.claude/**)` in `~/.claude/settings.json` or `.claude/settings.json` does not change the per-mode outcome in the table above. In modes that prompt, the prompt for a `.claude/` write offers **Yes, and allow Claude to edit its own settings for this session** , which approves later `.claude/` writes in that session without prompting again. Protected directories:
* `.git`
* `.config/git`
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -1,9 +1,3 @@
-> ## Documentation Index
->
-> Fetch the complete documentation index at: <https://code.claude.com/docs/llms.txt>
->
-> Use this file to discover all available pages before exploring further.
-
When Claude wants to edit a file, run a shell command, or make a network request, it pauses and asks you to approve the action. Permission modes control how often that pause happens. The mode you pick shapes the flow of a session: default mode has you review each action as it comes, while looser modes let Claude work in longer uninterrupted stretches and report back when done. Pick more oversight for sensitive work, or fewer interruptions when you trust the direction.
##
@@ -159,7 +153,7 @@
* **Model** : on the Anthropic API, Claude Opus 4.6 or later, or Sonnet 4.6. On Amazon Bedrock, Google Cloud Vertex AI, and Microsoft Foundry, only Claude Opus 4.7 and Opus 4.8. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
* **Provider** : available by default on the Anthropic API. On Amazon Bedrock, Google Cloud Vertex AI, and Microsoft Foundry, auto mode is off until you set `CLAUDE_CODE_ENABLE_AUTO_MODE`.
-If Claude Code reports auto mode as unavailable, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action is a transient classifier outage; see the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>). If you set `defaultMode: "auto"` in [settings](</docs/en/settings#available-settings>) and the session starts in `default` mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. Claude Code ignores `auto` from those files so a repository cannot grant itself auto mode. Move it to `~/.claude/settings.json`.
+If Claude Code reports auto mode as unavailable, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action is a transient classifier outage; see the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>). If you set `defaultMode: "auto"` in [settings](</docs/en/settings#available-settings>) and the session starts in `default` mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. Claude Code v2.1.142 and later ignore `auto` from those files so a repository cannot grant itself auto mode. Move it to `~/.claude/settings.json`.
###
@@ -167,7 +161,7 @@
Enable auto mode on Bedrock, Vertex AI, or Foundry
-On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud Vertex AI](</docs/en/google-vertex-ai>), and [Microsoft Foundry](</docs/en/microsoft-foundry>), auto mode does not appear in the `Shift+Tab` cycle until `CLAUDE_CODE_ENABLE_AUTO_MODE` is set to `1`. Only Claude Opus 4.7 and Opus 4.8 are supported on these providers. To enable it for one developer, add the variable to the `env` block in `~/.claude/settings.json`:
+On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud Vertex AI](</docs/en/google-vertex-ai>), and [Microsoft Foundry](</docs/en/microsoft-foundry>), auto mode does not appear in the `Shift+Tab` cycle until `CLAUDE_CODE_ENABLE_AUTO_MODE` is set to `1`. The variable works in Claude Code v2.1.158 and later. Only Claude Opus 4.7 and Opus 4.8 are supported on these providers. To enable it for one developer, add the variable to the `env` block in `~/.claude/settings.json`:
{
"env": {
@@ -304,7 +298,7 @@
* `.devcontainer`
* `.yarn`
* `.mvn`
- * `.claude`, except for `.claude/commands`, `.claude/agents`, `.claude/skills`, and `.claude/worktrees` where Claude routinely creates content
+ * `.claude`, except for `.claude/worktrees` where Claude stores its own git worktrees
Protected files:
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -156,10 +156,26 @@
* **Plan** : All plans.
* **Admin** : on Team and Enterprise, an admin must enable it in [Claude Code admin settings](<https://claude.ai/admin-settings/claude-code>) before users can turn it on. Admins can also lock it off by setting `permissions.disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>).
- * **Model** : Claude Opus 4.6 or later, or Sonnet 4.6. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported.
- * **Provider** : Anthropic API only. Not available on Bedrock, Vertex, or Foundry.
+ * **Model** : on the Anthropic API, Claude Opus 4.6 or later, or Sonnet 4.6. On Amazon Bedrock, Google Cloud Vertex AI, and Microsoft Foundry, only Claude Opus 4.7 and Opus 4.8. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
+ * **Provider** : available by default on the Anthropic API. On Amazon Bedrock, Google Cloud Vertex AI, and Microsoft Foundry, auto mode is off until you set `CLAUDE_CODE_ENABLE_AUTO_MODE`.
If Claude Code reports auto mode as unavailable, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action is a transient classifier outage; see the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>). If you set `defaultMode: "auto"` in [settings](</docs/en/settings#available-settings>) and the session starts in `default` mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. Claude Code ignores `auto` from those files so a repository cannot grant itself auto mode. Move it to `~/.claude/settings.json`.
+
+###
+
+
+
+Enable auto mode on Bedrock, Vertex AI, or Foundry
+
+On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud Vertex AI](</docs/en/google-vertex-ai>), and [Microsoft Foundry](</docs/en/microsoft-foundry>), auto mode does not appear in the `Shift+Tab` cycle until `CLAUDE_CODE_ENABLE_AUTO_MODE` is set to `1`. Only Claude Opus 4.7 and Opus 4.8 are supported on these providers. To enable it for one developer, add the variable to the `env` block in `~/.claude/settings.json`:
+
+ {
+ "env": {
+ "CLAUDE_CODE_ENABLE_AUTO_MODE": "1"
+ }
+ }
+
+To enable it for your organization, add the same `env` block to [managed settings](</docs/en/settings#settings-files>). Once the variable is set, auto mode appears in the `Shift+Tab` cycle for every session. To make it the default starting mode, also set `"permissions": {"defaultMode": "auto"}` in user or managed settings. On these providers, Claude Code ignores `defaultMode: "auto"` unless `CLAUDE_CODE_ENABLE_AUTO_MODE` is also set. To prevent developers from enabling auto mode, set `disableAutoMode` to `"disable"` in managed settings. This overrides the enable variable. If you connect through an [LLM gateway](</docs/en/llm-gateway>) configured with `ANTHROPIC_BASE_URL`, auto mode may already be reachable without the enable variable, because the gateway routes requests through the Anthropic API. The `disableAutoMode` setting applies the same way in that configuration.
###
@@ -268,20 +284,38 @@
Protected paths
-Writes to a small set of paths are never auto-approved, in every mode except `bypassPermissions`. This prevents accidental corruption of repository state and Claude’s own configuration. In `default`, `acceptEdits`, and `plan` these writes prompt; in `auto` they route to the classifier; in `dontAsk` they are denied; in `bypassPermissions` they are allowed. Protected directories:
+Writes to a small set of paths are never auto-approved, in every mode except `bypassPermissions`. This prevents accidental corruption of repository state and Claude’s own configuration.
+
+Mode| Protected-path writes
+---|---
+`default`, `acceptEdits`, `plan`| Prompted
+`auto`| Routed to the classifier
+`dontAsk`| Denied
+`bypassPermissions`| Allowed
+
+Protected directories:
* `.git`
+ * `.config/git`
* `.vscode`
* `.idea`
* `.husky`
* `.cargo`
+ * `.devcontainer`
+ * `.yarn`
+ * `.mvn`
* `.claude`, except for `.claude/commands`, `.claude/agents`, `.claude/skills`, and `.claude/worktrees` where Claude routinely creates content
Protected files:
* `.gitconfig`, `.gitmodules`
- * `.bashrc`, `.bash_profile`, `.zshrc`, `.zprofile`, `.profile`
- * `.ripgreprc`
+ * `.bashrc`, `.bash_profile`, `.bash_login`, `.bash_aliases`, `.bash_logout`, `.zshrc`, `.zprofile`, `.zshenv`, `.zlogin`, `.zlogout`, `.profile`, `.envrc`
+ * `.npmrc`, `.yarnrc`, `.yarnrc.yml`, `.pnp.cjs`, `.pnp.loader.mjs`, `.pnpmfile.cjs`, `bunfig.toml`, `.bunfig.toml`
+ * `.bazelrc`, `.bazelversion`, `.bazeliskrc`
+ * `.pre-commit-config.yaml`, `lefthook.yml`, `lefthook.yaml`, `.lefthook.yml`, `.lefthook.yaml`
+ * `gradle-wrapper.properties`, `maven-wrapper.properties`
+ * `.devcontainer.json`
+ * `.ripgreprc`, `pyrightconfig.json`
* `.mcp.json`, `.claude.json`
##
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -208,7 +208,7 @@
Each action goes through a fixed decision order. The first matching step wins:
- 1. Actions matching your [allow or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately
+ 1. Actions matching your [allow or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately, except writes to protected paths, which route to the classifier even when an allow rule matches
2. Read-only actions and file edits in your working directory are auto-approved, except writes to protected paths
3. Everything else goes to the classifier
4. If the classifier blocks, Claude receives the reason and tries an alternative
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -274,6 +274,7 @@
* `.vscode`
* `.idea`
* `.husky`
+ * `.cargo`
* `.claude`, except for `.claude/commands`, `.claude/agents`, `.claude/skills`, and `.claude/worktrees` where Claude routinely creates content
Protected files:
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -73,7 +73,7 @@
Auto mode| `auto`
Bypass permissions| `bypassPermissions`
-Auto mode appears in the mode indicator after you enable **Allow dangerously skip permissions** in the extension settings, but it stays unavailable until your account meets every requirement listed in the auto mode section. The `claudeCode.initialPermissionMode` setting does not accept `auto`. To start in auto mode by default, set `defaultMode` in your [user settings](</docs/en/settings#settings-files>) instead. Claude Code ignores `defaultMode: "auto"` in project and local settings.Bypass permissions also requires the **Allow dangerously skip permissions** toggle before it appears in the mode indicator.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
+Auto mode appears in the mode indicator when your account meets every requirement listed in the auto mode section. The `claudeCode.initialPermissionMode` setting does not accept `auto`. To start in auto mode by default, set `defaultMode` in your [user settings](</docs/en/settings#settings-files>) instead. Claude Code ignores `defaultMode: "auto"` in project and local settings.Bypass permissions requires the **Allow dangerously skip permissions** toggle in the extension settings before it appears in the mode indicator.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
The JetBrains plugin runs Claude Code in the IDE terminal, so switching modes works the same as in the CLI: press `Shift+Tab` to cycle, or pass `--permission-mode` when launching.
@@ -156,7 +156,7 @@
* **Plan** : All plans.
* **Admin** : on Team and Enterprise, an admin must enable it in [Claude Code admin settings](<https://claude.ai/admin-settings/claude-code>) before users can turn it on. Admins can also lock it off by setting `permissions.disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>).
- * **Model** : Claude Sonnet 4.6, Opus 4.6, or Opus 4.7. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported.
+ * **Model** : Claude Opus 4.6 or later, or Sonnet 4.6. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported.
* **Provider** : Anthropic API only. Not available on Bedrock, Vertex, or Foundry.
If Claude Code reports auto mode as unavailable, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action is a transient classifier outage; see the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>). If you set `defaultMode: "auto"` in [settings](</docs/en/settings#available-settings>) and the session starts in `default` mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. Claude Code ignores `auto` from those files so a repository cannot grant itself auto mode. Move it to `~/.claude/settings.json`.
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -148,15 +148,15 @@
Auto mode requires Claude Code v2.1.83 or later.
-Auto mode lets Claude execute without permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Auto mode also nudges Claude to keep working without stopping for clarifying questions. For stronger autonomous behavior while keeping permission prompts, set the [Proactive output style](</docs/en/output-styles>) instead.
+Auto mode lets Claude execute without permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Auto mode also nudges Claude to keep working without stopping for clarifying questions, though Claude still asks when your prompt or a skill explicitly relies on it. For stronger autonomous behavior while keeping permission prompts, set the [Proactive output style](</docs/en/output-styles>) instead.
Auto mode is a research preview. It reduces prompts but does not guarantee safety. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations.
Auto mode is available only when your account meets all of these requirements:
- * **Plan** : Max, Team, Enterprise, or API. Not available on Pro.
+ * **Plan** : All plans.
* **Admin** : on Team and Enterprise, an admin must enable it in [Claude Code admin settings](<https://claude.ai/admin-settings/claude-code>) before users can turn it on. Admins can also lock it off by setting `permissions.disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>).
- * **Model** : Claude Sonnet 4.6, Opus 4.6, or Opus 4.7 on Team, Enterprise, and API plans; Claude Opus 4.7 only on Max plans. Other models, including Haiku and claude-3 models, are not supported.
+ * **Model** : Claude Sonnet 4.6, Opus 4.6, or Opus 4.7. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported.
* **Provider** : Anthropic API only. Not available on Bedrock, Vertex, or Foundry.
If Claude Code reports auto mode as unavailable, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action is a transient classifier outage; see the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>). If you set `defaultMode: "auto"` in [settings](</docs/en/settings#available-settings>) and the session starts in `default` mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. Claude Code ignores `auto` from those files so a repository cannot grant itself auto mode. Move it to `~/.claude/settings.json`.
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -148,7 +148,7 @@
Auto mode requires Claude Code v2.1.83 or later.
-Auto mode lets Claude execute without permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Auto mode also instructs Claude to execute immediately and minimize clarifying questions. To get that behavior while keeping permission prompts, set the [Proactive output style](</docs/en/output-styles>) instead.
+Auto mode lets Claude execute without permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Auto mode also nudges Claude to keep working without stopping for clarifying questions. For stronger autonomous behavior while keeping permission prompts, set the [Proactive output style](</docs/en/output-styles>) instead.
Auto mode is a research preview. It reduces prompts but does not guarantee safety. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations.
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -73,7 +73,7 @@
Auto mode| `auto`
Bypass permissions| `bypassPermissions`
-Auto mode appears in the mode indicator after you enable **Allow dangerously skip permissions** in the extension settings, but it stays unavailable until your account meets every requirement listed in the auto mode section. The `claudeCode.initialPermissionMode` setting does not accept `auto`; to start in auto mode by default, set `defaultMode` in your Claude Code [`settings.json`](</docs/en/settings#settings-files>) instead.Bypass permissions also requires the **Allow dangerously skip permissions** toggle before it appears in the mode indicator.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
+Auto mode appears in the mode indicator after you enable **Allow dangerously skip permissions** in the extension settings, but it stays unavailable until your account meets every requirement listed in the auto mode section. The `claudeCode.initialPermissionMode` setting does not accept `auto`. To start in auto mode by default, set `defaultMode` in your [user settings](</docs/en/settings#settings-files>) instead. Claude Code ignores `defaultMode: "auto"` in project and local settings.Bypass permissions also requires the **Allow dangerously skip permissions** toggle before it appears in the mode indicator.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
The JetBrains plugin runs Claude Code in the IDE terminal, so switching modes works the same as in the CLI: press `Shift+Tab` to cycle, or pass `--permission-mode` when launching.
@@ -159,7 +159,7 @@
* **Model** : Claude Sonnet 4.6, Opus 4.6, or Opus 4.7 on Team, Enterprise, and API plans; Claude Opus 4.7 only on Max plans. Other models, including Haiku and claude-3 models, are not supported.
* **Provider** : Anthropic API only. Not available on Bedrock, Vertex, or Foundry.
-If Claude Code reports auto mode as unavailable, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action is a transient classifier outage; see the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>).
+If Claude Code reports auto mode as unavailable, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action is a transient classifier outage; see the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>). If you set `defaultMode: "auto"` in [settings](</docs/en/settings#available-settings>) and the session starts in `default` mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. Claude Code ignores `auto` from those files so a repository cannot grant itself auto mode. Move it to `~/.claude/settings.json`.
###
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -124,7 +124,7 @@
* Keep planning with feedback
* Refine with [Ultraplan](</docs/en/ultraplan>) for browser-based review
-Press `Ctrl+G` to open the proposed plan in your default text editor and edit it directly before Claude proceeds. When [`showClearContextOnPlanAccept`](</docs/en/settings#available-settings>) is enabled, each approve option also offers to clear the planning context first. Accepting a plan also names the session from the plan content automatically, unless you’ve already set a name with `--name` or `/rename`.
+Approving a plan exits plan mode and switches the session to the permission mode each approve option describes, so Claude starts editing. To plan again, cycle back to plan mode with `Shift+Tab`, or prefix your next prompt with `/plan`. Press `Ctrl+G` to open the proposed plan in your default text editor and edit it directly before Claude proceeds. When [`showClearContextOnPlanAccept`](</docs/en/settings#available-settings>) is enabled, each approve option also offers to clear the planning context first. Accepting a plan also names the session from the plan content automatically, unless you’ve already set a name with `--name` or `/rename`.
###
@@ -148,7 +148,7 @@
Auto mode requires Claude Code v2.1.83 or later.
-Auto mode lets Claude execute without permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read.
+Auto mode lets Claude execute without permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read. Auto mode also instructs Claude to execute immediately and minimize clarifying questions. To get that behavior while keeping permission prompts, set the [Proactive output style](</docs/en/output-styles>) instead.
Auto mode is a research preview. It reduces prompts but does not guarantee safety. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations.
@@ -254,7 +254,11 @@
claude --permission-mode bypassPermissions
-The `--dangerously-skip-permissions` flag is equivalent.
+The `--dangerously-skip-permissions` flag is equivalent. On Linux and macOS, Claude Code refuses to start in this mode when running as root or under `sudo`:
+
+ --dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons
+
+The check is skipped automatically inside a recognized sandbox. To run autonomously in a container, use the [dev container](</docs/en/devcontainer>) configuration, which runs Claude Code as a non-root user.
`bypassPermissions` offers no protection against prompt injection or unintended actions. For background safety checks without prompts, use auto mode instead. Administrators can block this mode by setting `permissions.disableBypassPermissionsMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>).
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -108,7 +108,15 @@
claude --permission-mode plan
-Press `Shift+Tab` again to leave plan mode without approving a plan. When the plan is ready, Claude presents it and asks how to proceed. From that prompt you can:
+Press `Shift+Tab` again to leave plan mode without approving a plan.
+
+###
+
+
+
+Review and approve a plan
+
+When the plan is ready, Claude presents it and asks how to proceed. From that prompt you can:
* Approve and start in auto mode
* Approve and accept edits
@@ -116,7 +124,21 @@
* Keep planning with feedback
* Refine with [Ultraplan](</docs/en/ultraplan>) for browser-based review
-Each approve option also offers to clear the planning context first.
+Press `Ctrl+G` to open the proposed plan in your default text editor and edit it directly before Claude proceeds. When [`showClearContextOnPlanAccept`](</docs/en/settings#available-settings>) is enabled, each approve option also offers to clear the planning context first. Accepting a plan also names the session from the plan content automatically, unless you’ve already set a name with `--name` or `/rename`.
+
+###
+
+
+
+Set plan mode as the default
+
+To make plan mode the default for a project, set `defaultMode` in `.claude/settings.json`:
+
+ {
+ "permissions": {
+ "defaultMode": "plan"
+ }
+ }
##
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -21,9 +21,9 @@
`plan`| Reads only| Exploring a codebase before changing it
`auto`| Everything, with background safety checks| Long tasks, reducing prompt fatigue
`dontAsk`| Only pre-approved tools| Locked-down CI and scripts
-`bypassPermissions`| Everything except protected paths| Isolated containers and VMs only
-
-Regardless of mode, writes to protected paths are never auto-approved, guarding repository state and Claude’s own configuration against accidental corruption. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools in any mode except `bypassPermissions`, which skips the permission layer entirely.
+`bypassPermissions`| Everything| Isolated containers and VMs only
+
+In every mode except `bypassPermissions`, writes to protected paths are never auto-approved, guarding repository state and Claude’s own configuration against accidental corruption. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools in any mode except `bypassPermissions`, which skips the permission layer entirely.
##
@@ -94,7 +94,7 @@
Auto-approve file edits with acceptEdits mode
-`acceptEdits` mode lets Claude create and edit files in your working directory without prompting. The status bar shows `⏵⏵ accept edits on` while this mode is active. In addition to file edits, `acceptEdits` mode auto-approves common filesystem Bash commands: `mkdir`, `touch`, `rm`, `rmdir`, `mv`, `cp`, and `sed`. These commands are also auto-approved when prefixed with safe environment variables such as `LANG=C` or `NO_COLOR=1`, or process wrappers such as `timeout`, `nice`, or `nohup`. Like file edits, auto-approval applies only to paths inside your working directory or `additionalDirectories`. Paths outside that scope, writes to protected paths, and all other Bash commands still prompt. Use `acceptEdits` when you want to review changes in your editor or via `git diff` after the fact rather than approving each edit inline. Press `Shift+Tab` once from default mode to enter it, or start with it directly:
+`acceptEdits` mode lets Claude create and edit files in your working directory without prompting. The status bar shows `⏵⏵ accept edits on` while this mode is active. In addition to file edits, `acceptEdits` mode auto-approves common filesystem Bash commands: `mkdir`, `touch`, `rm`, `rmdir`, `mv`, `cp`, and `sed`. These commands are also auto-approved when prefixed with safe environment variables such as `LANG=C` or `NO_COLOR=1`, or process wrappers such as `timeout`, `nice`, or `nohup`. Like file edits, auto-approval applies only to paths inside your working directory or `additionalDirectories`. Paths outside that scope, writes to protected paths, and all other Bash commands still prompt. When the [PowerShell tool](</docs/en/tools-reference#powershell-tool>) is enabled, `acceptEdits` mode also auto-approves `Set-Content`, `Add-Content`, `Clear-Content`, and `Remove-Item` on in-scope paths, along with their common aliases. The same scope and protected-path rules apply. Use `acceptEdits` when you want to review changes in your editor or via `git diff` after the fact rather than approving each edit inline. Press `Shift+Tab` once from default mode to enter it, or start with it directly:
claude --permission-mode acceptEdits
@@ -228,7 +228,7 @@
Skip all checks with bypassPermissions mode
-`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately. Writes to protected paths are the only actions that still prompt. Only use this mode in isolated environments like containers, VMs, or dev containers without internet access, where Claude Code cannot damage your host system. You cannot enter `bypassPermissions` from a session that was started without one of the enabling flags; restart with one to enable it:
+`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately. As of v2.1.126 this includes writes to protected paths, which earlier versions still prompted for. Removals targeting the filesystem root or home directory, such as `rm -rf /` and `rm -rf ~`, still prompt as a circuit breaker against model error. Only use this mode in isolated environments like containers, VMs, or dev containers without internet access, where Claude Code cannot damage your host system. You cannot enter `bypassPermissions` from a session that was started without one of the enabling flags; restart with one to enable it:
claude --permission-mode bypassPermissions
@@ -242,7 +242,7 @@
Protected paths
-Writes to a small set of paths are never auto-approved, in every mode. This prevents accidental corruption of repository state and Claude’s own configuration. In `default`, `acceptEdits`, `plan`, and `bypassPermissions` these writes prompt; in `auto` they route to the classifier; in `dontAsk` they are denied. Protected directories:
+Writes to a small set of paths are never auto-approved, in every mode except `bypassPermissions`. This prevents accidental corruption of repository state and Claude’s own configuration. In `default`, `acceptEdits`, and `plan` these writes prompt; in `auto` they route to the classifier; in `dontAsk` they are denied; in `bypassPermissions` they are allowed. Protected directories:
* `.git`
* `.vscode`
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -1,3 +1,9 @@
+> ## Documentation Index
+>
+> Fetch the complete documentation index at: <https://code.claude.com/docs/llms.txt>
+>
+> Use this file to discover all available pages before exploring further.
+
When Claude wants to edit a file, run a shell command, or make a network request, it pauses and asks you to approve the action. Permission modes control how often that pause happens. The mode you pick shapes the flow of a session: default mode has you review each action as it comes, while looser modes let Claude work in longer uninterrupted stretches and report back when done. Pick more oversight for sensitive work, or fewer interruptions when you trust the direction.
##
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -222,7 +222,7 @@
Skip all checks with bypassPermissions mode
-`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately. Writes to protected paths are the only actions that still prompt. Only use this mode in isolated environments like containers, VMs, or devcontainers without internet access, where Claude Code cannot damage your host system. You cannot enter `bypassPermissions` from a session that was started without one of the enabling flags; restart with one to enable it:
+`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately. Writes to protected paths are the only actions that still prompt. Only use this mode in isolated environments like containers, VMs, or dev containers without internet access, where Claude Code cannot damage your host system. You cannot enter `bypassPermissions` from a session that was started without one of the enabling flags; restart with one to enable it:
claude --permission-mode bypassPermissions
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -187,7 +187,7 @@
On entering auto mode, broad allow rules that grant arbitrary code execution are dropped:
- * Blanket `Bash(*)`
+ * Blanket `Bash(*)` or `PowerShell(*)`
* Wildcarded interpreters like `Bash(python*)`
* Package-manager run commands
* `Agent` allow rules
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -39,7 +39,7 @@
**During a session** : press `Shift+Tab` to cycle `default` → `acceptEdits` → `plan`. The current mode appears in the status bar. Not every mode is in the default cycle:
- * `auto`: appears when your account meets the auto mode requirements
+ * `auto`: appears when your account meets the auto mode requirements; cycling to auto shows an opt-in prompt until you accept it, or select **No, don’t ask again** to remove auto from the cycle
* `bypassPermissions`: appears after you start with `--permission-mode bypassPermissions`, `--dangerously-skip-permissions`, or `--allow-dangerously-skip-permissions`; the `--allow-` variant adds the mode to the cycle without activating it
* `dontAsk`: never appears in the cycle; set it with `--permission-mode dontAsk`
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -139,7 +139,7 @@
What the classifier blocks by default
-The classifier trusts your working directory and your repo’s configured remotes. Everything else is treated as external until you [configure trusted infrastructure](</docs/en/permissions#configure-the-auto-mode-classifier>). **Blocked by default** :
+The classifier trusts your working directory and your repo’s configured remotes. Everything else is treated as external until you [configure trusted infrastructure](</docs/en/auto-mode-config>). **Blocked by default** :
* Downloading and executing code, like `curl | bash`
* Sending sensitive data to external endpoints
@@ -158,7 +158,7 @@
* Read-only HTTP requests
* Pushing to the branch you started on or one Claude created
-Sandbox network access requests are routed through the classifier rather than allowed by default. Run `claude auto-mode defaults` to see the full rule lists. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure the auto mode classifier](</docs/en/permissions#configure-the-auto-mode-classifier>).
+Sandbox network access requests are routed through the classifier rather than allowed by default. Run `claude auto-mode defaults` to see the full rule lists. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure auto mode](</docs/en/auto-mode-config>).
###
@@ -174,7 +174,7 @@
When auto mode falls back
-Each denied action shows a notification and appears in `/permissions` under the Recently denied tab, where you can press `r` to retry it with a manual approval. If the classifier blocks an action 3 times in a row or 20 times total, auto mode pauses and Claude Code resumes prompting. Approving the prompted action resumes auto mode. These thresholds are not configurable. Any allowed action resets the consecutive counter, while the total counter persists for the session and resets only when its own limit triggers a fallback. In [non-interactive mode](</docs/en/headless>) with the `-p` flag, repeated blocks abort the session since there is no user to prompt. Repeated blocks usually mean the classifier is missing context about your infrastructure. Use `/feedback` to report false positives, or have an administrator [configure trusted infrastructure](</docs/en/permissions#configure-the-auto-mode-classifier>).
+Each denied action shows a notification and appears in `/permissions` under the Recently denied tab, where you can press `r` to retry it with a manual approval. If the classifier blocks an action 3 times in a row or 20 times total, auto mode pauses and Claude Code resumes prompting. Approving the prompted action resumes auto mode. These thresholds are not configurable. Any allowed action resets the consecutive counter, while the total counter persists for the session and resets only when its own limit triggers a fallback. In [non-interactive mode](</docs/en/headless>) with the `-p` flag, repeated blocks abort the session since there is no user to prompt. Repeated blocks usually mean the classifier is missing context about your infrastructure. Use `/feedback` to report false positives, or have an administrator [configure trusted infrastructure](</docs/en/auto-mode-config>).
How the classifier evaluates actions
@@ -257,7 +257,8 @@
See also
- * [Permissions](</docs/en/permissions>): allow, ask, and deny rules; auto mode classifier configuration; managed policies
+ * [Permissions](</docs/en/permissions>): allow, ask, and deny rules; managed policies
+ * [Configure auto mode](</docs/en/auto-mode-config>): tell the classifier which infrastructure your organization trusts
* [Hooks](</docs/en/hooks>): custom permission logic via `PreToolUse` and `PermissionRequest` hooks
* [Ultraplan](</docs/en/ultraplan>): run plan mode in a Claude Code on the web session with browser-based review
* [Security](</docs/en/security>): safeguards and best practices
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -39,7 +39,7 @@
**During a session** : press `Shift+Tab` to cycle `default` → `acceptEdits` → `plan`. The current mode appears in the status bar. Not every mode is in the default cycle:
- * `auto`: appears after you opt in with `--enable-auto-mode` or the persisted equivalent in settings
+ * `auto`: appears when your account meets the auto mode requirements
* `bypassPermissions`: appears after you start with `--permission-mode bypassPermissions`, `--dangerously-skip-permissions`, or `--allow-dangerously-skip-permissions`; the `--allow-` variant adds the mode to the cycle without activating it
* `dontAsk`: never appears in the cycle; set it with `--permission-mode dontAsk`
@@ -126,14 +126,12 @@
Auto mode is available only when your account meets all of these requirements:
- * **Plan** : Team, Enterprise, or API. Not available on Pro or Max.
+ * **Plan** : Max, Team, Enterprise, or API. Not available on Pro.
* **Admin** : on Team and Enterprise, an admin must enable it in [Claude Code admin settings](<https://claude.ai/admin-settings/claude-code>) before users can turn it on. Admins can also lock it off by setting `permissions.disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>).
- * **Model** : Claude Sonnet 4.6 or Opus 4.6. Not available on Haiku or claude-3 models.
+ * **Model** : Claude Sonnet 4.6, Opus 4.6, or Opus 4.7 on Team, Enterprise, and API plans; Claude Opus 4.7 only on Max plans. Other models, including Haiku and claude-3 models, are not supported.
* **Provider** : Anthropic API only. Not available on Bedrock, Vertex, or Foundry.
-If Claude Code reports auto mode as unavailable, one of these requirements is unmet; this is not a transient outage. Once enabled, start with the flag and `auto` joins the `Shift+Tab` cycle:
-
- claude --enable-auto-mode
+If Claude Code reports auto mode as unavailable, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action is a transient classifier outage; see the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>).
###
@@ -159,9 +157,16 @@
* Reading `.env` and sending credentials to their matching API
* Read-only HTTP requests
* Pushing to the branch you started on or one Claude created
- * Sandbox network access requests
-
-Run `claude auto-mode defaults` to see the full rule lists. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure the auto mode classifier](</docs/en/permissions#configure-the-auto-mode-classifier>).
+
+Sandbox network access requests are routed through the classifier rather than allowed by default. Run `claude auto-mode defaults` to see the full rule lists. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure the auto mode classifier](</docs/en/permissions#configure-the-auto-mode-classifier>).
+
+###
+
+
+
+Boundaries you state in conversation
+
+The classifier treats boundaries you state in the conversation as a block signal. If you tell Claude “don’t push” or “wait until I review before deploying”, the classifier blocks matching actions even when the default rules would allow them. A boundary stays in force until you lift it in a later message. Claude’s own judgment that a condition was met does not lift it. Boundaries are not stored as rules. The classifier re-reads them from the transcript on each check, so a boundary can be lost if [context compaction](</docs/en/costs#reduce-token-usage>) removes the message that stated it. For a hard guarantee, add a [deny rule](</docs/en/permissions#permission-rule-syntax>) instead.
###
@@ -199,7 +204,7 @@
Cost and latency
-The classifier currently runs on Claude Sonnet 4.6 regardless of your main session model. Classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations.
+The classifier runs on a server-configured model that is independent of your `/model` selection, so switching models does not change classifier availability. Classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations.
##
@@ -207,7 +212,7 @@
Allow only pre-approved tools with dontAsk mode
-`dontAsk` mode auto-denies every tool that is not explicitly allowed. Only actions matching your `permissions.allow` rules can execute; explicit `ask` rules are also denied rather than prompting. This makes the mode fully non-interactive for CI pipelines or restricted environments where you pre-define exactly what Claude may do. Set it at startup with the flag:
+`dontAsk` mode auto-denies every tool call that would otherwise prompt. Only actions matching your `permissions.allow` rules and [read-only Bash commands](</docs/en/permissions#read-only-commands>) can execute; explicit `ask` rules are denied rather than prompting. This makes the mode fully non-interactive for CI pipelines or restricted environments where you pre-define exactly what Claude may do. Set it at startup with the flag:
claude --permission-mode dontAsk
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -88,7 +88,7 @@
Auto-approve file edits with acceptEdits mode
-`acceptEdits` mode lets Claude create and edit files in your working directory without prompting. The status bar shows `⏵⏵ accept edits on` while this mode is active. In addition to file edits, `acceptEdits` mode auto-approves common filesystem Bash commands: `mkdir`, `touch`, `rm`, `rmdir`, `mv`, `cp`, and `sed`. Like file edits, these are auto-approved only for paths inside your working directory or `additionalDirectories`. Paths outside that scope, writes to protected paths, and all other Bash commands still prompt. Use `acceptEdits` when you want to review changes in your editor or via `git diff` after the fact rather than approving each edit inline. Press `Shift+Tab` once from default mode to enter it, or start with it directly:
+`acceptEdits` mode lets Claude create and edit files in your working directory without prompting. The status bar shows `⏵⏵ accept edits on` while this mode is active. In addition to file edits, `acceptEdits` mode auto-approves common filesystem Bash commands: `mkdir`, `touch`, `rm`, `rmdir`, `mv`, `cp`, and `sed`. These commands are also auto-approved when prefixed with safe environment variables such as `LANG=C` or `NO_COLOR=1`, or process wrappers such as `timeout`, `nice`, or `nohup`. Like file edits, auto-approval applies only to paths inside your working directory or `additionalDirectories`. Paths outside that scope, writes to protected paths, and all other Bash commands still prompt. Use `acceptEdits` when you want to review changes in your editor or via `git diff` after the fact rather than approving each edit inline. Press `Shift+Tab` once from default mode to enter it, or start with it directly:
claude --permission-mode acceptEdits
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -11,7 +11,7 @@
Mode| What runs without asking| Best for
---|---|---
`default`| Reads only| Getting started, sensitive work
-`acceptEdits`| Reads and file edits| Iterating on code you’re reviewing
+`acceptEdits`| Reads, file edits, and common filesystem commands (`mkdir`, `touch`, `mv`, `cp`, etc.)| Iterating on code you’re reviewing
`plan`| Reads only| Exploring a codebase before changing it
`auto`| Everything, with background safety checks| Long tasks, reducing prompt fatigue
`dontAsk`| Only pre-approved tools| Locked-down CI and scripts
@@ -88,7 +88,7 @@
Auto-approve file edits with acceptEdits mode
-`acceptEdits` mode lets Claude create and edit files in your working directory without prompting. Writes to protected paths and all non-edit actions still prompt the same as default mode. The status bar shows `⏵⏵ accept edits on` while this mode is active. Use `acceptEdits` when you want to review changes in your editor or via `git diff` after the fact rather than approving each edit inline. Press `Shift+Tab` once from default mode to enter it, or start with it directly:
+`acceptEdits` mode lets Claude create and edit files in your working directory without prompting. The status bar shows `⏵⏵ accept edits on` while this mode is active. In addition to file edits, `acceptEdits` mode auto-approves common filesystem Bash commands: `mkdir`, `touch`, `rm`, `rmdir`, `mv`, `cp`, and `sed`. Like file edits, these are auto-approved only for paths inside your working directory or `additionalDirectories`. Paths outside that scope, writes to protected paths, and all other Bash commands still prompt. Use `acceptEdits` when you want to review changes in your editor or via `git diff` after the fact rather than approving each edit inline. Press `Shift+Tab` once from default mode to enter it, or start with it directly:
claude --permission-mode acceptEdits
@@ -159,6 +159,7 @@
* Reading `.env` and sending credentials to their matching API
* Read-only HTTP requests
* Pushing to the branch you started on or one Claude created
+ * Sandbox network access requests
Run `claude auto-mode defaults` to see the full rule lists. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure the auto mode classifier](</docs/en/permissions#configure-the-auto-mode-classifier>).
Show diff (429 lines)
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -1,11 +1,23 @@
-Permission modes control whether Claude asks before acting. Different tasks call for different levels of autonomy: you might want full oversight for sensitive work, minimal interruptions for a long refactor, or read-only access while exploring a codebase. This page covers how to:
-
- * Switch modes during a session, at startup, or as a default
- * Choose a mode based on what Claude should be able to do without asking
- * Run auto mode with background safety checks, and see what it blocks by default
- * Plan changes read-only before approving edits
- * Restrict Claude to pre-approved tools for locked-down environments
- * Skip checks entirely in isolated environments
+When Claude wants to edit a file, run a shell command, or make a network request, it pauses and asks you to approve the action. Permission modes control how often that pause happens. The mode you pick shapes the flow of a session: default mode has you review each action as it comes, while looser modes let Claude work in longer uninterrupted stretches and report back when done. Pick more oversight for sensitive work, or fewer interruptions when you trust the direction.
+
+##
+
+
+
+Available modes
+
+Each mode makes a different tradeoff between convenience and oversight. The table below shows what Claude can do without a permission prompt in each mode.
+
+Mode| What runs without asking| Best for
+---|---|---
+`default`| Reads only| Getting started, sensitive work
+`acceptEdits`| Reads and file edits| Iterating on code you’re reviewing
+`plan`| Reads only| Exploring a codebase before changing it
+`auto`| Everything, with background safety checks| Long tasks, reducing prompt fatigue
+`dontAsk`| Only pre-approved tools| Locked-down CI and scripts
+`bypassPermissions`| Everything except protected paths| Isolated containers and VMs only
+
+Regardless of mode, writes to protected paths are never auto-approved, guarding repository state and Claude’s own configuration against accidental corruption. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools in any mode except `bypassPermissions`, which skips the permission layer entirely.
##
@@ -13,23 +25,29 @@
Switch permission modes
-You can switch modes at any time during a session, at startup, or as a persistent default. The mechanism depends on where you’re running Claude Code.
+You can switch modes mid-session, at startup, or as a persistent default. The mode is set through these controls, not by asking Claude in chat. Select your interface below to see how to change it.
* CLI
+ * VS Code
+
* JetBrains
- * VS Code
-
* Desktop
* Web and mobile
-**During a session** : press `Shift+Tab` to cycle through `default` → `acceptEdits` → `plan` → `auto`. The current mode appears in the status bar. `auto` does not appear in the cycle until you pass `--enable-auto-mode` at startup. Auto also requires a Team, Enterprise, or API plan and Claude Sonnet 4.6 or Opus 4.6, so the option may remain unavailable even with the flag. If `bypassPermissions` is also enabled, it appears in the cycle between `plan` and `auto`.**At startup** : pass the mode as a CLI flag:
+**During a session** : press `Shift+Tab` to cycle `default` → `acceptEdits` → `plan`. The current mode appears in the status bar. Not every mode is in the default cycle:
+
+ * `auto`: appears after you opt in with `--enable-auto-mode` or the persisted equivalent in settings
+ * `bypassPermissions`: appears after you start with `--permission-mode bypassPermissions`, `--dangerously-skip-permissions`, or `--allow-dangerously-skip-permissions`; the `--allow-` variant adds the mode to the cycle without activating it
+ * `dontAsk`: never appears in the cycle; set it with `--permission-mode dontAsk`
+
+Enabled optional modes slot in after `plan`, with `bypassPermissions` first and `auto` last. If you have both enabled, you will cycle through `bypassPermissions` on the way to `auto`.**At startup** : pass the mode as a flag.
claude --permission-mode plan
-**As a default** : set `defaultMode` in your [settings file](</docs/en/settings#settings-files>):
+**As a default** : set `defaultMode` in [settings](</docs/en/settings#settings-files>).
{
"permissions": {
@@ -37,64 +55,42 @@
}
}
-**Non-interactively** : the same flag works with `-p` for scripted runs:
-
- claude -p "refactor auth" --permission-mode acceptEdits
-
-`dontAsk` is never in the `Shift+Tab` cycle. `bypassPermissions` appears in the cycle only if you started the session with `--permission-mode bypassPermissions`, `--dangerously-skip-permissions`, or `--allow-dangerously-skip-permissions`. The third flag adds the mode to the cycle without activating it, so you can compose it with a different starting mode like `--permission-mode plan`. Set any of these at startup or in your settings file.
-
-The JetBrains plugin launches Claude Code in the IDE terminal, so switching modes works the same as in the CLI: press `Shift+Tab` to cycle, or pass `--permission-mode` when launching.
-
-**During a session** : click the mode indicator at the bottom of the prompt box to switch modes.**As a default** : set `claudeCode.initialPermissionMode` in VS Code settings, or use the Claude Code extension settings panel.The VS Code UI uses friendly labels that map to the settings keys below:
-
-UI label| Settings key
+The same `--permission-mode` flag works with `-p` for [non-interactive runs](</docs/en/headless>).
+
+**During a session** : click the mode indicator at the bottom of the prompt box.**As a default** : set `claudeCode.initialPermissionMode` in VS Code settings, or use the Claude Code extension settings panel.The mode indicator shows these labels, mapped to the mode each one applies:
+
+UI label| Mode
---|---
-Ask permissions| `default`
-Auto accept edits| `acceptEdits`
+Ask before edits| `default`
+Edit automatically| `acceptEdits`
Plan mode| `plan`
-Auto| `auto`
+Auto mode| `auto`
Bypass permissions| `bypassPermissions`
-Auto and Bypass permissions appear only after you enable **Allow dangerously skip permissions** in the extension settings. Auto also requires a Team, Enterprise, or API plan and Claude Sonnet 4.6 or Opus 4.6, so the option may remain unavailable even with the toggle on.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
-
-**During a session** : use the mode selector next to the send button. You can change it before or during a session.The Desktop UI uses friendly labels that map to the settings keys below:
-
-UI label| Settings key
----|---
-Ask permissions| `default`
-Auto accept edits| `acceptEdits`
-Plan mode| `plan`
-Auto| `auto`
-Bypass permissions| `bypassPermissions`
-
-Auto and Bypass permissions appear in the selector only after you enable them in Desktop settings. See the [Desktop guide](</docs/en/desktop#choose-a-permission-mode>) for details.
-
-**During a session** : use the mode dropdown next to the prompt box on [claude.ai/code](<https://claude.ai/code>) or in the Claude mobile app.For [Claude Code on the web](</docs/en/claude-code-on-the-web>) sessions running on Anthropic’s cloud VMs, the dropdown offers Auto accept edits and Plan mode. Ask permissions and Auto are not available for cloud sessions.For [Remote Control](</docs/en/remote-control>) sessions running on your local machine, the dropdown offers Ask permissions, Auto accept edits, and Plan mode. You can also set the starting mode when you launch the local host:
+Auto mode appears in the mode indicator after you enable **Allow dangerously skip permissions** in the extension settings, but it stays unavailable until your account meets every requirement listed in the auto mode section. The `claudeCode.initialPermissionMode` setting does not accept `auto`; to start in auto mode by default, set `defaultMode` in your Claude Code [`settings.json`](</docs/en/settings#settings-files>) instead.Bypass permissions also requires the **Allow dangerously skip permissions** toggle before it appears in the mode indicator.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
+
+The JetBrains plugin runs Claude Code in the IDE terminal, so switching modes works the same as in the CLI: press `Shift+Tab` to cycle, or pass `--permission-mode` when launching.
+
+Use the mode selector next to the send button. Auto and Bypass permissions appear only after you enable them in Desktop settings. See the [Desktop guide](</docs/en/desktop#choose-a-permission-mode>).
+
+Use the mode dropdown next to the prompt box on [claude.ai/code](<https://claude.ai/code>) or in the mobile app. Permission prompts appear in claude.ai for approval. Which modes appear depends on where the session runs:
+
+ * **Cloud sessions** on [Claude Code on the web](</docs/en/claude-code-on-the-web>): Auto accept edits and Plan mode. Ask permissions, Auto, and Bypass permissions are not available.
+ * **[Remote Control](</docs/en/remote-control>) sessions** on your local machine: Ask permissions, Auto accept edits, and Plan mode. Auto and Bypass permissions are not available.
+
+For Remote Control, you can also set the starting mode when launching the host:
claude remote-control --permission-mode acceptEdits
-Permission prompts appear in claude.ai for approval.
-
-Permission modes are set through the UI, CLI flags, or settings files. Telling Claude “stop asking for permission” in the chat does not change the mode. See [Permissions](</docs/en/permissions>) for how modes interact with allow, ask, and deny rules.
-
-##
-
-
-
-Available modes
-
-Each mode makes a different tradeoff between convenience and oversight. Pick the one that matches your task.
-
-Mode| What Claude can do without asking| Best for
----|---|---
-`default`| Read files| Getting started, sensitive work
-`acceptEdits`| Read and edit files except in protected directories| Iterating on code you’re reviewing
-`plan`| Read files| Exploring a codebase, planning a refactor
-`auto`| All actions, with background safety checks| Long-running tasks, reducing prompt fatigue
-`bypassPermissions`| All actions except writes to protected directories| Isolated containers and VMs only
-`dontAsk`| Only pre-approved tools| Locked-down environments
-
-Regardless of mode, writes to `.git`, `.vscode`, `.idea`, `.husky`, and `.claude` are never auto-approved, except for `.claude/commands`, `.claude/agents`, and `.claude/skills` where Claude routinely creates skills, subagents, and commands. This protects repository state, editor configuration, git hooks, and Claude’s own settings from accidental corruption.
+##
+
+
+
+Auto-approve file edits with acceptEdits mode
+
+`acceptEdits` mode lets Claude create and edit files in your working directory without prompting. Writes to protected paths and all non-edit actions still prompt the same as default mode. The status bar shows `⏵⏵ accept edits on` while this mode is active. Use `acceptEdits` when you want to review changes in your editor or via `git diff` after the fact rather than approving each edit inline. Press `Shift+Tab` once from default mode to enter it, or start with it directly:
+
+ claude --permission-mode acceptEdits
##
@@ -102,45 +98,17 @@
Analyze before you edit with plan mode
-Plan mode tells Claude to research and propose changes without making them. Claude reads files, runs shell commands to explore, asks clarifying questions, and writes a plan file, but does not edit your source code. Permission prompts work the same as default mode: you still approve Bash commands, network requests, and other actions that would normally prompt.
-
-###
-
-
-
-When to use plan mode
-
-Plan mode is useful when you want Claude to research and propose an approach before making changes:
-
- * **Multi-step implementation** : when a feature requires edits across many files
- * **Code exploration** : when you want to research the codebase before changing anything
- * **Interactive development** : when you want to iterate on the direction with Claude
-
-###
-
-
-
-Start and use plan mode
-
-Enter plan mode for a single request by prefixing your prompt with `/plan`, or switch the whole session into plan mode by pressing `Shift+Tab` to cycle through permission modes. You can also start in plan mode from the CLI:
+Plan mode tells Claude to research and propose changes without making them. Claude reads files, runs shell commands to explore, and writes a plan, but does not edit your source. Permission prompts still apply the same as default mode. Enter plan mode by pressing `Shift+Tab` or prefixing a single prompt with `/plan`. You can also start in plan mode from the CLI:
claude --permission-mode plan
-This example starts a planning session for a complex refactor:
-
- I need to refactor our authentication system to use OAuth2. Create a detailed migration plan.
-
-Claude analyzes the current implementation and creates a plan. Refine with follow-ups:
-
- What about backward compatibility?
- How should we handle database migration?
-
-When the plan is ready, Claude presents it and asks how to proceed. From that prompt you can:
+Press `Shift+Tab` again to leave plan mode without approving a plan. When the plan is ready, Claude presents it and asks how to proceed. From that prompt you can:
* Approve and start in auto mode
* Approve and accept edits
- * Approve and manually review each edit
- * Keep planning, which sends your feedback back to Claude for another round
+ * Approve and review each edit manually
+ * Keep planning with feedback
+ * Refine with [Ultraplan](</docs/en/ultraplan>) for browser-based review
Each approve option also offers to clear the planning context first.
@@ -150,61 +118,49 @@
Eliminate prompts with auto mode
-Auto mode is available on Team, Enterprise, and API plans. On Team and Enterprise, an admin must enable it in [Claude Code admin settings](<https://claude.ai/admin-settings/claude-code>) before users can turn it on. It requires Claude Sonnet 4.6 or Claude Opus 4.6, and is not available on Haiku, claude-3 models, or third-party providers (Bedrock, Vertex, Foundry). Auto mode lets Claude execute actions without showing permission prompts. Before each action runs, a separate classifier model reviews the conversation and decides whether the action matches what you asked for. It blocks actions that escalate beyond the task scope, target infrastructure the classifier doesn’t recognize as trusted, or appear to be driven by prompt injection: hostile instructions embedded in a file, web page, or tool result that attempt to redirect Claude toward actions you never asked for. The defense is layered: a server-side probe scans incoming tool results and flags suspicious content before Claude reads it, while the classifier itself is never shown tool results, so injected instructions cannot influence its approval decisions. For a deeper look at how these layers work together, see the [auto mode announcement](<https://claude.com/blog/auto-mode>) and the [engineering deep dive](<https://www.anthropic.com/engineering/claude-code-auto-mode>).
-
-Auto mode is a research preview. It reduces prompts but does not guarantee safety. It provides more protection than `bypassPermissions` but is not as thorough as manually reviewing each action. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations.
-
-**Model** : the classifier runs on Claude Sonnet 4.6, even if your main session uses a different model. **Cost** : classifier calls count toward your token usage the same as main-session calls. Each checked action sends a portion of the conversation transcript plus the pending action to the classifier. The extra cost comes mainly from shell commands and network operations, since read-only actions and file edits in your working directory outside protected directories don’t trigger a classifier call. **Latency** : each classifier check adds a round-trip before the action executes.
+Auto mode requires Claude Code v2.1.83 or later.
+
+Auto mode lets Claude execute without permission prompts. A separate classifier model reviews actions before they run, blocking anything that escalates beyond your request, targets unrecognized infrastructure, or appears driven by hostile content Claude read.
+
+Auto mode is a research preview. It reduces prompts but does not guarantee safety. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations.
+
+Auto mode is available only when your account meets all of these requirements:
+
+ * **Plan** : Team, Enterprise, or API. Not available on Pro or Max.
+ * **Admin** : on Team and Enterprise, an admin must enable it in [Claude Code admin settings](<https://claude.ai/admin-settings/claude-code>) before users can turn it on. Admins can also lock it off by setting `permissions.disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>).
+ * **Model** : Claude Sonnet 4.6 or Opus 4.6. Not available on Haiku or claude-3 models.
+ * **Provider** : Anthropic API only. Not available on Bedrock, Vertex, or Foundry.
+
+If Claude Code reports auto mode as unavailable, one of these requirements is unmet; this is not a transient outage. Once enabled, start with the flag and `auto` joins the `Shift+Tab` cycle:
+
+ claude --enable-auto-mode
###
-How actions are evaluated
-
-Each action goes through a fixed decision order. The first matching step wins:
-
- 1. Actions matching your [allow or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately
- 2. Read-only actions and file edits in your working directory are auto-approved, except writes to protected directories
- 3. Everything else goes to the classifier
- 4. If the classifier blocks, Claude receives the reason and attempts an alternative approach
-
-On entering auto mode, Claude Code drops any allow rule that is known to grant arbitrary code execution: blanket shell access like `Bash(*)`, wildcarded script interpreters like `Bash(python*)` or `Bash(node*)`, package-manager run commands, and any `Agent` allow rule. These rules would auto-approve the commands and subagent delegations most capable of causing damage before the classifier ever sees them. Narrow rules like `Bash(npm test)` carry over. The dropped rules are restored when you leave auto mode. The classifier receives user messages and tool calls as input, with Claude’s own text and tool results stripped out. It also receives your CLAUDE.md content, so actions described in your project instructions are factored into allow and block decisions. Because tool results never reach the classifier, hostile content in a file or web page cannot manipulate it directly. The classifier evaluates the pending action against a customizable set of block and allow rules, checking whether the action is an overeager escalation beyond what you asked for, a mistake about what’s safe to touch, or a sudden departure from your stated intent that suggests Claude may have been steered by something it read. Unlike your permission rules, which match tool names and argument patterns, the classifier reads prose descriptions of what to block and allow: it reasons about the action in context rather than matching syntax.
-
-###
-
-
-
-How auto mode handles subagents
-
-When Claude spawns a [subagent](</docs/en/sub-agents>), the classifier evaluates the delegated task before the subagent starts. A task description that looks dangerous on its own, like “delete all remote branches matching this pattern”, is blocked at spawn time. Inside the subagent, auto mode runs with the same block and allow rules as the parent session. Any `permissionMode` the subagent defines in its own frontmatter is ignored. The subagent’s own tool calls go through the classifier independently. When the subagent finishes, the classifier reviews its full action history. A subagent that was benign at spawn could have been compromised mid-run by content it read. If the return check flags a concern, a security warning is prepended to the subagent’s results so the main agent can decide how to proceed.
-
-###
-
-
-
What the classifier blocks by default
-Out of the box, the classifier trusts your working directory and, if you’re in a git repo, that repo’s configured remotes. Everything else is treated as external: your company’s source control orgs, cloud buckets, and internal services are unknown until you tell the classifier about them. **Blocked by default** :
-
- * Downloading and executing code, like `curl | bash` or scripts from cloned repos
+The classifier trusts your working directory and your repo’s configured remotes. Everything else is treated as external until you [configure trusted infrastructure](</docs/en/permissions#configure-the-auto-mode-classifier>). **Blocked by default** :
+
+ * Downloading and executing code, like `curl | bash`
* Sending sensitive data to external endpoints
* Production deploys and migrations
* Mass deletion on cloud storage
* Granting IAM or repo permissions
* Modifying shared infrastructure
- * Irreversibly destroying files that existed before the session started
- * Destructive source control operations like force push or pushing directly to `main`
+ * Irreversibly destroying files that existed before the session
+ * Force push, or pushing directly to `main`
**Allowed by default** :
* Local file operations in your working directory
- * Installing dependencies already declared in your lock files or manifests
+ * Installing dependencies declared in your lock files or manifests
* Reading `.env` and sending credentials to their matching API
* Read-only HTTP requests
* Pushing to the branch you started on or one Claude created
-To see the full default rule lists as the classifier receives them, run `claude auto-mode defaults`. If auto mode blocks something routine for your team, like pushing to your own org’s repo or writing to a company bucket, it’s because the classifier doesn’t know those are trusted. Administrators can add trusted repos, buckets, and internal services via the `autoMode.environment` setting: see [Configure the auto mode classifier](</docs/en/permissions#configure-the-auto-mode-classifier>) for the full configuration guide.
+Run `claude auto-mode defaults` to see the full rule lists. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via the `autoMode.environment` setting: see [Configure the auto mode classifier](</docs/en/permissions#configure-the-auto-mode-classifier>).
###
@@ -212,12 +168,37 @@
When auto mode falls back
-The fallback design keeps false positives from derailing a session: a mistaken block costs Claude a retry, not your progress. If the classifier blocks an action 3 times in a row or 20 times total in one session, auto mode pauses and Claude Code resumes prompting for each action. These thresholds are not configurable.
-
- * **CLI** : you see a notification in the status area, and the denied action appears in `/permissions` under the Recently denied tab. Approving the prompted action resets the denial counters, so you can continue in auto mode
- * **Non-interactive mode** with the `-p` flag: aborts the session, since there is no user to prompt
-
-Repeated blocks usually mean one of two things: the task genuinely requires actions the classifier is built to stop, or the classifier is missing context about your trusted infrastructure and treating safe actions as risky. If the blocks look like false positives, or if the classifier misses something it should have caught, use `/feedback` to report it. If blocks are happening because the classifier doesn’t recognize your repos or services as trusted, have an administrator [configure trusted infrastructure](</docs/en/permissions#configure-the-auto-mode-classifier>) in managed settings.
+Each denied action shows a notification and appears in `/permissions` under the Recently denied tab, where you can press `r` to retry it with a manual approval. If the classifier blocks an action 3 times in a row or 20 times total, auto mode pauses and Claude Code resumes prompting. Approving the prompted action resumes auto mode. These thresholds are not configurable. Any allowed action resets the consecutive counter, while the total counter persists for the session and resets only when its own limit triggers a fallback. In [non-interactive mode](</docs/en/headless>) with the `-p` flag, repeated blocks abort the session since there is no user to prompt. Repeated blocks usually mean the classifier is missing context about your infrastructure. Use `/feedback` to report false positives, or have an administrator [configure trusted infrastructure](</docs/en/permissions#configure-the-auto-mode-classifier>).
+
+How the classifier evaluates actions
+
+Each action goes through a fixed decision order. The first matching step wins:
+
+ 1. Actions matching your [allow or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately
+ 2. Read-only actions and file edits in your working directory are auto-approved, except writes to protected paths
+ 3. Everything else goes to the classifier
+ 4. If the classifier blocks, Claude receives the reason and tries an alternative
+
+On entering auto mode, broad allow rules that grant arbitrary code execution are dropped:
+
+ * Blanket `Bash(*)`
+ * Wildcarded interpreters like `Bash(python*)`
+ * Package-manager run commands
+ * `Agent` allow rules
+
+Narrow rules like `Bash(npm test)` carry over. Dropped rules are restored when you leave auto mode.The classifier sees user messages, tool calls, and your CLAUDE.md content. Tool results are stripped, so hostile content in a file or web page cannot manipulate it directly. A separate server-side probe scans incoming tool results and flags suspicious content before Claude reads it. For more on how these layers work together, see the [auto mode announcement](<https://claude.com/blog/auto-mode>) and the [engineering deep dive](<https://www.anthropic.com/engineering/claude-code-auto-mode>).
+
+How auto mode handles subagents
+
+The classifier checks [subagent](</docs/en/sub-agents>) work at three points:
+
+ 1. Before a subagent starts, the delegated task description is evaluated, so a dangerous-looking task is blocked at spawn time.
+ 2. While the subagent runs, each of its actions goes through the classifier with the same rules as the parent session, and any `permissionMode` in the subagent’s frontmatter is ignored.
+ 3. When the subagent finishes, the classifier reviews its full action history; if that return check flags a concern, a security warning is prepended to the subagent’s results.
+
+Cost and latency
+
+The classifier currently runs on Claude Sonnet 4.6 regardless of your main session model. Classifier calls count toward your token usage. Each check sends a portion of the transcript plus the pending action, adding a round-trip before execution. Reads and working-directory edits outside protected paths skip the classifier, so the overhead comes mainly from shell commands and network operations.
##
@@ -225,7 +206,7 @@
Allow only pre-approved tools with dontAsk mode
-`dontAsk` mode auto-denies every tool that is not explicitly allowed. Only actions matching your `/permissions` allow rules or `permissions.allow` settings can execute. If a tool has an explicit `ask` rule, the action is also denied rather than prompting. This makes the mode fully non-interactive, suitable for CI pipelines or restricted environments where you pre-define exactly what Claude is permitted to do.
+`dontAsk` mode auto-denies every tool that is not explicitly allowed. Only actions matching your `permissions.allow` rules can execute; explicit `ask` rules are also denied rather than prompting. This makes the mode fully non-interactive for CI pipelines or restricted environments where you pre-define exactly what Claude may do. Set it at startup with the flag:
claude --permission-mode dontAsk
@@ -235,37 +216,34 @@
Skip all checks with bypassPermissions mode
-`bypassPermissions` mode disables permission prompts and safety checks. Tool calls execute immediately, except for writes to `.git`, `.vscode`, `.idea`, and `.husky`, which still prompt to prevent accidental corruption of repository state, editor configuration, and git hooks. Writes to `.claude` also prompt, except for `.claude/commands`, `.claude/agents`, and `.claude/skills` where Claude routinely creates skills, subagents, and commands. Only use this mode in isolated environments like containers, VMs, or devcontainers without internet access, where Claude Code cannot cause damage to your host system.
+`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately. Writes to protected paths are the only actions that still prompt. Only use this mode in isolated environments like containers, VMs, or devcontainers without internet access, where Claude Code cannot damage your host system. You cannot enter `bypassPermissions` from a session that was started without one of the enabling flags; restart with one to enable it:
claude --permission-mode bypassPermissions
-The `--dangerously-skip-permissions` flag is equivalent to `--permission-mode bypassPermissions`:
-
- claude -p "refactor the auth module" --dangerously-skip-permissions
-
-`bypassPermissions` mode offers no protection against prompt injection or unintended actions. For a safer alternative that still maintains background safety checks, use auto mode. Administrators can block this mode by setting `permissions.disableBypassPermissionsMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>).
-
-##
-
-
-
-Compare permission approaches
-
-The table below summarizes the key differences in how each mode handles approvals. `plan` is omitted since it restricts what Claude can do rather than how approvals work.
-
-| `default`| `acceptEdits`| `auto`| `dontAsk`| `bypassPermissions`
----|---|---|---|---|---
-Permission prompts| File edits and commands| Commands and protected directories| None unless fallback triggers| None, blocked unless pre-allowed| Protected directories only
-Safety checks| You review each action| You review commands and protected-directory writes| Classifier reviews commands and protected-directory writes| Your pre-approved rules only| You review protected-directory writes
-Token usage| Standard| Standard| Higher, from classifier calls| Standard| Standard
-
-##
-
-
-
-Customize permissions further
-
-Permission modes set the baseline approval behavior. For control over individual tools or commands, layer additional configuration on top of the active mode. **Permission rules** are the first stop. Add `allow`, `ask`, or `deny` entries to your settings file to pre-approve safe commands, force a prompt for risky ones, or block specific tools entirely. Rules apply in every mode except `bypassPermissions`, and are matched by tool name and argument pattern. See [Manage permissions](</docs/en/permissions#manage-permissions>) for syntax and examples. **Hooks** cover logic that pattern-matching rules can’t express. A [`PreToolUse` hook](</docs/en/hooks#pretooluse-decision-control>) runs before every tool call and can allow, deny, or escalate based on command content, file paths, time of day, or a response from an external policy service. A [`PermissionRequest` hook](</docs/en/hooks#permissionrequest>) intercepts the permission dialog itself and answers on your behalf. See [Hooks](</docs/en/hooks>) for configuration.
+The `--dangerously-skip-permissions` flag is equivalent.
+
+`bypassPermissions` offers no protection against prompt injection or unintended actions. For background safety checks without prompts, use auto mode instead. Administrators can block this mode by setting `permissions.disableBypassPermissionsMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>).
+
+##
+
+
+
+Protected paths
+
+Writes to a small set of paths are never auto-approved, in every mode. This prevents accidental corruption of repository state and Claude’s own configuration. In `default`, `acceptEdits`, `plan`, and `bypassPermissions` these writes prompt; in `auto` they route to the classifier; in `dontAsk` they are denied. Protected directories:
+
+ * `.git`
+ * `.vscode`
+ * `.idea`
+ * `.husky`
+ * `.claude`, except for `.claude/commands`, `.claude/agents`, `.claude/skills`, and `.claude/worktrees` where Claude routinely creates content
+
+Protected files:
+
+ * `.gitconfig`, `.gitmodules`
+ * `.bashrc`, `.bash_profile`, `.zshrc`, `.zprofile`, `.profile`
+ * `.ripgreprc`
+ * `.mcp.json`, `.claude.json`
##
@@ -273,8 +251,9 @@
See also
- * [Permissions](</docs/en/permissions>): permission rules, syntax, managed policies
- * [Hooks](</docs/en/hooks>): custom permission logic, lifecycle scripting
- * [Security](</docs/en/security>): security safeguards and best practices
+ * [Permissions](</docs/en/permissions>): allow, ask, and deny rules; auto mode classifier configuration; managed policies
+ * [Hooks](</docs/en/hooks>): custom permission logic via `PreToolUse` and `PermissionRequest` hooks
+ * [Ultraplan](</docs/en/ultraplan>): run plan mode in a Claude Code on the web session with browser-based review
+ * [Security](</docs/en/security>): safeguards and best practices
* [Sandboxing](</docs/en/sandboxing>): filesystem and network isolation for Bash commands
- * [Non-interactive mode](</docs/en/headless>): run Claude Code programmatically with the `-p` flag
+ * [Non-interactive mode](</docs/en/headless>): run Claude Code with the `-p` flag
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -88,11 +88,13 @@
Mode| What Claude can do without asking| Best for
---|---|---
`default`| Read files| Getting started, sensitive work
-`acceptEdits`| Read and edit files| Iterating on code you’re reviewing
+`acceptEdits`| Read and edit files except in protected directories| Iterating on code you’re reviewing
`plan`| Read files| Exploring a codebase, planning a refactor
`auto`| All actions, with background safety checks| Long-running tasks, reducing prompt fatigue
-`bypassPermissions`| All actions, no checks| Isolated containers and VMs only
+`bypassPermissions`| All actions except writes to protected directories| Isolated containers and VMs only
`dontAsk`| Only pre-approved tools| Locked-down environments
+
+Regardless of mode, writes to `.git`, `.vscode`, `.idea`, `.husky`, and `.claude` are never auto-approved, except for `.claude/commands`, `.claude/agents`, and `.claude/skills` where Claude routinely creates skills, subagents, and commands. This protects repository state, editor configuration, git hooks, and Claude’s own settings from accidental corruption.
##
@@ -152,7 +154,7 @@
Auto mode is a research preview. It reduces prompts but does not guarantee safety. It provides more protection than `bypassPermissions` but is not as thorough as manually reviewing each action. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations.
-**Model** : the classifier runs on Claude Sonnet 4.6, even if your main session uses a different model. **Cost** : classifier calls count toward your token usage the same as main-session calls. Each checked action sends a portion of the conversation transcript plus the pending action to the classifier. The extra cost comes mainly from shell commands and network operations, since read-only actions and file edits in your working directory don’t trigger a classifier call. **Latency** : each classifier check adds a round-trip before the action executes.
+**Model** : the classifier runs on Claude Sonnet 4.6, even if your main session uses a different model. **Cost** : classifier calls count toward your token usage the same as main-session calls. Each checked action sends a portion of the conversation transcript plus the pending action to the classifier. The extra cost comes mainly from shell commands and network operations, since read-only actions and file edits in your working directory outside protected directories don’t trigger a classifier call. **Latency** : each classifier check adds a round-trip before the action executes.
###
@@ -163,7 +165,7 @@
Each action goes through a fixed decision order. The first matching step wins:
1. Actions matching your [allow or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately
- 2. Read-only actions and file edits in your working directory are auto-approved
+ 2. Read-only actions and file edits in your working directory are auto-approved, except writes to protected directories
3. Everything else goes to the classifier
4. If the classifier blocks, Claude receives the reason and attempts an alternative approach
@@ -233,7 +235,7 @@
Skip all checks with bypassPermissions mode
-`bypassPermissions` mode disables permission prompts and safety checks. Tool calls execute immediately, except for writes to `.git`, `.vscode`, and `.idea`, which still prompt to prevent accidental corruption of repository state and local configuration. Writes to `.claude` also prompt, except for `.claude/commands`, `.claude/agents`, and `.claude/skills` where Claude routinely creates skills, subagents, and commands. Only use this mode in isolated environments like containers, VMs, or devcontainers without internet access, where Claude Code cannot cause damage to your host system.
+`bypassPermissions` mode disables permission prompts and safety checks. Tool calls execute immediately, except for writes to `.git`, `.vscode`, `.idea`, and `.husky`, which still prompt to prevent accidental corruption of repository state, editor configuration, and git hooks. Writes to `.claude` also prompt, except for `.claude/commands`, `.claude/agents`, and `.claude/skills` where Claude routinely creates skills, subagents, and commands. Only use this mode in isolated environments like containers, VMs, or devcontainers without internet access, where Claude Code cannot cause damage to your host system.
claude --permission-mode bypassPermissions
@@ -253,8 +255,8 @@
| `default`| `acceptEdits`| `auto`| `dontAsk`| `bypassPermissions`
---|---|---|---|---|---
-Permission prompts| File edits and commands| Commands only| None unless fallback triggers| None, blocked unless pre-allowed| None
-Safety checks| You review each action| You review commands| Classifier reviews commands| Your pre-approved rules only| None
+Permission prompts| File edits and commands| Commands and protected directories| None unless fallback triggers| None, blocked unless pre-allowed| Protected directories only
+Safety checks| You review each action| You review commands and protected-directory writes| Classifier reviews commands and protected-directory writes| Your pre-approved rules only| You review protected-directory writes
Token usage| Standard| Standard| Higher, from classifier calls| Standard| Standard
##
@@ -263,7 +265,7 @@
Customize permissions further
-Permission modes set the baseline approval behavior. For control over individual tools or commands, layer additional configuration on top of the active mode. **Permission rules** are the first stop. Add `allow`, `ask`, or `deny` entries to your settings file to pre-approve safe commands, force a prompt for risky ones, or block specific tools entirely. Rules apply in every mode except `bypassPermissions`, which skips the permission layer entirely, and are matched by tool name and argument pattern. See [Manage permissions](</docs/en/permissions#manage-permissions>) for syntax and examples. **Hooks** cover logic that pattern-matching rules can’t express. A [`PreToolUse` hook](</docs/en/hooks#pretooluse-decision-control>) runs before every tool call and can allow, deny, or escalate based on command content, file paths, time of day, or a response from an external policy service. A [`PermissionRequest` hook](</docs/en/hooks#permissionrequest>) intercepts the permission dialog itself and answers on your behalf. See [Hooks](</docs/en/hooks>) for configuration.
+Permission modes set the baseline approval behavior. For control over individual tools or commands, layer additional configuration on top of the active mode. **Permission rules** are the first stop. Add `allow`, `ask`, or `deny` entries to your settings file to pre-approve safe commands, force a prompt for risky ones, or block specific tools entirely. Rules apply in every mode except `bypassPermissions`, and are matched by tool name and argument pattern. See [Manage permissions](</docs/en/permissions#manage-permissions>) for syntax and examples. **Hooks** cover logic that pattern-matching rules can’t express. A [`PreToolUse` hook](</docs/en/hooks#pretooluse-decision-control>) runs before every tool call and can allow, deny, or escalate based on command content, file paths, time of day, or a response from an external policy service. A [`PermissionRequest` hook](</docs/en/hooks#permissionrequest>) intercepts the permission dialog itself and answers on your behalf. See [Hooks](</docs/en/hooks>) for configuration.
##
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -212,7 +212,7 @@
The fallback design keeps false positives from derailing a session: a mistaken block costs Claude a retry, not your progress. If the classifier blocks an action 3 times in a row or 20 times total in one session, auto mode pauses and Claude Code resumes prompting for each action. These thresholds are not configurable.
- * **CLI** : you see a notification in the status area. Approving the prompted action resets the denial counters, so you can continue in auto mode
+ * **CLI** : you see a notification in the status area, and the denied action appears in `/permissions` under the Recently denied tab. Approving the prompted action resets the denial counters, so you can continue in auto mode
* **Non-interactive mode** with the `-p` flag: aborts the session, since there is no user to prompt
Repeated blocks usually mean one of two things: the task genuinely requires actions the classifier is built to stop, or the classifier is missing context about your trusted infrastructure and treating safe actions as risky. If the blocks look like false positives, or if the classifier misses something it should have caught, use `/feedback` to report it. If blocks are happening because the classifier doesn’t recognize your repos or services as trusted, have an administrator [configure trusted infrastructure](</docs/en/permissions#configure-the-auto-mode-classifier>) in managed settings.
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -25,7 +25,7 @@
* Web and mobile
-**During a session** : press `Shift+Tab` to cycle through `default` → `acceptEdits` → `plan` → `auto`. The current mode appears in the status bar. `auto` does not appear in the cycle until you pass `--enable-auto-mode` at startup. Auto also requires a Team (or Enterprise/API once available) plan and Claude Sonnet 4.6 or Opus 4.6, so the option may remain unavailable even with the flag. If `bypassPermissions` is also enabled, it appears in the cycle between `plan` and `auto`.**At startup** : pass the mode as a CLI flag:
+**During a session** : press `Shift+Tab` to cycle through `default` → `acceptEdits` → `plan` → `auto`. The current mode appears in the status bar. `auto` does not appear in the cycle until you pass `--enable-auto-mode` at startup. Auto also requires a Team, Enterprise, or API plan and Claude Sonnet 4.6 or Opus 4.6, so the option may remain unavailable even with the flag. If `bypassPermissions` is also enabled, it appears in the cycle between `plan` and `auto`.**At startup** : pass the mode as a CLI flag:
claude --permission-mode plan
@@ -55,7 +55,7 @@
Auto| `auto`
Bypass permissions| `bypassPermissions`
-Auto and Bypass permissions appear only after you enable **Allow dangerously skip permissions** in the extension settings. Auto also requires a Team plan and Claude Sonnet 4.6 or Opus 4.6, so the option may remain unavailable even with the toggle on.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
+Auto and Bypass permissions appear only after you enable **Allow dangerously skip permissions** in the extension settings. Auto also requires a Team, Enterprise, or API plan and Claude Sonnet 4.6 or Opus 4.6, so the option may remain unavailable even with the toggle on.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
**During a session** : use the mode selector next to the send button. You can change it before or during a session.The Desktop UI uses friendly labels that map to the settings keys below:
@@ -148,7 +148,7 @@
Eliminate prompts with auto mode
-Auto mode is available on Team plans, with Enterprise and API support rolling out shortly. On Team and Enterprise, an admin must enable it in [Claude Code admin settings](<https://claude.ai/admin-settings/claude-code>) before users can turn it on. It requires Claude Sonnet 4.6 or Claude Opus 4.6, and is not available on Haiku, claude-3 models, or third-party providers (Bedrock, Vertex, Foundry). Auto mode lets Claude execute actions without showing permission prompts. Before each action runs, a separate classifier model reviews the conversation and decides whether the action matches what you asked for: it blocks actions that escalate beyond the task scope, target infrastructure the classifier doesn’t recognize as trusted, or appear to be driven by hostile content encountered in a file or web page. For a deeper look at how the classifier is designed, see the [auto mode announcement](<https://claude.com/blog/auto-mode>).
+Auto mode is available on Team, Enterprise, and API plans. On Team and Enterprise, an admin must enable it in [Claude Code admin settings](<https://claude.ai/admin-settings/claude-code>) before users can turn it on. It requires Claude Sonnet 4.6 or Claude Opus 4.6, and is not available on Haiku, claude-3 models, or third-party providers (Bedrock, Vertex, Foundry). Auto mode lets Claude execute actions without showing permission prompts. Before each action runs, a separate classifier model reviews the conversation and decides whether the action matches what you asked for. It blocks actions that escalate beyond the task scope, target infrastructure the classifier doesn’t recognize as trusted, or appear to be driven by prompt injection: hostile instructions embedded in a file, web page, or tool result that attempt to redirect Claude toward actions you never asked for. The defense is layered: a server-side probe scans incoming tool results and flags suspicious content before Claude reads it, while the classifier itself is never shown tool results, so injected instructions cannot influence its approval decisions. For a deeper look at how these layers work together, see the [auto mode announcement](<https://claude.com/blog/auto-mode>) and the [engineering deep dive](<https://www.anthropic.com/engineering/claude-code-auto-mode>).
Auto mode is a research preview. It reduces prompts but does not guarantee safety. It provides more protection than `bypassPermissions` but is not as thorough as manually reviewing each action. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations.
@@ -233,7 +233,7 @@
Skip all checks with bypassPermissions mode
-`bypassPermissions` mode disables all permission prompts and safety checks. Every tool call executes immediately without any verification. Only use this in isolated environments like containers, VMs, or devcontainers without internet access, where Claude Code cannot cause damage to your host system.
+`bypassPermissions` mode disables permission prompts and safety checks. Tool calls execute immediately, except for writes to `.git`, `.vscode`, and `.idea`, which still prompt to prevent accidental corruption of repository state and local configuration. Writes to `.claude` also prompt, except for `.claude/commands`, `.claude/agents`, and `.claude/skills` where Claude routinely creates skills, subagents, and commands. Only use this mode in isolated environments like containers, VMs, or devcontainers without internet access, where Claude Code cannot cause damage to your host system.
claude --permission-mode bypassPermissions
Show diff (117 lines)
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -27,21 +27,9 @@
**During a session** : press `Shift+Tab` to cycle through `default` → `acceptEdits` → `plan` → `auto`. The current mode appears in the status bar. `auto` does not appear in the cycle until you pass `--enable-auto-mode` at startup. Auto also requires a Team (or Enterprise/API once available) plan and Claude Sonnet 4.6 or Opus 4.6, so the option may remain unavailable even with the flag. If `bypassPermissions` is also enabled, it appears in the cycle between `plan` and `auto`.**At startup** : pass the mode as a CLI flag:
-Report incorrect code
-
-Copy
-
-Ask AI
-
claude --permission-mode plan
**As a default** : set `defaultMode` in your [settings file](</docs/en/settings#settings-files>):
-
-Report incorrect code
-
-Copy
-
-Ask AI
{
"permissions": {
@@ -50,12 +38,6 @@
}
**Non-interactively** : the same flag works with `-p` for scripted runs:
-
-Report incorrect code
-
-Copy
-
-Ask AI
claude -p "refactor auth" --permission-mode acceptEdits
@@ -88,12 +70,6 @@
Auto and Bypass permissions appear in the selector only after you enable them in Desktop settings. See the [Desktop guide](</docs/en/desktop#choose-a-permission-mode>) for details.
**During a session** : use the mode dropdown next to the prompt box on [claude.ai/code](<https://claude.ai/code>) or in the Claude mobile app.For [Claude Code on the web](</docs/en/claude-code-on-the-web>) sessions running on Anthropic’s cloud VMs, the dropdown offers Auto accept edits and Plan mode. Ask permissions and Auto are not available for cloud sessions.For [Remote Control](</docs/en/remote-control>) sessions running on your local machine, the dropdown offers Ask permissions, Auto accept edits, and Plan mode. You can also set the starting mode when you launch the local host:
-
-Report incorrect code
-
-Copy
-
-Ask AI
claude remote-control --permission-mode acceptEdits
@@ -146,31 +122,13 @@
Enter plan mode for a single request by prefixing your prompt with `/plan`, or switch the whole session into plan mode by pressing `Shift+Tab` to cycle through permission modes. You can also start in plan mode from the CLI:
-Report incorrect code
-
-Copy
-
-Ask AI
-
claude --permission-mode plan
This example starts a planning session for a complex refactor:
-Report incorrect code
-
-Copy
-
-Ask AI
-
I need to refactor our authentication system to use OAuth2. Create a detailed migration plan.
Claude analyzes the current implementation and creates a plan. Refine with follow-ups:
-
-Report incorrect code
-
-Copy
-
-Ask AI
What about backward compatibility?
How should we handle database migration?
@@ -267,12 +225,6 @@
`dontAsk` mode auto-denies every tool that is not explicitly allowed. Only actions matching your `/permissions` allow rules or `permissions.allow` settings can execute. If a tool has an explicit `ask` rule, the action is also denied rather than prompting. This makes the mode fully non-interactive, suitable for CI pipelines or restricted environments where you pre-define exactly what Claude is permitted to do.
-Report incorrect code
-
-Copy
-
-Ask AI
-
claude --permission-mode dontAsk
##
@@ -283,21 +235,9 @@
`bypassPermissions` mode disables all permission prompts and safety checks. Every tool call executes immediately without any verification. Only use this in isolated environments like containers, VMs, or devcontainers without internet access, where Claude Code cannot cause damage to your host system.
-Report incorrect code
-
-Copy
-
-Ask AI
-
claude --permission-mode bypassPermissions
The `--dangerously-skip-permissions` flag is equivalent to `--permission-mode bypassPermissions`:
-
-Report incorrect code
-
-Copy
-
-Ask AI
claude -p "refactor the auth module" --dangerously-skip-permissions
Show diff (341 lines)
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -0,0 +1,338 @@
+Permission modes control whether Claude asks before acting. Different tasks call for different levels of autonomy: you might want full oversight for sensitive work, minimal interruptions for a long refactor, or read-only access while exploring a codebase. This page covers how to:
+
+ * Switch modes during a session, at startup, or as a default
+ * Choose a mode based on what Claude should be able to do without asking
+ * Run auto mode with background safety checks, and see what it blocks by default
+ * Plan changes read-only before approving edits
+ * Restrict Claude to pre-approved tools for locked-down environments
+ * Skip checks entirely in isolated environments
+
+##
+
+
+
+Switch permission modes
+
+You can switch modes at any time during a session, at startup, or as a persistent default. The mechanism depends on where you’re running Claude Code.
+
+ * CLI
+
+ * JetBrains
+
+ * VS Code
+
+ * Desktop
+
+ * Web and mobile
+
+**During a session** : press `Shift+Tab` to cycle through `default` → `acceptEdits` → `plan` → `auto`. The current mode appears in the status bar. `auto` does not appear in the cycle until you pass `--enable-auto-mode` at startup. Auto also requires a Team (or Enterprise/API once available) plan and Claude Sonnet 4.6 or Opus 4.6, so the option may remain unavailable even with the flag. If `bypassPermissions` is also enabled, it appears in the cycle between `plan` and `auto`.**At startup** : pass the mode as a CLI flag:
+
+Report incorrect code
+
+Copy
+
+Ask AI
+
+ claude --permission-mode plan
+
+**As a default** : set `defaultMode` in your [settings file](</docs/en/settings#settings-files>):
+
+Report incorrect code
+
+Copy
+
+Ask AI
+
+ {
+ "permissions": {
+ "defaultMode": "acceptEdits"
+ }
+ }
+
+**Non-interactively** : the same flag works with `-p` for scripted runs:
+
+Report incorrect code
+
+Copy
+
+Ask AI
+
+ claude -p "refactor auth" --permission-mode acceptEdits
+
+`dontAsk` is never in the `Shift+Tab` cycle. `bypassPermissions` appears in the cycle only if you started the session with `--permission-mode bypassPermissions`, `--dangerously-skip-permissions`, or `--allow-dangerously-skip-permissions`. The third flag adds the mode to the cycle without activating it, so you can compose it with a different starting mode like `--permission-mode plan`. Set any of these at startup or in your settings file.
+
+The JetBrains plugin launches Claude Code in the IDE terminal, so switching modes works the same as in the CLI: press `Shift+Tab` to cycle, or pass `--permission-mode` when launching.
+
+**During a session** : click the mode indicator at the bottom of the prompt box to switch modes.**As a default** : set `claudeCode.initialPermissionMode` in VS Code settings, or use the Claude Code extension settings panel.The VS Code UI uses friendly labels that map to the settings keys below:
+
+UI label| Settings key
+---|---
+Ask permissions| `default`
+Auto accept edits| `acceptEdits`
+Plan mode| `plan`
+Auto| `auto`
+Bypass permissions| `bypassPermissions`
+
+Auto and Bypass permissions appear only after you enable **Allow dangerously skip permissions** in the extension settings. Auto also requires a Team plan and Claude Sonnet 4.6 or Opus 4.6, so the option may remain unavailable even with the toggle on.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
+
+**During a session** : use the mode selector next to the send button. You can change it before or during a session.The Desktop UI uses friendly labels that map to the settings keys below:
+
+UI label| Settings key
+---|---
+Ask permissions| `default`
+Auto accept edits| `acceptEdits`
+Plan mode| `plan`
+Auto| `auto`
+Bypass permissions| `bypassPermissions`
+
+Auto and Bypass permissions appear in the selector only after you enable them in Desktop settings. See the [Desktop guide](</docs/en/desktop#choose-a-permission-mode>) for details.
+
+**During a session** : use the mode dropdown next to the prompt box on [claude.ai/code](<https://claude.ai/code>) or in the Claude mobile app.For [Claude Code on the web](</docs/en/claude-code-on-the-web>) sessions running on Anthropic’s cloud VMs, the dropdown offers Auto accept edits and Plan mode. Ask permissions and Auto are not available for cloud sessions.For [Remote Control](</docs/en/remote-control>) sessions running on your local machine, the dropdown offers Ask permissions, Auto accept edits, and Plan mode. You can also set the starting mode when you launch the local host:
+
+Report incorrect code
+
+Copy
+
+Ask AI
+
+ claude remote-control --permission-mode acceptEdits
+
+Permission prompts appear in claude.ai for approval.
+
+Permission modes are set through the UI, CLI flags, or settings files. Telling Claude “stop asking for permission” in the chat does not change the mode. See [Permissions](</docs/en/permissions>) for how modes interact with allow, ask, and deny rules.
+
+##
+
+
+
+Available modes
+
+Each mode makes a different tradeoff between convenience and oversight. Pick the one that matches your task.
+
+Mode| What Claude can do without asking| Best for
+---|---|---
+`default`| Read files| Getting started, sensitive work
+`acceptEdits`| Read and edit files| Iterating on code you’re reviewing
+`plan`| Read files| Exploring a codebase, planning a refactor
+`auto`| All actions, with background safety checks| Long-running tasks, reducing prompt fatigue
+`bypassPermissions`| All actions, no checks| Isolated containers and VMs only
+`dontAsk`| Only pre-approved tools| Locked-down environments
+
+##
+
+
+
+Analyze before you edit with plan mode
+
+Plan mode tells Claude to research and propose changes without making them. Claude reads files, runs shell commands to explore, asks clarifying questions, and writes a plan file, but does not edit your source code. Permission prompts work the same as default mode: you still approve Bash commands, network requests, and other actions that would normally prompt.
+
+###
+
+
+
+When to use plan mode
+
+Plan mode is useful when you want Claude to research and propose an approach before making changes:
+
+ * **Multi-step implementation** : when a feature requires edits across many files
+ * **Code exploration** : when you want to research the codebase before changing anything
+ * **Interactive development** : when you want to iterate on the direction with Claude
+
+###
+
+
+
+Start and use plan mode
+
+Enter plan mode for a single request by prefixing your prompt with `/plan`, or switch the whole session into plan mode by pressing `Shift+Tab` to cycle through permission modes. You can also start in plan mode from the CLI:
+
+Report incorrect code
+
+Copy
+
+Ask AI
+
+ claude --permission-mode plan
+
+This example starts a planning session for a complex refactor:
+
+Report incorrect code
+
+Copy
+
+Ask AI
+
+ I need to refactor our authentication system to use OAuth2. Create a detailed migration plan.
+
+Claude analyzes the current implementation and creates a plan. Refine with follow-ups:
+
+Report incorrect code
+
+Copy
+
+Ask AI
+
+ What about backward compatibility?
+ How should we handle database migration?
+
+When the plan is ready, Claude presents it and asks how to proceed. From that prompt you can:
+
+ * Approve and start in auto mode
+ * Approve and accept edits
+ * Approve and manually review each edit
+ * Keep planning, which sends your feedback back to Claude for another round
+
+Each approve option also offers to clear the planning context first.
+
+##
+
+
+
+Eliminate prompts with auto mode
+
+Auto mode is available on Team plans, with Enterprise and API support rolling out shortly. On Team and Enterprise, an admin must enable it in [Claude Code admin settings](<https://claude.ai/admin-settings/claude-code>) before users can turn it on. It requires Claude Sonnet 4.6 or Claude Opus 4.6, and is not available on Haiku, claude-3 models, or third-party providers (Bedrock, Vertex, Foundry). Auto mode lets Claude execute actions without showing permission prompts. Before each action runs, a separate classifier model reviews the conversation and decides whether the action matches what you asked for: it blocks actions that escalate beyond the task scope, target infrastructure the classifier doesn’t recognize as trusted, or appear to be driven by hostile content encountered in a file or web page. For a deeper look at how the classifier is designed, see the [auto mode announcement](<https://claude.com/blog/auto-mode>).
+
+Auto mode is a research preview. It reduces prompts but does not guarantee safety. It provides more protection than `bypassPermissions` but is not as thorough as manually reviewing each action. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations.
+
+**Model** : the classifier runs on Claude Sonnet 4.6, even if your main session uses a different model. **Cost** : classifier calls count toward your token usage the same as main-session calls. Each checked action sends a portion of the conversation transcript plus the pending action to the classifier. The extra cost comes mainly from shell commands and network operations, since read-only actions and file edits in your working directory don’t trigger a classifier call. **Latency** : each classifier check adds a round-trip before the action executes.
+
+###
+
+
+
+How actions are evaluated
+
+Each action goes through a fixed decision order. The first matching step wins:
+
+ 1. Actions matching your [allow or deny rules](</docs/en/permissions#manage-permissions>) resolve immediately
+ 2. Read-only actions and file edits in your working directory are auto-approved
+ 3. Everything else goes to the classifier
+ 4. If the classifier blocks, Claude receives the reason and attempts an alternative approach
+
+On entering auto mode, Claude Code drops any allow rule that is known to grant arbitrary code execution: blanket shell access like `Bash(*)`, wildcarded script interpreters like `Bash(python*)` or `Bash(node*)`, package-manager run commands, and any `Agent` allow rule. These rules would auto-approve the commands and subagent delegations most capable of causing damage before the classifier ever sees them. Narrow rules like `Bash(npm test)` carry over. The dropped rules are restored when you leave auto mode. The classifier receives user messages and tool calls as input, with Claude’s own text and tool results stripped out. It also receives your CLAUDE.md content, so actions described in your project instructions are factored into allow and block decisions. Because tool results never reach the classifier, hostile content in a file or web page cannot manipulate it directly. The classifier evaluates the pending action against a customizable set of block and allow rules, checking whether the action is an overeager escalation beyond what you asked for, a mistake about what’s safe to touch, or a sudden departure from your stated intent that suggests Claude may have been steered by something it read. Unlike your permission rules, which match tool names and argument patterns, the classifier reads prose descriptions of what to block and allow: it reasons about the action in context rather than matching syntax.
+
+###
+
+
+
+How auto mode handles subagents
+
+When Claude spawns a [subagent](</docs/en/sub-agents>), the classifier evaluates the delegated task before the subagent starts. A task description that looks dangerous on its own, like “delete all remote branches matching this pattern”, is blocked at spawn time. Inside the subagent, auto mode runs with the same block and allow rules as the parent session. Any `permissionMode` the subagent defines in its own frontmatter is ignored. The subagent’s own tool calls go through the classifier independently. When the subagent finishes, the classifier reviews its full action history. A subagent that was benign at spawn could have been compromised mid-run by content it read. If the return check flags a concern, a security warning is prepended to the subagent’s results so the main agent can decide how to proceed.
+
+###
+
+
+
+What the classifier blocks by default
+
+Out of the box, the classifier trusts your working directory and, if you’re in a git repo, that repo’s configured remotes. Everything else is treated as external: your company’s source control orgs, cloud buckets, and internal services are unknown until you tell the classifier about them. **Blocked by default** :
+
+ * Downloading and executing code, like `curl | bash` or scripts from cloned repos
+ * Sending sensitive data to external endpoints
+ * Production deploys and migrations
+ * Mass deletion on cloud storage
+ * Granting IAM or repo permissions
+ * Modifying shared infrastructure
+ * Irreversibly destroying files that existed before the session started
+ * Destructive source control operations like force push or pushing directly to `main`
+
+**Allowed by default** :
+
+ * Local file operations in your working directory
+ * Installing dependencies already declared in your lock files or manifests
+ * Reading `.env` and sending credentials to their matching API
+ * Read-only HTTP requests
+ * Pushing to the branch you started on or one Claude created
+
+To see the full default rule lists as the classifier receives them, run `claude auto-mode defaults`. If auto mode blocks something routine for your team, like pushing to your own org’s repo or writing to a company bucket, it’s because the classifier doesn’t know those are trusted. Administrators can add trusted repos, buckets, and internal services via the `autoMode.environment` setting: see [Configure the auto mode classifier](</docs/en/permissions#configure-the-auto-mode-classifier>) for the full configuration guide.
+
+###
+
+
+
+When auto mode falls back
+
+The fallback design keeps false positives from derailing a session: a mistaken block costs Claude a retry, not your progress. If the classifier blocks an action 3 times in a row or 20 times total in one session, auto mode pauses and Claude Code resumes prompting for each action. These thresholds are not configurable.
+
+ * **CLI** : you see a notification in the status area. Approving the prompted action resets the denial counters, so you can continue in auto mode
+ * **Non-interactive mode** with the `-p` flag: aborts the session, since there is no user to prompt
+
+Repeated blocks usually mean one of two things: the task genuinely requires actions the classifier is built to stop, or the classifier is missing context about your trusted infrastructure and treating safe actions as risky. If the blocks look like false positives, or if the classifier misses something it should have caught, use `/feedback` to report it. If blocks are happening because the classifier doesn’t recognize your repos or services as trusted, have an administrator [configure trusted infrastructure](</docs/en/permissions#configure-the-auto-mode-classifier>) in managed settings.
+
+##
+
+
+
+Allow only pre-approved tools with dontAsk mode
+
+`dontAsk` mode auto-denies every tool that is not explicitly allowed. Only actions matching your `/permissions` allow rules or `permissions.allow` settings can execute. If a tool has an explicit `ask` rule, the action is also denied rather than prompting. This makes the mode fully non-interactive, suitable for CI pipelines or restricted environments where you pre-define exactly what Claude is permitted to do.
+
+Report incorrect code
+
+Copy
+
+Ask AI
+
+ claude --permission-mode dontAsk
+
+##
+
+
+
+Skip all checks with bypassPermissions mode
+
+`bypassPermissions` mode disables all permission prompts and safety checks. Every tool call executes immediately without any verification. Only use this in isolated environments like containers, VMs, or devcontainers without internet access, where Claude Code cannot cause damage to your host system.
+
+Report incorrect code
+
+Copy
+
+Ask AI
+
+ claude --permission-mode bypassPermissions
+
+The `--dangerously-skip-permissions` flag is equivalent to `--permission-mode bypassPermissions`:
+
+Report incorrect code
+
+Copy
+
+Ask AI
+
+ claude -p "refactor the auth module" --dangerously-skip-permissions
+
+`bypassPermissions` mode offers no protection against prompt injection or unintended actions. For a safer alternative that still maintains background safety checks, use auto mode. Administrators can block this mode by setting `permissions.disableBypassPermissionsMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>).
+
+##
+
+
+
+Compare permission approaches
+
+The table below summarizes the key differences in how each mode handles approvals. `plan` is omitted since it restricts what Claude can do rather than how approvals work.
+
+| `default`| `acceptEdits`| `auto`| `dontAsk`| `bypassPermissions`
+---|---|---|---|---|---
+Permission prompts| File edits and commands| Commands only| None unless fallback triggers| None, blocked unless pre-allowed| None
+Safety checks| You review each action| You review commands| Classifier reviews commands| Your pre-approved rules only| None
+Token usage| Standard| Standard| Higher, from classifier calls| Standard| Standard
+
+##
+
+
+
+Customize permissions further
+
+Permission modes set the baseline approval behavior. For control over individual tools or commands, layer additional configuration on top of the active mode. **Permission rules** are the first stop. Add `allow`, `ask`, or `deny` entries to your settings file to pre-approve safe commands, force a prompt for risky ones, or block specific tools entirely. Rules apply in every mode except `bypassPermissions`, which skips the permission layer entirely, and are matched by tool name and argument pattern. See [Manage permissions](</docs/en/permissions#manage-permissions>) for syntax and examples. **Hooks** cover logic that pattern-matching rules can’t express. A [`PreToolUse` hook](</docs/en/hooks#pretooluse-decision-control>) runs before every tool call and can allow, deny, or escalate based on command content, file paths, time of day, or a response from an external policy service. A [`PermissionRequest` hook](</docs/en/hooks#permissionrequest>) intercepts the permission dialog itself and answers on your behalf. See [Hooks](</docs/en/hooks>) for configuration.
+
+##
+
+
+
+See also
+
+ * [Permissions](</docs/en/permissions>): permission rules, syntax, managed policies
+ * [Hooks](</docs/en/hooks>): custom permission logic, lifecycle scripting
+ * [Security](</docs/en/security>): security safeguards and best practices
+ * [Sandboxing](</docs/en/sandboxing>): filesystem and network isolation for Bash commands
+ * [Non-interactive mode](</docs/en/headless>): run Claude Code programmatically with the `-p` flag