AI Agent Benchmark: Why Retry Counts Decide Delivery Efficiency
This article presents a controlled benchmark comparing four large language models within the same AI agent execution framework, where only the underlying model changes. It shows that end-to-end delivery time is driven mainly by failure recovery costs—action steps, tool-call quality, service stability, and context management—rather than raw token generation speed. Readers will find the experimental setup, process data, efficiency attribution, a reusable evaluation pipeline, and practical retry and model-selection recommendations.
1. Background: Why “Fast Model Output” Does Not Mean “Fast Agent Delivery”
When an AI agent handles end-to-end build tasks, the industry often makes a common assumption: that a model’s generation speed or its advertised low cost directly translates into task delivery efficiency. In real projects, a single “completion” often consists of dozens of action rounds, hundreds of tool calls, several failure rollbacks, and context compression. Fast inference at a single point only solves a small part of the problem.
A more meaningful evaluation question is therefore: with the task, materials, context, browser environment, and acceptance rules all fixed, and only the underlying large model swapped, how do end-to-end time, retry counts, and first-attempt success rate differ? The value of this kind of “controlled-variable benchmark” lies not in ranking models, but in breaking efficiency down into observable, attributable engineering metrics.
2. Experiment Design: Locking Down Every Variable Except the Model
For the conclusions to be credible, all variables other than the model must be locked first. This practice used the following constraints:
- Unified execution framework: All four experiments ran on the same agent execution framework, with identical scheduling logic, tool registration, and log collection.
- Consistent tasks and materials: The same requirements spec, the same set of design assets, and the same reference materials, avoiding noise from input differences.
- Consistent context strategy: The same context window management policy and the same compression and summarization trigger thresholds.
- Consistent browser and acceptance: The same browser runtime, the same network conditions, and the same automated acceptance scripts and judgment rules.
- Single variable: The underlying large language model. The four groups represented a “vision-enhanced lightweight model,” a “general-purpose lightweight model,” a “small-parameter high-speed model,” and a “long-context reference model,” all characterized by around thirty billion parameters or fewer, or by long-context capability, with the long-context model serving as a cross-reference.
The point of this design is that any time difference can be attributed to the model’s behavior itself, rather than environment jitter or drifting acceptance standards.
3. Process Data: Real Performance of the Four Model Types
All four experiments eventually passed acceptance, but the process curves differed dramatically—and that is the most informative part.
- High-speed vision model: Finished in about seventeen minutes, with no full-round reruns, compact action rounds, and a high first-hit rate on tool calls.
- General-purpose lightweight model: Failed the first round, triggered a full rerun, then completed, totaling about one hour and twelve minutes.
- Small-parameter high-speed model: No full reruns, but three internal automatic retries, totaling about eighty-eight minutes.
- Long-context reference model: Under the default backoff strategy, failed twice in a row, then completed after adjusting backoff parameters, reaching first success at about one hour and four minutes; counting the failed attempts, actual consumption was higher.
Looking at all four together, a counterintuitive conclusion emerges: the gap between fastest and slowest is nearly fourfold, and the main source of that gap is not the “speed of generating tokens,” but the recovery cost after failures.
4. Efficiency Attribution: Four Engineering Variables That Actually Matter
4.1 Action Steps
Each time the agent completes one “observe–decide–act” loop, that is one round. More rounds mean more accumulated inference overhead, context assembly overhead, and scheduling overhead. The advantage of the high-speed model often shows up in fewer meaningless rounds: it decides “the information is already sufficient” earlier, instead of repeatedly confirming.
4.2 Tool-Call Quality
Tool-call failures usually fall into three categories: invalid parameter structure, wrong target element location, and failed return-value parsing. The first two directly invalidate an entire round. In practice, unifying tool descriptions, strictly constraining parameter schemas, and wrapping return values in a structured format can reduce the failure rate. An illustrative constraint:
{"tool": "browser.click","arguments": {"selector": "css:#submit","timeout_ms": 8000},"retryable": false}
Explicitly marking non-retryable errors prevents the framework layer from performing meaningless automatic retries, saving a great deal of time.
4.3 Service Stability
The long-context model failing twice in a row under default backoff shows that the failures did not come from task difficulty, but from request-layer queuing, rate limiting, or timeouts. Stability issues must be analyzed alongside server-side metrics, rather than simply blamed on “the model’s capability.”
4.4 Context Management
The longer the context, the higher the prefill cost per request, and the greater the chance that key information gets diluted. A reasonable approach is layered context: system constraints kept resident, task state as a structured summary, and historical traces retrieved on demand, rather than feeding everything back in full.
5. A Reusable Evaluation Method: Turning “Gut Feeling” into Metrics
It is advisable to solidify the benchmark into a repeatable pipeline, with core metrics including at least:
- End-to-end time (including failures and retries);
- First-attempt success rate and number of full reruns;
- Number of internal automatic retries;
- Total tool calls and failure rate;
- Action steps and share of redundant rounds;
- Peak context usage and number of compression triggers;
- Total cost per successful task (including failed consumption).
Pseudocode illustration:
def evaluate(model, task, env):t0 = now()result, trace = run_agent(model, task, env)return {"wall_time": now() - t0,"first_pass": trace.first_attempt_success,"reruns": trace.full_reruns,"auto_retries": trace.auto_retries,"tool_calls": len(trace.calls),"tool_fail_rate": trace.failed_calls / max(1, len(trace.calls)),"steps": len(trace.steps),"peak_context": trace.peak_tokens,}
The key is that “time including failures” must be counted in the total, otherwise the real efficiency of unstable models will be systematically overestimated.
6. Engineering Practice for Stability and Retry Strategy
More retries are not always better; retries should match the error type:
- Retryable errors (rate limiting, timeouts, network jitter): exponential backoff with jitter, with a cap and an overall budget;
- Non-retryable errors (invalid parameters, location failures): report and fix immediately, with automatic retries prohibited;
- Full reruns: triggered only when the state machine is judged unrecoverable, and required to preserve completed artifacts to avoid starting from scratch.
The retry budget should also be made explicit, for example “a maximum three-minute backoff budget per task,” to prevent long-tail tasks from dragging on indefinitely.
7. Selection Advice: From “Speed Above All” to “Optimal Total Cost”
Based on these observations, three practical recommendations:
- Make decisions on end-to-end metrics rather than single-point speed, and count failure costs into total cost;
- Match different models to different task tiers—lightweight high-speed models for simple subtasks, long-context models for complex planning;
- Put stability governance on par with prompt engineering, including backoff strategies, idempotent tools, artifact snapshots, and resumable checkpoints.
When deploying in the cloud, container platforms can host the execution environment, object storage can hold intermediate artifacts, and logging services plus monitoring and alerting systems can trace failure chains—making every failure attributable, reproducible, and optimizable.
8. Conclusion
The most important output of this benchmark is not who came first, but a set of judgment criteria: an agent’s real efficiency is determined jointly by action steps, tool-call quality, service stability, and context management. A model’s positioning describes only part of its capability boundary; engineering capability is what determines delivery speed. Build up the evaluation criteria, retry budgets, and observability system, and model selection moves from subjective impression to verifiable engineering conclusions.
