AI Agent Long-Horizon Coding Benchmarks: Metrics, Stability, and Evaluation Design

    This article breaks down a recent version update of a widely used Android development agent benchmark, focusing on what the shift in evaluation methodology means rather than the raw leaderboard numbers. It explains the engineering meaning of four core metrics—task pass rate, average task completion, average runtime, and average cost—and how combining them yields cost per successful task. It then decomposes the capability gains behind a doubled pass rate, traces where runtime and cost reductions come from, and outlines a five-step process for building a reproducible in-house evaluation. Finally, it covers stability design for long-running tasks and common selection pitfalls, recommending decisions based on your own task set rather than public rankings.

    1. What the Benchmark Update Signals

    A widely used Android development agent benchmark recently completed a version iteration, and the leaderboard now includes results from several general-purpose large models. According to the public data, the top models achieve an end-to-end task pass rate of roughly 40%, mid-to-upper models cluster around 20%, and lower-tier models sit in the low teens. The previous version of the same model generation passed at about half the rate of the new version. Average runtime for a full test round dropped from over 60 hours to around 20 hours, and average cost fell from over $400 to the $300 range. Some models focused on lightweight deployment reached a low-teens pass rate at a cost of just over ten hours and under $10.

    The numbers themselves are not the point. What deserves attention is the shift in evaluation paradigm: the measure changed from “can it complete a single function” to “can it deliver a runnable feature across dozens of tool calls without human intervention.”

    2. Engineering Meaning of the Four Core Metrics

    Task pass rate is the strictest all-or-nothing metric: a task counts as passed only when the feature implementation, UI adaptation, resource references, and build artifacts all meet the criteria. It is fundamentally different from “code similarity” or “unit test coverage,” which can be inflated through local optimization. Pass rate cannot.

    Average task completion reflects partial progress and distinguishes “does not run at all” from “one step short.” The two metrics are diagnostically valuable only in combination: a low pass rate with high completion points to a bottleneck in the final steps, while both being low indicates a problem at the planning stage.

    Average runtime determines the interaction experience. A magnitude of tens of hours means the task must support checkpoint resume and state persistence—no human can watch it the entire time.

    Average cost determines whether the approach can scale. Pairing cost with pass rate yields a more business-relevant metric, cost per successful task:

    1. def cost_per_success(total_cost, passed, total):
    2. if passed == 0:
    3. return float("inf")
    4. return total_cost / (passed / total)

    A rough conversion from the public data puts the cost per successful task for the top approach at just over $300, versus tens of dollars for the lightweight approach—nearly an order of magnitude apart. When selecting a solution, if the task has a large tolerance for failure, the latter is clearly more cost-effective.

    3. Decomposing the Doubled Pass Rate

    Going from one generation to double the pass rate is usually not a single-point optimization but the combined effect of four capabilities.

    First, instruction retention over long contexts. In long-horizon tasks, early constraints (naming conventions, directory structure, dependency versions) are easily forgotten after dozens of rounds, requiring an explicit constraint reinjection mechanism.

    Second, completeness of the tool-call loop. Read files, modify code, run the build, inspect logs, then correct—the more complete this loop, the higher the probability of self-correction.

    Third, error recovery. Facing compilation failures, missing resources, or failing tests, can the agent read the error and locate the root cause rather than repeatedly tweaking unrelated code?

    Fourth, cost-control strategies, including early stopping on unproductive rounds, reuse of repeated call results, and compression of retrieval results.

    A simplified task loop describes this structure:

    1. while not done and budget_left:
    2. plan = generate_or_revise_plan(constraints, current_state)
    3. action = select_tool(plan)
    4. obs = execute_and_collect_logs(action)
    5. if build_passes and acceptance_passes: done = True
    6. else: state = compress(obs, constraints)

    4. Where the Runtime and Cost Reductions Come From

    The drop in runtime from over 60 hours to around 20 hours comes mainly from three areas: parallelization, running independent builds, tests, and static checks concurrently; cache reuse, retaining dependency resolution and incremental build results across rounds; and scheduling optimization, orchestrating long reasoning and short tool calls in layers to avoid long tasks blocking short ones.

    The cost reduction comes more from “doing less useless work”: context trimming, fast failure exits, and handing deterministic work to scripts rather than model reasoning. One engineering rule of thumb is that any step that can be judged by deterministic validation should not be left to the model’s free play.

    5. Building a Reproducible Evaluation

    Public leaderboards are only useful for initial screening; the final decision should be based on your own codebase. A five-step approach is recommended.

    Step 1: Build the task set. Draw 30 to 100 tasks from a real requirement pool, covering five categories: new feature development, bug fixes, UI adaptation, dependency upgrades, and build fixes. Each category needs automatically verifiable acceptance criteria.

    Step 2: Fix the environment and seeds. Standardize the image, dependency versions, timeout thresholds, and random seeds; otherwise the data is not comparable.

    Step 3: Record metrics in layers. Beyond pass rate and completion, also record round distribution, failure-stage distribution, and cost per successful task.

    Step 4: Run repeated experiments. Single-round results are noisy; repeat each task three times and take the mean, and report the variance.

    Step 5: Establish a regression baseline. After each model or toolchain change, run the same task set to form a trend curve.

    A sample task description structure:

    1. {
    2. "id": "ui-019",
    3. "type": "adaptation",
    4. "constraints": ["min_sdk=24", "no_third_party_ui_lib"],
    5. "acceptance": ["assembleDebug succeeds", "acceptance script exit=0"],
    6. "timeout_min": 90,
    7. "budget_usd": 2.0
    8. }

    6. Stability Design for Long-Horizon Tasks

    Long-running tasks must be designed on the assumption that they will fail. First, state persistence: write the plan, completed steps, and intermediate artifacts to external storage so the process can resume after a restart. Second, budget guardrails: limit rounds, duration, and spend simultaneously, and exit gracefully while preserving the scene when any limit is exceeded. Third, sandbox isolation: use a container platform to provide disposable environments and avoid polluting the main branch. Fourth, observability: connect log services and monitoring alerts, with threshold alerts for failure rate, average rounds, and cost spikes. Fifth, human gates: operations involving data migration, permission changes, and releases require human confirmation.

    7. Selection Advice and Common Pitfalls

    Do not select based on pass-rate ranking alone. Rankings shift significantly with task distribution: UI-adaptation-heavy projects care more about completion and visual consistency; low-level refactoring projects care more about long-context retention and error recovery; budget-sensitive scenarios with decomposable tasks should prioritize cost per successful task.

    There are three common pitfalls. First, treating leaderboard scores as a promise—public task sets differ enormously from private codebases. Second, measuring only first-round success while ignoring multi-round stability and variance. Third, overlooking hidden costs, including environment setup, result review, and the human takeover time for failed tasks.

    Overall, the progress of the new generation of agents on long-horizon coding tasks is real, but engineering adoption still requires the combination of evaluation, guardrails, and observability. The recommendation is to use an in-house task set as the baseline, roll out gradually on low-risk modules first, and make decisions with data rather than rankings. Finding the balance between cost and efficiency that matches your own business is the sustainable approach.