Auditing Agent Benchmark Runs by Replaying Only the Steps That Matter

When a lab reports that its coding agent solved 60% of a container-based benchmark, nobody outside the lab can check the claim. The run happened on the lab's machines. It may have lasted hours, and the only evidence is a log the lab wrote itself. Rerunning the agent does not settle the question either: language models are nondeterministic, so a second run gives a different trajectory and a different score. This proposal builds a certificate that a benchmark harness emits alongside each run. During the run, the harness records a cryptographic fingerprint of the container's filesystem after every shell command, in a tree structure that can later prove "this file had these bytes at step $i$" in a few kilobytes. Afterward, an auditor traces backward from the files the hidden tests actually read to the few commands that produced them, and replays just those commands against verified slices of the recorded state. The auditor's cost scales with the size of that backward slice, not with the length of the run.

The opportunity lies between two literatures that rarely meet. Work on succinct computation certificates shows how to prove facts about large states and long computations with tiny proofs. Work on reproducible execution environments has made the container the standard unit of agent evaluation, but it still trusts whoever runs the container. The core claim is that, in practice, a benchmark outcome depends on a small dependency slice of a long trajectory. Committing to per-step state with authenticated trees, then replaying that slice, gives a third party strong evidence that the final state was produced by the logged commands and not edited out of band. The auditor fetches a small fraction of the state, and the harness needs no special hardware and no general-purpose zero-knowledge prover.

What exists and where the gap is

Container benchmarks have become the evaluation substrate for agents. Terminal-Bench runs 89 expert-curated command-line tasks in Docker sandboxes with hidden test suites, managed by its Harbor framework. It reports single attempts lasting up to two hours and consuming nearly 100 million tokens. TerminalTraj automates this at scale, with 32,325 Docker images and 50,733 verified trajectories. OpenHands supplies the sandboxed agent runtime. Agent-Diff grades tasks by diffing state snapshots taken before and after the run. All four establish the setting we work in, and all four trust the host that produced the snapshot or log.

Three papers come closest to closing this trust gap, and each motivates a different part of the design. VET uses notarized TLS transcripts to prove which language model API produced each response, and trusted hardware proxies to prove external inputs. By its own scoping, it leaves the shell actions and container state inside the host unverified. We take VET's model-call attestation as a component and cover the half it does not: the environment transitions. SciAgent's audit-grade harness pairs version-pinned containers with an append-only provenance log and a fresh-context LLM verifier. It catches real failures, such as computation silently moved from a cluster to a local node or missing child-session logs. The authors concede that the log is uncommitted, the verifier's confidence is uncalibrated, and verdicts can be hallucinated. That paper motivates the gap: an LLM judge of an unauthenticated log cannot detect a log that is internally consistent but false. Agent-Diff's state diffs are the outcome contract we want to make checkable by someone who does not run the server.

The technique comes from authenticated data structures. TICK keeps about 99.4 million Bitcoin transaction outputs in a self-balancing hash tree. It reports 0.3-second updates and proofs of presence under 2 KB and proofs of absence under 4 KB. Flat, high-arity Merkle trees, as in designated-verifier delegation, keep proof depth constant. We reuse both ideas for container filesystems and databases.

General succinct arguments constrain the design rather than supply it. zkFL reports about 55 minutes of proof generation just to aggregate ResNet-50 gradients. DualMatrix restricts inputs to 52-bit integers. Proving arbitrary shell commands, compilers, and pip installs inside a SNARK (a succinct non-interactive argument, a short proof checkable in near-constant time) is far beyond current prover budgets. We therefore deliberately do not attempt a zero-knowledge proof of the trajectory. Our certificate is succinct in what the auditor must fetch and recompute, and its soundness rests on hash commitments plus replay rather than on a polynomial argument.

Core Claim

Let a run consist of commands $c_1,\dots,c_T$, with committed state roots $R_0,\dots,R_T$, where $R_0$ is the root of the pinned image. The harness commits, at each step, the root together with the diff of written paths and the command's recorded stdout. Hidden tests read some set of paths in the final state. For each such path, the per-step diffs identify the last step that wrote it. Replaying that step inside a sandbox whose filesystem is fetched lazily, with every block checked against $R_{i-1}$, reveals the step's read set. The auditor then recurses on the last writers of those reads. The resulting set $S$ of steps is the outcome slice.

The claim is that $|S| \ll T$ on realistic agent runs. Replaying $S$, plus $k$ uniformly random extra steps, detects any outcome-relevant out-of-band mutation, because such a mutation must either break a root transition inside $S$ or be attributed to a command whose replay does not reproduce it.

Mutations outside the slice cannot change the grade. Against tampering anywhere else, which matters for process claims like "the agent did not install a cheat tool," the random sample gives the usual detection probability

$$P_{\text{detect}} = 1 - (1 - m/T)^{k},$$

where $m$ is the number of tampered steps. The formula follows from independent uniform sampling of $k$ steps.

The certificate binds the environment, not the model's intent. If the host fabricates a replayable command, such as pasting a hand-written solution via a heredoc, the environment chain is honest. Catching that requires VET-style attestation that the model emitted that command. We will report both configurations, so the boundary of what is proven stays explicit.

Research Program

The first piece is a harness layer for Harbor and OpenHands-style runtimes. It snapshots the container's writable layer after each command into a content-addressed, high-arity Merkle tree over paths and blocks. It covers database-backed replicas, as in Agent-Diff, by committing serialized rows under the same scheme. Each step's entry contains the command, the recorded output hash, the diff, and the new root, chained to the previous entry.

