Skip to main content
Some work splits naturally into many independent pieces: ten issues in the backlog, a hundred files to migrate, a test suite that takes an hour on one machine. Doing them one after another is slow. Run them side by side instead, with one sandbox per task. Each sandbox has its own files and processes, so whatever one task does can never interfere with another. It always follows the same four steps:
  1. Prepare once. Set up one sandbox with the repository, its dependencies and the agent.
  2. Save it as a snapshot. Every sandbox created from it starts exactly where it was.
  3. Fan out. Create one sandbox per task from the snapshot, all at the same time.
  4. Collect the results. Read each sandbox’s result, keep what is good, and delete the rest.

Fan out

This example runs three tasks in parallel. To keep it short and free to run, each task is a simple stand-in for what an agent would do: it makes a small change to a file and runs a check to prove it worked. The next section shows how to put a real agent in its place.
1

Prepare the base and save it

2

One copy per task, all at once

Each sandbox started with the repository already in place: none of them had to clone or install anything.
3

Collect, then clean up

Keep the sandboxes whose work you want to review. They sleep while you read, and cost nothing for compute. Delete the others. This example deletes all of them, then the snapshot, then the sandbox it was made from:

With a real agent

To use a real agent, replace the stand-in with the agent’s command. The rest of the code stays the same. Here, Claude Code works on three issues at once, each in its own sandbox, and commits its fix to a branch:

Sharding a test suite

The same approach speeds up a slow test suite. Split the tests into parts (called shards), and run each part in its own sandbox at the same time. The suite then takes about as long as its slowest part:

Limits to keep in mind

When you start many sandboxes at once, keep your plan’s limits in mind: Errors, retries and limits explains every limit in detail.

Snapshots

What a new sandbox takes from its snapshot.

A coding agent on your repo

The single-task version of this page, step by step.