Side-by-Side Testing of AI Agents on a Complex Frontend Task: Speed, Stability, and Retry Mechanisms

    This article compares four model groups on the same complex frontend build, using one agent framework and changing only the underlying model. It looks beyond final screenshots to measure task completion, execution time, tool stability, failure recovery, and output quality, and it draws lessons on planning, tool efficiency, retry strategy, and context management for evaluating AI coding agents.

    1. Why Final Screenshots Are Not Enough

    In AI agent development and AI-assisted coding tasks, a final screenshot shows only whether the result is visible. It does not fully reflect the engineering capability of the model. Two models may both produce a page that looks complete. One finishes in under twenty minutes, while the other goes through repeated failures, duplicate runs, and long waits. The first delivers more efficiently. The second may impose significant time and resource costs on a real project.

    Evaluating a complex agent therefore requires at least five metrics:

    1. Task completion: whether the core pages, interaction flows, and data states are complete.
    2. Execution efficiency: the time from task start to the first result that can be accepted.
    3. Action stability: whether tool calls fail often and whether the agent falls into invalid loops.
    4. Failure recovery: whether the agent can identify the cause of a failure and keep going, instead of starting over.
    5. Output quality: whether code structure, visual consistency, responsive behavior, and state persistence meet the requirements.

    This horizontal experiment uses one unified agent framework and changes only the underlying model. All other conditions stay the same. This isolates environment variables as much as possible, so differences in framework capability, prompts, or browsers are not mistaken for differences in model capability.

    2. The Shared Task: Building a Creative Collaboration System

    The test task is to build a collaboration system for creative teams. No ready-made page is provided as a reference. The model works only from the task description, initial data, and assets, and it must complete the full process from interface design to interaction implementation.

    The system includes the following modules:

    • Project overview: shows project stages, members, task progress, and recent activity;
    • Inspiration asset wall: supports image browsing, categorization, and drag-and-drop organization;
    • Asset comments: comments must be linked to a specific asset or visual position;
    • Version approval: supports submitting, approving, rejecting, and switching between historical versions;
    • Release preview: shows the current deliverable in a form close to the final output;
    • Role permissions: distinguishes between roles such as creative lead, designer, and client.

    The difficulty of this task lies not in building any single page but in keeping multiple pages consistent. For example, when the version approval status changes, the progress in the project overview, the available versions in the release preview, and the status in the comment area should all update together. If a model focuses only on local pages, the final result may look complete visually but be logically disconnected.

    Data must also survive a page refresh. This test does not evaluate complex backend architecture. It checks whether the model understands the state lifecycle and whether it saves key data through browser-local persistence or another reasonable method.

    3. Test Conditions and Acceptance Criteria

    To keep the comparison reproducible, all four groups ran under the same conditions:

    • the same context window;
    • the same task budget;
    • the same type of browser automation tool;
    • the same initial assets and seed data;
    • a desktop check size of 1440×1000;
    • a mobile check size of 390×844;
    • the first generated result saved for each group;
    • only one focused round of fixes allowed;
    • final retention of code, screenshots, execution logs, review records, and metrics data.

    This test emphasizes the first generated result. If only the fixed page is kept, it is impossible to judge the model’s initial planning and self-checking ability. The first result shows whether the model built a reasonable information architecture from the start. It also helps identify whether an error came from a design decision, a code implementation, or a tool execution failure.

    Acceptance should not rely only on static screenshots. The following behaviors also need to be verified:

    1. After dragging an asset, whether its order or group membership changes;
    2. After adding a comment, whether it still appears after a page refresh;
    3. After switching versions, whether the page shows the correct content;
    4. Whether approve and reject actions update the project status;
    5. Whether each role sees only the features its permissions allow;
    6. Whether the mobile view has horizontal overflow, overlapping buttons, or truncated text;
    7. Whether the browser console shows obvious runtime errors.

    4. Execution Differences Across the Four Models

    All four models completed the task, but their execution processes differed clearly.

    The first group finished the main task in about 17 minutes, with a focused action path. It usually built the basic layout and data structure first, then added interactions, and it verified its work at key checkpoints. Its visual style was restrained, but the page structure was clear, and the relationships among projects, members, and assets were easy to follow. This shows that a model does not need the most complex interface to produce an acceptable result in fewer action rounds.

    The second group’s first run failed. Including the rerun, the total time was about 1 hour 12 minutes. Its interface had a strong branded look, with good visual consistency across heading levels, approval states, and the permission matrix. Its mobile adaptation was also stable. However, the first failure shows room for improvement in fault tolerance. In a real development environment, the ability to keep completed outputs and pinpoint the failed step matters more than simply running again.

    The third group did not perform a full rerun. Instead, it triggered several automatic retries during execution, for a cumulative time of about 88 minutes. It built a high-density system in which navigation, project progress, roles, delivery, approval, and an asset canvas formed a fairly complete workspace. Its engineering completeness was good. However, the long execution time shows that a complex system does not improve just by adding more features. If a model confirms each step repeatedly or calls tools often to verify the same state, the action chain grows noticeably longer.

    The fourth group failed in its first two runs. It then increased the backoff interval and kept trying, and it produced its first acceptable result after a cumulative time of about 1 hour 04 minutes. The final page used an archival visual style, with serif headings, an off-white background, thin dividers, and work thumbnails. Its design direction was distinctive. The execution process, however, shows that its default retry strategy handled consecutive failures poorly. Retry intervals that are too short cause repeated failures, while waits that are too long inflate the total time.

    5. Beyond the Final Page: Focus on the Execution Trace

    The results point to four areas where the models differed most.

    1. Planning Granularity

    Strong models do not modify the page in a disorderly way from the start. They first break down the task and define the page structure, data model, and interaction relationships. A reasonable sequence looks like this:

    1. Read the task and assets
    2. ↓
    3. Build the page skeleton and routes
    4. ↓
    5. Define shared state and data structures
    6. ↓
    7. Implement core interactions
    8. ↓
    9. Add visual styles
    10. ↓
    11. Run the desktop check
    12. ↓
    13. Run the mobile check
    14. ↓
    15. Make focused fixes and output the artifacts

    Without a clear plan, a model often switches back and forth between visual and functional work, which creates many repeated tool calls.

    2. Tool Call Efficiency

    Tool calls should be judged by their effective ratio, not only by their count. A single successful browser check can reveal layout problems, interaction problems, and console errors at once. Reopening the same page or retaking the same screenshot without producing new information is low-value action.

    The following metric can be used to record this:

    1. Effective action rate = Number of actions that produce new information or complete a valid change ÷ Total number of actions

    A higher rate usually indicates a more mature execution strategy.

    3. Failure Recovery

    Failure recovery has three levels:

    • identifying which step failed;
    • keeping the code and state that were already completed;
    • fixing the root cause instead of rerunning mechanically.

    For example, if a page fails to load, the model should first check for syntax errors, dependency status, and route paths, rather than regenerating all the code. Local fixes are faster, and they reduce the risk that new errors overwrite working results.

    4. Context Management

    A complex task involves requirements, asset content, code files, screenshot feedback, and runtime logs at the same time. If a model cannot keep these pieces of information linked, contradictions appear. A role permission implemented earlier may be overwritten by a later change, or an approved version may still show as pending review on another page.

    In practice, teams should keep a structured summary, such as:

    1. Current page: Version approval
    2. Current role: Client
    3. Completed: Version switching, approval buttons, status display
    4. To verify: Status after refresh, mobile button layout
    5. Known issue: Comment positioning may overflow on narrow screens

    Such a summary reduces repeated context and helps the model keep its state consistent across a long workflow.

    6. Building a More Reliable Evaluation System

    When choosing a coding model, enterprises should not judge it from a single task or a single page. A better approach is to build a multidimensional scoring table:

    Evaluation Dimension Focus
    Functional completeness Whether core flows form a closed loop
    First-run success rate Share of runs that pass without a rerun
    Average completion time Time from launch to the first acceptable result
    Tool stability Ratio of call failures, timeouts, and other anomalies
    Repair efficiency Number of new issues introduced by one round of fixes
    Visual quality Hierarchy, spacing, color, and consistency
    Responsive capability Adaptation on desktop and mobile
    State reliability Whether data persists after a page refresh
    Output maintainability Whether components, naming, and data structures are clear

    First-run success rate and average completion time are especially useful for measuring production efficiency. Repair efficiency and output maintainability are better indicators of whether a model can enter a real development workflow.

    7. Practical Recommendations for Development Teams

    First, define acceptance rules before testing begins. Without clear acceptance boundaries, you cannot tell the difference between a page that looks good and a feature that is actually complete