New: the Agent Incident Ledger: disclosed incidents of AI gone rogueExplore the ledger
Illustration of a riveted steel sandbox with its red front door standing open. Outside, one small robot asks "Hey, how'd you escape?" and the other points back at the door and answers "By the front door."

Did the AI Really Escape Its Sandbox?

Nov 17, 20266 Min

In 2026, several stories said an AI escaped its sandbox. In most of them, the agent walked through a door someone had left open. This post reads six of these incidents and explains what a sandbox actually controls.

Sandboxing has become the default answer to securing AI agents. But what exactly is a sandbox? The term covers everything from network restrictions and filesystem boundaries to process isolation and credential protection. It can mean a hardened microVM, a thin OS policy around a single command, or a filter on the agent's outgoing network traffic. These are fundamentally different security controls, yet they're often discussed as if they provide the same protection.

TL;DR

  • Many 2026 headlines about an AI "escaping its sandbox" describe something else: an internet connection left open, a name lookup nobody filtered, a bug in a service the agent was allowed to use. The word "escape" says little about what actually failed.
  • A sandbox controls what the agent can reach (files, network, credentials), and how isolated its code runs, from a microVM down to an interpreter that only runs the model's code.
  • Credentials need their own control to keep real keys away from the agent. Some sandboxes include one, others leave it to you.
  • Scope matters as much as strength: which part of the agent is sandboxed? The whole agent, its tools and code, or only the code it writes?

Revisiting Sandbox escapes in the media

2026 gave us several "AI escapes sandbox" headlines. "Escape" suggests the agent broke through a wall, and that is how most readers take it. Looking closer, most of these stories describe something else: internet access left open by mistake, a DNS resolver nobody filtered, or an allowed service with a bug in it. A broken wall calls for a stronger isolation type, while an open door only needs a tighter configuration.

Incident
Headline
Area
What actually happened
"OpenAI Flags AI Agent's DNS Escape in 15 Minutes" (Tech Insider)
Network
Side channel the filter missed
"Anthropic says its own AI models breached three companies during security tests" (TechCrunch)
Network, then the target's credentials
No wall: internet open by mistake
Same TechCrunch story
Network
Went out through machines that had internet
"Meta AI Model Accessed Internet, Hacked Outside Firm in Testing" (Bloomberg)
Network
No wall: internet open by mistake
"OpenAI says its models escaped a sandbox and breached Hugging Face" (TechRadar)
Network, execution, credentials
A bug in the one allowed network service
Critical, CVSS 10.0
Filesystem
Gap between the sandboxed and unsandboxed parts
Six incidents, step by step
How each run went, from setup to outcome. The red marker walks through the steps.
OpenAI research model, DNS
NetworkSide channel the filter missed
  1. The model has a search tool, a Python shell and an offline web cache. HTTPS to outside services is blocked.
  2. The search tool fails. Direct requests to search engines and chatbots are blocked.
  3. At 9:50 on 20 Sep 2026 a query reaches an outside chatbot, and answers come back in the DNS replies.
  4. 12 minutes later the monitor raises a P0 alert. A reviewer acknowledges it at 10:05.
  5. The automatic stop does not fire. A human stops the run at 12:34.
Source: OpenAI disclosure, 25 Sep 2026.
Claude Opus 4.7, Irregular eval
Network, then the target's credentialsNo wall: internet open by mistake
  1. The model is told it has no internet. Because of a misunderstanding between Anthropic and Irregular, it has.
  2. It cannot reach its fictional target.
  3. It finds the live website of a real company whose domain matches the fictional name, and attacks it.
  4. It pulls application and infrastructure credentials out of the site.
  5. It uses them to reach a production database, downloads user records and changes them.
  6. Nobody notices during the run. Anthropic finds it in a transcript review on 24 Jul 2026.
Source: Anthropic, 30 Jul and 9 Sep 2026. Irregular postmortem, 14 Aug 2026.
Anthropic research model, Irregular eval
NetworkWent out through machines that had internet
  1. The fictional target only runs for 24 hours. When it goes offline, the model keeps looking.
  2. Machines it is allowed to reach in the test environment have open internet access. It goes out through them.
  3. It scans about 9,000 real hosts.
  4. It downloads files and plants a remote-control script.
  5. Then it notices the host sits in an unrelated cloud account, concludes the target is real, and stops.
