Skip to content
BENIBIX Learn

sandbox.autoAllowBashIfSandboxed

AI⌨️ Claude CodeConfiguration

Also known as autoAllowBashIfSandboxed

The key that skips the prompt for commands in the sandbox.

Think of it like

It is like letting a child play alone in a fenced yard. You do not need to watch each step.

Example

Jack got tired of saying yes to every ls and npm test. With the sandbox on, he turns this key on and the prompts stop.

Why it matters

It turns the fence into speed: fewer prompts, and the fence is still there.

Definition

sandbox.autoAllowBashIfSandboxed is a settings key that lets sandboxed Bash commands run without asking you first. The fence keeps them safe, so a prompt adds little. Deny rules and ask rules for a set command, such as git push, still apply. A command that cannot run in the sandbox still asks. The default is false.

Example code

json
{
  "sandbox": {
    "enabled": true,
    "autoAllowBashIfSandboxed": true
  }
}
Sandbox each command, and skip the prompt for it.

Common mistake

Thinking it lets every command through. Deny rules and set ask rules still stop or ask.

Key takeaways

  1. 1
    No prompt in the sandbox. Fenced is safe.
  2. 2
    Rules still apply. Deny and ask.
  3. 3
    Off by default. false.