AI Usage Limits That Stay Correct During Retries and Concurrent Requests
Design AI usage limits with explicit units, reservations and failure rules, including a concurrency test for the last available credit.
Luka Abramovic3 min read

AI usage limits in product design need a rule for work already in progress. If two requests both see one remaining credit and both start, a simple check-then-charge approach can exceed the allowance. Reserve the required usage as part of accepting the operation, then settle or release it according to an explicit outcome rule.
Define the unit customers understand before implementing a meter. A session, completed report and model request are different units. One report may require several internal calls or retries. Explain the customer-facing unit without exposing unnecessary infrastructure detail.
Write the consumption contract
Customer-facing unit
Event that reserves usage
Amount reserved
Event that consumes the reservation
Failure or cancellation rule
Whether a retry belongs to the same operation
When reserved usage becomes available again
How the customer sees used, reserved and remaining units
How support reconciles a disputed operation
Use a completed report as an illustrative unit. Decide whether a failed report returns the reservation and whether a user-requested regeneration is a new unit. These are product choices. Apply them consistently instead of letting internal retry behaviour decide what the customer is charged.
Calculate availability with reservations included
In an illustrative allowance of ten reports, six are completed and two are running. If each running report reserves one unit, available usage is ten minus six minus two, which equals two. Displaying four remaining without showing the reservations invites two different interpretations of what the user can still start.
Ask the developer to demonstrate two simultaneous requests for the last available unit. Acceptance must make the reservation consistently, so at most one request receives that unit. Rejecting the second request after both expensive jobs have begun does not control the underlying work.
Settle failures and retries deliberately
Give every operation a stable identifier. A retry of the same operation should not accidentally create a second reservation. A genuinely new generation should receive a new identity under the product’s rules.
Test success, failure before execution, failure after partial work, cancellation and a lost response. Decide which outcomes consume the unit. Keep the internal provider cost separate from the customer entitlement decision. The business may incur a provider charge even when it chooses to return the customer’s credit.
Reconcile the meter with completed work
| Operation state | Illustrative customer unit state | Reconciliation question |
|---|---|---|
| Accepted and running | Reserved | Does a live job own the reservation? |
| Completed | Consumed | Was it settled only once? |
| Failed under refund rule | Released | Is the unit available again? |
| Outcome unknown | Pending review | What evidence resolves the operation? |
Run a reconciliation over a small test account and match every reservation or charge to an operation. Investigate orphaned reservations rather than silently expiring them while a job may still be running.
Finish by testing the customer message at the limit. It should explain what is used, what is pending and which permitted next action exists. This gives the user a comprehensible product rule and gives support a record it can verify.
Bring the usage promise and one generation flow. We can map reservations, retries and failures into a limit customers can understand. Discuss the first release with Adamant Code.