Most cost estimates start with the price per token and work upward. That is the wrong end. The number that decides whether a cap is safe is how many model calls a pathological run can make, because that count multiplies everything else.
An agent is not a single request with a predictable cost. It is a loop, and each step can trigger tool calls, sub-agent spawns, retries and longer reasoning traces. Cycles, a budget enforcement vendor, describes an agent as a loop where each step can trigger more steps, so exposure compounds with every step (Cycles on agent budget control). That piece walks through a "summarize this repository" task that looks like 23 calls and $2.63, then shows how a rate limit plus retries plus sub-agents turns it into a 200-call task at roughly ten times the cost.
So the first input is a count: the largest number of billable model calls one run can issue before something structural stops it. A step counter, a recursion limit or a circuit breaker gives you that number. Everything below plugs into it.



