StoryboardAI Engineering

The sandbox

A sealed, throwaway computer for running code a model wrote.

What is a sandbox?

Code written by a model, shaped by a file a stranger uploaded, could do anything a program can do: delete files, read secrets, send data somewhere. Running it on your own server would be reckless.

A sandbox is a sealed environment for exactly this. It has no network, sees only the files it was given, has strict limits on time and memory, and is destroyed after each run.

The rule is simple: assume the code is hostile and make sure it would not matter. Then letting a model write and run programs becomes safe enough to ship.

A sandbox is several separate walls, each enforced from outside.1. Files: write only inside the working folder. 2. Network: closed, except a short list. 3. Limits: memory, time and processes capped. 4. Afterwards: destroyed, nothing kept.Fileswrite only inside the working folderNetworkclosed, except a short listLimitsmemory, time and processes cappedAfterwardsdestroyed, nothing kept
A sandbox is several separate walls, each enforced from outside.

Why does a sandbox matter?

An agent that can run commands or code can do real damage: delete files, leak secrets, send data anywhere. A model can be mistaken or deceived, so its good intentions are not a safeguard. A sandbox limits what is physically possible. Inside it, even a thoroughly fooled agent cannot reach anything that matters.

How does a sandbox work?

  1. The harness starts a separate, sealed environment for the agent's work.
  2. A wall around files: the agent can write only inside its working folder.
  3. A wall around the network: nothing can be reached except a short allowed list.
  4. Limits on memory, processor time and how long anything may run.
  5. When the task ends, the environment is destroyed and nothing carries over.

When should you use a sandbox?

Use it when

  • An agent runs commands or code a model wrote
  • It reads untrusted material, such as web pages or other people's code
  • You want to let it work without approving every step

Think twice when

  • The agent only reads and writes text through narrow tools
  • The work truly needs your real environment. Then use tight permissions and approval

Where does a sandbox sit in a real system?

The sandbox is created and controlled by the harness, from outside. The agent's tools operate inside it. The walls are enforced by the operating system, so nothing running inside can remove them.

What goes wrong with a sandbox?

  • Calling something a sandbox when it shares your real files or credentials.
  • Leaving the network fully open, so data can be sent out.
  • Reusing one sandbox across tasks, letting one job's leftovers affect the next.

What does a sandbox look like in practice?

A coding agent opens a file containing a hidden instruction to download and run a script. It is taken in and tries. The sandbox has no route to that address, the command fails, and the attempt is logged. Nothing was protected by the model noticing the trick.

Watch it happen

These stories show the sandbox at work, one step at a time.