Long-程 Agent Coding Benchmarks Explained: Pass Rate, Completion, Cost, and Time
An in-depth look at how long-horizon agent coding benchmarks work, what the four core metrics (pass rate, average completion, average time, and cost per run) actually measure, why high completion does not guarantee passing, what makes long-running tasks expensive, and how to choose and reproduce these evaluations in your own engineering workflow.
1. Why Long-Horizon Tasks Have Become the Key Battleground for Coding Agent Evaluation
Short tasks, such as completing a single function or explaining a snippet of code, can no longer reveal the real differences between coding agent tools. The real separation comes from long-horizon tasks: requirements that are vague, work that spans multiple files, repeated test runs, and self-correction based on failure output. A single run can last several hours or even longer. These tasks are much closer to real development work, and they put far more pressure on an agent’s ability to manage context, orchestrate tool calls, recover from errors, and control costs.
A recent mobile app development capability leaderboard added evaluation results for two coding agent tools. The shape of that data gives developers a useful coordinate system for understanding long-horizon capability evaluation. This article does not focus on specific products; instead, it abstracts the evaluation methodology and the selection logic behind it.
2. What the Four Core Metrics Actually Measure
Long-horizon benchmarks usually report four dimensions at the same time. They constrain one another and cannot be read in isolation:
- Pass rate: the proportion of tasks in a fixed task set that fully meet the acceptance criteria. It measures “can it get it right.”
- Average completion: how far the tasks that did not fully pass got on average. It measures “how far off is it.”
- Average time: wall-clock time from task dispatch to convergence. It measures “how long you wait.”
- Cost per benchmark run: the model and tool-call spend for running the full benchmark. It measures “how much it costs.”
From the public data, one tier-one result using a certain agent framework was a 24.0% pass rate, 82.3% average completion, 27.4 hours average time, and about $317.4 per run (roughly 2,123 RMB). Another lightweight model, evaluated through a certain open-source-style agent framework, had a 17.3% pass rate, 71.2% average completion, 12.0 hours average time, and about $9.9 per run (roughly 66.2 RMB). The former scored higher than several other general-purpose flagship models, but lower than the 28.7% at the top.
Key takeaway: the pass rates differ by about 6.7 percentage points, but the cost differs by about 32x and the time by about 2.3x. Pass rate is not the only objective function.
3. What the “Scissors Gap” Between Pass Rate and Completion Tells You
A 24.0% pass rate paired with 82.3% completion means a large number of tasks were “almost done but not correct.” This is very typical in long-horizon tasks, and the common causes include:
- Strict acceptance conditions (all tests must pass, no regressions);
- Instruction drift in long contexts, where later edits deviate from the original constraints;
- Poor retry strategies after tool-call failures, leading to unproductive loops;
- Missing self-verification, declaring completion without running the full test suite.
Engineering implication: if your team cares more about a “usable draft plus human finishing,” high completion is more valuable than a high pass rate. If it feeds an automated pipeline, pass rate must come first, because 76% of failed tasks will block the pipeline.
4. Cost Structure: Why Long-Horizon Tasks Are So Expensive
The cost of long-horizon tasks does not grow linearly. It is amplified by three factors:
- Context accumulation: every round of tool output (build logs, test reports) enters the context, and token consumption grows roughly quadratically with the number of rounds;
- Retries and rollbacks: exploratory calls after failures often make up the majority of total calls;
- Verification overhead: repeated builds, test runs, and screenshot checks are all real compute spend.
So the gap between $317.4 and $9.9 is essentially the pricing difference between two strategies: “deep reasoning plus long context plus multi-round verification” versus “lightweight, fast iteration.”
A sketch of cost-control pseudocode:
def run_task(task, budget):spent = 0while not task.done() and spent < budget:plan = planner(task.state) # plan the next stepresult = executor(plan) # call tools to executespent += result.costif result.failed and spent > budget * 0.6:return escalate_to_human(task) # hand off to a human once over budgetreturn task
5. Selection Advice: Match the Scenario, Not the Leaderboard Rank
- Budget- and latency-sensitive teams (CI gates, batch refactoring, scaffolding generation): prioritize low-time, low-cost options. A 17.3% pass rate with 12 hours and about 66 RMB fits a “generate then human-filter” workflow.
- High-value one-off efforts (complex defect localization, cross-module migration): it can be acceptable to trade higher cost for a higher pass rate and completion.
- Hybrid strategy: first use a lightweight option to produce candidates in bulk, then have a higher-capability option take a second pass at the failures. This usually gives the best overall cost.
6. How to Reproduce This Kind of Evaluation in Your Own Project
- Fix the task set and acceptance scripts: acceptance must be automatically判定-able, avoiding subjective scoring.
- Isolate the environment: run in containers, block external network access, and ensure repeatability.
- Measure the full chain: record per-round tokens, tool-call counts, wall-clock time, and cost, not just the final result.
- Set budget guardrails: auto-terminate on timeout or budget overrun and archive the scene for attribution.
- Statistical significance: long-horizon tasks have high variance, so run multiple times and report the mean and confidence interval.
You can rely on general cloud capabilities to carry the evaluation infrastructure: a container platform handles isolated execution, object storage archives logs and artifacts, a message queue decouples task dispatch, and logging plus monitoring and alerting handle metering and anomaly detection. In this kind of evaluation engineering practice, Baidu AI Cloud also typically lands these capabilities by combining these general categories.
7. Conclusion
The value of long-horizon agent coding evaluation is not in producing a ranking, but in offering a quantifiable decision framework: use pass rate to judge automation feasibility, completion to judge the cost of human intervention, and time and cost to judge the boundary of scale. Only by understanding how these four constrain one another can you build a coding agent workflow that is both efficient and controllable.
