# sandbox.allowUnsandboxedCommands

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

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** allowUnsandboxedCommands, strict sandbox mode

## 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.

## 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

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

## Example code

```json
{
  "sandbox": {
    "enabled": true,
    "allowUnsandboxedCommands": false
  }
}
```

Keep every command in the sandbox, with no way out.

## Why it matters

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

## Common mistake

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

## Three principles

- **Retry outside.** On by default.
- **false is strict.** No way out.
- **Excluded still run outside.** By list.

## Related terms

- [sandbox.enabled](https://learn.benibix.com/term/ai/sandbox-enabled-setting)
- [sandbox.excludedCommands](https://learn.benibix.com/term/ai/excluded-commands-setting)
- [Managed Settings File](https://learn.benibix.com/term/ai/managed-settings-file)

## Told apart from

- [excludedCommands vs allowUnsandboxedCommands](https://learn.benibix.com/compare/excluded-commands-setting-vs-allow-unsandboxed-commands-setting): People think both keys let commands out of the sandbox in the same way. excludedCommands is a fixed list you write, and those commands always run with no fence. The other key decides if Claude may ask to rerun a blocked command with no fence. A strict setup turns the second key off and keeps the list short.

---

Source: https://learn.benibix.com/term/ai/allow-unsandboxed-commands-setting
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
