Provider spending limits don't stop anything. They're alerts wearing a brake's clothing.

The documented cases from this year are ugly. A developer set a $250 cap and received a $10,138 bill overnight. An AWS customer with anomaly detection enabled was charged $30,141 for a single Bedrock inference run — no alert fired. FinOps teams reported burning an entire annual token budget four months into the year.

None of that is because models are expensive. It's structural: provider caps run off billing pipelines that lag by minutes to hours. That was an acceptable design when the worst case was a forgotten EC2 instance at $4/hour. An agent stuck in a retry loop moves faster than the billing system can observe it.

So I built a local one. This is the story of getting it wrong first, because the way it failed is more interesting than the fix.

Intercepting the calls