The second piece is the auditor. It requests proofs of presence and absence for test-read paths, builds the outcome slice by lazy verified replay, and issues a verdict with an explicit list of the steps that could not be reproduced.

The central empirical unknown is replay determinism. Commands that hit the network, read clocks, or spawn background processes will not replay byte-for-byte. We will measure how often honest steps replay exactly. We will then add a small set of normalizations: recorded network responses served back during replay, a frozen clock, and pinned random seeds. We will report what fraction of honest slices become fully auditable after normalization. If that fraction is low, the method fails, and we want to know that early.

Baselines

The naive reference point is the status quo of trusting the submitter's log and self-reported score. It costs nothing and catches nothing. It anchors the detection-rate axis at zero for out-of-band tampering.

The strongest competitor on detection is full replay of the recorded commands. The auditor reruns all $T$ logged commands, with recorded model outputs, from the pinned image and compares final states. This is the obvious thing a skeptic would do. It should detect every outcome-relevant tampering that our slice detects, so it is the ceiling on detection and the target on cost. It will be run on the same trajectories, hardware, and determinism normalizations as our auditor. We beat it if we match its detection rate on outcome-relevant attacks while fetching and recomputing a small fraction of its bytes and CPU time. We set a target of at least a 5x cost reduction at the median task as the bar for the idea being worth its complexity. No reported result was found on Lacuna for the cost of full command replay on Terminal-Bench or Agent-Diff, so we measure it ourselves.

The strongest existing verification method is SciAgent's fresh-context LLM verifier, applied to the same logs. Its reported overhead is 1.7% to 9.9% of total run cost (audit-grade harness). No reported result was found on Lacuna for its detection rate against deliberate log forgery. We will run it with the same model budget across seeds and count detections on the same attack suite.

A tamper-evident hash-chained log without replay isolates whether the commitment alone does the work. It proves the log was not edited after the fact, but not that the logged commands produced the logged state.

The key ablation replaces slice-targeted replay with uniform random sampling at the same replay budget. If random sampling detects outcome-relevant attacks as often, the slice construction is not pulling its weight.

Why not just…?

Why not just run the harness in a hardware enclave and use its attestation? This is the most serious threat. If Harbor ran inside an attested enclave, the attestation would cover the image and the execution at low overhead, and our replay machinery would be unnecessary. Our counterarguments are partial and honest. VET notes that relying on trusted hardware limits deployability and concentrates trust in the hardware vendor (VET), and agent benchmark hosts often run Docker-in-Docker and GPU workloads where enclave support is uneven. We position the certificate as the fallback for hosts without enclaves, and as a cross-check that does not depend on the vendor. If enclave hardware is available, we will add an enclave arm and report its overhead next to ours. If enclaves become ubiquitous for these workloads, the contribution narrows to vendor-independence.

Why not just replay the whole recorded trajectory? Full replay is our strongest baseline, and it may already be cheap enough on short tasks. Terminal-Bench reports runs of up to two hours (Terminal-Bench), but much of that time is model latency rather than command execution, which replay skips. The decisive measurement is therefore the ratio of slice cost to full-replay cost per task. If that ratio sits near one for most tasks, we will say so and recommend full replay over committed logs as the simpler protocol.

Why not just sign and hash-chain the log? A signed chain proves the log was not altered after writing. It says nothing about whether the host edited files between logged commands, which is exactly the failure an internally consistent forged log hides. The hash-chain-only baseline makes this concrete. We expect it to detect none of the out-of-band edit attacks, and the experiment will show whether that holds.

Why not just have an LLM judge read the logs? SciAgent's own authors report uncalibrated confidence, hallucinated verdicts, and blindness to evidence missing from logs (audit-grade harness). TerminalTraj also requires executable tests rather than judgments to rule out hallucinated success (TerminalTraj). The judge remains useful for semantic process errors that replay cannot see, such as a scientifically wrong parameter choice. We will report cases where it catches things the replay misses, alongside the reverse.

Proposed Experiments

We run honest agent trajectories on all 89 Terminal-Bench 2.0 tasks and the 224 Agent-Diff tasks, using an open-weight agent so runs are cheap to repeat. For context, Terminal-Bench reports a best resolution of 62.9% (GPT-5.2 with Codex CLI) and roughly 36% for the best open-weight model, Kimi K2 Thinking. We also draw a few thousand recorded TerminalTraj trajectories to measure replay determinism at scale.

On honest runs, we measure four things: harness overhead in wall-clock time and storage per step, the fraction of steps that replay exactly before and after normalization, slice size relative to $T$, and the false-alarm rate. TICK's 0.3-second tree updates and sub-4 KB proofs suggest per-step commit costs should stay small relative to model latency. We will verify this rather than assume it.

On a red-team suite, we inject the following attacks into otherwise honest runs: out-of-band edits to grader-read files, replacement of the final snapshot, falsified command outputs, unlogged background processes that write files, and edits to non-graded paths. For each attack we report the detection rate for every baseline, together with auditor bytes fetched and CPU seconds. We repeat across multiple seeds, which SciAgent did not do.

The decisive check is a joint condition. The slice auditor must match full replay's detection on outcome-relevant attacks while costing at least 5x less at the median. At least most honest slices must replay exactly after normalization, with a target above 90%. If determinism falls short, the protocol degenerates to unverifiable steps. If slices are not small, full replay over committed logs wins. Either result is reportable, and we commit in advance to publishing it.