open_budgetOpen a budget for the run: dollars, tokens, calls or minutes. Hand the id to every sub-agent.
One dollar cap for the whole run, shared by every sub-agent. Watch spend free. Turn on Pro and the run stops at the line, before the next model call.
500 checks/day free · Pro $9/mo · bring your own model
How it works
open_budgetOpen a budget for the run: dollars, tokens, calls or minutes. Hand the id to every sub-agent.
reserveBefore each model or tool call, reserve the estimate. Pro answers allowed=false at the cap.
recordRecord what it really cost. budget_status shows spend; weekly_report shows runs that went over.
Pricing
Free resets daily and is not a trial. Pro is $9 a month.
Watch-only shadow mode. 500 checks a day: tracks every run's spend, flags where a cap would have stopped it, drafts a weekly report. Never blocks.
Enforcing: reserve returns allowed=false at the cap, so the run stops instead of spending past it.
Worked example
A nightly job with a $2 cap loops and keeps calling the model. In free mode the weekly report shows it spent $11.40, $9.40 past the cap. With Pro at $9/month, the run stops at $2.00.
For agents
Each result includes understood, job and a one-line outcome your agent can report back in plain words.
open_budgetOpen a hard budget for one agent run before it starts: max dollars, tokens, calls and/or wall-clock seconds. Returns a handle.
reserveCall 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.
recordAfter 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.
weekly_reportDraft a plain-English report of the last 7 days for your key (or IP): runs, spend, runs that went over their cap, and dollars spent after a cap would have stopped them. Read-only; sends nothing.
budget_statusSee 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.
usage_and_upgradeUsage today + upgrade link (not metered).
Connect
claude mcp add --transport http run-budget-guard https://budget.cloudforbots.com/mcp
MCP URL https://budget.cloudforbots.com/mcp
REST POST https://budget.cloudforbots.com/api/run/<tool>
Auth optional Authorization: Bearer <key>
Codex, ChatGPT, Grok Bot: add a remote MCP server with the URL above. Skill file: SKILL.md · catalog entry: tool.json
FAQ
Agent loops and sub-agent forks can burn millions of tokens in one run before anyone notices. Provider caps are monthly or org-wide, and SDKs report usage after the run. Run Budget Guard gives one run a hard cap that every sub-agent shares, checked before each call. Start free in watch-only mode to see what your runs actually spend.
Call open_budget at the start with max_usd, max_tokens, max_calls and/or max_seconds. Before every model call, tool call or sub-agent spawn, call reserve with your estimate. If allowed is false, stop and return the partial result. Optionally call record with the actual usage to keep the ledger exact.
Yes. Pass the handle to each sub-agent. Every reserve is an atomic check-and-deduct on one ledger row, so eight parallel calls against a cap of five calls allow exactly five.
Your agent does. Run Budget Guard does not see your prompts or proxy your model traffic; it only counts the numbers you send. Use your provider's published prices for the estimate and record to correct it.
In free watch-only mode nothing is blocked: reserve returns would_block=true and the weekly report counts the spend past the cap. With Pro in enforce mode the run is marked stopped with the reason (max_usd, max_tokens, max_calls, max_seconds) and every later reserve returns allowed=false, so a looping agent cannot creep past the cap.
Call weekly_report: runs in the last 7 days, total dollars, tokens and calls, how many runs went over their cap, and how much was spent after a dollar cap would have stopped them. It is a draft your agent shows you; nothing is sent or changed.
Free: watch-only shadow mode, 500 checks a day, 10 open runs, weekly report, handles last 24 hours. Pro is $9 a month: enforcing caps, 50,000 checks a day, 200 open runs, handles up to 7 days. You get your Pro key on screen right after paying.