On this page5 sections
One job is finished. Perhaps it took one model request. Perhaps it took three requests, four tool calls and a repair pass. The customer receives one result in either case; the system has done very different amounts of work.
Retry amplification makes repeated execution visible. It does not label every extra step waste: reading a log and querying a metric are distinct operations. A retry repeats the same intended operation after failure, rejection or uncertainty.
Give repeated work an identity
Consider an agent answering a support ticket. A log read and metric query serve the same task but are different operations. Sending the failed metric query again creates another attempt at that operation. A task ID follows the requested outcome, an operation ID identifies each intended model request or tool action, and a new attempt ID marks each execution. Those distinctions separate a necessary next step from repetition.
After an interruption, “resumed” does not tell us whether the agent repeated its query or moved on. The identities must show it. OpenTelemetry’s semantic-convention guidance distinguishes logical client calls from individual attempts; its generative AI attributes also include conversation and tool-call identities.
There is still a customer question beyond the trace: was the answer acceptable? OpenAI’s Agents tracing documentation groups model responses and tool calls under a turn, recording duration, status, arguments and results where available. That helps reconstruct the work, but cannot by itself establish consumer acceptance. The application needs its own outcome decision.
Two ratios reveal two different costs of repetition
For a task containing one intended operation, divide physical attempts by eligible tasks. Provided every task reached a first attempt, 1.00 means no repeats; 1.27 means 27% more attempts than tasks.
When a task has several operations, the ratio of attempts to logical operations isolates retries more directly. Keep attempts per task as well: it captures total work, including useful distinct steps.
Also divide attempts by accepted outcomes. Failed and unresolved tasks consumed resources without yet delivering an accepted result. Their attempts still belong in the numerator.
Here is a fictional hundred-task triage batch, with one operation per task and at least one attempt each. Seventy-eight succeed first time, fourteen succeed after one retry, five fail after three attempts and three stop after two attempts with an unknown destination result. The arithmetic is 78 + 28 + 15 + 6 = 127 attempts, producing 92 accepted outcomes.
That is 1.27 attempts per operation and, in this example, per task. Per accepted outcome, 127 / 92 is about 1.38 attempts. The three unknowns remain separate from both success and confirmed failure until reconciled.
Retain the operation type. Repeating a model request adds time and cost. Repeating an external write may add an effect as well. The count shows that work grew; the operation identifies what else may have grown with it.
Keep every attempt on the bill
Choose one of the fourteen tasks needing a retry. Its first attempt did not deliver the accepted answer, but it still contributes to the bill. So do attempts for the five failed tasks and three unresolved ones. Include every attempt, its tool charges and monetary execution costs. Divide the batch total by 92 accepted outcomes to obtain cost per accepted result.
Use the provider’s billed token categories and applicable rates without overlapping them. Cached input may already be included in input totals; adding it again double-counts the charge. A reasoning subtotal may likewise already sit within an input or output total. Measuring repeated work should not accidentally manufacture repeated charges.
A cheap first response can become an expensive finished task if it needs corrections or extra tools. A slower response completed without another pass may cost less overall. Compare both under the same acceptance rule. Weakening that rule makes delivery look cheaper without establishing greater efficiency.
The customer waits for the task from start to finish. The trace helps explain that interval: generation, tools, retry pauses, queues and time spent reconciling uncertain outcomes. Concurrent tools can both consume resources while their shared time passes only once for the customer. Adding their durations would count the overlap twice. Elapsed wait and resource cost answer different questions.
Resolve the uncertain write before sending it again
Now take an unresolved write that timed out. The agent lacks an answer; the destination may already have saved the change. Repeating it blindly could create a duplicate effect. OpenAI’s recovery guidance advises inspecting saved work and completed actions before retrying a failed turn, honoring retry limits and stopping when the error changes.
Look for that particular write at its destination. A supported read or stable external identifier may locate it. Where idempotency keys are supported, repeated requests with the same key can identify the same intended operation, subject to the destination’s guarantees. These are reconciliation methods, not permission to assume success. Move the task to accepted or failed only when evidence supports that state; the timeout did not decide it.
Age matters too. At ten seconds, a destination check may be ordinary progress. At thirty minutes, an operator may need to intervene. Showing which unanswered tasks have waited longest makes visible something a success percentage cannot: whose result still lacks an explanation.
Find the operation behind the growing count
If the next batch uses more attempts, compare received tasks with accepted outcomes, explicit failures and unknowns before declaring the agent worse. Put attempts per operation, task and accepted result beside cost and waiting time. Is one metric query repeating, or is useful work increasing? Model, tool and error class can distinguish provider overload, a slow MCP server, invalid arguments, conflicts and rejected output.
Even a retry whose duplicate effect is prevented consumes resources. If the platform hides attempts or stable task IDs, part of this trail is unavailable. Measurements at boundaries you control still help if their gaps are explicit. Completion notifications alone cannot establish an exact amplification ratio.
The prompt-cache SLI guide and scheduled-work contract explore related cost and completion questions. This batch already gives the next operator a clearer account: 92 accepted results required 127 attempts; five tasks failed; three await reconciliation. The timed-out write now leads to a destination check rather than an automatic retry. One result remains one result, with the work behind it finally visible.
Source context
Source links appear within this article. Read them alongside the author’s analysis and evaluate the guidance against your environment.
Report an error or outdated detail