Skip to content
BENIBIX Learn

Claude Code Sandbox

AI⌨️ Claude CodeClaude Code Concepts

Also known as Sandboxing, /sandbox, sandbox-runtime

A wall that keeps Claude's shell commands in set folders and sites.

Think of it like

It is like a fence around a yard. The dog can run, but not get out.

Example

Emma turns on the sandbox. Now Claude can run build scripts without prompts, and a script that tries to read her home folder is simply blocked.

Why it matters

It cuts prompts and adds safety at the same time, because the walls do the checking.

Definition

The Claude Code sandbox runs the shell commands Claude starts inside a wall set by your computer's system. You choose up front which folders they may write to and which sites they may reach. Inside that wall, commands can run without asking, since they cannot reach anything else. It is off at first, and you turn it on with /sandbox. It is a separate layer from permission rules, and the two work together.

Example code

console
/sandbox
Turn on the sandbox for shell commands.
Commands run inside a box with set folders and sites.

Common mistake

Thinking it covers every tool. It wraps shell commands, so keep permission rules for the other tools too.

Key takeaways

  1. 1
    A boundary. Set by the system.
  2. 2
    Folders and sites. You choose them.
  3. 3
    Off by default. Turn on with /sandbox.

Compare

Learn it properly