Evaluating AI Coding Agents for Mobile App Development: Metrics and Engineering Trade-offs
This article explains how to evaluate AI coding agents on real engineering tasks. It covers four metrics (pass rate, average completion rate, wall-clock time, and cost per successful task), the trade-offs between them, and how to build a reproducible evaluation set with automated acceptance checks and practical rollout guidelines.
1. Why AI Coding Agents Need Systematic Evaluation
AI coding agents can already handle tasks such as app scaffolding, feature development, code migration, and version upgrades. When teams adopt these tools, a common problem appears: demos look strong, but after integration into real projects, the work often needs frequent rework. Demo tasks are usually short with clear boundaries. Real engineering tasks often span multiple modules, depend on legacy code, and require an understanding of business constraints.
Evaluation should therefore focus on real engineering tasks. A usable evaluation system needs to answer three questions: whether the agent can complete the task correctly, how far it gets, and how much time and money it costs.
2. Four Core Metrics and What They Mean
1. Pass rate
The pass rate is the share of tasks whose final output meets all acceptance criteria. Acceptance criteria typically include successful compilation, passing automated tests, and key features matching the requirements document. The pass rate is the most intuitive metric, but it is binary. It cannot distinguish a task that almost succeeded from one that made no progress at all.
2. Average completion rate
Completion rate measures the share of requirements an agent fulfills on each task. For example, if a requirement is split into twenty checkpoints and the agent meets sixteen of them, the completion rate is 80%. This metric reflects partial success and shows how far an agent progresses on complex tasks.
3. Average wall-clock time
Time refers to the elapsed wall-clock time from when the agent receives a task to when it produces a result. For long-running tasks, this can span several hours or more than ten hours. It includes model inference, tool calls, retries after failures, and waiting for external resources. Time directly affects iteration speed and determines whether a task can be completed within a single working day.
4. Cost per run
Cost includes model call fees, compute resource fees, and necessary storage and logging costs. Cost per run should be read together with pass rate. Otherwise, a cheaper model that fails often may end up with a higher total cost.
The following pseudocode calculates the cost per successful task, which provides a basis for side-by-side comparison:
function cost_per_success(total_cost, runs, pass_rate):successes = runs * pass_rateif successes == 0:return infinityreturn total_cost / successes
This metric answers a practical question: on average, how much does it cost to produce one deliverable task? It is closer to real decision-making than the cost of a single run.
3. Engineering Trade-offs Between Metrics
The four metrics constrain each other. No single combination is optimal for every scenario.
- High completion rates often come with long run times. Agents tend to take more steps to satisfy each checkpoint, which produces more complete output but increases waiting time.
- A high pass rate does not necessarily mean low cost. If a task must succeed on the first attempt, a team may need a stronger model and a longer context window, which raises unit prices.
- Lower-cost models suit high-frequency, small-scope tasks, such as fixing clear compilation errors or adding unit tests. Failures in these tasks are cheap, so retries are fast.
- Long-running tasks suit overnight batch execution, provided there is a reliable rollback mechanism and a process for reviewing results.
The core of engineering decisions is to classify tasks by risk and granularity, then choose a metric priority that fits each level.
4. Building Your Own Evaluation Set
Public general-purpose benchmarks only reflect general capability. Teams should build evaluation sets based on their own codebases.
1. Task stratification
Divide tasks into three categories:
- Atomic tasks: single-file changes and localized refactors with clear acceptance criteria.
- Feature tasks: new cross-module functionality that requires understanding existing interfaces.
- Migration tasks: version upgrades and framework replacements that involve many compatibility decisions.
Select representative samples from each category that cover the team’s common scenarios.
2. Reproducible environment
Evaluations must run with pinned dependency versions, fixed build scripts, and an isolated runtime environment. Otherwise, results for the same model will fluctuate due to environment drift, and comparisons will not be meaningful. Store the initial code snapshot, dependency manifest, and run parameters in version control, and generate a separate record for each evaluation run.
3. Acceptance criteria
Acceptance should be automated to avoid subjective human judgment. Typical acceptance layers include:
- Successful build;
- Passing unit and integration tests;
- No new serious warnings from static analysis;
- Screenshot regression of key screens matching the expected output.
Record the cause of every failure at each layer so that the agent’s weak points can be analyzed later.
4. Result logging
Each run should record at least the task ID, agent version, pass or fail result, completion rate, run time, cost, and failure type. Logs can be written to a logging service, and monitoring alerts can notify the owner when the pass rate drops noticeably.
5. Practical Recommendations
- Select tools by scenario. For atomic tasks, prioritize cost. For feature tasks, balance pass rate and completion rate. For migration tasks, choose higher-quality options when the budget allows.
- Set permission boundaries. The agent should modify only designated directories and must not operate directly on production configuration or release processes.
- Keep human review. Before code is merged, a developer should read the diff, focusing on business logic and security-related changes.
- Control iteration cost. Set maximum steps and maximum spending for each task. Stop automatically and hand off to a human when a threshold is exceeded.
- Re-run evaluations regularly. Models and tools are updated frequently, so re-run the evaluation set each iteration cycle and use the results to decide whether to adjust tool selection.
6. Summary
Evaluating AI coding agents depends on comparing pass rate, completion rate, run time, and cost per successful task within one framework, then making decisions based on the team’s own task mix. Teams should first build reproducible evaluation sets and automated acceptance checks, then assign tasks to approaches with different cost and capability levels based on the results. This helps control risk and produces steady gains in development efficiency.
