Short-Horizon Code Completion Is Solved; Long-Horizon AI Coding Is the Real Test: New Benchmark Leaderboard Shows Doubled Pass Rates and Cost Optimization
Short-horizon code completion is already everywhere, but long-horizon AI coding is the real test. This article reviews a recently updated long-horizon coding leaderboard and explains what its numbers mean for developers. It covers four core metrics (task pass rate, average task completion, average time per run, and average cost per run), why long-horizon tasks remain difficult, and how to apply leaderboard data in practice. It also offers a guide to building an internal evaluation system, with guidance on benchmark design, reproducible environments, multi-sample runs and cost tracking, systematic failure triage, and tiered model scheduling. It closes with five adoption recommendations and four common pitfalls.
1. Three Signals from the Updated Leaderboard
A mobile OS AI development benchmark has recently updated its long-horizon coding leaderboard. The update adds results for a new-generation flagship workhorse, a lightweight model, and a reasoning-focused flagship model. The results can be summarized as follows:
| Solution category | Task pass rate | Avg. task completion | Avg. time per run | Avg. cost per run |
|---|---|---|---|---|
| Top-ranked solution | 40.0% | — | — | — |
| New-generation workhorse | 24.0% | 82.3% | 27.4 hours | $317.4 |
| Its predecessor generation | 12.0% | — | 66.2 hours | $418.3 |
| Lightweight solution | 17.3% | — | 12.0 hours | $9.9 |
| Reasoning-focused flagship | 5th place | — | — | — |
These results send developers three signals.
- Capability gains are structural. The top-ranked model reaches a 40.0% pass rate, while the new-generation workhorse ranks sixth at 24.0%. That is double its predecessor’s 12.0%, a gain of 12 percentage points. Fifth place goes to a flagship known for its reasoning strength. This suggests deep reasoning is also a key variable for long-horizon tasks.
- Effectiveness and efficiency are improving together. For the same new-generation model, the average time to complete a full run dropped from 66.2 hours to 27.4 hours, a reduction of about 59%. Average cost fell from $418.3 to $317.4, a drop of about 24%. The time savings far exceed the cost savings. This points to improvements in generation speed, tool-calling efficiency, and task planning quality, so the gains are not simply the result of more reasoning time.
- Lightweight solutions offer a cost advantage. A model built for low overhead achieved a 17.3% pass rate, placing ninth. It ran in just 12.0 hours on average at a cost of only $9.9, which stands out for cost control.
A leaderboard’s value lies not in the rankings themselves, but in providing a set of comparable baselines. For engineering teams, the key questions are: what do these numbers actually mean, and how can they guide technology selection and evaluation programs?
2. Understanding the Four Core Metrics
2.1 Task Pass Rate: The Strictest Delivery Standard
The task pass rate is the share of tasks that pass every acceptance test after a complete run. It measures the ability to actually finish a task. It is far more demanding than pass rates in code-completion scenarios. Long-horizon tasks usually span multiple files and modules over an extended execution period. A single unmet subgoal or introduced regression fails the entire task. A 24.0% pass rate therefore means that roughly three-quarters of tasks still require human intervention. This matches the current adoption pattern of human-AI collaboration with a gradual handoff.
2.2 Average Task Completion: Gauging How Close a Task Gets
Completion is generally calculated as the proportion of subgoals or acceptance items met. It reflects how far a task was pushed. For the new-generation model, the pass rate is 24.0%, but average completion reaches 82.3%. The gap of about 58 percentage points suggests that most failed tasks were already close to done. They were held up by a few critical defects, such as:
- Improper handling of edge cases;
- A key test case that did not pass;
- One related change left out.
Tasks like these usually need only minor manual fixes before delivery. When building human-AI collaboration workflows, completion is an important input for prioritizing where humans step in.
2.3 Average Time per Run: Driving Wait Costs and Parallelism
Long-horizon tasks are measured in hours or even tens of hours. The gap between 27.4 and 66.2 hours directly affects:
- Feedback cycles;
- Pipeline queue time;
- The number of tasks that can run in parallel per day.
Runtime also determines evaluation and operations strategy. The longer each task takes, the more expensive each evaluation run becomes. That makes fast-fail circuit breaking, resume-from-checkpoint, and result caching increasingly necessary.
2.4 Average Cost per Run: Convert It to “Cost per Success”
The $317.4 and $9.9 figures differ by about 32x. Comparing them directly can mislead decisions, because their pass rates differ by 6.7 percentage points. A metric closer to business reality is cost per success, meaning the average spend needed to successfully complete one task. It can be estimated as “average cost ÷ pass rate”:
| Solution | Avg. cost | Pass rate | Cost per success (est.) |
|---|---|---|---|
| Predecessor generation | $418.3 | 12.0% | ~$3,486 |
| New-generation workhorse | $317.4 | 24.0% | ~$1,323 |
| Lightweight solution | $9.9 | 17.3% | ~$57 |
Compared with the predecessor, the new-generation workhorse cuts cost per success by about 62%. In effect, it solves twice as many tasks for less money. The lightweight solution costs about 1/23 as much per success as the new-generation workhorse, a substantial advantage.
However, this calculation is a first-order approximation based on public data. Hidden costs that the leaderboard does not report must also be factored in:
- Time and money spent on failed tasks;
- Labor hours for manual corrections;
- Extra overhead from repeated runs.
The actual cost of completing tasks may therefore exceed the values in the table. If manually correcting an unfinished task costs C (in USD), the effective cost can be approximated as “average cost + (1 − pass rate) × C”. For the new-generation workhorse:
- When C = $100, the effective cost is about $393;
- When C = $500, the effective cost is about $698.
This means that the more labor hours automation saves, the stronger the case for the higher-pass-rate option.
3. Why Long-Horizon Coding Tasks Remain Difficult
Code completion only predicts what code comes next within a local context. Long-horizon tasks require the model to close the full loop an engineer would follow: understand the requirements → locate the relevant code → implement changes → verify and fix. The difficulties concentrate in five areas.
- Context at scale. Code and documentation in large codebases far exceed the capacity of a context window. Models must retrieve and locate relevant files, then compress and retain key information while maintaining an understanding of the overall structure within a limited context. Long-context capability is only the foundation. What matters more is whether the model can “find the right code and remember it.”
- Task planning and decomposition. Models must break a natural-language requirement into ordered, executable steps and adjust the plan as feedback comes in. Getting stuck in local details too early while losing sight of overall constraints leads to costly rework later.
- Tool calling and execution feedback. Whether tools for reading and writing files, running builds, executing tests, and searching documentation work reliably directly affects progress. So does whether the model correctly interprets the error messages they return.
- Self-correction and regression control. After a test fails, the model must find the root cause, change the code, re-verify, and avoid “fixing one thing and breaking everything else.” This demands a high level of cross-file consistency and causal reasoning.
- Long-range consistency and resource constraints. Tasks can last hours or even tens of hours. The model’s early decisions, architectural assumptions, and conventions must remain valid throughout. Meanwhile, runtime and API costs both have budget ceilings, so the model must know when to stop.
This also explains how the new generation achieved “doubled pass rates, nearly halved runtimes, and lower costs” at the same time. Better task planning and fewer wasted attempts pay off in both capability and efficiency.
4. Putting Leaderboard Data to Work: A Guide to Internal Evaluation
Leaderboards measure general capability with a standardized task set. Individual teams, however, differ widely in business code, tech stacks, and quality standards, so copying the rankings directly is unreliable. We recommend building your own long-horizon evaluation system in the following steps.
4.1 Build an Evaluation Set That Fits Your Business
- Task sources: Draw from real tickets, historical defects, and code review comments. Cover feature work, bug fixes, refactoring and migrations, and documentation generation.
- Difficulty distribution: Classify tasks as easy, medium, or hard based on the scope of changes and depth of dependencies. Use the leaderboard’s sub-50% pass rates as a reference for difficulty so your internal evaluation can distinguish between models.
- Acceptance criteria: Every task needs objective, automatically executable acceptance criteria. Prefer behavioral acceptance tests over line-by-line comparison of code text.
- Anti-contamination design: Keep a portion of tasks private and never published, and add new tasks regularly. This reduces bias from evaluation data leaking into training.
4.2 Fix the Environment and Standardize How Tasks Are Judged
- Use a container platform to create an isolated, reproducible environment for each task. Pin dependency versions, and set execution timeouts and resource limits.
- Archive code diffs, run logs, and test reports to object storage so results can be reviewed later.
- Strictly separate “tests that ship with the project” from “the evaluator’s private acceptance tests.” This prevents submissions from “gaming” scores by modifying tests.
The scoring logic below is illustrative:
from pathlib import Pathimport jsonimport subprocessimport time# RUNNER is a placeholder; replace it with the build and test commands your project actually usesRUNNER = "<build and test command>"TIMEOUT_SECONDS = 3600 # timeout for a single check, to keep tasks from blocking indefinitelydef run_check(cmd: list[str], workdir: Path) -> bool:"""Run a check command in the project directory; a timeout or non-zero exit counts as a failure"""try:result = subprocess.run(cmd, cwd=workdir, timeout=TIMEOUT_SECONDS,capture_output=True, text=True,)return result.returncode == 0except subprocess.TimeoutExpired:return Falsedef judge(task_dir: Path) -> dict:"""Three-stage judging: build check -> project's own tests -> evaluator's private acceptance tests"""checks: dict[str, bool] = {}started = time.perf_counter()for name, args in [("build", ["check"]),("tests", ["test"]),("acceptance", ["acceptance"]),]:ok = run_check([RUNNER, *args], task_dir)checks[name] = okif not ok:break # fail fast on any stage and skip the remaining checksreturn {"task": task_dir.name,"passed": all(checks.values()),"failed_stage": next((k for k, v in checks.items() if not v), None),"elapsed_seconds": round(time.perf_counter() - started, 1),}if __name__ == "__main__":root = Path("tasks")results = [judge(d) for d in sorted(root.iterdir()) if d.is_dir()]print(json.dumps(results, ensure_ascii=False, indent=2))
# Example: run long-horizon evaluations as scheduled jobs in a CI pipeline (illustrative syntax)# The short regression suite runs daily and the full suite weekly, so neither competes with routine build resourcesschedules:- name: nightly-smokecron: "0 2 * * *" # smoke tasks at 2:00 AM dailyref: mainjobs: [ai-coding-smoke]- name: weekly-fullcron: "0 3 * * 1" # full evaluation at 3:00 AM every Mondayref: mainjobs: [ai-coding-full]jobs:ai-coding-smoke:runs-on: linux # isolated container with the evaluation environment preinstalled, keeping the dev environment cleantimeout-minutes: 120steps:- uses: actions/checkout@v4- name: Run long-horizon coding evaluationenv:MODEL_ENDPOINT: ${{ secrets.MODEL_ENDPOINT }} # model endpoint stored in secret managementAPI_KEY: ${{ secrets.API_KEY }}MAX_COST_PER_TASK: "5.00" # per-task cost cap; abort if exceeded to prevent budget overrunsrun: <command to run the evaluation script>ai-coding-full:uses: ./.github/workflows/ai-coding-eval.yml # reuse the full evaluation workflowwith:suite: full # full task suiterepeat: 3 # repeat each task 3 times to reduce the impact of one-off variance
4.3 Use Multiple Tasks and Multiple Runs, and Track Cost
- Results from a single run vary widely. We recommend repeating each task 3–5 times and using at least several dozen tasks.
- Record time, input/output token counts, and cost at the same time. Then calculate cost per success rather than looking at pass rate alone.
def summarize(reports: list[dict]) -> dict:"""Summarize evaluation results: pass rate + cost per success, to support side-by-side comparison"""total, passed = len(reports), sum(r["passed"] for r in reports)if total == 0:return {"tasks": 0, "pass_rate": 0.0, "unit_success_cost": None}pass_rate = passed / totalavg_cost = sum(r["cost"] for r in reports) / totalreturn {"tasks": total,"passed": passed,"pass_rate": round(pass_rate, 4),"avg_cost": round(avg_cost, 2),# Cost per success is undefined when no task succeeds; return None instead of 0"unit_success_cost": round(avg_cost / pass_rate, 2) if passed else None,}
4.4 Attribute Failures Systematically
We recommend defining failure categories first, then collecting data continuously through a log service and monitoring alerts:
- Misunderstood requirements;
- Locating the wrong code;
- Implementation defects;
- Introduced regressions;
- Tool or environment errors;
- Timeouts or budget overruns;
- Infinite loops.
If one category accounts for a high share of failures, focus improvements on that stage. For example, if “regressions introduced after implementation” is common, add code review rules and automated regression tests to the execution stage. Once logs feed into monitoring alerts, you can also quickly detect backlogs of evaluation tasks or sudden spikes in failure rates.
4.5 Schedule Models by Cost Tier
Following the tiered approach reflected in the leaderboard, you can build a similar tiering strategy internally to balance cost and effectiveness:
- Lightweight models: Handle relatively well-defined subtasks such as requirement interpretation, first-draft solutions, and test generation. The time and cost advantages of the lightweight solution in the leaderboard make these models a fit for high-concurrency, low-complexity scenarios.
- Mainstream workhorse models: Handle most routine development tasks, balancing pass rate against resource consumption.
- Flagship models: Reserved for high-complexity, high-risk tasks, second attempts on hard problems, or reviewing results.
5. Adoption Recommendations and Common Pitfalls
Five adoption recommendations
- Roll out in phases: Start with a small-scale pilot on non-core modules. Compare the total cost of “task completion + manual fixes,” then expand gradually.
- Let evaluation drive improvement: An evaluation set is an asset in its own right. It can support regression checks after model upgrades, prompt optimization, and process improvements.
- Always keep a human in the loop: Changes to core business logic or data security must go through human review. AI output is also subject to coding standards and static analysis.
- Quantify the return on investment: Use metrics such as the percentage reduction in requirement delivery cycle time and cost per success. These are better than vague impressions of “feeling more productive.”
- Maintain security and compliance baselines:
- Redact sensitive information in code and logs;
- Use isolated environments to restrict execution permissions, so evaluations cannot cause irreversible external effects;
- On cloud platforms such as Baidu AI Cloud, general-purpose cloud products (object storage, container platforms, log services, monitoring alerts) and capabilities such as key management and access control can handle this isolation and auditing. None of this depends on any specific tooling.
Four common pitfalls
- Judging only by rank: Leaderboard task distributions, scoring rules, and scenarios differ from your own. A high rank does not guarantee the best performance on your codebase, so internal evaluations should be the final word.
- Judging only by pass rate: Looking at pass rate alone ignores time and cost. Without constraints on either, a higher pass rate does not necessarily yield a higher return.
- Overlooking the value of completion: A model with high completion but a low pass rate, paired with manual fixes, may be more cost-effective than one with a slightly higher pass rate but lower completion.
- Drawing conclusions from a single run: Single runs are heavily affected by randomness. Use multiple samples and a fixed evaluation environment to reduce variance.
6. Conclusion
The latest long-horizon coding leaderboard features “doubled pass rates, nearly halved runtimes, and slightly lower costs” alongside “low-cost lightweight solutions.” Together, they show that AI coding is evolving rapidly along two paths: rising capability and tiered cost. For development teams, more important than chasing rankings is:
- Understanding the relationships among pass rate, completion, time, and cost;
- Using cost per success to measure real value for money;
- Building a reproducible evaluation system with clear failure attribution.
On that foundation, combining models of different tiers while keeping human oversight turns long-horizon AI coding capability into measurable gains in development productivity.
