AI-native

How do you test whether an AI agent can set up a repo?

Give every attempt its own fresh machine, run the agent's setup under a time limit, then check that the tool it was meant to install really works, by its path, and record pass, exit codes and seconds as one line per attempt. Throw the machine away afterwards. Running attempts back to back on one machine gives false passes and false times, because whatever the last attempt left behind does the work.

Updated November 23, 2026

Why test setup at all?

Because "works on my machine" is the first thing an agent runs into. A README's install steps assume things the author already has, and an agent following them on a new machine hits the gaps. In Sandboxer's guide on testing whether an agent can set up a repo on a clean machine, the README commands of four small public projects, run exactly as written, worked for 2 of 4: Ubuntu 24.04 refuses a system-wide pip install, and npm install -g can't write to /usr as a normal user. A stand-in agent with one retry rule (add --user after the first error, sudo after the second) passed all 4.

What does one attempt look like?

  1. Fresh machine: create a new sandbox for this attempt only, without your account's secrets.
  2. Set up under a limit: run the install, or your agent's run, under timeout, so a stuck step ends with a clear exit code (124).
  3. Use it: run the project's documented usage command under its own short limit.
  4. Check: pass only if that command exits 0 and prints what it should.
  5. Record and delete: append one JSON line with the task, the agent, the starting image, the sandbox, exit codes, pass and timings, then delete the sandbox.

To score a real agent, replace the install step with the agent's run and keep the rest, so the grading is the same for every agent.

Why does a clean machine matter?

Leftovers lie. When the guide ran attempts back to back in one sandbox, three results were wrong:

  • A false pass: an install that failed still passed its check, because the previous attempt's install was still on disk.
  • A false time: a Go install took 91 milliseconds instead of 7.3 seconds, because the build cache from the attempt before was still there.
  • A false pass from the image: a Rust install timed out, but the check found a copy of the tool that ships with the base image.

A fresh machine per attempt fixes the first two. Checking the tool at the path the setup should have created, not just by name, fixes the third. In the guide, a new sandbox was ready about a quarter of a second after it was asked for, so a fresh one costs almost nothing.

Should attempts start from a warm machine?

Only if you mean to measure that. A snapshot that keeps download and build caches cut one Go setup from 7.9 seconds to 0.8, but made no difference to a Rust compile and added about a second to start-up. It also changes the question from "does setup work on a stock machine" to "does it work on one that already has these caches", so record the starting image with every result and never compare pass rates across the two. To run many attempts side by side, see running many coding agents in parallel; for full benchmark runs, see agent evaluations on Sandboxer.

Frequently asked questions

Why do AI agents fail to set up repos?

Usually because the README assumes the author's setup. On a stock Ubuntu 24.04 machine, system-wide pip installs and global npm installs as a normal user both fail.

Can I test setup by running attempts one after another on one machine?

Not reliably. Files and caches left by earlier attempts produce false passes and false timings. Use a fresh machine for each attempt.

How do I tell whether the agent installed the tool?

Check it by the path the setup should create, not just by name, because the base image may already have a copy.

How many attempts should I run?

More than one per repo. A pass rate over three attempts per repo says more than a single try.