03 Methodology

Methodology

Every number on this site is produced by rerun-bench. The formulas, with unit tests, are in docs/METRICS.md. This page summarizes them.

3.1 Runs

What one run is

  1. rerun-bench copies the task's starting workspace into a fresh temporary directory. Nothing carries over between runs.
  2. It starts the agent CLI headlessly in that directory with the task prompt, and records wall time, exit status, token counts, cost when the CLI reports it, the CLI version, the model and the final diff.
  3. The task's verifier runs against the workspace. The run passes if and only if the verifier exits 0.

Runs are interleaved: run 0 of every task, then run 1 of every task, and so on, so a provider-side change in the middle of a session spreads across tasks instead of landing on whichever task ran last.

3.2 Metrics

What each metric means

Pass rate
Passing runs divided by all runs. A run passes only if the task's verify.py exits 0. The agent's exit code and its own claims of success are recorded but never scored.
Wilson 95% interval
The range of pass rates consistent with the observed runs. Unlike the normal approximation, it behaves at 0% and 100% and at small n. With 30 runs and 30 passes the interval is still 89% to 100%.
Macro pass rate and task-bootstrap interval
The mean of per-task pass rates, with an interval from resampling tasks. It reflects uncertainty about the task population, which the pooled Wilson interval ignores. Use it when comparing agents across the suite.
pass@k
Chance that at least one of k runs of a task passes (Chen et al. 2021). What you get if you retry until it works.
pass^k
Chance that all k runs of a task pass (Yao et al. 2024). What you get if you run the agent once and trust the result.
Flip rate
Chance that two runs of the same task disagree, averaged over tasks. 0 means every task always passes or always fails.
Flaky task fraction
Share of tasks with at least one pass and at least one fail. Coarser than flip rate and grows with n.
Cost, tokens, wall time
Medians per run as the CLI reports them. A value the CLI does not report is null and shown as not reported, never as zero. Wall time covers the agent process only.
Within-task CV
Coefficient of variation across reruns of one task, averaged over tasks. It measures how steady one agent is, not how different the tasks are.
Approach similarity
Mean Jaccard similarity of changed lines across passing runs of a task. 1.0 means every passing run made the same edit.

pass^k is never higher than pass@1, and pass@1 is never higher than pass@k. The gap between pass@k and pass^k is the cost of inconsistency. Full formulas in METRICS.md.

3.3 Comparisons

How agents are compared

3.4 Tasks

Task suite

rerun-bench default suite: 10 small, verifiable Python tasks. Each has a prompt, a starting workspace, a reference solution and a verifier script. They cover precise edits, bug fixes, implementing to a spec, refactors that must preserve behavior, following repository instructions, and writing tests that must catch injected bugs. Task sources.

Tasks in the suite
TaskWhat it asksTagsTimeout
add-cli-flagAdd a flag to a small CLI without changing its default outputcli feature python600 s
edit-configMake three precise edits to a TOML configconfig toml precision300 s
fix-failing-testFix the bug behind a failing unit testbugfix python tests600 s
follow-agents-mdAdd a function while following the repo's AGENTS.md conventionsinstructions agents-md python600 s
implement-lru-cacheImplement a small data structure to specimplement data-structure python600 s
implement-slugifyImplement a function from its docstring specimplement python spec600 s
minimal-fixFix one bug in legacy code without touching anything elsebugfix over-edit-trap minimal-diff600 s
multi-file-renameRename a function across a packagerefactor multi-file python600 s
refactor-extract-helperRefactor duplicated logic without changing behaviorrefactor python behavior-preserving600 s
write-testsWrite unit tests strong enough to catch injected bugstests mutation python600 s

3.5 Isolation

How runs are isolated

3.6 Limits

Known limitations

3.7 Reproduce

Reproduce a result set

uv tool install rerun-bench
rerun-bench run --agent claude --tasks all --runs 3 --out results/ --run-id claude --yes
rerun-bench run --agent codex --model <model> --tasks all --runs 3 --out results/ --run-id codex --yes
rerun-bench report results/ --format json -o report.json

Real runs spend API credit or subscription quota. Start with --tasks edit-config --runs 2.