Skip to content
BENIBIX Learn

sandbox.allowUnsandboxedCommands

AI⌨️ Claude CodeConfiguration

Also known as allowUnsandboxedCommands, strict sandbox mode

The key that says if Claude may run a blocked command with no fence.

Think of it like

It is like a rule that a child stays in the pen. They may not climb out, not even for a ball.

Example

Emma's company wants no command to ever leave the sandbox. IT sets this key to false in managed settings.

Why it matters

Without it, a blocked command can still run with no fence once a person says yes.

Definition

sandbox.allowUnsandboxedCommands is a settings key. It decides if Claude may try a blocked command again, this time with no fence. The default is true, so Claude can ask to do that. Set it to false for a strict sandbox, and Claude Code ignores the ask. Then only the commands in excludedCommands run with no fence.

Example code

json
{
  "sandbox": {
    "enabled": true,
    "allowUnsandboxedCommands": false
  }
}
Keep every command in the sandbox, with no way out.

Common mistake

Leaving it at true and thinking the sandbox is strict. Claude can still ask to run a blocked command outside.

Key takeaways

  1. 1
    Retry outside. On by default.
  2. 2
    false is strict. No way out.
  3. 3
    Excluded still run outside. By list.

Compare