A budget turns “keep going until done” into a bounded, auditable contract.
Architecture contract
ResourceBudget has max_cost_units, max_tokens, max_wall_ms, max_tool_calls, max_attempts and max_spawns. Budgets are enforced by the system, never by the component being budgeted. Exhaustion is an explicit BUDGET error family outcome, and hard limits are deterministic. A retry must change something, so attempts cannot loop silently.