Skip to content
BENIBIX Learn

excludedCommands vs allowUnsandboxedCommands

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.

AI⌨️ Claude Code

sandbox.excludedCommands

A list of commands that run outside the sandbox.

sandbox.excludedCommands is a settings key that names commands to run with no fence, such as tools that break in the sandbox. Each entry is written like a Bash rule: an exact command, or a start such as docker *. An entry must match each command in a call. Commands that start with sudo, eval or xargs stay fenced.

Example
Jack's docker builds fail inside the sandbox. He adds docker * here, and docker runs outside while the rest stays fenced.
Why it matters
Some tools cannot work in a sandbox. This lets you keep it on for all the rest.
Full entry
AI⌨️ Claude Code

sandbox.allowUnsandboxedCommands

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

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.
Why it matters
Without it, a blocked command can still run with no fence once a person says yes.
Full entry

In one line

sandbox.excludedCommands
A list of commands that run outside the sandbox.
sandbox.allowUnsandboxedCommands
The key that says if Claude may run a blocked command with no fence.