An agent budget needs a stop the application enforces
At the assumed rates and token caps here, twenty model calls reserve $0.18, but only if the application counts calls and enforces the caps, recovery attempts included.
Telling an agent to keep costs low does not stop it spending anything. An agent that can keep calling a model and tools needs a rule, held by the application, that decides whether another operation may start. The model's own view of how far it has got should play no part in that rule.
The Claude tool-use overview, read on 14 November 2026, describes the boundary for client tools: the model proposes a structured call, your application runs it and returns the result. That boundary is the natural place to enforce limits, because a proposal can be logged there without being carried out.
The reserve is built from maxima
Assume at most 4,000 input tokens and 1,000 billable output tokens per model call. At invented rates of $1 per million input tokens and $5 per million output tokens, one call costs at most $0.009 under those assumptions, provided all billable output fits the stated limit.
| Allowed model calls | Maximum input per call | Maximum billable output per call | Nominal reserve, USD |
|---|---|---|---|
| 5 | 4000 | 1000 | $0.045 |
| 10 | 4000 | 1000 | $0.090 |
| 20 | 4000 | 1000 | $0.180 |
The reserve uses maxima, not average requests multiplied by a step count. An average helps forecast a likely bill but cannot bound an unusually long run. The table also assumes a flat rate, no extra fees, no uncounted retries and no overlapping calls.
Reserving before each request
Before a request starts, the application checks the remaining budget and reserves the most that request is allowed to cost. Afterwards it reconciles the reservation against reported usage. Where calls can run in parallel, their reservations are made together, so that each one cannot spend the same remaining amount.
Recovery attempts belong in the same ledger. A request repeated inside an SDK still counts against the job even if your outer loop did not advance, so a loop counter is not a call counter until a small controlled run has shown how attempts actually behave.
External operations need an allowance of their own. A search, storage write or paid tool may bill in a different unit, and a model-token bound should not be presented as a total spending cap while those can carry on outside it.
What the agent returns when it stops
When the agent reaches a limit it should hand back the work completed, what remains, why it stopped and whatever is needed to resume. A stopped job is not automatically a failed implementation. If the task is bigger than the authorised budget, stopping is the correct outcome.
The final report may need a model call of its own, so room for it has to be held back. Alternatively the application can write the stop message from the ledger. A design that spends the whole reserve exploring and then needs an unbudgeted explanation has left its accounting unfinished.
A deadline works alongside token and call caps, since waiting on slow tools can use up the useful time without using up tokens. Logging which limit ended the run separates a budget problem from a scheduling one.
Progress is not the same as activity
A tool call is activity. Progress is something defined in terms of the task, such as a verified file change, an accepted field or a completed check. If the loop repeats with no new progress event, the application can pause or ask for a narrower scope, and that policy should be written down instead of left to the model asking itself whether it is almost done.
The stop path can be tested with synthetic tools and deliberately small caps. The checks are that the next operation is denied and that the report keeps the completed work, all without real payments or consequential writes.
An entry in your own results log should name the enforced limits, the ledger's scope and the evidence of stopping. With those, a reader can tell whether a budget was an estimate, a request in a prompt or an actual boundary.