- Since Claude Code 2.1.324, published 13 November, turning the Bash sandbox on no longer lets sandboxed commands skip the permission prompt.
sandbox.autoAllowBashIfSandboxedused to default totrueand now defaults tofalse. - I ran the same headless job on 2.1.323 and 2.1.325 with only
"enabled": truein the sandbox block. On 2.1.323,touch,python3andmakeran. On 2.1.325 all three were refused, andclaude -pexited 0 and reported success. - One line brings the old behaviour back:
"autoAllowBashIfSandboxed": true. It worked from a repository's own settings file in a checkout I had never trusted, where an allow rule in that same file was ignored.
Claude Code's sandbox has two modes. In auto-allow mode, a command that runs inside the sandbox skips the permission prompt, because the operating system already limits what it can touch. In regular permissions mode the sandbox still applies, and every command also goes through your allow rules and permission mode.
Until last week, auto-allow was what you got when you turned the sandbox on and set nothing else. The 2.1.325 changelog has 139 entries, and one of them says sandboxed Bash commands now follow the normal permission flow by default. The settings reference dates the switch to 2.1.324, which went to npm 85 minutes before 2.1.325 and has no changelog section of its own.
I tested what that does to a headless run, the kind a CI step or a cron job makes.
What I ran
A scratch git repository with a Makefile and this .claude/settings.json:
{
"sandbox": { "enabled": true }
}
Each run was one claude -p call on Haiku 5.5 that asked for exactly one shell command, with only the project's settings loaded and no MCP servers. I used the native macOS binaries of 2.1.323, from 12 November, and 2.1.325. That came to 35 runs and under ten cents of usage.
| Command | 2.1.323 | 2.1.325 |
|---|---|---|
ls -la |
ran | ran |
touch build.marker |
ran | refused |
python3 -c "print(6*7)" |
ran | refused |
make test |
ran | refused |
ls passes on both because Claude Code treats it as read-only, sandbox or not. The other three used to be approved by the sandbox and now need an approval that a headless run can't give.
The refusals read like this. For touch, Claude Code told the model that it "asks before a shell command creates, changes or removes files" in the working directory. For python3 and make the message was shorter: "This command requires approval".
I also wrote "autoAllowBashIfSandboxed": false into the file on 2.1.323. The touch was refused with the same message, so the new default is the old opt-out.
The job stays green
All 35 runs exited with status 0. A run whose only command was refused came back with "subtype": "success" and "is_error": false. Claude's reply said in one sentence that the command did not run.
A pipeline step that sends claude -p a task and has a sandbox block will finish normally after 2.1.324, having run none of the commands that write or execute. Exiting 0 after a refusal is how headless mode already worked. The update changes which commands get refused.
The refusals are in the output if you ask for it. With --output-format json, the result carries a permission_denials array that lists each refused command. This fails the step when the array has anything in it:
claude -p "$PROMPT" --output-format json > result.json
jq -e '.permission_denials | length == 0' result.json
On my refused touch run, jq exited 1.
Three ways back
Three things unblocked commands on 2.1.325.
Setting "autoAllowBashIfSandboxed": true next to "enabled": true restored the old behaviour for all three commands. They still ran inside the sandbox: a touch aimed at /private/tmp failed with "Operation not permitted", as it did on 2.1.323.
Passing --allowedTools 'Bash(make *)' on the command line let make test run with the new default in place. This is narrower, because only the commands you name get through.
--permission-mode acceptEdits let the touch run and still refused python3. That mode approves file commands like touch inside the project, and an interpreter isn't one of them.
A fourth thing I tried did not work. I put an allow rule for make in the repository's .claude/settings.json, and Claude Code printed this to stderr and refused the command:
Ignoring 1 permissions.allow entry from .claude/settings.json: this workspace has not been trusted.
A fresh CI checkout is that kind of folder. 2.1.323 printed the same line, so this part is older than last week.
A repository can opt itself back in
Both tests used the same untrusted checkout and the same file. The allow rule for one command was ignored. The autoAllowBashIfSandboxed: true key was applied, and it let all three commands run.
The docs agree with what I saw. The settings reference lists the key's scope as any file. The sandboxing page says a repository's value for it applies even when an administrator requires the sandbox, unless managed settings set the key themselves.
The new default covers people who wrote "enabled": true and nothing else. A repository can still choose auto-allow for whoever runs a headless agent in it. The sandbox applies either way, and it limits what those commands can reach. If you want one answer across every repository, set the key in managed settings, to either value.
If your organisation enforces the sandbox
The docs' example for enforcing the sandbox through managed settings has three keys: enabled, failIfUnavailable and allowUnsandboxedCommands. It has no autoAllowBashIfSandboxed line. An organisation that deployed that example had auto-allow until last week. After the update, its developers get permission prompts for sandboxed commands again.
The changelog says to set the key to true in your highest-ranking managed source. The ranking matters. By default Claude Code uses the first managed source that delivers any policy and ignores the rest: server-managed settings from claude.ai, then MDM policy, then managed settings files. With that default, a key added to managed-settings.json does nothing on a machine that also receives server-managed settings.
I didn't test this part. It would mean writing system policy on my machine, so it comes from the docs.
Three more changes that make runs wait
The same release has three other changes in the same direction. I'm reporting them from the changelog.
Scheduled tasks and /loop now ask before running a skill that declares allowed-tools or hooks. Adding Skill(name) to permissions.allow lets it run unattended again.
"Always allow" in Desktop, IDE and SDK hosts is now offered only when saving the rule would allow that command again. The changelog says a scheduled task that relied on one can now wait for you.
Read-only git commands ask first in a repository that isn't the project's or one you trusted. I tried to reproduce this with git -C ../other log and with cd ../other && git log. Both versions refused both forms, so I couldn't isolate the change.
What I'd do
Check which version your jobs run. npm's latest tag is 2.1.325, and stable still points at 2.1.311, so teams on stable haven't met this yet.
Search your settings files and CI configs for a sandbox block. If it has "enabled": true and no autoAllowBashIfSandboxed line, you are on the new default the moment you update.
For CI I'd keep the new default and pass --allowedTools for the commands the job needs. It names what runs, and the sandbox still applies to those commands. For a laptop where the sandbox was the reason you stopped reading prompts, add the key.
Then add the permission_denials check to every headless step. An exit code of 0 only tells you the run ended.


