Skip to main content
Three parts: a coding environment with a graded task, a runtime that places each rollout in a fresh Daytona sandbox, and an eval that runs every task variant wide on it. HUD ships no Daytona runtime; the cookbook writes one in a single file, runtime.py, and the same pattern places rollouts on any infrastructure you can start a container on. The full walkthrough, with the concurrency and warm-pool measurements, lives in Daytona’s guide.

Open the source

The complete project: the environment, the runtime, the task list, and the benchmark receipts behind the numbers.

The environment

One file. A workspace with a shell, seeded bugs in calc.py, and a grader that pays 1.0 only when every test passes.
Run it locally first. The claude agent needs a HUD_API_KEY or an ANTHROPIC_API_KEY:

Write the runtime

A runtime is a callable that takes the task being placed and returns an async context manager yielding a Runtime: the address of the environment’s control channel. HUD connects there, runs the rollout, and exits the context, which is where the runtime tears its host down.
DaytonaRuntime in runtime.py is the whole thing, four steps top to bottom, each registering its own teardown:
  • The environment travels as a Docker image. The first rollout builds Dockerfile.hud into a Daytona snapshot; later ones reuse it. The snapshot name is a hash of the files that go into the image (snapshot.py), so editing the environment builds a new snapshot instead of running the old one.
  • The control channel goes over SSH. Daytona exposes sandbox ports only as HTTPS previews, so the runtime forwards a local port to the sandbox’s hud serve and yields tcp://127.0.0.1:<port>.
  • A crashed run leaves nothing billing. Sandboxes auto-stop after 10 minutes without activity and, being ephemeral, are deleted when they stop. An open SSH forward does not count as activity, so the runtime refreshes the sandbox once a minute while the rollout runs; if the process dies, the refreshes stop and the sandbox goes.
  • Sizing is Daytona’s own. Pass resources=Resources(cpu=..., memory=...) and the snapshot is built with it. A task that sets runtime_config is refused, so a requirement is never silently dropped.
Same task, same agent, one argument changed. A fresh sandbox is usable in about 3 seconds at low concurrency and about 10 at 256 wide, and the full ladder to 256 ran 1,272 creates without a failure. For spin-up numbers, warm pools, and sizing rules, see Daytona’s guide.

Run every variant wide

fix_calc takes a variant from 0 to 23, each a different set of seeded bugs. Run them all as one taskset, group attempts each, with up to max_concurrent sandboxes at once:
bench/baseline.py runs this and breaks the pass rate down by how many functions each variant breaks.

Run it

Source code

Runnable project: the environment, runtime.py, and bench/ with the concurrency and warm-pool receipts.

Designing tasks for signal

Build rewards with enough signal to distinguish better trajectories.

Daytona sandboxes

Spin-up measurements to 256 concurrent, warm pools, and sizing rules.