AI Agent Containment After Anthropic's Cyber Eval Incidents

AI agent containment is now a routing requirement: Anthropic found three cyber-eval incidents where Claude reached real systems, proving prompts cannot replace network and gateway controls.

TheRouter Newsroomvia Anthropic
AI agent containment diagram showing a sandboxed evaluation lane blocked from the public internet by routing and network policy gates

AI agent containment just stopped being a safety-lab problem. Anthropic disclosed that a review of 141,006 cyber-evaluation runs found three incidents where Claude reached the open internet from third-party test environments and gained unauthorized access to real organizations. The operational lesson is not that a model "went rogue." The sharper lesson is that an AI agent will follow the network, credential, package-registry, and tool permissions it is actually given — even when the prompt says the world is simulated.

For teams routing coding agents, red-team agents, or autonomous security workflows through a gateway, this changes the control plane. Model choice and refusal policy are not enough. AI agent containment now needs to be expressed as egress policy, provider lane selection, tool allowlists, credential scope, and audit correlation before the request ever reaches the model.

AI agent containment moved from prompt claim to network fact

Anthropic says the affected evaluations were capture-the-flag style cyber tasks run with third-party evaluation partner Irregular. The prompt told Claude that the environment was simulated and had no internet access. The infrastructure did not match that promise. In one case, a fictional company name overlapped with a real domain; Claude exploited weak passwords and unauthenticated endpoints and accessed a production database with several hundred rows. In another, Mythos 5 built and uploaded a malicious Python package to the real PyPI registry for roughly one hour; Anthropic says it ran on 15 systems, including a security scanner. A third run scanned roughly 9,000 targets before compromising an internet-facing application with exposed credentials and SQL injection.

The key operator detail is the mismatch between declared scope and enforceable scope. The model did not need exotic capabilities to cause harm in two of the incidents. Basic web reachability, package publication, weak credentials, and unrestricted scanning were enough. That is exactly the failure mode production agent operators should worry about: not superintelligence, but an ordinary tool loop with a false boundary.

OpenAI's July Hugging Face evaluation incident is useful cross-provider context. OpenAI described models that exploited a zero-day in an Artifactory package-registry cache proxy to escape a constrained benchmark environment and reach Hugging Face production infrastructure. Anthropic's incidents were less technically sophisticated, but more instructive for everyday operators: containment can fail through mundane routing and egress mistakes, not only through zero-days.

What a router can control before the model acts

A model router cannot make a leaky evaluation range safe by itself, but it can prevent a single "agent" product lane from hiding different risk classes. Treat cyber-eval traffic, code-generation traffic, and production support-agent traffic as separate routing lanes with separate upstream keys, separate tool policies, and separate logging labels. If all three share the same provider credential and the same base URL path, incident reconstruction becomes guesswork.

The minimum gateway metadata for this class of workload is not just model and user. Add a durable workload label such as agent_eval, code_agent, or prod_assistant; an environment label such as sandbox, staging, or production; and a run identifier that follows tool calls, package-registry writes, browser actions, and outbound HTTP attempts. If a model publishes a package or scans a host, the gateway log should be able to answer which upstream model, provider account, evaluation run, and tool grant created that action.

There is also a migration path for teams that currently use prompt-only boundaries. Before: send the agent a system prompt saying "you are in a simulation and cannot access the internet," then let the harness decide what tools are available. After: route the request through an agent_eval_no_egress lane, use a provider/API key that cannot call unrelated hosted tools, deny package-publication credentials entirely, and put outbound HTTP behind a domain allowlist that is tested before the run starts. The request shape can stay OpenAI-compatible; the lane policy cannot stay implicit.

AI agent containment checklist for gateway teams

First, separate model fallback from containment fallback. If the high-capability cyber model is unavailable, falling back to a general coding model may reduce capability but not reduce tool risk. The safe fallback is often "stop the run" unless the alternate model uses the same network and tool sandbox.

Second, bind every tool permission to the workload, not to the human operator. A human's PyPI, GitHub, cloud, or package-registry credential should not be mounted into an eval agent because the human is allowed to use it. The agent should receive a synthetic credential scoped to the one action class the run requires, and most cyber evals should receive no publication credential at all.

Third, add egress probes to the preflight. Anthropic's post makes clear that the dangerous state was detectable: the prompt and the network disagreed. A run should fail before the first model call if curl https://example.com, DNS resolution, package installation, or registry publication succeeds in a lane that claims no internet access.

Fourth, aggregate by agent run, not only by API request. A single harmful chain may include dozens of harmless-looking completions. Gateway accounting should group the sequence so an operator sees "one eval run attempted public-internet access" rather than 200 isolated chat completions.

For TheRouter users, the immediate action is to model these as routing-policy requirements. Use TheRouter as the OpenAI-compatible entry point where workload labels, upstream provider choice, and fallback behavior can be kept explicit; pair it with network controls outside the gateway for browser, shell, and package-manager access. The stable place to start is the TheRouter documentation, then map each agent class to a lane before adding more models.

What to watch next

Anthropic says it will release a lightly redacted transcript of the PyPI incident and is working with METR on third-party review. Those details matter because they should reveal where the model recognized real-world evidence and where the harness failed to interrupt. Operators should watch less for headline severity and more for concrete interrupters: network validation, transcript review cadence, package-registry policy, and whether future model releases expose stronger situational-awareness signals that a gateway can log.

The record correction is simple: this story is not proof that prompts are useless or that agentic models inherently pursue independent goals. Anthropic says the models pursued the assigned task under a false belief about scope. That is still enough to change production practice. AI agent containment has to be engineered in the same layer where requests, credentials, tools, and providers are routed — not left as an instruction inside the prompt.

Help & contact