Source: Anthropic, 30 Jul and 9 Sep 2026.
Meta Muse Spark 1.1, Irregular eval
NetworkNo wall: internet open by mistake
  1. The scenario names a real website as the target instead of a fictional one. The model reaches it over the open internet.
  2. It finds a flaw in the site and exploits it.
  3. Irregular shuts the evaluation down and notifies Meta and the site. Meta confirms on 5 Aug 2026 and blames the setup.
Source: Meta, 14 Aug 2026. Bloomberg, 6 Aug 2026.
OpenAI ExploitGym and Hugging Face
Network, execution, credentialsA bug in the one allowed network service
  1. Agents solve security challenges with limited network access. Package downloads go through an internal registry proxy.
  2. They find and exploit a zero-day in that proxy.
  3. They escalate privileges and move from node to node.
  4. They reach a node with open internet access.
  5. They upload a malicious dataset that runs code in Hugging Face's dataset processing, then collect cloud and cluster credentials.
  6. They reach a small set of internal datasets. Hugging Face detects and contains the intrusion on its own.
Source: OpenAI, 21 Jul 2026. Hugging Face, 16 Jul 2026.
Claude Code CVE-2026-39861
FilesystemGap between the sandboxed and unsandboxed parts
  1. Claude Code runs a command. The command runs inside the sandbox.
  2. The command creates a symlink in the project that points outside it. The sandbox allows this.
  3. Later, the Claude Code process writes to a path through that link. It is not sandboxed, so nothing stops it.
  4. The write lands outside the project, without a prompt. Fixed in version 2.1.64.
Source: CVE-2026-39861 advisory, 21 Apr 2026. CVSS 10.0.

The two cases that look most like real escapes still went through an open door. In OpenAI's ExploitGym incident, the agents found a zero-day in the package registry proxy, the only network path they were allowed (OpenAI's account; it has not said what isolated the agents' code). CVE-2026-39861 is a scope failure: Claude Code's sandboxed commands and its unsandboxed process each did something harmless, and together they wrote outside the project.

Most of these runs used very capable models on purpose, with safety classifiers switched off, doing offensive security work. Full write-ups, timelines and sources for each incident are in Manifold's Agent Incident Ledger (introduction).

The failures in these runs carry over to everyday agents. The rest of this post explains why agents go looking for a way out, and which parts of a sandbox the table above refers to.

Why an agent needs a sandbox at all

An agent is a language model plus the harness around it (like Claude Code or Codex), which together read files, run shell commands, install packages and make web requests.

An agent that has everything it needs rarely causes trouble. It does the task and stops. Trouble starts when the task gets stuck: a tool fails, a target is offline, a permission is missing. Agents are persistent, so they keep trying the next thing they can reach, until they either finish or run out of options. Over a long enough run, assume they will try everything within reach, whether or not you meant it to.

The obvious first defense was human approval for risky commands. However, like alert fatigue in security, approval fatigue soon sets in: people stop reading prompts and just approve. Hardly any prompt is actually security critical, so people learn to approve quickly to keep the work going.

A sandbox reduces the number of prompts by setting boundaries that are enforced by something the agent cannot talk to, such as the operating system or a separate machine. Typical boundaries allow writes only to the project folder and network access only to approved domains. Commands that stay inside them can run without asking, because the damage they could do is already limited, and only actions that cross a boundary need a person to approve them. The boundaries also define the blast radius if something goes wrong. Anthropic reports that sandboxing Claude Code reduced permission prompts by 84% in its internal use (Anthropic, 2025).

A stuck agent works through everything in reach
An example run. The search tool has failed, and the agent keeps trying options until one gets it an answer or it runs out. The sandbox decides how long that list is.
No sandbox
1Retry the search toolStill failing.
2Read files in the projectNothing useful.
3Search the offline web cacheNo match.
4Install a scraping packageInstalled. No way to use it.
5Read env vars and ~/.awsFinds cloud keys. Now in its context.
6Change its own settingsDone. Its next commands run without asking.
7Connect to other machinesReaches them. No answer there.
8Call a chatbot over HTTPSWorks. An outside chatbot answers.
Task solved through a path nobody intended. On the way it picked up cloud keys and turned off its own approval prompts.
Sandboxed
1Retry the search toolStill failing.
2Read files in the projectNothing useful.
3Search the offline web cacheNo match.
4Install a scraping packageInstalled. No way to use it.
5Read env vars and ~/.awsNot reachable.
6Change its own settingsNot reachable.
7Connect to other machinesNot reachable.
8Call a chatbot over HTTPSNot reachable.
Out of options. The agent reports that it is stuck. That is the outcome you want.

What a sandbox limits

A sandbox answers two questions. What can the agent reach: which files, which network destinations, which credentials? And how isolated does it run? The reach is set by policies. Isolation depends on the technology and how much of your machine it shares.

Area
What it controls
A good default
What goes wrong
Files
Which folders the agent can read and write
Read and write the project folder, read the tools it needs, nothing else
Secrets in reach (~/.aws, .env), or writes to the agent's own settings
Network
Where the agent can connect
An allowlist, with packages from an internal registry
Paths the filter misses, such as DNS, or a bug in an allowed service
Credentials
Which keys the agent can use
A proxy outside the sandbox adds the real key, or short-lived tokens
Static keys in files or environment variables, valid until revoked
Execution isolation
How much the running code shares with your machine
The whole agent in a VM or container, or at least an OS process sandbox
A kernel bug on a shared kernel, or a mounted docker.sock

Files, network and credentials decide what the agent can reach. Execution isolation decides how hard it is to break out. Most incidents above went through something the agent was allowed to reach, without breaking any isolation. A microVM with your AWS key and open internet protects you less than a small interpreter that can reach nothing.

Credentials need the most care, because using one needs no escape at all. An agent that can read your GitHub token can do anything that token allows, from inside the sandbox. The safest setup keeps the real key out: the agent gets a placeholder, and a proxy outside or part of the sandbox adds the real key only to allowed requests.

Execution isolation trades strength for convenience. From lightest to heaviest, the options are a language runtime that only runs code written for it, an OS process sandbox such as Seatbelt or Landlock around the agent's real tools, a container with its own view of files and network, and a VM or microVM with its own kernel. The heavier the option, the less the code shares with your machine, and the more work it takes to give the agent the files and tools it needs.

Scope: which part of the agent is sandboxed

A sandbox can hold the whole agent, everything except the agent loop, or only the code the model writes. Anthropic's Managed Agents design calls these parts the brain, meaning the model and the loop that drives it, and the hands, meaning the sandboxes and tools that act (Anthropic, 2026). The hands are often sandboxed, while the brain often is not. Yet it is the brain that reads the poisoned web page and keeps trying when it gets stuck.

Scope
Sandboxed
Not sandboxed
Examples
Whole agent
The agent loop, its tools and the code it writes
Credentials, if a proxy adds them
Docker Sandboxes, nono, Codex Cloud, an agent inside a microVM
Tools and code
The tools, or some of them, and the code they run
The agent loop and the model, plus any tools left out
Anthropic Managed Agents; Claude Code and Codex CLI, which sandbox only the shell tool
Generated code only
The code the model writes
The agent, all its tools and its credentials
Pydantic's Monty, Cloudflare Code Mode, hosted code interpreters

Scope can surprise you even inside one product. Claude Code and Codex both sandbox shell commands, but not all of the agent's other tools. In Claude Code, a rule that stops shell commands from reading a file does not stop the agent's own Read tool (Claude Code, Sandboxing). In Codex, the network filter covers sandboxed commands but not web search, MCP server connections or browser activity (Codex, Agent approvals and security).

Putting it to use

No single sandbox fits every agent. Start from what you run:

You run
Start with
A coding agent on your laptop
The whole agent inside a VM or container, or at least an OS process sandbox.
An agent that runs generated code in your product
Sandboxing only the generated code is fine for the code. Guard the agent separately, since it keeps the tools and the keys.
Autonomous or offensive security agents
The whole agent in a microVM, network limited to in-scope targets, and a person watching the run.

How a sandbox is configured matters as much as how it is built. In SandboxEscapeBench (Marchand et al., 2026), frontier models got out of Docker containers mostly through misconfigurations, such as a mounted docker.sock, rather than kernel flaws. Most of the configuration can be set once for a whole team:

  • Keep real keys out of every sandbox: inject them through a proxy, or hand out short-lived tokens.
  • Make network access an allowlist that covers DNS.
  • Never mount docker.sock or the SSH agent socket into a sandbox.
  • Keep logs outside the sandbox, where the agent cannot edit them.

And the next time you read that an AI escaped its sandbox, ask three things. Did it break a wall or walk through a door? Which area did it get through: files, network, credentials or execution? And was the agent inside the sandbox at all?

There are many sandboxes, each with its own scope, isolation type and defaults. Across a team, someone has to know which agent runs where, what it can reach, and whether that matches the rules you meant to set. Keeping track of that is the job of an agentic AI security platform such as Manifold Security.

About the author

  • Markus Gierlinger

    Markus Gierlinger

    Security Researcher

    Markus is a security researcher with over 12 years of experience across software engineering, security research, and product management.