Skip to content
BENIBIX Learn

sandbox.enabled

AI⌨️ Claude CodeConfiguration

Also known as sandbox enabled setting, "sandbox" key

The key that runs Claude's shell commands inside a sandbox.

Think of it like

It is like putting a toddler in a play pen. They can play, but only inside the fence.

Example

Lucy lets Claude run tests in a repo she does not know well. She turns the sandbox on, so a bad script cannot touch her home folder.

Why it matters

A shell command can do all that you can. The sandbox cuts that down to what the job needs.

Definition

sandbox.enabled is a settings key that turns on the sandbox for the Bash commands Claude runs. The sandbox fences each command off from your files and the network. It works on macOS, Linux and WSL2, and Linux needs bubblewrap and socat. The default is false. Choosing a mode in /sandbox writes this key to your local file.

Example code

json
{
  "sandbox": {
    "enabled": true
  }
}
Fence in every Bash command Claude runs.
Every Bash command takes this path once the sandbox is on.

Common mistake

Thinking the key alone means it is on. If the sandbox cannot start, commands run without it, unless a second key stops that.

Key takeaways

  1. 1
    Fences Bash commands. Files and network.
  2. 2
    Off by default. false.
  3. 3
    Linux needs tools. bubblewrap, socat.