If Claude Code is asking for permission again on commands that run inside its sandbox, that’s expected. Since v2.1.325, released on November 13, 2026, sandboxed Bash commands follow the normal permission flow by default. Before, the sandbox was enough to approve them. To get that behavior back, set sandbox.autoAllowBashIfSandboxed to true in your settings, or pick auto-allow on the Mode tab of /sandbox.
Claude Code sandbox: why it asks for permission again since v2.1.325
Thomas Poulain ·
What changed in v2.1.325?
The sandbox has two modes, shown on the Mode tab of /sandbox. In auto-allow mode, a command that runs inside the sandbox goes through without a prompt. In regular permissions mode, it goes through your rules and your permission mode, as it would outside the sandbox. The file and network limits are the same in both modes.
The autoAllowBashIfSandboxed setting picks between the two. Its default went from true to false. If your sandbox block only contains "enabled": true, you moved to regular permissions without changing anything. The settings reference dates the new default to v2.1.324, published the same day with no release notes.
The TypeScript Agent SDK follows the same change. Since 0.3.325, its sandbox option no longer approves sandboxed commands unless autoAllowBashIfSandboxed: true is set.
The change also affects how to read a figure from Anthropic. In October 2025, Anthropic’s post on sandboxing reported 84% fewer permission prompts in its internal usage. It described a sandbox where commands run without prompts. That gain assumes auto-allow, which is no longer the default.
How do I get the old behavior back?
In a session, run /sandbox and pick auto-allow on the Mode tab. Claude Code saves that choice to .claude/settings.local.json, so it applies to the current project only.
For every project, put both keys in ~/.claude/settings.json.
{
"sandbox": {
"enabled": true,
"autoAllowBashIfSandboxed": true
}
}
The running session picks up the change at the next shell command. The Mode tab of /sandbox then shows the mode in effect. With the TypeScript Agent SDK, add autoAllowBashIfSandboxed: true to the sandbox option.
What does the setting change in each permission mode?
You won’t notice the new default everywhere. In auto mode, the mode the terminal starts in, you get no extra prompts. The classifier reviews sandboxed commands instead. In Manual mode, every command that isn’t read-only or covered by an allow rule asks for your approval.
| Permission mode | false, the default since v2.1.325 | true |
|---|---|---|
Manual (default) | Prompts, unless read-only or matched by an allow rule | No prompt |
acceptEdits | File commands (mkdir, mv, cp, rm…) go through inside the working directory, the rest as in Manual | No prompt |
| auto | The classifier reviews the command | No prompt, but the classifier can still review it |
dontAsk, and claude -p with no mode | Denied, unless read-only or matched by an allow rule | No prompt |
bypassPermissions | No prompt | No prompt |
In auto mode, auto-allow doesn’t always skip the classifier. A command that names network hosts still goes to it. When the classifier review runs server-side, every sandboxed command also waits for its verdict and can be blocked. In plan mode, auto-allow doesn’t widen anything.
Even with true, these sandboxed commands still go through the permission flow:
- a command matched by a content-scoped
askrule such asBash(git push *), or blocked by adenyrule; - an
rmorrmdiraimed at a critical path, such as your home directory; - commands from the Monitor tool;
- commands such as
FOO=bar npm test, where a variable set in front can change which program runs, ormake CC=clangandeval "ls".
For that last group, a matching allow rule such as Bash(make *) stops the prompt. A command excluded with excludedCommands, or retried outside the sandbox, always follows the normal flow. And the CLAUDE_CODE_SUBPROCESS_ENV_SCRUB variable turns auto-allow off.
Why doesn’t the setting take with managed settings?
If your company turns the sandbox on through managed settings, /sandbox no longer opens. It prints Sandbox settings can't be changed here. Higher-priority settings override them. This happens as soon as enabled, autoAllowBashIfSandboxed or allowUnsandboxedCommands is set above your local settings.
You can still use a file. If managed settings don’t set autoAllowBashIfSandboxed, put it in your ~/.claude/settings.json. If they set it to false, no file you control can change it. Run /status and read the Setting sources line to see whether Enterprise managed settings is loaded.
For administrators, the v2.1.325 changelog is specific. To keep commands running without prompts, the key has to go in the highest-ranking managed source. By default, Claude Code applies only one managed source, the highest one that contains a policy key. It ignores the others without a warning.
The order starts with settings managed from claude.ai, then MDM policies, then managed-settings.json files. A key added to managed-settings.json has no effect if your organization also pushes settings from claude.ai. With managedSourcesBehavior set to "merge", Claude Code combines the sources. The key then counts, unless claude.ai sets it too. In /status, the Setting sources line shows the selected source in parentheses, such as (remote) or (file). The Skipped sources line names the skipped ones.
What do you accept by turning auto-allow back on?
A sandboxed command runs without you reading it. It can change files in your working directory, even in Manual mode, where the Edit tool would ask first. The sandbox stops it from writing outside the working directory, the temp directory and added directories. Inside that boundary, it can still delete your whole working directory. The critical-path check only covers rm and rmdir, and it can miss some.
By default, a sandboxed command can also read most of the machine, ~/.ssh and ~/.aws/credentials included. Add those paths to sandbox.filesystem.denyRead if you don’t want it to read them.
A repository can also decide for you. Its .claude/settings.json can set autoAllowBashIfSandboxed, and it ranks above your user settings. To keep your own value in that project, put it in .claude/settings.local.json. A company locks the key by setting it in managed settings.
Keep content-scoped ask rules on sensitive commands, such as Bash(git push *). They prompt even in auto-allow mode. A PreToolUse hook also runs right before each command and can block it. With "onFailure": "block", it blocks even when it crashes.
What else changed in the sandbox in November?
Two nearby releases also change the sandbox. If a command now fails instead of prompting, look there.
- v2.1.323, November 12: on macOS and Linux,
git worktree add,moveandremovefail read-only. A commit also fails in a worktree the session wasn’t started in or given. - v2.1.326, November 16: on macOS, Linux and WSL, sandboxed commands no longer write to some sensitive home folders. Some of them can be reopened with
sandbox.filesystem.allowWrite, in user or managed settings.
v2.1.326 also prompts before some lines that set environment variables, when auto-allow is off.
Section 3.5 of module 3, Advanced configuration covers the sandbox and its settings. Section 11.5 of module 11, Security and compliance covers the managed settings a company enforces on its machines.