Skip to content
BENIBIX Learn

excludedCommands vs Bash Permission Rule

People think putting a command in excludedCommands lets it run without asking. It does not. The list only takes a command out of the sandbox, so it runs with your full access. It still goes through your rules and your mode. In Manual mode, it still needs a Bash allow rule to skip the prompt.

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

Bash Permission Rule

A rule like Bash(npm run *) that covers shell commands.

A Bash permission rule matches the shell commands Claude wants to run. It is written as Bash and the command, such as Bash(npm run *). A star stands for any text. A bare Bash rule covers every command. The rule matches the text Claude writes, so the same program called another way can slip past it.

Example
Jack lets npm test run without a prompt. He denies git push, so nothing leaves his laptop.
Why it matters
Most of Claude's work runs through the shell. These rules decide how often you are asked.
Full entry

In one line

sandbox.excludedCommands
A list of commands that run outside the sandbox.
Bash Permission Rule
A rule like Bash(npm run *) that covers shell commands.