AI Coding Benchmarks on Android: Engineering Trade-offs in Long-Horizon Tasks
This article analyzes a public Android development benchmark covering three general-purpose LLM-powered coding tools, and translates the results into a reusable engineering methodology. It breaks down four metrics—pass rate, average completion, average duration, and cost per run—explains why higher completion tends to come with longer runtimes, and offers a selection matrix, acceptance criteria, cost-control patterns, and agent orchestration practices for teams adopting AI coding tools.
1. Background: Task-Based Coding Benchmarks Are Becoming a Selection Standard
A maintainer of a mobile ecosystem recently published a set of coding benchmark results for mobile application development through its official developer account, covering three general-purpose LLM-powered coding tools. This is not a traditional competitive programming problem set. Instead, the evaluation environment places the agent inside a complete application engineering context: the agent must create an app within a runnable project skeleton, fill in missing functionality, migrate code, complete cross-platform conversion, and prove the result is actually usable through builds and tests.
The rise of this kind of benchmark reflects a real shift: the focus of code generation evaluation has moved from “is a single function correct” to “can a long-horizon task be delivered.” In real development, one requirement often spans dozens of files, several build failures and fixes, and multiple rounds of dependency adjustment. The model has to maintain long-context consistency, understand existing architectural constraints, and self-correct based on failure signals. As a result, the metrics have expanded from a single pass rate into four dimensions: pass rate, average completion, average duration, and cost per run.
Note that this article does not recommend or compare any specific product. Instead, it abstracts the public results into a reusable engineering methodology: when AI coding tools enter the development workflow, how should teams define metrics and control technical debt and cost.
2. Metric Breakdown: What the Four Numbers Actually Mean
The public data shows a clear stratification among the three tested tools across thirty long-horizon tasks. The best-performing group reached a pass rate close to 30% and an average completion above 80%, but averaged nearly 30 hours per run at a cost on the order of 300 USD per benchmark run. Another group had a pass rate of about 17% and average completion around 70%, averaging about 12 hours at a cost below 10 USD per run. The third group fell in between.
Translated into engineering language, these numbers support four conclusions:
- Pass rate is delivery certainty. It answers “how many times out of ten does it work on the first try,” which directly determines whether the team needs to reserve a manual fallback budget.
- Average completion is the value of a partial result. 70% completion means the scaffold, data layer, and part of the UI are already usable and the rest can be filled in quickly by a human; above 80% is closer to a submission that can go straight to review.
- Average duration is iteration cadence. The gap between roughly twelve hours and nearly thirty pushes a task from “closed within the same day” to “waiting across days,” affecting parallel task scheduling and blocker management.
- Cost per run is the scaling threshold. Across hundreds of automated runs, differences in unit cost are amplified into budget-level differences.
3. Engineering Trade-offs: Why High Completion Often Comes With Long Duration
High completion and long duration are not a coincidence but a direct consequence of how agents work, driven by at least three trade-offs.
The first is the trade-off between exploration depth and search space. Strategies with higher completion tend to retrieve engineering context more thoroughly, compare multiple implementation paths, and backtrack and retry after failures. This is essentially a wider search in the solution space, which naturally takes more time.
The second is the trade-off between verification intensity and confidence. Correctness on long-horizon tasks depends on repeated verification through builds, static checks, and tests. More verification rounds mean higher confidence, but each round also means real waiting and resource consumption.
The third is the trade-off between context maintenance and inference cost. Cross-file refactoring requires the model to preserve architectural consistency over a long context; the longer the context and the more constraints, the higher the per-inference cost.
Conversely, low-cost, low-duration approaches usually compress exploration and verification rounds, trading “acceptable completion” for throughput and predictable budgets. This is not a capability deficiency but a difference in strategy orientation, and it suits scenarios with clear requirement boundaries and a complete human review step.
4. A Selection Framework: Mapping Benchmark Scores to Team Scenarios
Teams should choose with a three-dimensional matrix rather than looking only at a single leaderboard position.
| Scenario characteristic | Priority metrics | Suggested strategy |
|---|---|---|
| Vague requirements, many architectural constraints | Completion, pass rate | Accept long duration, schedule cross-day tasks |
| Clear requirements, repetitive batch work | Unit cost, duration | Choose the low-cost option, add human fallback |
| Strong compliance, traceability required | Pass rate, log completeness | Enforce auditing and human review |
| Exploratory prototyping | Duration | Produce quickly, refactor later |
In practice, benchmark metrics can be turned into internal acceptance criteria, for example:
acceptance:pass_rate_target: 0.25 # target pass ratemin_completion: 0.70 # minimum acceptable completionmax_duration_hours: 16 # upper limit for a single task durationcost_ceiling_per_run: 20 # cost ceiling per run (internal settlement unit)human_review: required # whether human review is mandatory
5. Cost Control: Making Long-Running Tasks Predictable
Cost overruns usually come not from a high unit price but from missing constraints. Four levers help:
- Tiered routing. Split traffic by task complexity: simple changes go through a low-cost lane, complex refactoring through a high-completion lane.
- Budget circuit breakers. Set duration and invocation limits per run; when exceeded, stop and preserve intermediate artifacts.
- Reuse of intermediate states. Capture completed scaffolds, interface definitions, and test skeletons as templates to reduce repeated exploration.
- Observability. Use logging services, monitoring alerts, and metric dashboards to record the failure reason of each verification round, producing cost attribution that can be analyzed.
Illustrative budget control logic:
def should_continue(state, budget):if state.elapsed_hours > budget.max_hours:return Falseif state.estimated_cost > budget.cost_ceiling:return Falseif state.completion >= budget.min_completion and state.tests_passing:return Falsereturn True
6. Agent Orchestration: Keeping Long-Running Tasks From Blocking the Team
The biggest risk of long-running tasks is blocking. A recommended pattern is “asynchronous tasks plus human gates”: put long-horizon tasks into a containerized task queue, let the container platform provide isolation and elastic scaling, land all task artifacts in object storage, and notify reviewers of state changes through a message queue. Humans step in only at critical gates, such as architecture decisions, interface contract confirmation, and final merge.
A failure classification mechanism should also be established: separate failures into environment and dependency issues, requirement misunderstanding, code correctness issues, and insufficient test coverage. Each category maps to a different retry strategy, avoiding the cost waste of blindly re-running.
7. Common Pitfalls and Governance Recommendations
- Looking only at pass rate. Ignoring completion leads to many “one step short” partial results being discarded.
- Ignoring duration variance. Averages hide the long tail; the impact of the slowest task on the delivery cycle needs attention.
- Missing human gates. Fully automatic merging amplifies model bias directly into production defects.
- No cost attribution. Without per-task accounting, return on investment cannot be judged.
For governance, AI coding tools should be brought into development process standards: define the scope where they may be used, require review, keep a complete audit trail, and periodically run regression evaluations with an internal task set, forming a closed loop of “evaluate, select, review.” Baidu AI Cloud’s practices in general capabilities such as container platforms, object storage, logging services, and monitoring alerts also offer a reference engineering foundation for this kind of long-horizon automated task.
