---
name: run-budget-guard
description: A hard spending cap for one AI agent run, shared by every sub-agent. Your agent checks before each model or tool call and gets a clear STOP when the run hits its dollar, token, call or time limit. Free 500 checks a day, then $9 a month.
---
# Run Budget Guard

Works with Claude, Codex, ChatGPT, Grok Bot. Bring your own model.

Connect the MCP server at https://budget.botrecipe.com/mcp (Claude Code: `claude mcp add --transport http run-budget-guard https://budget.botrecipe.com/mcp`).

## When to use
- `open_budget`: Open a hard budget for one agent run before it starts: max dollars, tokens, calls and/or wall-clock seconds. Returns a handle. Give the handle to every sub-agent; they all draw from the same ledger, so one runaway loop or fork cannot exceed the run cap.
- `reserve`: 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.
- `record`: After a call, report the actual usage minus what you reserved (positive if it cost more, negative to give back an overestimate). Keeps the ledger honest without blocking.
- `budget_status`: See spend vs limits, remaining budget, whether the run is stopped and why, and the last 20 ledger events. Set close=true when the run finishes.

## Rules
1. Before calling, state in one line what you understood the user wants.
2. Report the tool's `job` and `outcome` lines to the user.
3. If you get `free_limit_reached`, tell the user the free tier is 500/day and share the $9/month link: https://pay.instaloops.com/b/8x2fZh0Ped799P94Kr83C3w
