Agent Engineering Efficiency Evaluation: From Execution Time to Retry Governance

    Evaluating AI agents requires more than checking whether a task eventually succeeds. This article presents a practical framework for measuring the complete task execution capability of agents, covering reproducible controlled experiments, layered metrics such as first-attempt success rate and time-to-first-valid-delivery, end-to-end time decomposition, retry classification and governance strategies, context management for long-running tasks, and how to turn evaluation results into concrete engineering improvements—without ranking any specific model or product based on limited runs.

    1. Evaluating Agents Means More Than “Did It Eventually Succeed?”

    A common pattern in agent development: given the same requirement, different execution runs all deliver a working result, but some follow a short path, others iterate repeatedly, and still others spend long stretches stuck between failed requests and automatic retries.

    If you only present the final page or delivery screenshot, these differences are hidden. Yet for development teams and enterprise users, the questions that actually matter are:

    Can the task be completed within a time limit? Does the result meet acceptance criteria? How much human intervention was required during execution? Can the system recover from failures? And how many resources were consumed to deliver a successful result?

    Agent evaluation should therefore shift from “the quality of a single generation” to “the capability to execute a complete task.” The model is an important component, but not the only variable. The execution framework, tool feedback, external services, retry mechanisms, and context organization all shape the final outcome.

    This article discusses a general evaluation and governance methodology. It does not rank any specific model or product based on limited run records.

    2. Define the Evaluation Target: Model Capability Is Not System Capability

    An agent that can modify files, run commands, operate a browser, and verify results typically involves multiple interacting layers.

    The first layer is model reasoning and decision-making. It understands requirements, plans steps, selects tools, and adjusts its approach based on feedback.

    The second layer is the execution framework. It organizes messages, maintains task state, schedules tools, handles timeouts, and executes retry and recovery policies.

    The third layer is tools and the runtime environment. The file system, terminal, browser, dependency environment, and external services can all become performance bottlenecks or failure sources.

    The fourth layer is the acceptance mechanism. It determines what counts as done, which defects are unacceptable, and when a task should be terminated.

    This means end-to-end performance should be understood as a system-level outcome:

    Overall task performance = the combined effect of model decision-making, the execution framework, the tool environment, and acceptance constraints.

    This is not a numerical formula but a reminder to evaluators: even when you only swap the model, observed changes in execution time may come from how well the model fits a fixed execution framework. For example, the same tool descriptions may not be equally clear to different models, and the same context compression strategy may preserve different amounts of useful information.

    A fixed framework helps control variables, but it does not completely eliminate system-level factors.

    3. Designing Reproducible Controlled Experiments

    3.1 Fix the task input, not just a single prompt

    A comparable development task should include a clear requirement statement, an initial codebase, asset files, instructions for running the project, and delivery criteria.

    Take interactive page development as an example. The input should specify at minimum:

    Which pages and interactions must be implemented; which assets must be used; which files may be modified; whether responsiveness across screen sizes is required; and under what conditions a feature is considered complete.

    If one run receives the full set of assets while another must find substitute resources on its own, the conditions are not equivalent—even if the task description is identical.

    3.2 Restore a clean environment for every run

    Each experimental round should start from the same initial state, including code files, dependency state, the working directory, and any task-relevant browser state.

    In particular, prevent half-finished work, cached results, or error fixes from a previous round from influencing the next one. Caches do not always need to be cleared, but the rule must be explicit: are you comparing cold-start performance or performance in a normal working environment? Do not mix the two.

    3.3 Fix resource and permission boundaries

    Tool permissions, network access scope, concurrency limits, per-call timeouts, and the total execution budget should all be defined and recorded in advance.

    If one run is allowed to install additional dependencies and another is not, the results conflate permission differences. Similarly, experiments that allow human hints should be tallied separately from fully autonomous runs.

    3.4 Define an acceptance checklist in advance

    Acceptance should not be decided by the executor simply declaring “it’s done.”

    For development tasks, checks can be grouped into four categories:

    • Functional checks: are the core operations actually usable?
    • Runtime checks: does the project start normally, and are there any blocking errors?
    • Constraint checks: were the specified directories, assets, and modification scope respected?
    • Quality checks: do layout, readability, error messages, and similar aspects meet the pre-agreed requirements?

    Visual acceptance inevitably involves subjective judgment. Use explicit check items and a consistent review process to reduce bias.

    4. Build Layered Metrics and Avoid Being Misled by a Single Time Figure

    4.1 First-attempt success rate

    First-attempt success rate measures how many tasks pass acceptance without a full re-run.

    The term “first attempt” must be defined first. Do internal tool retries within a task still count as the same attempt? Does an automatic resend after a model request timeout interrupt the current round? These rules need to be fixed in advance.

    Otherwise, seemingly identical success rates may be computed under completely different counting conventions.

    4.2 Success rate within a bounded budget

    Production environments rarely allow unlimited retries, so you should also measure how many tasks complete within a given time, call count, or resource budget.

    This metric is closer to real delivery needs than “did it eventually succeed.” A process that only succeeds after multiple re-runs has very different predictability from one that completes in a single pass.

    4.3 Time to first valid delivery

    Start the clock when the task officially launches, and stop it at the first pass of full acceptance.

    This duration should include waiting, failure recovery, automatic retries, and acceptance fixes. If full re-runs occurred, the earlier failed attempts should be included in the cumulative figure, rather than only reporting the time of the final successful run.

    4.4 Action efficiency and effective progress

    Fewer tool calls is not necessarily better. Necessary testing, log inspection, and result verification may increase call counts while reducing delivery risk.

    What matters more is:

    Whether the agent repeatedly reads the same information without forming new judgments; whether it modifies the same code multiple times without verifying the root cause; whether it keeps repeating operations after sufficient evidence is available; and whether it updates its strategy after failures.

    Use the call trajectory to judge “effective actions.” Do not treat raw call counts as a capability score.

    5. Decompose the Time to Find the Real Optimization Targets

    In a serial execution chain, end-to-end time can be approximately decomposed as:

    Total time = model request and generation time + tool execution time + waiting and backoff time + acceptance and repair time + framework scheduling overhead.

    With parallel execution, these intervals may overlap and cannot simply be summed. Analyze the critical path based on the event timeline.

    Different time structures point to different optimization directions:

    • If most time goes to model calls, examine unnecessary round trips, repeated explanations, and oversized input contexts.
    • If most time goes to tool execution, look for bottlenecks in builds, tests, page loads, or external access.
    • If waiting and backoff dominate, prioritize analysis of service availability, rate limiting, timeout thresholds, and retry policy.
    • If acceptance and repair dominate, the likely causes are insufficient early requirement understanding, poor task decomposition, or verification happening too late.

    Looking only at total duration makes it easy to mistake infrastructure problems for weak reasoning ability, or to mistake fast but low-quality execution for high efficiency.

    6. Retries Are Not a Single Number—They Are Distinct Recovery Behaviors

    “A high retry count” alone does not explain the problem. At least three categories should be distinguished.

    The first is request-level retries: after a model service or network request fails, the execution framework resends the request. This mainly reflects the communication link, service stability, and the retry implementation.

    The second is tool-level retries: after a browser operation, file access, or command execution fails, the tool is invoked again. Causes may include a page not being ready, temporarily unavailable resources, or incorrect parameters.

    The third is task-level re-runs: the current execution can no longer proceed, so part of the state must be reset, or the entire task restarted.

    The costs of these three categories differ greatly. A brief request resend and a full task re-run should not be merged into one number.

    Each retry record should include at least: the layer it belongs to, the triggering reason, the wait duration, the current attempt count, whether the strategy changed, and whether recovery ultimately succeeded. When the cause cannot be determined, mark it as unknown—do not force an attribution just to make the report complete.

    7. Designing Retry Policy: Improve Success Odds While Controlling Risk

    7.1 Distinguish transient faults from deterministic errors

    Brief connection drops and temporary service unavailability may justify retries.

    Deterministic problems—syntax errors, invalid parameters, missing permissions—generally cannot be solved by repeating the same action. The input should be modified, the approach adjusted, or the task terminated.

    For rate-limit responses, follow the waiting guidance provided by the service first; when no explicit guidance exists, fall back to a controlled backoff strategy.

    7.2 Use bounded backoff

    A common practice is to increase the wait time as failures accumulate, adding random jitter to reduce the risk of many requests resending simultaneously.

    But backoff must be bounded by a maximum attempt count, a maximum wait time, and the total task budget. Simply increasing retry counts may let a few tasks eventually succeed while significantly stretching the overall tail latency.

    7.3 Verify state before retrying operations with side effects

    Reading a file and submitting a business operation carry very different risks.

    When a write, send, or submit operation times out, you cannot assume it had no effect. The system should first query the execution result, or use idempotent design to avoid duplicate effects. When the state cannot be verified, automatic retries should pause and hand off to an explicit recovery process.

    7.4 Set stop conditions and checkpoints

    When the same class of error repeats with no new information, stop the mechanical retries.

    For long-running tasks, save checkpoints at key stages—for example, confirmed requirements, passing tests, and completed file changes. On recovery, resume from the most recent trusted state, but saving a checkpoint must not become a reason to skip final acceptance.

    8. Context Management Determines Whether Long Tasks Can Keep Moving Forward

    Long tasks generate large volumes of tool output, error logs, and intermediate conclusions. Keeping everything indiscriminately inflates the model input and buries important constraints.

    A more robust approach divides the context into three layers:

    • Stable constraint layer: preserves the original goal, non-negotiable limits, and acceptance criteria.
    • Working state layer: records the current plan, completed items, unresolved issues, and the next verification step.
    • Evidence layer: keeps key errors, test results, and their locations, with full materials re-read when necessary.

    When compressing context, do not summarize “presumed fixed” as “problem resolved,” and do not lose failure causes or unverified assumptions. Summaries should preserve the boundary between facts, hypotheses, and items still to be confirmed.

    The execution framework should also retain the original trajectory so deviations introduced by summarization can be traced back.

    9. Interpreting Results Without Overreaching

    A single task or a single run provides anecdotal evidence, not a general performance claim.

    More reliable evaluation covers different task types—requirement clarification, code modification, UI implementation, fault localization, test repair—and repeats executions under identical conditions. Run order should be shuffled appropriately to avoid aligning a fixed order with service fluctuations in a particular time window.

    Report completion rates, time distributions, and failure causes together. Averaging only the successful tasks’ durations excludes the failures and makes the results look overly optimistic.

    Tasks unfinished within budget should be listed separately rather than being assigned an arbitrary “completion time.” With small samples, avoid overly precise percentile claims.

    If you adjust retry limits, timeouts, or recovery behavior midway, you have created a new experiment configuration. The adjusted results can demonstrate engineering improvements, but they should not be merged with the original configuration under a claim of fully identical conditions.

    10. Turning Evaluation Results into Engineering Improvements

    A valuable evaluation system should ultimately guide action:

    • Low first-attempt success rate: prioritize requirement expression, tool feedback, and early verification.
    • Excessive request-level retries: prioritize service stability, request pacing, and timeout configuration.
    • Frequent repeated modifications: strengthen root cause analysis and minimal verification steps.
    • Continuously growing context: establish layered state recording and evidence traceability.
    • High final completion rate but highly variable duration: focus on tail latency, recovery paths, and budget governance.

    Enterprises can also set different strategies based on business risk: exploratory prototypes may allow more attempts, while tasks involving data modification, external notifications, or formal releases should enforce stronger permission boundaries, idempotency controls, and human confirmation.

    Conclusion

    The engineering value of an agent is not “it generated quickly once,” nor “it eventually succeeded after enough retries.” It is the ability to deliver consistently, at an acceptable cost and with predictable timing, under explicit constraints.

    Evaluation should therefore span the full execution chain: fixed inputs and environments, explicit acceptance criteria, decomposed time and failure sources, governed retry behavior, and traceable evidence. Only by placing model capability and engineering governance in the same evaluation table can you identify the factors that truly affect delivery efficiency.