A sandbox enforces limits in the operating system, so they hold even when the model is fooled. Agents now use Seatbelt on macOS and bubblewrap, Landlock and seccomp on Linux to restrict file writes and network access for every command they spawn. Sandboxing also cuts approval prompts, which removes much of the pressure to switch to unsafe modes.
Read in this order
- ArticleMaking Claude Code safer with sandboxing (Anthropic)Start here: why sandboxing cuts prompts and how the design works.
- OfficialClaude Code: Configure the sandboxed Bash toolThe settings that turn on filesystem and network limits for Bash.
- OfficialCodex: SandboxCodex's sandbox for comparison, including its modes and defaults.