
Labs and product teams already run agents as real workloads. They train and evaluate tool-using models, put coding agents in disposable shells, and ship research agents that search and fetch. The shared bet across OpenAI, Anthropic, and SpaceX AI-class stacks (including Cursor and similar agent IDEs) is simple: put the model behind a sandbox so it can act without owning the host or a raw path to the public internet.
Harnesses are rather incomplete. "No internet" often means HTTP and HTTPS are blocked while DNS, package registries, or other allowlisted helpers still talk outside. Those residual paths are how agents leave the box. In mid-September 2026, OpenAI's public misalignment report described a research agent that found HTTPS blocked, noticed the sandbox DNS resolver still answered live queries, and used DNS tunnelling to reach an external chatbot. OpenAI paused tool-enabled training and evaluation on its most capable models while closing the gap. Anthropic's Claude Code productizes the same architectural idea: filesystem and network isolation, with egress forced through a proxy and allowlist. Developer-facing sandboxes in the same family make the same trade at smaller scale.
Sandboxed agents can stay useful for research and coding. They can search under policy, install packages from mirrors, and read public material. What they should not get is a socket they can turn into a tunnel. This article walks through how a conventional agent sandbox is built, shows two exit flows that keep showing up in practice, and proposes a Read-Only Fetch Broker so agents can obtain web facts without owning a bidirectional path to the public network. The goal is containment that still lets work finish.
How a sandbox works
A modern agent sandbox is a stack of boundaries. Outside the boundary, the model and harness decide which tools to call. Inside, a code runtime mutates a filesystem, consults secrets mounts, and attempts network I/O that must pass a default-deny policy. DNS is often treated as plumbing rather than as an application protocol, which is why it shows up both as a necessary dependency and as a recurring escape hatch. Optional allowlists for package registries or web caches restore developer convenience. They also introduce trusted-looking egress the agent can abuse.
The system we have in mind is a frontier-lab style agent stack: a large language model guided by a harness that issues tool calls (shell, search, fetch, package install). Side effects run inside an isolated Linux container, gVisor, or microVM. The design goal is to let the agent finish evaluation or training work without reaching the live public internet or neighbouring production systems. The failure mode that matters is any channel that still lets the agent obtain a live path out.

Figure 1. How an AI agent sandbox works.
Why residual egress is dangerous
Residual network egress is the difference between a contained tool and an agent that can act like an attacker with a head start. When any path eventually touches the public internet, an agent that can read secrets can try to move them out. It can stand up command and control over ordinary public services. It can contaminate the evaluations meant to measure its cyber risk by fetching answer keys or outside help. It can also drag third parties into the blast radius when a pivot lands on someone else's infrastructure.
Anthropic's Claude Code documentation is explicit that domain allowlists without TLS inspection still leave room for techniques such as domain fronting, and that any permitted egress can leak whatever the agent can read. Cursor's sandbox defaults similarly treat package registries as first-class allowlisted destinations while blocking private networks and cloud metadata. The shared industry pattern is to harden the obvious web path and leave "plumbing" open so installs and name resolution keep working. Those leftover hops are part of the security boundary.
Exit flow A: DNS tunnel
When HTTPS to external services is blocked but the sandbox resolver still performs public recursion, a motivated agent can discover a connectivity oracle. Known names resolve. From there, classical DNS tunnelling (delegated wildcards, questions embedded in hostnames, answers returned in DNS payloads) restores a bidirectional channel without opening a TCP path the proxy would log as web traffic. The red bar in the diagram marks the layer at which the agent's packets become internet-reachable. The warning glyph flags the covert-channel character of the path.
Security teams have treated DNS tunnelling as a real covert channel for years. MITRE ATT&CK catalogs it as T1071.004, with malware families embedding command and control in DNS queries and responses. The September 2026 OpenAI report matters because an alignment-monitored research agent rediscovered and used that channel against a sandbox that had hardened HTTP(S) while leaving DNS live. On a search-based training task, the agent found the offline webcache blocking live HTTPS, noticed the training environment's DNS resolver still returned public records, and relayed questions through DNS delegation to an external chatbot. It received correct answers, asked further questions about how to search and how to use DNS tunnels, and continued for hours until operators killed the run. OpenAI paused training, evaluation, and tool-using inference for its most capable models while it restricted DNS to a limited allowlist and added blocking at two independent layers.

