AI Engineer World's Fair 2026
1,000 Agent Tasks in a Sandbox: What Breaks When LLMs Run Code — Kevin Orellana, AWS
Loading slides…
Read the talk
1,000 Agent Tasks in a Sandbox: What Breaks When LLMs Run Code
Kevin Orellana’s overnight AgentCore experiment separates broken interfaces from constrained execution environments—and shows why local success tells you too little about a remote agent’s ability to finish.
From a talk by Kevin Orellana
At a glance
Ideas worth remembering
Separate interface failures from sandbox failures: the image round trip failed because of MCP encoding, while another test wrote files it could not retrieve from the sandbox.
Choose tests around hosted workflows. Browser tabs exhausted memory in a way the code-interpreter tests did not.
Task completion depends on practical execution details, including process permissions, package placement, binary locations and filesystem behavior.
Broad agent-generated workflows can reveal overlooked constraints, but local testing must be complemented by tests in the remote environment where the agent will run.
Give the agent the same environment customers use
Kevin Orellana pointed a coding agent at his team’s cloud sandbox platform, told it to “Try to break it,” and left it running overnight. The experiment began with a practical testing question: if customers increasingly use agents to drive a platform, could an agent exercise that platform the way a customer would?
Orellana works on Amazon Bedrock AgentCore, which provides sandboxes alongside agent identity, memory, runtimes and gateways. To make the sandbox accessible to a coding agent, the team spent a day or two building an MCP server around the service. MCP supplied the interface through which the agent could use the cloud environment; refining the exposed tools and smoke-testing them came next.
The first checks were small: write and execute a Python file, or convert a Python file into Java. Then the request expanded to 1,000 tests across ten domains. The number was arbitrary—a way to cast a wide net, rather than a coverage guarantee. A run expected to take hours and consume substantial tokens also needed credential management and injection, plus a way to investigate whether a failure belonged to the service or its MCP wrapper.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Store workflow results where concurrent agents can use them
The harness had three main parts: a coding agent, an MCP server wrapping the cloud sandbox, and a local SQLite database for findings. Results went into the database rather than the Markdown files agents tend to produce. At 1,000 tests, collecting findings as structured records made the experiment more manageable and supported multiple local subagents executing tests concurrently and recording their results.
A “test” could be a complete customer workflow. The coverage included several different demands:
- Sandbox lifecycle and stress. Exercise how reliably an environment behaves under pressure.
- File transfer and performance. Upload files, download them again, and test the service’s behavior around filesystem I/O.
- Software development. Write Python or Java packages, or run an end-to-end machine-learning training program.
- Document and browser work. Generate a PDF report or open a webpage.
AgentCore hosted both a code sandbox and a cloud browser, and the useful workloads differed between them. Browser tests could create many tabs, scrape and summarize pages, take and download screenshots, fill forms, or automate a login. Those activities put different demands on the environment from compiling a package or generating a report. Testing the platform therefore meant testing what each hosted application actually did.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Three failures reveal two places to investigate
The clearest failure began with an image round trip. Upload an image, download it, and compare what came back with what went in. The returned image did not match the input. Investigation located an incorrect encoding layer in the MCP wrapper. The workflow had exposed a defect in the interface carrying the data, rather than establishing a defect in the sandbox’s execution machinery.
Two other cases broadened the diagnosis:
- A null byte disrupted the tests. Orellana connects the case to the special treatment a zero byte can receive, including marking the end of a string in some languages. The account does not identify which component mishandled it or give a precise failure mechanism.
- Written files could not be retrieved. Files were written to a particular directory inside the sandbox, but were unavailable when the test tried to get them back. Orellana identifies this as a sandbox-layer case without specifying the directory or its underlying cause.
These examples produced a useful split: investigate the interface layer, which exposes operations and carries inputs and outputs, separately from the sandbox layer, where the workload runs. A failed customer task can cross both. The image test is especially instructive because its intended result is simple—get back what was uploaded—yet the wrapper was enough to break that expectation.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
An agent’s chosen route becomes an environment requirement
A conventional API service usually exposes a relatively predictable operation: send a request and receive a shaped response from a backend whose work you understand. An agent inside a sandbox can choose a much wider range of intermediate actions. A gateway may expose access to it, but the workload’s actual compute requirements depend on the route the agent takes.
That route can look odd from the outside. An agent might download an unexpected package or convert a CSV into JSON and then into a PDF. Each intermediate step adds requirements: enough memory and CPU, permission to launch or use processes, and permission to access the relevant files. A task can fail because one of those operations is unavailable even when the agent has a plausible plan for producing the final answer.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Browser tabs exposed a memory limit the code tests did not
What changes when the same platform hosts a browser instead of a code interpreter? Orellana’s failure comparison puts the code sandbox above the cloud browser and marks sandbox terminations in red. Opening browser tabs consumed enough memory that many browser tests failed from memory constraints; this was not a comparable failure pattern in the code-interpreter environment. The comparison makes application-specific pressure visible, although the talk gives no numerical failure rates or memory allocations.
The browser tests were unforgiving: starving sessions and sandboxes of memory counted as complete failures. That is a different outcome from a tool returning an error while leaving the environment available. Here, the environment itself could no longer sustain the workflow.
Grouping failures around sandbox primitives suggested more concrete questions to ask. For files, those questions include which filesystems are mounted, which paths permit reading, writing or execution, and whether storage persists or is ephemeral. These are properties a workload depends on. A platform intended to accept varied customer workflows has to account for how those properties affect task completion.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Small execution constraints can block the whole task
The discussion then moves below application tools into the controls composing the sandbox. Kernel capabilities and interception mechanisms can affect whether a workload can make outbound calls or reach internal company services. The consequential relationship is that an agent’s requested operation must also be permitted by the environment executing it.
Three examples make that dependency tangible:
- Starting a process. A machine-learning package may need to spawn another process. Its workflow depends on the process or container being allowed to do so.
- Finding a Python package. Downloading a package is only useful if it lands where the Python kernel can pick it up.
- Executing a Rust binary. A coding agent needs the binary in an appropriate location before it can run the program.
These details accumulate into the ability to solve the business problem. Generating unit tests or integration tests can exercise known behavior, but a sandboxed agent also depends on low-level controls that may be easy to overlook when specifying the task. Orellana’s proposed extension is broad workflow fuzz testing: ask an agent to attempt many tasks across domains, then inspect which combinations expose those constraints. The 1,000-workflow run is a way to discover sharp edges, not a claim that generated tests exhaust the possible workloads.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Test remotely, and give the agent a way to inspect failures
The local-to-remote move gives this testing strategy an immediate use. Running more coding-agent workspaces eventually strains a developer’s laptop; remote sandboxes let teams work through more GitHub pull requests. But the tools, MCP connections and running applications on that laptop may differ from what the remote environment provides. A successful local attempt does not exercise those differences.
At the time of the talk, AgentCore had recently added SSH access to sandboxes so customers could inspect what was happening inside. The investigator could be a human or the coding agent working alongside them. That access provides a way to enter the actual failing environment and look for the conditions preventing the application from running smoothly.
Environment design can also distort how agent capability appears in evaluations. Orellana cites a UC Berkeley study in which an exploit agent with suitable environment controls reportedly reached up to 100% on SWE benchmarks. He contrasts it with another study where broken tools substantially reduced agents’ effectiveness on business tasks. Neither study is identified sufficiently here to establish its evaluation scope or reproduce the result; their role in the argument is to show how favorable or broken tooling can change the outcome attributed to a model.
The closing challenge is concrete: test locally, then fuzz-test a wide set of domain workflows remotely. Once an application can choose arbitrary actions inside a sandbox, its failure points include every execution constraint along that chosen route. Exercising real workflows in the destination environment makes those constraints observable before customers discover them through unfinished tasks.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Resources
Related talks
- Beating RL With Reflection: GEPA and Optimize Anything
Explains how execution traces, tool errors and other diagnostic feedback can guide changes to prompts and agent programs after failures have been exposed.
Full transcript
Loading transcript…