Token usage is the primary cost driver for AI agents. A developer agent completing a complex feature might use 500,000 tokens in a session; if it gets stuck in a loop or tackles an unexpectedly large task, that number can grow by an order of magnitude without a budget constraint. At typical API pricing, this translates directly to unexpected billing.
Budgets also serve a safety function beyond cost control. An agent that exceeds its token budget is either working on something much larger than expected (possibly scope creep) or stuck in a loop. Either way, it is a signal worth investigating. A budget limit forces that investigation to happen before costs become significant.
Budgets can be set at multiple levels: per-session (stop when this task exceeds N tokens), per-day (cap this agent's daily consumption), or per-project (aggregate budget across all agents in a repository). The right level depends on how predictable the agent's workload is and how closely cost is being tracked.