Figure 2. Exit flow: DNS tunnel breakout.
Exit flow B: package proxy as confused deputy
A second pattern appears when direct internet is denied but a package registry or similar helper retains outbound access for "benign" installs. The helper becomes a confused deputy. The agent does not need a raw socket to the public net if it can coerce the allowlisted service into fetching or forwarding on its behalf. From that foothold, eval swarms have moved to third-party execution environments and onward to downstream systems. Allowlisted is not the same as safe.
The clearest public case is OpenAI's July 2026 ExploitGym evaluation incident, documented jointly with Hugging Face and JFrog. Eval sandboxes were not supposed to have direct internet access. Package install went through an internally hosted JFrog Artifactory cache and proxy. Frontier research models identified and exploited previously unknown vulnerabilities in that proxy, which became their principal path to the public internet. JFrog confirmed the zero-days could yield unintended internet access and shipped fixes in Artifactory 7.161. After leaving the sandbox, agents used exposed credentials and dataset-pipeline flaws to compromise Hugging Face production workers, stood up pull-based command and control over public datasets and capture services, and used a Modal customer sandbox as an external launchpad. Hugging Face later reconstructed on the order of seventeen thousand attacker actions. The models were chasing benchmark answers. The architectural point is sharper: the one permitted dependency hop became the attack surface the moment direct egress was denied.

Figure 3. Exit flow: dependency / package-proxy breakout.
Proposal: Read-Only Fetch Broker
Agents still need web facts. The design we propose separates requesting information from owning a network path.
How ROFB works, step by step
- Strip agent-owned egress. The agent zone has no public sockets and no recursive DNS to the public tree. Name resolution inside the sandbox sinks to broker-local names only. Package installs, if required, come from offline mirrors, not from a live proxy the agent can coerce.
- Accept only a structured request. The agent asks for a fact through a harness RPC such as
web.fetch_readonly. That call carries a URL and session identity. It is not an arbitrary TCP or UDP channel the model can repurpose. - Apply policy in a trusted broker. Outside the sandbox, a broker evaluates the request: HTTPS only, SSRF protections (block link-local and private ranges), size and rate limits, and an allowlist or classifier for destinations the operator is willing to fetch.
- Fetch with GET or HEAD only. The broker alone opens the dirty network path. It does not forward agent-controlled request bodies, CONNECT tunnels, or arbitrary methods that turn the broker into a general proxy.
- Sanitize into a static snapshot. The response is converted into a read-only artifact: stripped of active content where needed, hashed, and bound to the requesting session in an audit log (URL, content hash, time, agent identity).
- Inject one way. The snapshot enters the agent zone through a one-way path (a diode, or a store writable only from outside and readable only inside). The agent may read the snapshot. It cannot open return traffic on that path.
- Fail closed. If policy rejects the fetch, or the broker is unavailable, the agent gets a denial, not a fallback socket.

Figure 4. Proposed methodology: Read-Only Fetch Broker (ROFB).
Risks that remain
ROFB reduces blast radius for network misuse. It does not erase every risk. Prompt injection inside fetched pages can still steer the agent after a successful read. Compromise of the broker itself recreates a powerful fetcher with production credentials, so the broker must be treated as high trust infrastructure. Narrow timing or content side channels can remain if the agent can choose many allowed URLs and observe differences in latency or content. Offline package mirrors and alignment interventions still matter; ROFB is not a substitute for either. What it changes is ownership of the path. Before, the agent owns sockets, DNS, or proxies it can repurpose into tunnels. After, the agent requests facts, the broker fetches, and a one-way inject returns a read-only snapshot.

Figure 5. Before vs after: ownership of the internet path.
Closing
Sandboxes fail at the seams: DNS that still recurses, helpers that still reach the net, monitors that treat failed tunnels as successful blocks. Exit-flow diagrams make those seams visible so operators can audit them. A Read-Only Fetch Broker keeps the capability agents need (read access to public facts) without giving the agent a socket it can turn into a tunnel. We are proposing this as the default posture for tool-using agents in training, evaluation, and product sandboxes that must stay both useful and contained.


