Evaluating AI Agent Coding Capabilities: Benchmarks vs. Real-World Stability Testing

    Public leaderboards for AI coding agents often use inconsistent evaluation criteria, making scores hard to compare and easy to over-optimize. This article argues for reproducible, real-world testing instead, using the task of replicating a mobile weather web app to expose core capability dimensions. It examines first-pass output and iteration pace, automated testing feedback loops, instruction retention under long-context compression, and the tradeoff between speed and stability. A reusable evaluation checklist and practical guidance for running agents in containerized environments are also included. The focus remains on capability dimensions and engineering methods rather than recommending specific products.

    1. Background: Inconsistent Benchmarks vs. Hands-On Testing

    AI coding tools with agentic capabilities are iterating quickly, and nearly every release claims a comprehensive lead. In practice, developers face an awkward problem when selecting tools: public leaderboards use different evaluation criteria. Task sets, scoring methods, context limits, and whether web access or test execution is allowed all vary, making scores difficult to compare horizontally. Benchmark scores are also easier to target with specific optimizations, which steadily reduces their reference value.

    A more reliable approach is to return to real engineering scenarios and run a reproducible set of tasks for horizontal testing. This article uses “replicate a mobile weather web app” as the guiding task to abstract the core dimensions for evaluating an AI agent’s coding ability and to provide a neutral, transferable evaluation framework. Note that this article does not recommend or compare any specific product; the focus is on capability dimensions and engineering methods.

    2. Evaluation Design: Reproducible Tasks That Expose Real Capability

    An effective evaluation task must meet three conditions: the requirements are specific enough, the results are visually verifiable, and the process is long enough to expose stability issues. Replicating a mobile weather app fits these conditions.

    A sample prompt structure is shown below (illustrative, not a specific product instruction):

    1. Create a standalone working directory on the desktop and complete development based on the following requirements, executing the entire process autonomously:
    2. 1. Use a component-based frontend framework to build a mobile web app;
    3. 2. Align the layout and interaction logic with the weather app of a mainstream mobile OS;
    4. 3. Cover multiple weather types: sunny, cloudy, rain, snow, and fog;
    5. 4. Provide a corresponding dynamic background effect for each weather type;
    6. 5. After completion, verify rendering and interaction usability yourself.

    The value of this task is that it simultaneously examines UI fidelity, animation details, state management, and most importantly—whether the model can find and fix problems on its own without human intervention.

    3. Dimension 1: First-Pass Output and Iteration Pace

    A common pattern in testing is that stronger agents adopt a “minimum viable version first, then continuous refinement” workflow. They typically produce a runnable initial version in about ten minutes. At that point, visual effects and interaction details often fall short, but the skeleton is in place. A longer self-repair phase follows, using screenshots, logs, and page structure to locate issues and fix them one by one.

    This pace is reasonable from an engineering standpoint. The difficulty of complex frontend tasks is not writing everything correctly in one pass, but quickly establishing an observable feedback loop. A non-functional initial version is not the problem; the real problem is an agent that lacks self-diagnosis ability, or that cannot map a diagnosed issue to a specific code location.

    Three criteria are worth focusing on: whether the initial version runs; whether problem localization is accurate; and whether fixes converge rather than repeatedly rewriting from scratch.

    4. Dimension 2: Automated Testing and the Feedback Loop

    Better-performing agents proactively introduce browser automation after the first generation to run rendering checks: comparing screenshots, reading console errors, and inspecting element layout, then continuing to modify based on the results. This loop is key to long-task success.

    In engineering terms, the loop can be abstracted as:

    1. Generate/modify code -> Start local server -> Automated rendering and interaction -> Collect screenshots and error logs
    2. -> Diff analysis -> Locate file and code block -> Modify again -> Regression verification

    Two points need attention. First, verification must include regression to avoid fixing an animation while breaking the layout. Second, error information must be structured; overly long plain-text logs consume context budget and actually reduce repair efficiency.

    5. Dimension 3: Instruction Retention Under Long-Horizon Execution and Context Compression

    Agent tasks often run for tens of minutes and inevitably trigger context compression. The most common failure mode here is “goal drift”: the model gradually forgets the original hard constraints—for example, covering multiple weather types or aligning with specific interaction logic—and finally delivers a product that looks complete but deviates from requirements.

    A more stable behavior in testing is that even after multiple context compressions, the original instructions are retained and the task goal is not replaced by short- or mid-term local goals. In engineering, stability can be enhanced by externalizing constraints: write requirements into a standalone requirements file, express acceptance criteria as executable check scripts, and have the agent re-read them before each iteration.

    6. Dimension 4: The Tradeoff Between Speed and Stability

    Another common phenomenon is fast inference with high result variance: an early wrong path choice can be switched quickly, but large amounts of low-quality code accumulate in the mid-to-late stages, making convergence difficult. Speed itself is not a flaw; the problem is the lack of self-checking and staged convergence judgment.

    Therefore, evaluation should not look only at total elapsed time, but should record: the proportion of effective modifications, the number of rollbacks, and the number of times the same issue reappears. These metrics reflect real usability better than “finished in a few minutes.”

    7. A Reusable Evaluation Checklist

    1. Layered task set: include single-file small tasks, multi-file medium tasks, and cross-directory large-repo tasks to observe whether capability decays with scale.
    2. Verifiable constraints: each requirement maps to an automated check item to avoid subjective scoring.
    3. Record the full process: save each round’s diff, screenshots, and error logs for post-mortem analysis of failure points.
    4. Control variables: keep settings consistent for whether web retrieval is allowed, whether test execution is allowed, and thinking-effort configuration.
    5. Focus on regression: rerun all check items after fixes.
    6. Observable cost: track execution time and resource consumption as part of the overall assessment.

    8. Engineering Implementation Recommendations

    To adopt AI coding capability within a team, run it in a controlled containerized development environment, with a unified logging service and monitoring/alerting system to collect execution traces. Store code and artifacts in object storage or a code repository for version traceability. Set staged checkpoints for long tasks; if acceptance criteria are not met, trigger continued iteration or human intervention.

    In related practice at Baidu AI Cloud, the execution environment is typically hosted on a container platform, observability is ensured through a logging and monitoring system, and model capabilities are packaged as replaceable components to avoid tight coupling with a single tool.

    9. Conclusion

    Evaluating an agentic coding agent comes down to four things rather than a single benchmark run: whether it can quickly establish a runnable version, whether it can form an automated verification loop, whether it can retain the goal under long horizons and context compression, and whether it can balance speed and stability. Turning evaluation into a reproducible, verifiable, and observable engineering process is the right approach to technical selection.