Retries belong in the AI budget before the first request
In this invented ledger, 100 jobs need 125 attempts and cost $1.25, while a three-attempt cap would need a $3 worst-case reserve at the same assumed rate, and those two figures answer different questions.
If a budget assumes one request per job while the application can make three, the estimate describes a different application. A retry policy is part of the workflow you are buying, so the attempt cap and recovery conditions should be written beside the model configuration.
The Claude error guide, read on 14 November 2026, distinguishes several kinds of error and recommends exponential backoff for internal API errors. It does not make every failed request worth repeating, so decide what can change on the next attempt before sending it.
A ledger by original job stops the double counting
Each job gets one identifier before its first attempt, and attempts get their own numbers and outcomes. When a later attempt succeeds, the original job is marked accepted once, which stops a recovery run inflating the apparent amount of work completed.
| Attempt number | Requests sent | New accepted jobs | Assumed spend |
|---|---|---|---|
| 1 | 100 | 80 | $1.00 |
| 2 | 20 | 15 | $0.20 |
| 3 | 5 | 2 | $0.05 |
In the example, eighty jobs pass initially. Fifteen more pass on the second attempt and two on the third, leaving three unresolved. The total is 125 requests and 97 accepted jobs. At the assumed cent per attempt, the bill is $1.25. No real requests were sent.
A reserve is not an expected bill
With a maximum of three attempts on each of 100 jobs, the fixed-price worst case is 300 attempts and $3. That reserve does not predict how often later attempts will be needed, and the invented ledger costs less because most jobs stop earlier.
A real estimate needs token usage and charges for unsuccessful attempts where available. The fixed cent per attempt is only the teaching assumption here. Some failures happen before generation and others after useful processing, so the service's billing record is a better guide than a status code.
External tools and human review need their own budget lines apart from model calls. A retry can repeat more than text generation if the workflow lets it, and the job reserve has to cover the operations it can actually trigger.
Different failures call for different recovery
A request rejected for its shape needs a correction. A capacity problem may need a wait. A completed but wrong answer needs a task-level decision about whether another attempt is useful. Those categories are worth preserving rather than sending everything through one generic repeat loop.
A deadline matters as well as an attempt count, because backoff can keep requests polite while making the final answer too late for the user. When time runs out, record the unresolved result and the reason instead of turning it into an empty successful answer to clear the queue.
Retries can also live in the SDK, the application and the job runner. If each repeats the operation independently, the effective attempt count can exceed the limit you thought you set. A controlled trial with the actual request log shows which component owns recovery.
A lost response does not mean the write failed
If a tool request changes something and its response is lost, check the destination using the job identifier or an appropriate receipt before repeating it. A missing response is not evidence that the operation never happened. A deduplication mechanism helps where the receiving service supports one, but verify its documented scope.
None of this claims that a model API supplies exactly-once execution. We make no such claim. The application manages its own downstream actions and recovery evidence.
A results log for this should show original jobs, total attempts, accepted jobs, unresolved jobs, actual spend and the enforced caps, so a model comparison includes the recovery policy that produced the result.