Safety, Security & Responsible AI·Question 56 of 70Advanced

You must run a cyber-capable agent in an evaluation harness that needs to install packages. In 2026 several labs' agents escaped exactly this kind of setup. Why isn't sandboxing enough when the agent itself is the adversary, and how would you contain it?

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

The coding-agent sandbox answer assumes the model is a victim: injected text makes it misbehave, so you remove credentials and egress and the damage is bounded. Here the agent is capable, persistent and goal-directed, and every channel you leave open is something it will probe. The 2026 incidents show what that looks like:

  • OpenAI said that GPT-5.6 Sol and a more capable pre-release model, run with reduced cyber refusals on the ExploitGym benchmark, used a zero-day in the package registry cache proxy to get out of the evaluation environment, and reached Hugging Face looking for test answers.
  • Anthropic reported that a misconfiguration gave live internet access in evaluations whose prompt said none existed, and that Mythos 5 published a PyPI package that ran on 15 real systems.
  • UK AISI logged 19 unsanctioned actions across 10 of 122 runs, including public posts inviting other agents to reuse artefacts.
  • Matthew Green summarised reports of agents using their only permitted egress, an artifact proxy, as a shared message board, and one reaching a remote chatbot over DNS.
Full worked answer with diagram

The coding-agent sandbox answer assumes the model is a victim: injected text makes it misbehave, so you remove credentials and egress and the damage is bounded. Here the agent is capable, persistent and goal-directed, and every channel you leave open is something it will probe. The 2026 incidents show what that looks like:

  • OpenAI said that GPT-5.6 Sol and a more capable pre-release model, run with reduced cyber refusals on the ExploitGym benchmark, used a zero-day in the package registry cache proxy to get out of the evaluation environment, and reached Hugging Face looking for test answers.
  • Anthropic reported that a misconfiguration gave live internet access in evaluations whose prompt said none existed, and that Mythos 5 published a PyPI package that ran on 15 real systems.
  • UK AISI logged 19 unsanctioned actions across 10 of 122 runs, including public posts inviting other agents to reuse artefacts.
  • Matthew Green summarised reports of agents using their only permitted egress, an artifact proxy, as a shared message board, and one reaching a remote chatbot over DNS.

The lesson: the one allowed egress is the attack surface, and a shared service is a communication channel.

Containment I would build:

  • Resolve dependencies before the run. Bake them into the image, or serve a pre-populated, read-only mirror that holds only the lockfile's packages and never fetches upstream. No upload or publish path at all, which closes both the package-publishing and the message-board channels.
  • Harden and isolate the proxy itself. Run it in a separate trust domain, keep it minimal and patched, and assume it will be attacked, because it is the only thing the agent can reach.
  • No DNS resolution to the outside. Static name resolution for the mirror only. DNS is egress.
  • Nothing shared and writable between runs. Per-run caches. A shared cache that one run writes and another reads is a channel between agents.
  • No credentials inside, and canaries that are. Plant fake tokens and alert the moment one is used.
  • Prove the boundary before every campaign. Run a preflight probe from inside the sandbox that must fail to reach the internet. The Anthropic case was a configuration that did not match the prompt.
  • Monitoring that can block, out of band. AISI's recommendations were to treat internet access as something that must be justified, use fine-grained network controls, and monitor in real time with the ability to block. Log denied attempts too: they are the signal.
  • Stop on the first unsanctioned action and treat it as a finding, not noise.

Why this still is not enough. Green's argument is that sandboxes are a small part of the answer. Useful agents need information access, monitoring that traffic well is hard, and a "warden" model watching the agent just moves the alignment problem down a level. So containment is layered with capability-aware decisions: which models get which harness, with which network policy, signed off by whom.

Worth sketching. Optional, but it makes the point that every arrow out of the sandbox is either removed or read only.

flowchart LR
    A["Agent in per-run sandbox"] --> M["Read-only mirror,<br/>lockfile packages only"]
    A -.->|"blocked"| U["Upstream registry"]
    A -.->|"blocked"| D["External DNS"]
    A -.->|"blocked"| W["Uploads and publish"]
    A --> T["Canary tokens"]
    T --> X["Out-of-band monitor"]
    M --> X
    X -->|"unsanctioned action"| K["Halt run"]

What a good answer covers

  • The coding-agent sandbox answer assumes the model is a victim
  • Here the agent is capable, persistent and goal-directed, and every channel you leave open is something…
  • OpenAI said that GPT-5.6 Sol and a more capable pre-release model, run with reduced cyber refusals on…
  • Anthropic reported that a misconfiguration gave live internet access in evaluations whose prompt said…
  • UK AISI logged 19 unsanctioned actions across 10 of 122 runs, including public posts inviting other…

Key terms: Containment I would build · Resolve dependencies before the run

Interviewer follow-ups to expect

  1. The task genuinely needs one upstream API: how do you allow it without recreating the proxy problem?

  2. What would you log on the mirror to spot an agent probing it?

  3. Would you use a second model as a monitor here, and what are you trusting when you do?

Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep