budget-guard: reserve
budget_reserve[budget-guard] Call BEFORE each model call, tool call or sub-agent spawn with your estimate. Returns allowed=true and deducts it, or allowed=false with the limit that tripped. When allowed is false, stop, do not retry, and return your partial result to the user. Atomic, so parallel sub-agents cannot both slip under the cap.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| usd | No | Estimated cost of the next call in USD. | |
| note | No | Short note, e.g. "web_search #12". | |
| calls | No | Number of calls to reserve (default 1). | |
| handle | Yes | The budget handle from open_budget (looks like bg_<id>.<secret>). Pass it to every sub-agent so they all spend from the same budget. | |
| tokens | No | Estimated tokens of the next call. |