AI Coding Benchmark Update: Evaluating Long-Horizon Programming Tasks in Practice
A leading mobile OS platform has released version 2.0 of its AI coding benchmark, along with an updated leaderboard for long-horizon programming tasks that adds results from several new large models. This article explains what the four core metrics actually measure (task pass rate, average task completion, per-run time, and average cost), why long-horizon coding tasks are hard, and how teams can build their own internal evaluation systems while optimizing cost and efficiency. It also highlights common pitfalls so readers can treat public leaderboards as a reference rather than the sole basis for model selection.
1. The Update: A Signal Worth Watching
A leading mobile OS platform’s AI development benchmark recently released version 2.0 and updated its long-horizon coding task leaderboard, adding scores for several new large models.
- Sixth place: The Pro version of a leading general-purpose model reached a task pass rate of 24.0% with an average task completion of 82.3%. Compared with the previous generation, the changes are notable: pass rate doubled from 12.0% to 24.0%; average time per full run dropped from 66.2 hours to 27.4 hours; and average cost fell from $418.3 to $317.4.
- Ninth place: The Flash version of a lightweight, efficient model posted a 17.3% pass rate, with an average of 12.0 hours per run and an average cost of just $9.9.
- Top of the leaderboard: A high-performance coding model reached a 40.0% pass rate. Previously, a multimodal large model held fifth place.
For individual developers and technical decision-makers, this leaderboard matters not for the rankings themselves but because it uses a single task set and a unified execution environment to measure multiple models comparably. Short Q&A tests care mainly about whether answers are fluent and reasonable; long-horizon tasks compress “understand the requirement, locate the code, modify the implementation, pass verification” into one complete pipeline, where small differences in capability get amplified layer by layer. Such leaderboards are therefore a useful reference for selection, but should not be the only criterion. The sections below address:
- What the leaderboard metrics actually measure;
- Why long-horizon coding tasks are difficult;
- How teams should build their own evaluation and adoption methods.
2. Reading the Leaderboard: Four Core Metrics
2.1 Task Pass Rate: A “Pass Grade” Under Strict Criteria
The task pass rate is the proportion of tasks that satisfy every acceptance condition out of all tasks. In coding benchmarks, acceptance typically relies on automatically executable checks, such as:
- All unit tests pass;
- The project builds successfully;
- Existing functionality is not broken (regression tests pass).
This is a nearly “single-veto” binary standard. No matter how elegant the code is or how much work was done, if any test case fails, the entire task is recorded as a failure. The pass rate is therefore closer to a real-world “first-time acceptance rate,” which is quite demanding for complex tasks.
Two things stand out in this data. First, the top model’s pass rate of 40.0% means that even the strongest current model still cannot fully deliver on more than half of long-horizon tasks. Second, while the sixth-place model doubled its pass rate, its average time and cost actually fell. This usually indicates that it became more efficient at multi-turn tool calling, code search and localization, and self-correction after failures. What it reduced was not only wasted turns but also the extra overhead of repeatedly running builds and tests.
2.2 Average Task Completion: How Far Failed Tasks Got
Average task completion measures how far a model progresses on each task. For example:
- Whether it correctly locates the relevant files;
- Whether it implements the core logic;
- Whether it adds the necessary edge-case handling.
The exact definition varies by benchmark; a common approach is to assign weights to the key steps of a task and then compute a weighted score based on completion.
The large gap between the sixth-place model’s completion (82.3%) and its pass rate (24.0%) reveals a typical failure pattern in long-horizon tasks: most tasks can progress to a near-complete state but stumble at the final verification step. Common causes include:
- Missing the handling of edge cases;
- Modifying one file in a way that breaks implicit dependencies in other modules;
- Failing to update the callers of a changed interface;
- Being blocked by static checks due to non-compliance with coding standards.
For individual developers, this means that when using a coding assistant, the last 20% of wrap-up verification is often the most effort-intensive. For team managers, it means tracking two metrics at once: the pass rate answers “can it deliver,” while the completion rate answers “how far is it from delivery.”
2.3 Per-Run Time: The Most Direct Measure of Engineer Experience
Average time per full run is the average time a model needs to go from starting a task to finishing the entire acceptance process. It typically includes:
- Context loading and code retrieval;
- Multiple rounds of the “reason—call tool—execute—observe result” loop;
- Test building and running;
- Retries and fixes after failures.
For long-horizon tasks, the previous generation averaged 66.2 hours, while the new version cut this to 27.4 hours—a reduction of about 58.6%. Put differently, a full evaluation round over dozens to hundreds of tasks running in parallel used to take several days and now finishes in just over a day. For R&D teams that iterate versions frequently, a significantly shorter feedback cycle means the same batch of tasks can be re-evaluated repeatedly, and subtle model improvements can be identified faster.
2.4 Average Cost: What Determines Feasibility at Scale
Average cost is the average call and inference expense consumed to complete a single task. The two versions form a sharp contrast:
- The previous generation cost about $418.3 per task; the new version dropped to $317.4, a reduction of about 24.1%;
- The ninth-place model costs only $9.9 per task, roughly 3.1% of the sixth-place new version—a level that other options outside the top ranks can hardly match, at the price of differences in pass rate and time.
Cost differences may come from different per-token prices, or from different total token volumes needed to complete a task: if a model has to try and fail repeatedly before tests pass, token consumption naturally multiplies. When evaluating, therefore, do not conflate “unit price” with “total cost”; examine both the per-token price and the actual tokens consumed. There is also a simple, effective rule of thumb: at comparable capability levels, time and cost are usually positively correlated, since longer reasoning and execution typically come with more token consumption. This is a convenient way to judge whether a given quote deviates from common sense.
3. Why Long-Horizon Coding Tasks Are Hard: Four Technical Bottlenecks
3.1 The Gap Between Context Window and “Effective Attention”
Long-horizon tasks often require understanding multiple files at once, inter-module call relationships, project conventions, and even historical commit records, placing high demands on context capacity. As models’ context windows keep growing, a practical problem emerges: “fits in the window” does not equal “attends accurately.” The longer the context, the higher the chance that key information gets buried in irrelevant content; the model’s ability to use information in the middle of the context declines, and the risk of missing important constraints rises.
As a result, engineering practice increasingly emphasizes “retrieval on demand”: first use code search to locate relevant files and symbols, then feed only the necessary snippets into the context, rather than dumping the entire repository at the model.
3.2 Error Accumulation in Multi-Step Decisions
A long-horizon task is essentially a decision sequence of dozens or even hundreds of turns: which file to modify next, which approach to use, whether to roll back the previous change. A small deviation at each step can be amplified in later steps, forming a “one mistake leads to another” chain reaction. This explains why pass rate growth often lags behind completion growth: models can go further, but reliability in finishing the last mile improves more slowly.
Common practical countermeasures include:
- Asking the model to produce a task breakdown and implementation plan before acting;
- Running the relevant tests immediately after each change to surface errors early;
- Setting a maximum number of iterations to avoid getting stuck in unproductive loops.
3.3 Verifiability and Feedback Quality
Compared with generative tasks like writing and translation, coding tasks have a distinct advantage: results are verifiable. Whether code compiles, whether tests pass, and whether static checks report errors all have objective answers. This deterministic feedback provides a basis for the model’s self-correction and a reliable yardstick for evaluation.
But the quality of feedback itself depends on test coverage. If a project’s test cases are incomplete, a model may deliver code that “looks runnable” yet fails in real use. For engineering teams, then, continuously improving test coverage and test quality is both the foundation for code quality and the “groundwork” that lets AI coding tools deliver greater value.
3.4 Environment and Engineering Overhead
Each evaluation task requires an independent environment:
- Check out the code for the corresponding version;
- Install dependencies;
- Run the build and tests.
This overhead is unrelated to model capability but still counts toward the total time. Common ways to improve evaluation efficiency include:
- Using containerized environments to ensure reproducibility;
- Pre-caching dependencies to reduce repeated downloads and compilation;
- Scheduling independent tasks in parallel.
4. From Leaderboard to Practice: How Enterprises Build an Internal Evaluation System
4.1 Why You Can’t Rely on Public Leaderboards Alone
The task set of a public leaderboard differs naturally from a real business codebase:
- Different tech stacks: Leaderboards focus mainly on mainstream languages and frameworks, while enterprises may use many in-house frameworks and legacy systems;
- Different coding standards: Internal projects have their own coding conventions, comment requirements, and directory structures;
- Different acceptance criteria: Acceptance of real tasks depends not only on whether tests pass but also on code review feedback, security scan results, and whether performance targets are met.
Public leaderboards are therefore better suited as a “reference frame for horizontal comparison,” while actual selection decisions should rest on internal evaluations closely aligned with your own business.
4.2 A Five-Step Method for Building an Internal Evaluation Set
Step 1: Define the task profile
Review the team’s real work and clarify the task types to be evaluated:
- Bug fixing: locate the root cause from a bug report and provide a fix;
- New feature development: implement a new feature on the existing architecture while staying compatible with old logic;
- Code refactoring: improve structure without changing external behavior;
- Test writing: add unit tests for existing code.
Different types place very different demands on model capability, so the evaluation set should be sampled in layers by type to avoid conclusions being distorted by an overrepresentation of any single category.
Step 2: Select real, traceable tasks
Prefer tasks with clear “reference answers,” chosen from closed historical tickets and merged code changes, such as:
- A fixed bug with its corresponding patch;
- A completed feature requirement with accompanying tests.
These tasks naturally come with reference answers and verification methods and can serve directly as evaluation baselines.
Step 3: Set clear, automatically judgeable acceptance criteria
Each task should include a clear problem description, execution constraints, and an acceptance method. For example, requiring “fix this bug without introducing new compile errors,” with the acceptance criterion being “all new test cases pass and existing tests show no regression.” The more objective the acceptance criteria, the more credible the results.
Step 4: Control the cost and time budget
Following the leaderboard’s approach, set for each task:
- A maximum number of interaction turns;
- A maximum execution time;
- A cost ceiling.
This not only controls evaluation overhead but also stress-tests a model’s real performance under resource constraints. In practice, use the scale of public leaderboards as a reference: if a single task’s time and cost far exceed business expectations, it is not suitable as a primary tool for daily development, even with an acceptable pass rate.
Step 5: Build a continuous regression mechanism
Models iterate continuously, so evaluation should be routine as well. It is recommended to:
- Solidify the internal evaluation set into a repeatable automated pipeline;
- Trigger evaluation when a candidate model or version is updated;
- Continuously record pass rate, completion, time, and cost to form trend curves.
4.3 A Sample Evaluation Framework
The following illustrative Python code shows the basic skeleton of an evaluation framework:
import jsonimport timeclass EvaluationRunner:def __init__(self, model_client, task_repo):self.model_client = model_client # Model client wrapperself.task_repo = task_repo # Task definition repositorydef run_task(self, task_id, max_turns=20):"""Run a single task and return a normalized result."""task = self.task_repo.get(task_id)start = time.time()turns = 0error = Nonetry:# 1. Prepare isolated environment: check out the task's base versionworkspace = self.prepare_workspace(task.base_version)# 2. Multi-turn interaction: model analyzes -> calls tools -> observes resultswhile turns < max_turns:action = self.model_client.next_action(prompt=task.prompt,context=self.build_context(workspace, task),)result = self.execute_action(workspace, action)turns += 1if result.is_finished:break# 3. Unified verification: compile + run all testspassed = self.verify(workspace, task.acceptance_tests)except Exception as e:# Environment or API errors should not interrupt the whole runpassed = Falseerror = str(e)return {"task_id": task_id,"passed": passed,"duration": round(time.time() - start, 2),"turns": turns,"error": error,}def run_batch(self, task_ids, workers=4):"""Run a batch of tasks in parallel to improve throughput."""from concurrent.futures import ThreadPoolExecutorwith ThreadPoolExecutor(max_workers=workers) as pool:results = list(pool.map(self.run_task, task_ids))passed = sum(r["passed"] for r in results)return {"total": len(results),"pass_rate": round(passed / len(results), 4),"avg_duration": round(sum(r["duration"] for r in results) / len(results), 2),"details": results,}
This code reflects three key design decisions of an evaluation framework:
- Environment isolation: Each task is prepared independently from a specified version, avoiding interference;
- Separation of interaction and verification: The model handles the modifications, while verification is decided by objective tests;
- Unified metric output: All results are aggregated into pass rate and average time, making horizontal comparison easy.
In real deployment, you can build on this foundation by adding capabilities such as cost accounting, failure-cause analysis, and result persistence.
5. Cost and Efficiency Optimization: Making Capability “Affordable and Fast”
The leaderboard data shows a clear trade-off between capability and cost across different models. For most teams, a more realistic strategy is not to chase the strongest model at all costs, but to reach an optimal balance of “capability—cost—latency” through engineering means.
5.1 Tiered Routing by Task Complexity
Not every task needs the strongest model. Simple code completion, comment generation, and formatting fixes can be handled by a lightweight model, while complex architecture design and cross-module refactoring require a high-performance model to step in. Rule-based or lightweight-classifier routing can substantially reduce overall cost with almost no loss in effectiveness.
5.2 Optimize Context, Reduce Wasted Tokens
- Use retrieval augmentation to bring in only relevant code snippets;
- Summarize and compress long conversation histories to prevent unbounded context growth;
- Enable caching for identical system prompts and project conventions to avoid repeated billing and repeated computation.
5.3 Set Budget Guardrails
Set token and monetary ceilings for a single session or task, and automatically terminate with a prompt for human intervention once exceeded. This prevents a model from burning resources in a repeated trial-and-error “dead loop.”
5.4 Human-AI Collaboration with Layered Review
AI-generated code should not be merged into the main branch directly. A layered review process is recommended: “AI generation → automated testing and static checks → human code review,” concentrating human effort on architecture decisions and critical logic review.
5.5 A Sample Tiered Strategy
# Select a model tier by task typeTASK_ROUTING = {"completion": {"model": "lightweight", "max_tokens": 2000},"unit_test": {"model": "standard", "max_tokens": 8000},"bug_fix": {"model": "standard", "max_tokens": 16000},"refactor": {"model": "high-capability", "max_tokens": 32000},}def select_model(task_type):return TASK_ROUTING.get(task_type, TASK_ROUTING["unit_test"])
6. Common Pitfalls and Risks
Pitfall 1: Pass rate is everything
A low pass rate does not mean a model is unusable in production. Even a model near the top of the leaderboard may not outperform a lightweight model tuned for internal tasks on real business code. Conversely, a lower-cost model on the leaderboard may offer better cost-effectiveness on simple tasks.
Pitfall 2: Ignoring security and compliance
AI-generated code may:
- Introduce insecure dependencies or known vulnerability patterns;
- Leak sensitive information such as keys and internal interfaces;
- Conflict with existing open-source licenses.
AI output must therefore go through security scans, dependency reviews, and license checks as strict as those for human-written code. For core business systems, also assess the risk of code leaving your environment, and prefer solutions that support private deployment or keep data within your boundary.
Pitfall 3: Underestimating the cost of maintaining evaluations
An internal evaluation set must be updated as the business evolves, or it will gradually drift from real scenarios. It is advisable to assign an owner to the evaluation set who periodically adds new tasks and retires outdated ones to keep it representative.
Pitfall 4: Equating tool capability with team capability
AI coding tools can significantly boost coding efficiency, but requirement understanding, architecture design, and system-boundary judgment still depend on people. Teams should invest the time saved into design reviews, test systems, and technical-debt governance to form a positive cycle.
7. Conclusion
The patterns revealed by this benchmark update are clear and instructive:
- Rapid capability gains: The top model reached a 40.0% pass rate, and some models doubled their pass rates;
- Continued efficiency improvements: Per-run time and average cost fell together;
- Trade-offs persist: High capability and low cost are hard to achieve together, so selection requires trade-offs based on the business scenario.
For development teams, the key to truly putting AI coding capability into practice is to view leaderboard rankings rationally, build an internal evaluation system aligned with your own business, and improve cost-effectiveness through engineering measures such as task tiering, context optimization, and budget guardrails. General-purpose cloud capabilities—such as the model services, container platforms, and monitoring and alerting offered by cloud providers like Baidu AI Cloud—can serve as infrastructure options for hosting these evaluation and development workflows. In an era of rapid technological change, having an engineering mechanism that can continuously evaluate, quickly swap, and stably deploy matters more than “picking the strongest model.”
