21One agent

Sandboxing

Run the agent inside set limits on files and network so it can act without asking each time.

Anthropic, OpenAI, Google, Simon Willison

commandsif allowedAgentAgentCodeSandboxToolFilesToolNetworkconnections
How to read this

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.
AnthropicMaking Claude Code safer with sandboxingOct 20, 2025
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.
GoogleSafety and Security for AI Agents

Therefore

Sandboxing creates pre-defined boundaries within which Claude can work more freely, instead of asking for permission for each action.
AnthropicMaking Claude Code safer with sandboxingOct 20, 2025
The sandbox is the boundary that lets the agent act autonomously without giving it unrestricted access to your machine.
OpenAISandbox
Run your agent in a secure sandbox that restricts the files and secrets it can access and the network connections it can make.
Simon WillisonDesigning agentic loopsSep 30, 2025

In use

Claude Code

In our internal usage, we've found that sandboxing safely reduces permission prompts by 84%.
AnthropicMaking Claude Code safer with sandboxingOct 20, 2025

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.
OpenAISandbox

claude.ai

When Claude runs code inside claude.ai, it does so in a gVisor container on isolated infrastructure.
AnthropicHow we contain Claude across productsMay 25, 2026

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.
AnthropicHow we built Claude Code auto mode: a safer way to skip permissionsMar 25, 2026
Coding agents themselves implement various levels of sandboxing, but so far I’ve not seen convincing enough documentation of these to trust them.
Simon WillisonDesigning agentic loopsSep 30, 2025

Sources

  1. Making Claude Code safer with sandboxingDavid Dworken and Oliver Weller-Davies, Anthropic, Oct 20, 2025
  2. How we built Claude Code auto mode: a safer way to skip permissionsJohn Hughes, Anthropic, Mar 25, 2026
  3. How we contain Claude across productsAnthropic, May 25, 2026
  4. SandboxOpenAI
  5. Safety and Security for AI AgentsGoogle
  6. Designing agentic loopsSimon Willison, Sep 30, 2025

Added Nov 14, 2026