Long-horizon AI Coding Benchmarks: Reading the Results and Building Your Own Evaluation
This article breaks down a recent update to a long-horizon AI coding benchmark and explains how to interpret its four core metrics: pass rate, completion degree, average wall-clock time, and average cost. It covers why multi-step engineering tasks are hard, how to design a layered, automatically verifiable evaluation set (L1–L4), and the sandbox and observability requirements needed for reproducible runs. It also introduces an effective-cost model for model selection and practical recommendations such as tiered routing, human-in-the-loop review, regression protection, and context governance. The goal is to help teams replace single-point accuracy with a multi-dimensional, cost-aware evaluation baseline.
1. What the Update Signals: From Writing Code to Delivering Tasks
A recent update to an AI development benchmark added scores for several new coding models. The most important signal is not any specific ranking but a shift in capability structure: top models now pass roughly 40% of end-to-end tasks, mid-to-upper models generally land in the 17%–24% range, and the previous generation of comparable models passed only about 12%. In other words, pass rates for long-horizon tasks roughly doubled within a single generation.
Quality, time, and cost improved at the same time. Average task completion reached around 82%, average wall-clock time for a full test round dropped from the 66-hour range to the 27-hour range, and average cost fell from around $400 to around $300. Lightweight models aimed at low cost took about 12 hours per round at under $10, giving them an order-of-magnitude advantage on cost.
The real meaning of these numbers is that the evaluation focus has moved from “is the generated snippet correct” to “can long-horizon, multi-step engineering tasks with tool calls be delivered reliably.” For developers, this means selection criteria need to be rewritten.
2. How to Read the Four Core Metrics
2.1 Pass Rate
Pass rate is the most intuitive but also the most easily misread metric. It measures whether the model actually satisfied all acceptance conditions of a task under a given time budget and tool permissions. Three points matter:
- Pass rate is strict: partial completion earns no credit, so it is highly sensitive to error recovery.
- Pass rate depends heavily on task distribution; the closer tasks are to real development workflows (changing configs, adding tests, fixing builds), the lower the score.
- Pass rate should not be read alone. It must be observed together with completion degree, otherwise it hides cases where “most of the work is right but the final step fails.”
2.2 Average Completion Degree
Completion degree is a continuous metric that reflects how far a task was advanced. A completion of 82% paired with a 24% pass rate indicates that the typical failure mode is “the first 80% goes smoothly, then the finish collapses.” Common causes include not organizing code according to existing project conventions, missing regression tests, ignoring boundary conditions, and breaking existing implementations across multiple rounds of edits.
2.3 Average Wall-Clock Time per Round
The drop from 66 hours to 27 hours essentially reflects better scheduling efficiency and fewer wasted retries. In long-horizon tasks, time is mainly consumed in three places: repeatedly reading files, repeatedly running failing tests, and continuing to stack changes on wrong assumptions. Lower time usually means more mature context-management and tool-calling strategies.
2.4 Average Cost
Cost should be understood as “total cost per task” rather than “price per token.” A cheap model that fails repeatedly can accumulate far more cost than an expensive model that passes on the first try. Low-cost options are valuable for high-volume, low-risk, parallelizable verification tasks.
3. Why Long-Horizon Tasks Are Hard: Four Engineering Fundamentals
- State consistency: After dozens of tool calls, the model’s understanding of the “true current repository state” tends to drift, causing repeated work or reverting completed results.
- Error accumulation: 95% per-step accuracy leaves only about 36% overall success over a 20-step chain. This is the mathematical root of pass rates being far below completion degree.
- Implicit acceptance criteria: “Done” for real tasks often includes implicit constraints such as team conventions, directory standards, and log formats that are not written into the requirements.
- Cost and latency coupling: Longer reasoning chains improve success rates but also amplify time and cost, so budgets and timeout policies must be set explicitly.
4. Designing a Trustworthy Long-Horizon Evaluation Set
Use “automatically verifiable” as the first principle and build a layered task set:
- L1 single-file fix: locate a defect and add tests, testing basic reasoning;
- L2 cross-file change: modify interfaces and callers together, testing consistency maintenance;
- L3 build and dependency governance: resolve dependency conflicts and build failures, testing environment understanding;
- L4 end-to-end feature delivery: from requirements to implementation, tests, and docs, testing long-chain planning.
Each task needs three things: an initial repository snapshot, an executable acceptance script, and explicit resource and timeout limits. Acceptance must be fully automated to avoid the subjective bias of human scoring.
# Task definition exampletask_id: L2-inject-retryrepo_snapshot: repo://snapshot/1a2b3cbudget:wall_clock_hours: 2max_tool_calls: 120cost_limit_usd: 5acceptance:- run: ./scripts/build.shexpect: success- run: ./scripts/test.sh --filter retryexpect: success- run: ./scripts/lint.shexpect: success
5. Sandboxing and Observability: Making Results Reproducible
Long-horizon evaluations must run in isolated environments, otherwise results are not comparable. Recommended minimum engineering constraints:
- Use a fresh container for each task, with no shared filesystem or dependency cache;
- Control network egress, allowing only necessary dependency sources to avoid unpredictable external state;
- Record the full tool-call trace, command output, and resource consumption as replayable logs;
- Fix random seeds and model versions so the same task can be repeated.
Observability data should be collected into a unified logging and monitoring/alerting system, aggregated by task to track time, call counts, and failure stages for later attribution.
# Trace recording exampledef run_task(task, agent):trace = []for step in agent.step_until_done(task, budget=task.budget):trace.append({"step": step.index,"tool": step.tool_name,"elapsed": step.elapsed_seconds,"cost": step.accrued_cost,"ok": step.exit_code == 0,})return {"task_id": task.id, "passed": task.verify(), "trace": trace}
6. Cost Model: Do the Math Before Choosing
Total cost per task can be abstracted as:
Cost_total = Σ(input tokens × price_in + output tokens × price_out) + environment cost + retry cost
Retry cost is often ignored. It helps to introduce the concept of “effective cost”:
Effective cost = average cost per task / pass rate
By this measure, a 12% pass-rate option can have an effective cost more than twice that of a 24% pass-rate option even at a very low unit price. In engineering, set hard budget caps and timeout circuit breakers so a single task does not consume the compute for an entire batch.
7. Implementation Advice: Tiered Routing and Human-in-the-Loop Checks
- Tiered routing: route low-risk, batch-verifiable tasks to low-cost models and high-complexity, cross-module tasks to high-pass-rate models to significantly optimize overall cost.
- Human-in-the-loop checks: treat 80% completion as a signal that “manual finishing is needed,” concentrating review effort on the final stage rather than the whole process.
- Regression protection: require existing tests in acceptance scripts to prevent “fix one, break three.”
- Context governance: provide repository summaries, directory conventions, and interface lists for long tasks to reduce time wasted on unproductive exploration.
- Continuous regression evaluation: rerun the same task set after model and toolchain upgrades, using a fixed baseline to measure real gains.
In cloud deployments, you can combine a container platform for sandboxes, object storage for repository snapshots and traces, a message queue for task distribution, and logging plus monitoring/alerting for observability. Baidu AI Cloud can be included in architecture evaluation as a foundation for these general capabilities.
8. Conclusion
The core takeaway from this benchmark update is that AI coding is moving from “snippet generation” to “task delivery,” and evaluation must likewise move from single-point accuracy to a multi-dimensional balance of pass rate, completion degree, time, and cost. For teams, a real capability moat is not chasing a ranking but owning an automatically verifiable long-horizon evaluation set and cost model, which is the foundation for sustainable iteration.
