[DOCS] Contradictory default values for allowUnsandboxedCommands between CLI and SDK documentation

Resolved 💬 2 comments Opened Jan 24, 2026 by coygeek Closed Feb 27, 2026

Documentation Type

Missing documentation (feature not documented)

Documentation Location

https://code.claude.com/docs/en/settings https://platform.claude.com/docs/en/agent-sdk/python https://platform.claude.com/docs/en/agent-sdk/typescript

Section/Topic

  • Settings: Sandbox settings table - Python SDK: SandboxSettings type documentation - TypeScript SDK: SandboxSettings interface documentation

Current Documentation

Settings guide (CLI):

| `allowUnsandboxedCommands` | Allow commands to run outside the sandbox via the `dangerouslyDisableSandbox` parameter. [...] Default: true | `false` |

Note: The Description says "Default: true" but the Example column shows false.

Python SDK reference:

| `allowUnsandboxedCommands` | `bool` | `False` | Allow the model to request running commands outside the sandbox... |

TypeScript SDK reference:

| `allowUnsandboxedCommands` | `boolean` | `false` | Allow the model to request running commands outside the sandbox... |

What's Wrong or Missing?

The CLI settings documentation states that allowUnsandboxedCommands defaults to true (in the Description column), while:

  1. The same row's Example column shows false
  2. Both SDK references (Python and TypeScript) state the default is False/false

This is a security-sensitive setting that controls whether the model can request to bypass sandbox isolation. The contradiction could lead to:

  1. Security misconfiguration: Users may assume one behavior while experiencing another
  2. Unexpected sandbox escapes: If CLI defaults to true but users expect SDK behavior (false)
  3. Confusion when migrating: Code that works one way in CLI may behave differently via SDK

Suggested Improvement

  1. Verify the actual default in the Claude Code implementation
  2. If CLI and SDK have different defaults, explicitly document this difference in both locations:

``
|
allowUnsandboxedCommands | ... | Default: true (CLI) / false (SDK) | ... |
``

  1. If they share the same default, correct the errant documentation
  2. Consider adding a security note explaining the implications of this setting

Impact

High - Prevents users from using a feature

Additional Context

  • Mirror locations:
  • code.claude.com/docs/en/settings.md (line 281)
  • platform.claude.com/docs/en/agent-sdk/python.md (line 2260)
  • platform.claude.com/docs/en/agent-sdk/typescript.md (line 2048)
  • Related: Sandboxing documentation at https://code.claude.com/docs/en/sandboxing

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