Evaluating AI Coding Agents in Mobile App Development: Metrics and Trade-offs

    Evaluating AI coding agents in mobile app development requires a tailored approach due to complex project structures and multi-step tasks. This article explores four core evaluation metrics—pass rate, average completion, average wall-clock time, and cost per run—and examines the engineering trade-offs between high completion rates and long execution times. It also provides a Python code example for calculating these metrics, highlights common evaluation pitfalls, and offers practical recommendations for integrating these assessments into your development workflow.

    1. Why Evaluate Coding Agents Separately for App Development?

    A coding agent is an AI system capable of reading codebases, planning steps, calling tools, modifying files, and running tests. It differs from models that only perform code completion, and the criteria for judging them differ as well. Completion tools focus on the accuracy of single lines or functions, whereas agents must maintain contextual consistency across multi-file, multi-step tasks and self-repair when errors occur.

    Mobile app development poses several typical challenges for agents. First, the project structure is complex, consisting of UI layers, data layers, network layers, and platform configuration files; modifying one area might impact many others. Second, tasks often span multiple versions, such as migrating from an old UI framework to a new one. Third, building and running depend on specific toolchains and simulated environments, requiring the agent to handle compilation errors and dependency conflicts.

    Therefore, evaluations should revolve around real engineering tasks rather than isolated test scores. A reasonable evaluation set typically covers scenarios like app creation, feature addition, bug fixing, code migration, and framework conversion, while retaining the original task requirements, initial code state, and acceptance tests.

    2. Four Core Metrics and Their Meanings

    Evaluation results typically include four metrics, each answering a different question.

    1. Pass Rate
    This refers to the proportion of tasks that pass all acceptance tests. It answers: “Can the agent independently deliver usable results?” It is calculated as the number of passed tasks divided by the total number of tasks. Pass rate is the most direct metric for delivery decisions, but it is a binary indicator and cannot reflect situations where the task is almost complete but still has minor defects.

    2. Average Completion
    This refers to the proportion of satisfied acceptance criteria in each task relative to the total criteria, averaged across all tasks. It answers: “How far did the agent get on average?” Completion often diverges from the pass rate: a batch of tasks might meet most criteria but fail overall because of one critical test. Looking at both metrics together helps distinguish between “almost there” and “complete failure.”

    3. Average Wall-Clock Time
    This is the average time from receiving a task to outputting the final result, including model inference, tool calls, and test runs. Time directly impacts the developer’s waiting cost and determines whether it can be used in continuous integration (CI) pipelines.

    4. Cost Per Run
    This refers to the computing and API costs consumed for a complete evaluation run, usually summed up by task. Cost needs to be viewed alongside the pass rate; otherwise, it is easy to compare only unit prices while ignoring total consumption.

    3. Engineering Trade-offs: High Completion vs. Long Execution Time

    A common phenomenon in evaluations is that some agents have high completion rates but significantly longer average wall-clock times. This usually reflects a design orientation rather than necessarily indicating stronger capabilities.

    Long execution times often stem from the following behaviors. The agent might repeatedly run builds and tests to verify results step-by-step. It might read more context files to build a more comprehensive understanding of the project. It might also actively perform regression checks after modifications to reduce residual issues. These steps improve completion quality at the cost of time and computing power.

    Conversely, agents with shorter execution times typically perform less validation and context gathering. Their fast responses are suitable for rapid iteration, but they are more likely to miss dependency relationships in complex tasks, leading to manual rework by developers. Rework time is often excluded from evaluation metrics, meaning the evaluation numbers might underestimate the true total cost.

    Teams can refer to the following framework when making selection decisions.

    Scenario Priority Metric Typical Trade-off
    Critical module refactoring, migration Pass rate, completion Accept longer execution time in exchange for less rework
    Daily feature addition, prototyping Time, cost Accept a lower pass rate, rely on manual review
    Large-scale, budget-sensitive tasks Passed tasks per unit cost Allocate batches constrained by total budget

    No single set of metrics fits all scenarios. The key to selection is clarifying the task type, rework cost, and budget limit, then deciding which metric takes priority.

    4. Statistical Methods and Example Code

    To ensure comparable results, teams should record data under a unified task set, execution environment, and acceptance criteria. The following example demonstrates how to aggregate the run records of each task into the four metrics and calculate the number of passed tasks per dollar of cost.

    1. from dataclasses import dataclass
    2. from statistics import mean
    3. @dataclass
    4. class TaskResult:
    5. task_id: str
    6. passed: bool # Whether all acceptance tests are passed
    7. completion: float # Proportion of satisfied acceptance criteria, ranging from 0.0 to 1.0
    8. hours: float # Wall-clock time in hours
    9. cost_usd: float # Run cost for this task in USD
    10. def summarize(results: list[TaskResult]) -> dict:
    11. if not results:
    12. raise ValueError("Evaluation results are empty and cannot be summarized")
    13. total_cost = sum(r.cost_usd for r in results)
    14. passed_count = sum(1 for r in results if r.passed)
    15. return {
    16. "task_count": len(results),
    17. "pass_rate": passed_count / len(results),
    18. "avg_completion": mean(r.completion for r in results),
    19. "avg_hours": mean(r.hours for r in results),
    20. "total_cost_usd": total_cost,
    21. # Number of passed tasks per dollar, used to compare cost-effectiveness
    22. "passed_per_usd": passed_count / total_cost if total_cost > 0 else 0.0,
    23. }

    When using this, note three things. First, input data must come from the same task set. When the number of tasks is too small, the variance in a single run will be high; you should report the sample size and provide the range across multiple runs. Second, execution time should distinguish between automated execution and manual waiting time to avoid confusion. Third, the cost calculation scope must be unified, such as whether it includes failed retries and test environment fees.

    5. Common Pitfalls in Interpreting Evaluation Results

    Pitfall 1: Treating average completion as the pass rate. High completion only indicates that most steps are correct; it does not mean the deliverable is production-ready.

    Pitfall 2: Comparing only execution time. An agent that produces results quickly might require more manual fixes, potentially resulting in longer total man-hours.

    Pitfall 3: Comparing only unit price. A lower cost per run often comes with a lower pass rate, meaning the actual cost per deliverable task might be higher.

    Pitfall 4: Ignoring evaluation environment differences. Different agent frameworks, prompt strategies, and tool permissions significantly affect results. Before comparing, confirm that both parties are using identical execution conditions.

    6. Implementation Recommendations

    First, build an internal, small-scale evaluation set. Select 10 to 20 tasks representing your team’s typical work, including new features, bug fixes, and migrations, with fixed acceptance tests.

    Second, embed metrics into your workflow. Re-run the evaluation whenever introducing new tools or upgrading versions, recording changes in the four metrics.

    Third, allocate tools by task type. Prioritize high pass-rate solutions for tasks on the critical path, and choose fast, low-cost solutions for auxiliary tasks while retaining a manual review step.

    Fourth, continuously record rework data. Rework time is the cost most easily missed in evaluations; including it in your statistics yields a conclusion closer to reality.

    The capabilities of coding agents are still evolving rapidly, and the validity of selection conclusions is usually short-lived. Measuring regularly with reproducible methods better supports long-term engineering decisions than a one-off leaderboard.