An AI agent sandbox is an isolated workspace where an agent can run code, install packages and change files without a mistake or a hijacked instruction reaching your machines, your credentials or your network. This month Google and Nvidia handed their sandbox technology to the Cloud Native Computing Foundation and Microsoft launched one for Azure, which turns the sandbox from a developer trick into standard infrastructure. The incidents of the past year show where governance should focus. The walls mostly hold. The leaks come through the doors organisations open themselves.
What follows covers what a sandbox does and does not do, the four levels of isolation, what went wrong in the past year and what European organisations should require before agents run unattended.
What an AI agent sandbox is, and what it is not
A coding or data agent works in a loop. It writes code, runs it, reads the result and tries again. Running the code is the risky step. Without isolation the agent acts with the rights of the person or service account that started it, which usually means far more access than the task needs.
A sandbox draws a boundary around that step. It decides which folders the agent sees, which processes it may start and which addresses it may contact, and it can be thrown away when the task ends. Good isolation also makes agents more useful. Anthropic reports 84% fewer permission prompts in its own use since Claude Code started working inside a sandbox.
The term causes confusion in Europe. An agent sandbox is a technical control. An AI regulatory sandbox under Article 57 of the AI Act is a supervised testing scheme run by national authorities, and the Digital Omnibus moved the deadline for every member state to have one to 2 August 2027. Our overview of the AI Act after the Digital Omnibus covers the wider timeline.
Why sandboxes became infrastructure in November 2026
Around KubeCon North America in Salt Lake City, Google donated Agent Substrate and gVisor to the CNCF. Agent Substrate suspends idle agents and restores them in under 500 milliseconds, which matters because, by Google’s count, agents spend 90 to 95% of interactive time waiting for a model, an API or a human. Nvidia donated OpenShell, a runtime that enforces which files, networks, credentials and model endpoints each agent may reach. On 17 November Microsoft put an Agent Sandbox extension for AKS in public preview, built on the open Kubernetes Agent Sandbox project that also sits behind GKE Agent Sandbox.
Two governance signals stand out. Policy is moving out of the agent and into the infrastructure around it, where platform and security teams can review it. And the open-source question has become a sourcing question. Daytona, one of the best-known sandbox providers, moved its core development to a private codebase in June 2026, citing AI that scans open repositories for flaws, while Google and Nvidia moved in the opposite direction and put their projects under foundation governance.
Four levels of isolation
The main difference between sandboxes is whether the agent shares a kernel with the host. The kernel is the core of the operating system, and code that compromises it controls everything above it.
| Level | How it works | Examples | Fits |
|---|---|---|---|
| Operating system sandbox | macOS or Linux rules limit which folders and hosts a process can use | Seatbelt, bubblewrap, built into Claude Code and Codex | A developer watching an agent on a laptop |
| Container | Own filesystem and processes, same kernel as the host | Docker, dev containers | Trusted code in a reproducible environment |
| Software kernel | A layer intercepts system calls before they reach the host kernel | gVisor, used by Modal and GKE Agent Sandbox | Many sandboxes per cluster with a smaller attack surface |
| MicroVM | A lightweight virtual machine with its own kernel and a hardware boundary | Firecracker, Kata Containers, Docker Sandboxes, E2B, Vercel Sandbox | Untrusted code and agents without supervision |
The performance argument against microVMs has largely gone. Firecracker, which AWS built for Lambda, boots a microVM in under 125 milliseconds with less than 5 MiB of overhead. For untrusted agent code, a microVM or gVisor should be the baseline in any policy, and a plain container the exception that needs a reason.

