Skip to content
ReviewRamble

The weekly brief

AI, reviewed, in your inbox.

  • New reviews of tools, models, MCP servers and repos, with the verdict up front
  • Re-checked prices and ratings when something changes
  • New analysis pieces as they are published

Models, agents, MCP servers and the tools actually worth your time.

One email a week. Unsubscribe with the link in any brief. How we use your email

Agent sandbox

An agent sandbox is an isolated environment, such as a container, virtual machine or operating-system restriction, in which an AI agent runs code and commands so it cannot reach files, networks or data outside set limits.

Also called: sandboxing, code sandbox

By Divya Sharma · Checked Nov 15, 2026 · How we review

Agents run code that nobody has reviewed: commands they chose, scripts they wrote, packages they installed. A sandbox limits the damage if that code is wrong or if the agent has been tricked by prompt injection.

How it works

Sandboxes come in a few forms:

- Operating-system restrictions on a local machine. Claude Code, for example, can run shell commands inside a boundary enforced by Seatbelt on macOS and bubblewrap on Linux, limiting writes to the project folder and routing network traffic through a proxy that checks each domain. - Containers or virtual machines that hold the whole agent, used for computer use and for cloud coding agents. - Hosted code sandboxes, such as E2B, that run model-written code on remote machines and return the output.

The key property is that the operating system or hypervisor enforces the limit, not the model. The boundary holds whatever command the model decides to run.

Why it matters

A sandbox lets an agent work without a human-in-the-loop approval for every command, because the worst case is contained. It also helps against data exfiltration, since blocked network access stops stolen data leaving.

Limits

A sandbox only covers what runs inside it. In Claude Code's case, file tools and MCP servers run outside the shell sandbox. Secrets placed inside the sandbox can still leak through allowed domains. Combine sandboxing with narrow agent permissions.

Related terms

Coding agent
A coding agent is an AI agent that works on software directly: it reads a codebase, edits files, runs commands and tests, and repeats until a change works, rather than only suggesting code for a person to paste.
Human-in-the-loop
Human-in-the-loop (HITL) is a design in which an AI system pauses at chosen points for a person to approve, correct or reject its next step, so risky or uncertain actions are not taken automatically.
Prompt injection
Prompt injection is an attack where text fed to a language model, typed by a user or hidden in a web page, file or tool result, changes the model's behaviour in ways its developer did not intend.
Agent permissions
Agent permissions are the rules that decide which tools, files, commands, networks and accounts an AI agent may use, and which actions need a human's approval first, so a mistaken or manipulated agent can do limited damage.
Data exfiltration (AI agents)
Data exfiltration, for AI agents, is when an attacker tricks an agent into reading private data it can access and sending it out, through a web request, an email, an image link or another channel the attacker controls.

Sources