How One Team Burned $6,000 on Claude in a Single Night

It started as a perfectly reasonable automation.
A developer set up a simple `/loop` command inside Claude Code. Every 30 minutes the AI would scan his open pull requests, review the latest changes, and post comments. Convenient. Set it and forget it.
He launched the loop in the evening, closed his laptop, and went to bed.
Twenty-six hours later he woke up to an email from Anthropic: his account had blown past every spending limit. The final bill?
$6,000.
Not for a massive codebase. Not for thousands of complex agents. For one forgotten loop that ran 46 times on Claude Opus 4.7.
The Billing Trap Nobody Talks About
Here’s what actually happened — and why it got so expensive so fast.
Every time the loop triggered, Claude didn’t just look at the latest changes. It received the entire conversation history from the very first message. That’s how the Claude API works by design: full context on every request.
- Iteration 1: ~200 tokens;
- teration 46: 800,000 tokens.
The history didn’t just grow linearly. Each successful review added the AI’s own long, detailed output back into the thread. The context ballooned like a snowball rolling downhill.
The Cache That Almost Saved Him (But Didn’t)
Anthropic does offer prompt caching — a 12.5× discount on repeated input tokens. In theory, it should have made this kind of recurring task cheap.

The developer had set his loop to 30 minutes.
So the sequence was merciless:
- Loop fires → full history sent → everything gets cached (discount applies).
- 30 minutes pass → cache expires.
- Next loop fires → full history sent again at full price → new, even larger cache created.
- Repeat 46 times.
By hour 20 the context window had swollen to 800k tokens. Every single iteration was now re-uploading and re-caching almost the entire previous conversation at the most expensive rate. The actual useful work (reviewing PRs) was a rounding error. The monster cost was the repeated full-context re-caching.
No Warning, No Mercy

The first sign of trouble was the angry email about exceeded limits.
By the time he saw it, the damage was already done.
Also read:
- Time’s Up for SaaS: Grow Faster or Disappear
- Twitter Dev Builds “Stukach-Claw” — An AI Snitch Bot That’s Already Reported 4,250 People to the IRS for Tax Jokes
- Baidu Drops ERNIE-Image: A Compact 8B Open-Source Text-to-Image Model That Tops the Charts
The Fix Is Brutally Simple

- Set the interval to 5 minutes or less so the cache never expires between runs.
- Start a completely fresh session for every iteration (no shared history).
Anything in between is playing Russian roulette with your credit card.
The developer in this story is far from the first person this has happened to — he’s just the one whose story went viral. Similar silent $1k–$3k burn-downs have been quietly reported in Claude developer communities for months.
Claude is still one of the best coding models on the planet.
But it is also, right now, one of the easiest ways to accidentally set your API budget on fire while you sleep.
Sleep well. Just don’t forget to kill your loops.