Answer: You enable or disable sandboxing for Bash commands with the `sandbox.enabled` setting: set it to `true` to sandbox Bash commands or `false` to run them unsandboxed. The default is `false`, and when you pick a mode in the `/sandbox` panel, Claude Code writes this key to `.claude/settings.local.json` for the current project; set it in `~/.claude/settings.json` to sandbox every project. Status: Confirmed Entry: tool/claude-code/permissions-and-security/enable-sandbox Revision: 1 Digest: sha256:f6ab033e6d3d1ae6 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:05:50Z Last changed: 2026-11-13T03:05:50Z Last verified: 2026-11-20T12:25:26Z Next check: 2026-11-21T12:25:26Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Setting key | sandbox.enabled | [1] | 2026-11-20 Enabled value | true | [1] | 2026-11-20 Disabled value | false | [1] | 2026-11-20 Default | false | [1] | 2026-11-20 Type | Boolean | [1] | 2026-11-20 Project settings file | .claude/settings.local.json | [1] | 2026-11-20 Global settings file | ~/.claude/settings.json | [1] | 2026-11-20 Sources: [1] Anthropic. "All settings". https://code.claude.com/docs/en/settings-reference.md Role: primary. Accessed: 2026-11-20T12:25:26Z Quote: "### `sandbox.enabled`" (Supports: Setting key) Quote: "`true`: Claude Code sandboxes Bash commands" (Supports: Enabled value) Quote: "`false`: Bash commands run unsandboxed" (Supports: Disabled value) Quote: "**Default**: `false`" (Supports: Default) Quote: "**Type**: Boolean" (Supports: Type) Quote: "Claude Code writes this key to `.claude/settings.local.json` for the current project" (Supports: Project settings file) Quote: "set it in `~/.claude/settings.json` to sandbox every project" (Supports: Global settings file) Published: 2026-11-20T02:53:01Z Snapshot SHA-256: 9799f12057acf903fd64918707eb588e4cdf60a1bf4d4dadff10faed965629f4 (captured 2026-11-20T12:25:26Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. Cross-check: not-available at 2026-11-20T12:25:26Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:25:26Z Last attempt: 2026-11-20T12:25:26Z Notes and limitations: Extracted automatically from a single official source (section "`sandbox.enabled`"). Related: https://latestn.com/tool/claude-code/permissions-and-security/enable-sandboxed-bash How do I enable the sandboxed Bash tool in Claude Code and confirm commands run inside the sandbox? https://latestn.com/tool/claude-code/permissions-and-security/enforce-policies What policies and restrictions can I enforce on Claude Code for my organization? https://latestn.com/tool/claude-code/permissions-and-security/filesystem-configuration How do I configure filesystem access and writable locations for a Claude Code deployment? https://latestn.com/tool/claude-code/permissions-and-security/control-permissions How do I control what Claude Code is allowed to do? https://latestn.com/tool/claude-code/permissions-and-security/define-trusted-infrastructure How do I define trusted infrastructure for Claude Code auto mode? https://latestn.com/tool/claude-code/permissions-and-security/disable-permission-prompts-unattended How do I turn off permission prompts in unattended Claude Code runs? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:05:50Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/permissions-and-security/enable-sandbox/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-code/permissions-and-security/enable-sandbox POST: https://latestn.com/dispute/tool/claude-code/permissions-and-security/enable-sandbox with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/permissions-and-security/enable-sandbox?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I enable or disable sandboxing in Claude Code? Revision 1, last verified 2026-11-20T12:25:26Z. https://latestn.com/tool/claude-code/permissions-and-security/enable-sandbox (accessed 2026-11-21T09:57:14Z). @misc{LatestN_tool_claude_code_permissions_and_security_enable_sandbox_r1, title = {How do I enable or disable sandboxing in Claude Code?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/permissions-and-security/enable-sandbox}}, note = {Revision 1; digest sha256:f6ab033e6d3d1ae6; last verified 2026-11-20T12:25:26Z; accessed 2026-11-21T09:57:14Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-code/permissions-and-security/enable-sandbox