Sandboxing
Run the agent inside set limits on files and network so it can act without asking each time.
Anthropic, OpenAI, Google, Simon Willison
The problem
Approving every action wears people down until they stop paying attention, and code a model writes can compromise the machine it runs on.
Constantly clicking "approve" slows down development cycles and can lead to ‘approval fatigue’, where users might not pay close attention to what they're approving, and in turn making development less safe.
Code execution is a special tool that has extra security implications: sandboxing must be used to prevent model-generated code to compromise the local environment, potentially creating security issues.
Therefore
Sandboxing creates pre-defined boundaries within which Claude can work more freely, instead of asking for permission for each action.
The sandbox is the boundary that lets the agent act autonomously without giving it unrestricted access to your machine.
Run your agent in a secure sandbox that restricts the files and secrets it can access and the network connections it can make.
In use
Claude Code
In our internal usage, we've found that sandboxing safely reduces permission prompts by 84%.
Codex
When a local chat runs commands in the ChatGPT desktop app, Codex CLI, or IDE extension, those commands run inside a constrained environment instead of running with full access by default.
claude.ai
When Claude runs code inside claude.ai, it does so in a gVisor container on isolated infrastructure.
Where it breaks
Each new capability needs configuring, network or host access breaks isolation, and agents’ built-in sandboxes lack documentation you can trust.
Sandboxing is safe but high-maintenance: each new capability needs configuring, and anything requiring network or host access breaks isolation.
Coding agents themselves implement various levels of sandboxing, but so far I’ve not seen convincing enough documentation of these to trust them.
Sources
- Making Claude Code safer with sandboxingDavid Dworken and Oliver Weller-Davies, Anthropic, Oct 20, 2025
- How we built Claude Code auto mode: a safer way to skip permissionsJohn Hughes, Anthropic, Mar 25, 2026
- How we contain Claude across productsAnthropic, May 25, 2026
- SandboxOpenAI
- Safety and Security for AI AgentsGoogle
- Designing agentic loopsSimon Willison, Sep 30, 2025
Added Nov 14, 2026