# sandbox.autoAllowBashIfSandboxed

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

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** autoAllowBashIfSandboxed

## Think of it like

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

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

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.

## Example code

```json
{
  "sandbox": {
    "enabled": true,
    "autoAllowBashIfSandboxed": true
  }
}
```

Sandbox each command, and skip the prompt for it.

## Why it matters

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

## Common mistake

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

## Three principles

- **No prompt in the sandbox.** Fenced is safe.
- **Rules still apply.** Deny and ask.
- **Off by default.** false.

## Related terms

- [sandbox.enabled](https://learn.benibix.com/term/ai/sandbox-enabled-setting)
- [Permission Prompt](https://learn.benibix.com/term/ai/permission-prompt)
- [Permission Rule](https://learn.benibix.com/term/ai/permission-rule)

---

Source: https://learn.benibix.com/term/ai/auto-allow-bash-if-sandboxed-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.
