You're running an agent against your own cloud account, and there is nobody else to catch a bad night's work before the invoice does.
Open sourceMITShopDevX
a spend limit for what your AI agent does outside the chat
AI agents can now run real commands on real accounts. breakerbox reads every command before it runs, works out what it will cost, and stops it if that breaks a limit you set.
When you give an agent a terminal, you give it your cloud account. Most of the time that's exactly what you want — it can deploy, test, and clean up on its own.
The trouble starts when it loops. An agent that misreads a task can start servers, then start more, then start more again — and every one of those is a command that runs in under a second. In the best-known case, an operator woke up to roughly $6,500 of cloud charges from an agent that spun up machines by itself overnight.
Here's the part people miss: none of that money was spent on AI. It was spent on servers. Tools that watch your AI spending never saw a thing, because not one of those commands was an AI request.
A fuse box doesn't stop you using electricity. It cuts the power when something draws far more than it should. breakerbox does that for money.
Nothing happens silently. When breakerbox stops something, it says what the command would have cost, which limit it broke, and what the agent should do instead.
$ breakerbox check "aws ec2 run-instances --instance-type p4d.24xlarge --count 8" DENY estimated $6292.34 Billable actions EC2 p4d.24xlarge x8 $6292.34 aws.ec2.run-instances · $32.7726/hr · qty 8 · high confidence Why - Single action estimated at $6292.34, over the per-action cap of $20.00. - Session spend would reach $6292.34, over the session cap of $50.00. - Today's spend would reach $6292.34, over the daily cap of $200.00.
Runaway spend rarely looks like one huge command. More often it's a small command repeated until it isn't small any more. breakerbox watches for all four shapes.
| What the agent does | Example | Result |
|---|---|---|
| Asks for something far too big | aws ec2 run-instances --instance-type p4d.24xlarge --count 8 |
Deny $6,292 is over the per-action limit |
| Gets stuck in a loop | while true; do aws ec2 run-instances ...; done |
Deny a paid action with no end condition |
| Drifts — many small charges | 30 modest servers over one working session | Deny once the session total is reached |
| Fires too fast to be deliberate | 12 paid commands inside 60 seconds | Deny that's a loop, not a person working |
| Runs something unmeasurable | terraform apply -auto-approve |
Ask the cost lives in files, not the command |
| Same, with nobody watching | the above, in auto-approve mode | Deny a question nobody can answer isn't a guard |
| Ordinary work | npm test && git commit -am wip |
Allow silently — you never notice it's there |
Claude Code has a built-in checkpoint called a hook — a place where an outside program gets to inspect a command and veto it before it runs. breakerbox lives in that gap. That's why there's no proxy to run, no service to sign up for, and no credentials to hand over.
This split is the most important design decision in the tool, and it's easy to get wrong.
A blocked command costs nothing — so it must not count against your budget. If it did, a handful of commands you stopped would use up your limit, and an agent that never spent a cent would find itself locked out. So breakerbox writes down what it's about to spend, and only converts that into a real charge once the command has actually run.
At the exact moment you start a cloud server, you have been charged $0. The bill arrives gradually, over the hours it stays running.
So a guardrail that only asked "what does this cost right now?" would wave through the very command that causes the damage. breakerbox instead asks "what will this cost if it runs for a day?" — and charges that against your limit immediately.
You're running an agent against your own cloud account, and there is nobody else to catch a bad night's work before the invoice does.
You have real cloud spend but no finance function watching it. Your first warning today is a billing alert, hours late.
You run agents in a mode where they don't stop to ask. This is where breakerbox matters most — it's the only thing still saying no.
You're handing an agent to someone learning. A hard ceiling turns an expensive mistake into a message on screen.
Installing it registers the checkpoint and writes a settings file with starting limits of $20 per command, $50 per session, and $200 per day. Change them to whatever a bad day is worth to you.
$ npm i -g @shopdevx/breakerbox $ breakerbox init
breakerbox check "…"Ask what would happen to a command, without running itbreakerbox statusSee how much of each limit you've usedbreakerbox logReview what's been spent, and on whatbreakerbox reset --sessionClear the running total and carry onbreakerbox doctorConfirm it's really protecting you — it tries a real blockdoctor is worth running once. It doesn't just check that files are in place — it sends a fake request for eight GPU servers through the real checkpoint and confirms it comes back refused. If something is misconfigured, you find out then rather than during an incident.
A safety tool that oversells itself is worse than none, because you stop paying attention. Here is exactly where the protection ends.