Home/ Incident database/success-tax-47k-2025-12
Financial loss Runaway loop unverified

Runaway while-loop in Claude agent burns ~$47,000 in API tokens overnight

anonymous (engineering post-mortem) · Dec 1, 2025 · General agent

What happened

An engineering post-mortem titled 'The Success Tax' detailed a rogue while-loop in a Claude-based AI agent that ran unbounded overnight and consumed roughly $47,000 in API tokens. The write-up became a flagship example used to argue for 'AI circuit breakers' and FinOps-style cost controls on agents.

$47K
Loss / impact
Dec 1
2025
Runaway
Failure mode
General
Agent type

Causal vector

Unbounded agent loop with no token/cost ceiling or kill-switch

Source

Reported by Post-mortem reshared on LinkedIn. Sourced from a secondary summary; flagged pending a stronger primary source.

Read the original report ↗

How a spend firewall would have helped

This is the textbook runaway loop. A velocity cap (‘max N calls per minute’) and a daily total cap (‘max $X/day’) return BLOCKED on the call that would push spend over the ceiling, stopping the loop cold.

The six rule types that contain this class of failure

Per-transaction cap

Any single spend above your ceiling is BLOCKED before it moves.

Daily total

Cumulative spend across all agent calls, bounded per day.

Velocity limit

Stops runaway retry loops — the #1 cause of overnight losses.

Merchant allowlist

Only approved destinations can ever receive funds.

Category rules

Flag high-risk classes (crypto, infra, refunds) for review.

Approval threshold

Above a value, the action waits for a human.

Don't be the next entry

Every incident in this database is the result of trusting a prompt, a provider cap, or a human review cycle. sipi.bot replaces all three with one deterministic call. 27 documented failures, one control.