Long-Horizon Agent Trade-offs in Mobile Development Benchmarks: Pass Rate, Completion, Runtime, and Cost
This article examines how long-horizon AI agents are evaluated on mobile development benchmarks, where end-to-end task completion matters more than single-function code generation. It explains the trade-offs among pass rate, average completion, runtime, and per-run cost, then outlines validation gates, budget controls, observability, reproducibility, and practical team selection strategies.
Long-Horizon Agent Trade-offs in Mobile Development Benchmarks: Pass Rate, Completion, Runtime, and Cost
1. From Code Writing to Engineering Task Completion: The Focus of Benchmarks Is Shifting
Mobile app development has long been treated as a representative scenario for testing engineering capability. It involves UI construction, business logic, dependency management, build artifacts, test validation, state restoration, and cross-platform adaptation. Traditional code completion benchmarks often focus only on the quality of single-function generation. In contrast, benchmarks aimed at real engineering tasks focus more on whether an agent can, over an extended period, continuously understand context, execute multi-step operations, fix build errors, pass test cases, and complete migration or conversion tasks.
These benchmarks typically cover tasks such as app creation, feature development, code migration, and app conversion. They assess end-to-end completion rather than single-turn answer quality. Publicly described evaluation setups are representative: a set of 30 long-horizon tasks, with pass rate, average completion, average runtime, and per-run cost reported. A publicly described mobile development benchmark from one cloud vendor follows a similar approach, focusing on agent stability under real engineering constraints. For developers, this is closer to daily development pain points than single-point code generation: requirement decomposition, cross-file modification, build failure localization, regression validation, and cost control are all essential.
It is important to emphasize that benchmark scores are not equivalent to production capability. Benchmark tasks are limited in number and run in relatively controlled environments, while production projects involve legacy debt, private dependencies, device matrices, and compliance requirements. Therefore, when reading leaderboards, scores should be understood as engineering performance samples under a specific task set, agent configuration, and budget—not as universal rankings.
2. Four Core Metrics: Pass Rate, Completion, Runtime, and Cost
When evaluating long-horizon agents, looking only at pass rate can be misleading. At least four types of metrics should be observed together.
First, pass rate indicates whether a task meets the predefined acceptance criteria. It is the hardest quality metric, but it may underestimate partially usable output. Second, average completion reflects how far a task has been advanced. It is useful for observing whether an agent still delivers reusable code or staged results when it does not fully pass. Third, average runtime represents the response cycle of long-horizon tasks and directly affects team iteration pace. Fourth, per-run cost includes model calls, build and test execution, environment runtime, and retry overhead, determining whether a solution can be scaled.
Public evaluations show trade-offs between two typical configurations. One long-horizon agent solution has a pass rate of about 24.0%, average completion of 82.3%, average runtime of 27.4 hours, and per-run cost of about 317.4 currency units. A lightweight, fast solution has a pass rate of about 17.3%, average completion of 71.2%, average runtime of 12.0 hours, and per-run cost of about 9.9 currency units. The former achieves higher completion but significantly increases cycle time and cost, while the latter has a lower pass rate but clear advantages in speed and budget. These abstract data reveal a key fact: high-quality completion of long-horizon tasks often depends on more exploration, retries, and validation. Cost does not grow linearly; it is amplified by failure recovery and context maintenance.
3. Why High Completion Comes with Long Runtimes: Engineering Complexity of Long-Horizon Tasks
A long-horizon agent is not simply a chatbot with more conversation turns. It must maintain task state across multiple execution rounds, understand cross-file dependencies, process build and test feedback, and decide whether to roll back, retry, or replan after failures. Raising completion from 70% to above 80% often means the agent must handle more edge cases: missing dependencies, interface mismatches, resource path errors, test environment differences, and post-migration regression issues.
Runtime growth mainly comes from three areas. The first is the validation loop: after each modification, the system needs to build, run tests, and inspect artifacts. The more validation cycles, the longer the runtime. The second is state recovery: once context drifts in a long-horizon task, the agent needs to reread key files, compare differences, and fix cascading errors. The third is failure retry: high-completion solutions usually do not give up after the first failure; instead, they perform multiple repair rounds, which significantly increases calls and environment runtime.
Therefore, high completion with long runtime is not necessarily inefficient; it may be the result of engineering trade-offs. For migration, refactoring, and complex feature development, a low one-shot pass rate but high staged completion may be more valuable than fast failure. For scaffold generation, local patches, and test supplementation, low-latency and low-cost solutions are more suitable. Teams should define different strategies by task type rather than using a single leaderboard to decide all scenarios.
4. Controlling Uncertainty with Task Orchestration and Validation Gates
To make long-horizon agents manageable, the key is to place them in an observable and rollback-capable engineering pipeline. The following neutral pseudocode shows the basic structure of task orchestration, validation gates, and budget control:
function run_task_set(tasks, agent, budget):results = []for task in tasks:state = init_state(task)for step in range(max_steps):plan = agent.plan(state)state = apply_actions(plan, state)if static_check(state) fails:state = agent.repair(state, "static_check")continueif build(state) fails:state = agent.repair(state, "build")continueif unit_and_integration_tests(state) fail:state = agent.repair(state, "tests")continueif regression_contract_check(state) passes:state.status = "passed"breakif budget.exceeded(state):state.status = "budget_exceeded"breakresults.append(score(task, state))return aggregate(results)
This pseudocode reflects three principles. First, validation gates should run early: static checks, builds, unit and integration tests, and regression contract checks should be executed in layers to prevent the agent from continuing in the wrong direction. Second, failures should be classified: different failure types trigger different repair strategies, which saves budget compared with generic retries. Third, budgets should be hard constraints: when call counts, runtime, or environment costs exceed thresholds, the process should terminate proactively to prevent long-tail tasks from consuming the overall budget.
In general-purpose cloud environments such as Baidu AI Cloud, teams can use container platforms, object storage, logging services, and monitoring/alerting to build reproducible evaluation pipelines: container platforms ensure consistent environments, object storage retains build artifacts and test reports, logging services record agent decision traces, and monitoring/alerting tracks cost and failure rates. These capabilities are not tied to a specific agent product and are suitable as evaluation infrastructure.
5. Cost and Throughput: Decomposing Per-Run Cost
The cost of a single benchmark run cannot be judged only by model call unit price. A more reasonable estimate should include call cost, environment runtime cost, retry amplification factor, and human review cost:
estimated_cost =token_calls * unit_token_cost+ runtime_hours * unit_runtime_cost+ retry_count * average_retry_cost+ human_review_hours * unit_review_cost
The retry amplification factor is the most easily underestimated part. In long-horizon tasks, one failure may trigger multiple repair rounds, each accompanied by builds, tests, and environment runtime. If the average number of retries rises from 2 to 6, total cost may double even if the unit price per call remains unchanged. Teams should set layered budgets: per-task, per-batch, and daily budgets, and monitor the budget-exceeded rate, retry rate, and human-takeover rate on dashboards.
In terms of throughput, high-completion solutions are often suitable for offline batch processing or overnight long runs, while low-latency solutions are suitable for interactive assistance. A hybrid strategy is usually more practical: use lightweight solutions for small-step tasks and fast feedback, and use long-horizon solutions for migration, refactoring, and complex defect repair. Through task routing, high-value tasks can be assigned to high-completion configurations, while low-risk tasks can be delegated to low-cost configurations.
6. Observability and Reproducibility: Making Benchmark Conclusions Credible
For benchmark evaluations to be credible, they must be reproducible. It is recommended to record the following metrics: task pass rate, completion distribution, average and tail runtime, per-task cost distribution, failure-stage distribution, retry count, human-takeover rate, and build/test stability. Tail runtime is especially important because a small number of long-tail tasks may consume most of the budget.
For reproducibility, base images, dependency versions, test data, and environment configurations should be fixed, and the inputs, key decision logs, and final artifacts of each run should be retained. For migration tasks, interface contracts and regression cases before and after migration should also be recorded. Only by decomposing a score into five elements—task set, configuration, budget, validation rules, and environment—can leaderboard data be transformed into actionable selection guidance for teams.
7. Team Selection Guidance and Boundaries
For teams sensitive to quality and high task complexity, high-completion long-horizon solutions can be evaluated first, but they must be paired with budget gates and human review to avoid runaway long-tail costs. For teams sensitive to budget and response time, lightweight fast solutions can be used first for scaffolds, local patches, test supplementation, and documentation generation, with failed tasks escalated to long-horizon solutions. A more mature approach is to establish task tiers: simple tasks pass automatically, medium tasks are repaired by agents, and complex tasks involve human intervention or are handed off to long-horizon agents.
At the same time, the boundaries of benchmarks should be recognized: task counts are limited, environments are controlled, and acceptance rules are explicit. They cannot fully represent the legacy debt, private dependencies, device matrices, and compliance constraints of production projects. Public scores should be treated as directional references. Final selection should be based on small-scale pilots combined with the team’s own codebase, build duration, test coverage, and workflows. The value of long-horizon agents is not to replace engineers, but to turn repetitive engineering operations into observable, budgetable, and rollback-capable automated workflows. Only by incorporating quality, speed, and cost into the same set of engineering metrics can teams make rational trade-offs.
