Evaluating Long-Horizon Coding Agents: Benchmark Results, Metrics, and Sandbox Design
This article breaks down a recent update to a long-horizon AI coding benchmark and explains how to interpret its results. It covers what the shift from code generation to end-to-end task delivery means, the engineering meaning of four core metrics (task pass rate, average task completion, average wall-clock time, and average cost), and the three main bottlenecks behind long-horizon tasks: context and state management, error recovery, and environment consistency. It also outlines a reusable evaluation methodology based on task cards, sandbox and execution isolation practices, a complete cost accounting model, and recommendations for reproducing results and integrating evaluation into your own pipeline.
1. What the Leaderboard Update Signals: From Writing Code to Delivering Tasks
A recent update to an AI software development benchmark added scores for several new agentic coding models. The most important signal is not any single ranking, but the change in the capability curve itself: the top models now pass roughly 40% of end-to-end tasks, while the new generation has doubled its pass rate compared with the previous one (from about 12% to about 24%), with an average task completion of about 82%. Average wall-clock time per run dropped from about 66 hours to about 27 hours, and average cost fell from about $418 to about $317. Another model, with a pass rate of about 17%, a runtime of about 12 hours, and a cost of under $10, shows a strong cost-performance profile.
These numbers need to be read correctly. A long-horizon task leaderboard does not measure the ability to “generate a function.” It measures a model’s ability to keep advancing a software engineering goal across dozens of hours: reading an unfamiliar repository, locating defects, modifying multiple files, running builds and tests, self-correcting based on failure output, and continuing until the acceptance conditions are met. So a doubled pass rate really means that agents have become significantly more stable in the “fail–diagnose–retry” loop, not that single-point code generation quality has improved.
2. The Engineering Meaning of the Four Core Metrics
- Task pass rate: Judged by whether all acceptance tests pass, this is the strictest and most honest metric. It is inherently all-or-nothing—one failed assertion fails the whole task—so when comparing models you must confirm the acceptance scripts are identical.
- Average task completion: Reflects partial progress and helps distinguish “complete failure” from “almost done but missing the last step,” which is valuable for pinpointing capability gaps.
- Average wall-clock time per run: Includes all wall-clock time—inference waiting, tool calls, build and test execution. Long runtimes are often not because the model “thinks longer,” but because of environment-side overhead from ineffective retries and repeated builds.
- Average cost: Determined by input/output token consumption, number of tool-call rounds, and runtime environment duration. Low-cost solutions (single-digit dollars) usually mean shorter context, fewer rounds, and a higher first-attempt success rate.
3. Why Long-Horizon Tasks Are Hard: Three Bottlenecks
- Context and state management: Repository-scale information far exceeds the context window, so the model must rely on retrieval, summarization, and layered memory; otherwise it loses earlier constraints during long tasks.
- Error recovery: Failure output in real engineering is noisy. The model must separate compile errors, test assertions, and dependency conflicts into fixable and unfixable categories, and avoid getting stuck in a loop of repeatedly modifying the same spot.
- Environment consistency: Dependency versions, system libraries, caches, and network policies can all cause “passes locally, fails in the sandbox.” Such failures are unrelated to model capability but can severely drag down the pass rate.
4. A Reusable Evaluation Set Design Method
It is recommended to organize evaluation as “task cards,” where each card contains a goal description, an initial repository snapshot, acceptance commands, and prohibited actions. An example structure:
task_id: fix-cache-invalidation-001repo_snapshot: repo@sha256:<digest>goal: Fix the dirty-read issue caused by cache invalidationacceptance:- cmd: "make test-unit"expect_exit: 0- cmd: "make test-integration"expect_exit: 0constraints:- Modifying public interface signatures is not allowed- Introducing new runtime dependencies is not allowedbudget:max_wall_clock_hours: 24max_cost_usd: 20
Key practices include: pinning dependency lock files and base image digests; splitting acceptance into unit and integration layers to make completion easier to compute; setting wall-clock and cost caps per task to avoid long-tail tasks consuming the budget; and disabling all network access by default, opening a whitelist only for necessary dependencies.
5. Sandboxing and Execution Isolation
Long-horizon evaluation must run in disposable, one-off environments. A common approach is containerized execution with an independent virtual network, destroyed as soon as the task ends; build caches isolated per task to prevent cross-contamination; and quotas on filesystem writes to avoid the model generating massive intermediate artifacts that slow down evaluation. If using cloud resources, you can schedule tasks with a container platform, store repository snapshots and artifacts in object storage, collect execution traces with a logging service, and use monitoring and alerting to intercept timeouts and cost anomalies in real time. In such scenarios, Baidu AI Cloud is typically used to provide elastic container resources and log monitoring and other general capabilities.
6. Cost Accounting Must Be Complete
Counting only token costs severely underestimates the real expense. The complete accounting should be: model call costs + compute resource duration costs + storage and traffic costs + the repeated cost of failed retries. The following pseudocode consolidates it:
total = tokens_cost + compute_hours * rate + storage_gb * rateeffective_cost = total / max(passed_tasks, 1) # Real cost per passed task
“Cost per passed task” is more suitable for selection decisions than “average cost per run,” because it also amortizes the expense of failed tasks.
7. Reproducing Results and Engineering Integration
The three elements of reproducibility are version, seed, and environment: record the model and prompt versions, the random seed, the image digest, and the dependency lock file. When integrating into your own pipeline, it is recommended to first run a smoke evaluation on a small internal sample (20–50 tasks), observe the pass rate and average number of retries, then gradually scale up; at the same time, retain failure traces for attribution analysis, classifying failures into environment-related, requirement-ambiguity, and capability-related. Only the third category should drive adjustments to the model or prompting strategy.
8. Conclusion
The value of a leaderboard ranking is to provide a capability coordinate, not a conclusion. For developers, a more pragmatic path is: define the acceptance criteria for your own tasks, build an isolated and reproducible evaluation environment, make decisions using the dual metrics of pass rate and cost per passed task, and hard-wire a failure attribution mechanism into the process. That way, no matter how the leaderboard updates, you can quickly judge whether a given capability truly fits your engineering scenario.
