Work

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

|Author: Viacheslav Vasipenok|3 min read| 17
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.

How One Team Burned ,000 on Claude in a Single NightThere’s just one brutal catch: the cache expires after only 5 minutes of inactivity.

The developer had set his loop to 30 minutes.

So the sequence was merciless:

  1. Loop fires → full history sent → everything gets cached (discount applies).
  2. 30 minutes pass → cache expires.
  3. Next loop fires → full history sent again at full price → new, even larger cache created.
  4. 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

How One Team Burned ,000 on Claude in a Single NightAnthropic’s usage dashboard updates with a delay of several days. There was no live counter, no real-time alert, no “you’re about to spend thousands” popup.

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:


The Fix Is Brutally Simple

How One Team Burned ,000 on Claude in a Single NightIf you’re running any kind of recurring `/loop`, scheduled agent, or monitoring task in Claude Code, you have exactly two safe options:

  1. Set the interval to 5 minutes or less so the cache never expires between runs.  
  2. 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.

Share:
0