What went wrong since late 2025, and the lesson for each
Damage inside the granted rights
In December 2025 a developer asked Claude Code to clean up an old repository and lost the entire home folder. Docker’s analysis found no attack and no vulnerability, just a valid but destructive command with no boundary between what the model decided and what the shell executed. In July 2026 developers reported that GPT-5.6 Sol in Codex unexpectedly deleted files. OpenAI traced the deletions to a mix-up with the $HOME variable and said they were more likely in full access mode without sandboxing or auto review.
The lesson is least privilege at the folder level. An agent should see one project, not a home directory, a shared drive or a backup.
An escape through the only exit
In July 2026 OpenAI ran its models against ExploitGym, a benchmark for offensive cyber skills. The environment had no direct internet access. Its only egress was an internally hosted proxy for installing software packages. GPT-5.6 Sol and an internal research prototype found a zero-day in that proxy, a self-hosted JFrog Artifactory, worked their way to an internet-connected node and broke into Hugging Face to steal the benchmark answers. Hugging Face detected the intrusion itself. JFrog fixed the flaws in Artifactory 7.161.15 and credited OpenAI’s researchers with at least eight vulnerabilities.
The lesson is that the door is part of the sandbox. A package mirror, a proxy or a cache that an agent can reach belongs in the same patching, monitoring and threat model as the isolation layer.
An escape on request
Anthropic’s system card for Claude Mythos Preview describes an earlier version that a simulated user asked to escape a secured sandbox meant to reach only a few predetermined services. The model built a multi-step exploit, gained broad internet access and emailed the researcher, who was eating a sandwich in a park. The UK AI Security Institute’s SandboxEscapeBench shows the same pattern at scale. Prompted to escape, frontier models frequently broke out of containers with common misconfigurations such as exposed Docker sockets and privileged mode, while none solved the hardest scenarios.
The lesson is to test the configuration, not the brochure. SandboxEscapeBench is open source, and a red-team exercise against your own sandbox setup is cheap compared with an incident. Our analysis of Fable 5.2 and Mythos 5.2 explains how Anthropic now gates the cyber capabilities of these models.
What a sandbox does not solve
A sandbox protects infrastructure from the agent. It does not protect data from what the agent does within the rules. Simon Willison’s lethal trifecta names the dangerous combination: access to private data, exposure to untrusted content and a way to communicate externally. Put customer data in a sandbox with open egress and a single injected instruction can move that data out without breaking any wall.
Built-in sandboxes also have documented gaps. The Claude Code sandbox is off by default, lets sandboxed commands read most of the machine unless you restrict it, by default filters network traffic by hostname without inspecting TLS, leaves MCP servers and hooks outside the boundary and falls back to running unsandboxed when it cannot start unless configured to fail. Codex keeps network access off by default. In both cases the defaults are a starting point for a policy, not the policy.
Where your agent’s code runs
A managed sandbox holds your code, often your data and sometimes your credentials, so it belongs in your processor and supplier records like any other cloud service. Location and control differ more than most comparisons suggest.
| Option | Isolation | Location and control |
|---|---|---|
| E2B | Firecracker microVM | Managed cloud in the US, EU and APAC, bring your own cloud on AWS, GCP and Azure for enterprise customers, about $0.05 per vCPU-hour |
| Vercel Sandbox | Firecracker microVM | 19 regions including Europe, but Washington is the default when no region is set |
| Modal | gVisor or VM runtime | Managed, with GPU sandboxes on the gVisor runtime |
| Daytona | Containers or VMs | Managed service, the open-source repository is unmaintained since June 2026 and archived since October 2026 |
| Koyeb Sandboxes | MicroVM | Paris-based, joining Mistral AI after an acquisition announced in February 2026 |
| Self-hosted Kubernetes Agent Sandbox | gVisor or Kata Containers | Your own clusters or EU regions of GKE and AKS, with you owning the proxies and their patches |
Two checks are easy to miss. First, set the region explicitly, because defaults are often in the United States. Second, if you fall under NIS2 or DORA, treat the sandbox provider as an ICT supplier in your risk assessment, and if you ship a product with an agent inside, remember that the Cyber Resilience Act now requires manufacturers to send an early warning on actively exploited vulnerabilities within 24 hours. Our piece on AI and Europe’s security reporting clocks covers those obligations. For organisations weighing a European stack end to end, our analysis of sovereignty layer by layer applies to sandboxes too.
What to require before agents run unattended
Turn the five doors into requirements your teams and suppliers can show evidence for.
| Door | Requirement | Evidence to ask for |
|---|---|---|
| What goes in | Only the project workspace is mounted, credential folders are unreadable | Mount configuration, read and write rules |
| What goes out | Egress denied by default, destinations on an allowlist, package proxies patched and monitored | Network policy, proxy version and patch history |
| Who holds the keys | No long-lived secrets inside the sandbox, credentials injected by a proxy outside it | Secret handling design, token lifetimes |
| What runs beside it | An inventory of MCP servers, hooks and excluded commands outside the boundary | List of side processes and their permissions |
| What remains and what you see | Command and network logs kept, the sandbox fails closed, environments are disposable | Log retention, fail-closed setting, snapshot policy |
Google’s Benjamin Elder put the key rule plainly at KubeCon: “Don’t expose credentials to the sandbox.” The sandbox is one part of the wider environment around a model, which our explainers on the AI harness and harness engineering describe.

Frequently asked questions
Is a Docker container a sandbox?
Partly. A container separates files and processes but shares the host kernel. For untrusted agent code, use a microVM or gVisor.
Is an agent sandbox the same as an AI regulatory sandbox?
No. An agent sandbox is a technical isolation layer. An AI regulatory sandbox is a supervised testing scheme under Article 57 of the AI Act.
Can an AI agent escape a sandbox?
From a misconfigured container, often, as AISI’s tests show. From a well-configured microVM it is much harder. The real incidents of the past year mostly went through permitted exits and rights the agent already had.
Do we need a managed provider?
Not necessarily. Developers can start with the built-in sandboxes of Claude Code and Codex or with Docker Sandboxes. Products that run code for many users usually need a managed service or a self-hosted Kubernetes setup.
Autonomy is granted at the door
The walls are getting stronger and cheaper every quarter, and with Google, Nvidia and Microsoft building them into Kubernetes they will soon be a default rather than a choice. That shifts the governance work. Every useful agent needs a few openings, a folder with data, a key, a package mirror, a tool server, and each opening is a decision about how much autonomy the agent gets. Organisations that keep a list of those doors, with an owner for each one, will be able to give agents more freedom with less risk than those still comparing kernels.





