In Claude Code 2.1.325, sandboxed Bash follows the normal permission flow. Set sandbox.autoAllowBashIfSandboxed: true to opt into automatic approval inside the sandbox. Deny rules and command-scoped ask rules still apply; bare Bash and Bash(*) ask rules are skipped there. For /loop or scheduled tasks calling a skill that declares allowed-tools or hooks, the changelog recommends adding that specific skill to permissions.allow.
Checked: 2026-11-15 JST. Scope: the official Claude Code 2.1.325 documentation and a planned comparison with 2.1.322. The CLI version comparison is unverified. Isolation preflights on macOS 27.0 and Node.js 26.12.1 did not meet the required isolation conditions, so we stopped the comparison. Product behavior below comes from official sources; the audit example was tested with synthetic settings.
Key points: Sandbox restrictions and permission decisions are separate. When choosing automatic approval, retain deny rules and scoped ask rules, and allow skills by name. The read-only audit helps review supplied settings; it does not guarantee unattended execution.
What changed for sandboxed Bash in 2.1.325?
The 2.1.325 changelog describes a default change to the normal permission flow for sandboxed Bash. That flow can still approve a call through allow rules, the permission mode, or built-in read-only command handling. It does not mean every Bash call must prompt.
| Setting or condition | Documentation-based expectation for 2.1.322 | Documented behavior for 2.1.325 |
|---|---|---|
| Sandbox enabled, autoAllow omitted | Previous default was true | Normal permission flow |
| autoAllow explicitly true | Automatic approval inside sandbox | Automatic approval inside sandbox, with exceptions below |
| Command covered by deny | Denial takes precedence | Denial takes precedence |
Bash(git push *) ask |
Command-scoped prompt | Prompt remains |
Bare Bash ask with autoAllow true |
Version comparison unverified | Whole-tool prompt skipped inside sandbox |
| Match in excludedCommands | Normal permission flow | Normal permission flow |
This is not a table of measured CLI outcomes. The settings reference says the default is false and was true before 2.1.324. The change appears in the 2.1.325 changelog, but we have not established the first affected release. We did not test 2.1.324.
How can you inspect settings without changing them?
Save the audit script and explicitly pass the files to read. It runs with Node.js and does not write settings, use the network, or execute commands. It does not read home-directory settings when called without arguments.
node sandbox-unattended-audit.mjs \
--user /absolute/path/to/user-settings.json \
--project /absolute/path/to/repo/.claude/settings.json \
--local /absolute/path/to/repo/.claude/settings.local.json \
--skill /absolute/path/to/repo/.claude/skills/demo/SKILL.mdPass only files that exist. Add --managed /absolute/path/to/managed-settings.json only to inspect a single managed input. Paths containing symlinks are rejected; use their physical paths. Output omits settings text, paths, and skill bodies. Skills are identified by their input-array index.
What do the audit labels mean?
| Warning or status | What the supplied files show | Next check |
|---|---|---|
| regular-permissions | Sandbox enabled; autoAllow false or omitted | Review allow rules and permission mode |
| bare-bash-ask-skipped | autoAllow true alongside a bare Bash ask | Scope the ask rule to the required command |
| needs-allow | Skill declares allowed-tools or hooks without its named allow | Review its content before allowing that skill |
| allow-listed | A named allow exists in the supplied files | Not a prediction of success or safety |
| review-deny | A Skill deny rule is present | Check names and aliases in the CLI; the example does not resolve deny details |
| managed-auto-allow-review | Managed enables sandbox without autoAllow true in the same input | Check the highest-ranked managed source |
| unsandboxed-retry-review | Supplied files do not prohibit unsandboxed retries | Review allowUnsandboxedCommands |
The example statically inspects a limited syntax in supplied files. It does not evaluate command-line settings, environment variables, permission modes, multiple managed sources, plugins, aliases, or actual command permission decisions. It detects scalar, space-separated, and YAML-list allowed-tools declarations, but does not parse general YAML. Unsupported declarations fail with an error.
Where should automatic approval and restrictions be configured?
Review settings precedence and consider the following only for the work that needs it. This is a configuration example; the audit script does not save it.
{
"sandbox": {
"enabled": true,
"failIfUnavailable": true,
"autoAllowBashIfSandboxed": true,
"allowUnsandboxedCommands": false
},
"permissions": {
"ask": ["Bash(git push *)"],
"allow": ["Skill(demo)"]
}
}This configuration example targets the local CLI. demo is a placeholder; replace it with a skill you have reviewed. In the local CLI, failIfUnavailable prevents execution when the required sandbox is unavailable; allowUnsandboxedCommands: false prohibits unsandboxed retries and may stop existing workflows. See restricting writes outside the working directory.
The reference documents an exception for Anthropic-hosted environments: a session can start with a warning despite failIfUnavailable: true, without enforcing your sandbox.filesystem or sandbox.network rules. This example does not guarantee stopping or isolation in cloud scheduled tasks or other hosted environments. We did not test hosted execution.
| Location | Scope | Priority for the same scalar key |
|---|---|---|
User ~/.claude/settings.json |
Your projects | Lowest |
Project .claude/settings.json |
Shared project | Above user |
Local .claude/settings.local.json |
Your copy of this project | Above project |
Startup --settings |
Current session | Above local; excluded from this audit |
| Managed settings | Organizational policy | Highest, with rules for multiple sources |
There is an admin-required sandbox exception to precedence. When managed allowUnsandboxedCommands: false or network.allowManagedDomainsOnly: true makes the sandbox admin-required, project/local enabled: false cannot override user enabled: true. The example detects this condition from the supplied managed input and retains the bare-Bash-ask warning.
Permission arrays merge instead of being replaced wholesale by higher-priority files; the audit reflects that merge. For organizations enabling sandboxing through managed settings, the changelog and reference direct administrators to put autoAllow true in the highest-ranked managed source. Do not assume user settings can change organizational policy. We did not test managed deployments.
Do deny and command-scoped ask rules still apply?
Permissions and Sandbox modes retain deny and scoped asks such as Bash(git push *) with autoAllow true. Plan mode has an exception to skipping bare Bash and Bash(*) asks, and CLAUDE_CODE_SUBPROCESS_ENV_SCRUB disables automatic approval. Commands that cannot run in the sandbox, including excludedCommands, go through the normal permission flow.
Before adding broad Bash allows to remove prompts, review permission wildcard scope.
What needs checking for skills in /loop and scheduled tasks?
The 2.1.325 changelog says /loop and scheduled tasks ask before invoking a skill that declares allowed-tools or hooks; it recommends a Skill(name) allow for unattended invocation. The Skills permission syntax documents Skill(demo) and Skill(demo *) with arguments. The Skill(skill:<name>) form in Permissions describes parameter-form denial; we do not substitute it for this allow syntax.
Review skill hooks as well. Hook exit statuses and subagent MCP trust cover separate checks. Allowing a Skill does not establish MCP trust or approve every tool operation.
The scheduling comparison says /loop inherits session permissions. We did not execute interactive /loop or scheduled tasks. Changes to “Always allow” in Desktop, IDE, and SDK hosts are also documented-only here. For separate considerations, see Claude Code usage and codex exec.
What did we verify, and what remains unverified?
| Target | Check performed | Scope of the result |
|---|---|---|
| Public sources | Relevant official documentation and GitHub CHANGELOG retrieved | Documentation at retrieval time |
| CLI isolation preflight | Fake API and settings, outer sandbox and environment-only fallback | Nested sandbox failed; fallback could not demonstrate all config paths were isolated, so comparison stopped |
| Settings precedence | Enumerated unset, false, true for enabled/autoAllow across three scopes | 729 combinations for the audit, not the CLI engine |
| Admin-required exception | Enumerated two managed keys and user/project/local enabled | 243 additional combinations covering the independent-review counterexample |
| Invalid inputs and boundaries | JSON, types, frontmatter, size, symlinks | Invalid-input rejection in the example |
| Broken audit variants | Reversed precedence, removed bare-ask warning, missed hooks | Tests detect those faults |
| Unmeasured | S1–S8 and K1–K2 version matrix, managed, /loop, Desktop hosts | Product statements limited to official documentation |
Download the synthetic inputs and audit outputs. The preflight used fixed dummy credentials and a local fake API, without calling a real model or reading real setting values or hashes. It was not a completed CLI comparison or evidence of increased traffic or rankings. Find related examples in SaaS Workflows.
What are the frequently asked questions?
Why does sandboxed Bash prompt in 2.1.325?
It now follows the normal permission flow. Not every command necessarily waits: allow rules, permission mode, and other checks matter. Our CLI version comparison remains unverified.
How do I auto-approve sandboxed Bash?
Set sandbox.enabled and sandbox.autoAllowBashIfSandboxed to true. Deny rules and command-scoped asks still apply. In a managed organization, review the highest-ranked managed source.
Does autoAllow bypass deny rules?
The official specification retains deny rules. Distinguish skipping bare Bash or Bash(*) asks from retaining scoped asks and deny. Exceptions include plan mode.
Why can a skill stop /loop or a scheduled task?
The changelog adds approval before skills declaring allowed-tools or hooks. Review the skill and add its specific name, such as Skill(demo), to allow. We did not measure interactive scheduled execution.
Where does this belong in managed settings?
Official guidance puts sandbox.autoAllowBashIfSandboxed: true in the highest-ranked managed source. The example inspects only one managed input, not MDM or effective multi-source policy.
Can saved Always allow rules stop scheduled tasks in Desktop hosts?
The 2.1.325 changelog describes Always allow changes in Desktop, IDE, and SDK hosts that can make a scheduled task relying on a saved rule wait. We did not test those hosts.
Go deeper on this topic
SaaS integrations
Give AI the context to continue the work: source conversations, open tasks, and unresolved details, from adoption decisions to integration code.
Article 1 of 22 in this series.
Next reads
Claude Code Permission Wildcards: What * Allows and How to Audit
Compare Claude Code 2.1.322 and 2.1.323 in isolated tests: broad Bash wildcards, spaces, variable warnings, and a read-only settings audit.
Claude Code Subagent MCP: Folder Trust and Startup Controls
Cloned repo inline MCP waits for folder trust. Tests on Claude Code 2.1.319 cover 75 isolated cases, strict and bare exceptions, and a read-only audit.
Postman Auto-Install: Check Claude Code and Codex Settings
Postman auto-install reports, rollback response, source changes and a read-only settings checklist. Local checks; removal and exfiltration unverified.
Use the topic hub as a map, then continue to the next article in the series. New here? Start at the home hub →
FAQ
Why does sandboxed Bash prompt in 2.1.325?
It now follows the normal permission flow. Not every command necessarily waits: allow rules, permission mode, and other checks matter. Our CLI version comparison remains unverified.
How do I auto-approve sandboxed Bash?
Set sandbox.enabled and sandbox.autoAllowBashIfSandboxed to true. Deny rules and command-scoped asks still apply. In a managed organization, review the highest-ranked managed source.
Does autoAllow bypass deny rules?
The official specification retains deny rules. Distinguish skipping bare Bash or Bash(*) asks from retaining scoped asks and deny. Exceptions include plan mode.
Why can a skill stop /loop or a scheduled task?
The changelog adds approval before skills declaring allowed-tools or hooks. Review the skill and add its specific name, such as Skill(demo), to allow. We did not measure interactive scheduled execution.
Where does this belong in managed settings?
Official guidance puts sandbox.autoAllowBashIfSandboxed: true in the highest-ranked managed source. The example inspects only one managed input, not MDM or effective multi-source policy.
Can saved Always allow rules stop scheduled tasks in Desktop hosts?
The 2.1.325 changelog describes Always allow changes in Desktop, IDE, and SDK hosts that can make a scheduled task relying on a saved rule wait. We did not test those hosts.