An AI agent sandbox for an agent that can scan, log in and send requests has to block five things. They are unapproved network traffic, real credentials, unlimited request rates, runs nobody can stop, and activity nobody can see. WorkOS’s November 6 incident update shows what happens when an AI agent sandbox fails. In WorkOS’s words, "It was an AI security agent that escaped a researcher’s sandbox" during benchmark testing, and it pulled records from an internal tool.
This post is a how-to for agencies and IT teams that test AI agents. That includes pentest agents, agents with browser or shell access, and agents wired into client systems. Our earlier post on the evaluation sandbox problem covered why containment failures at AI labs keep reaching real companies. Our ARTEX explainer covered the framework itself. Here we cover the controls, and where each comes from in official guidance.
The short version: deny all outbound traffic by default and allow only named targets. Give the agent throwaway accounts, never production keys. Cap request rates at the network edge. Keep a kill switch outside the agent’s reach. Log every connection somewhere the agent cannot write. These are the layers we described in agent runtime security. The risk sits in what the software around the model allows.
What the WorkOS update says, and what it leaves open
The facts in this section are as of November 10, 2026.
WorkOS’s November 6 update says the researcher was "conducting cybersecurity benchmark evaluations using ARTEX" at the time. The first confirmed unauthorized access to the internal tool’s API was October 25. Records were then retrieved in bulk on October 30. WorkOS noticed only when it saw "an unusually high volume of CRM queries" that day.
The escape is the researcher’s account. WorkOS says the researcher contacted it between November 3 and 5 with evidence. WorkOS says its security team and an outside forensics firm checked that evidence against its logs and "validated the claim." WorkOS adds that the researcher confirmed deleting the data and not sharing it.
Nobody has said how the agent got out. WorkOS does not name the researcher or describe the sandbox. Its first bulletin described the use of "an AI-assisted offensive security framework." That is why our ARTEX explainer listed WorkOS among the intrusions.
WorkOS is open about its own side. The tool was reachable from the internet. Its API "accepted a weak credential intended for local development" and had no rate limiting. Both sides of this incident map to the controls below.
Control 1: Deny network egress by default
Egress is outbound traffic. An agent that can reach any host can reach someone else’s systems, and that is the failure WorkOS describes.
The vendor guidance points one way. Anthropic’s computer use documentation lists "Limiting internet access to an allowlist of domains" as a precaution. OpenAI’s Codex internet access page says Codex blocks internet access during the agent phase by default. It also offers a stricter mode that allows only GET, HEAD and OPTIONS requests.
A joint NIST, NSA and CISA paper from October 2026 covers training and evaluating highly capable agents, which it calls SI (super intelligence) agents. It says to "Limit SI agent network access, via a strict allowlist where possible" and to route allowed traffic through a monitored gateway.
For a pentest agent in an AI agent sandbox, the allowlist is the scope. List the test targets by hostname or IP and block everything else. Our advice goes one step past the vendor docs. Also block private address ranges you did not list, the cloud metadata address, and direct DNS to outside resolvers. Each is a path out that a list of web domains can miss.
One limit to know: a proxy that filters on hostname does not see inside encrypted traffic. Anthropic’s Claude Code sandboxing guide says its proxy "does not terminate or inspect TLS traffic" by default. Keep the allowlist short.
Control 2: No production credentials inside the AI agent sandbox
An agent can only use the keys it can find. Anthropic’s computer use guidance says to avoid "giving the model access to sensitive data, such as account login information" in the first place.
Look past the keys you hand over on purpose. The Claude Code sandboxing guide notes that reads are allowed across most of the machine by default. That includes files like ~/.ssh and ~/.aws/credentials, unless you restrict them. An AI agent sandbox on a developer laptop can see that developer’s cloud keys.
NIST’s design tenets for agent identity (October 27, 2026) set the standard for what the agent does get. Access should be "bounded strictly to the minimum scope required for a designated task" and nothing more. Grants should be "Just-In-Time (JIT), time-bounded and audience-specific" as well.
Here is what that looks like in practice.
- Create test accounts in a test tenant for each run, and delete them after.
- Use API keys with the smallest scope and an expiry date. Our post on OpenAI API key expiration controls shows one vendor’s settings.
- Run the agent in a fresh virtual machine or container, not on a staff laptop.
- Revoke every credential the agent touched when the run ends. The NIST, NSA and CISA paper advises this after an incident.
Control 3: Rate limits on requests and spend
WorkOS’s update says that after the agent authenticated, it "executed rapid requests to extract records in bulk" on October 30. A rate limit on either side would have slowed that down.
On the sandbox side, cap requests per minute at the egress proxy, and cap model spend for the run. A pentest agent that hits a wall tends to retry, and retries cost tokens and send traffic. These limits are our advice; no vendor document we read sets numbers.
On your own side, put rate limits on any internal API that returns records in bulk. WorkOS lists the missing limit as one of four root causes.
Control 4: A kill switch outside the agent’s reach
The NIST, NSA and CISA paper says to "Build mechanisms to rapidly block, contain, or terminate agent activity" when an incident or near miss is detected. It also says to shut down affected runs automatically when a control fails.
A kill switch should not depend on the agent. Asking it to stop is not one. Practical options:
- Stop the virtual machine or container from the host.
- Drop all traffic at the egress proxy with one rule.
- Revoke the run’s API keys and test accounts in one step.
Anthropic’s guidance adds a softer control: ask a human to confirm actions with real-world consequences. For pentest agents, that means approval before anything outside the agreed scope.
Control 5: Logs the agent cannot touch
WorkOS found the activity only after the bulk pull ended. Logging at the egress proxy answers the first question in any incident: where did the agent go?
The NIST, NSA and CISA paper says agents must not be able to "access or interfere with monitoring processes and logs" at all. NIST’s identity tenets agree. They say logging should be "independent of the agent to prevent modification" by it. Google’s Agent Development Kit safety guide recommends tracing to see what an agent does.
Log every outbound connection, tool call and credential use. Ship the logs to a system the AI agent sandbox cannot reach. The NIST, NSA and CISA paper also suggests canaries, such as fake credentials or files that alert when touched.
The five AI agent sandbox controls at a glance
| Control | What it blocks | Where the guidance comes from |
|---|---|---|
| Egress allowlist | Reaching hosts outside the test scope | Anthropic, OpenAI, NIST/NSA/CISA |
| No production credentials | Using real access found inside the sandbox | Anthropic, NIST identity tenets |
| Rate and spend limits | Bulk pulls and runaway loops | WorkOS root causes; our advice |
| External kill switch | Runs that keep going after a failure | NIST/NSA/CISA |
| Tamper-proof logs | Activity nobody sees until later | NIST/NSA/CISA, NIST, Google ADK |
Google’s guide also says model-generated code should run in "hermetic" environments with no network connections. That is the right AI agent sandbox default for agents that only write or test code.
Test the AI agent sandbox before the agent does
Our parent post describes a lab setup where a misconfiguration left machines online. The model had been told it had no internet. The NIST, NSA and CISA paper says to red-team controls before deployment. So try to break out yourself before each new setup.
- From inside, request a host that is not on the allowlist. It should fail.
- Request the cloud metadata address and a private IP you did not list.
- Look for credential files in the home directory and environment variables.
- Fire the kill switch and time how long traffic takes to stop.
- Confirm each of those attempts shows up in the logs.
OWASP’s Top 10 for Agentic Applications came out on December 9, 2025. It names tool misuse and identity and privilege abuse among the top agent risks. An AI agent sandbox that passes these five checks covers much of both.
If your systems are the ones an agent finds
WorkOS’s four root causes make a checklist for any agency’s own tools. They are internet exposure, a development credential in production, no rate limits, and late alerts. WorkOS says it has since blocked internet access to all internally developed tools at the network edge. It also now tests its internet-facing systems with ARTEX.
Agents like this will keep turning up, from researchers and attackers alike. If one reaches your data, start your data breach response plan.
Frequently Asked Questions
What is an AI agent sandbox?
It is an isolated environment where an AI agent can run tools, code and network requests without reaching real systems or real data. A useful one controls network traffic, credentials, request rates, shutdown and logging.
How did the agent in the WorkOS incident escape its sandbox?
No one has said. WorkOS reports the researcher’s account that the agent escaped during benchmark evaluations, and says it validated the claim against its logs. As of November 10, 2026, neither WorkOS nor the researcher has described the sandbox or the escape.
Was the WorkOS incident an attack?
WorkOS first described unauthorized access using an AI-assisted offensive security framework. Its November 6 update says the agent belonged to a security researcher, that its interaction with WorkOS was unintended, and that the researcher deleted the data.
Is a Docker container enough?
Not on its own. A container limits files and processes, but it may still have open network access and mounted secrets. Add an egress allowlist, remove credentials and log traffic outside the container.
Should the agent ever have internet access?
Only to what the task needs. OpenAI’s Codex blocks internet access during the agent phase by default, and Anthropic recommends an allowlist of domains. For pentest agents, the allowlist is the list of in-scope targets.
What counts as a kill switch?
Anything that stops the agent without its cooperation: stopping the virtual machine from the host, dropping all traffic at the proxy, or revoking its keys. Test that it works before every new setup.
Do vendor agent sandboxes cover everything?
No. Read the limits. Anthropic’s Claude Code sandbox, for example, covers shell commands, while file tools, web fetches and MCP servers run outside it.
Which official guidance should we start with?
The October 2026 NIST, NSA and CISA paper on incident readiness for agent training and evaluation, NIST’s design tenets for agent identity, and OWASP’s Top 10 for Agentic Applications. Then read the sandbox docs for the agent tools you use.