Incident: An unattended loop found on the bill
Module 14 · Incident file · About 30 minutes
What happened
On 17 March 2026 a Claude Code user, jialejiahi, opened GitHub issue #35166 on the anthropics/claude-code repository: "Claude Code sends repeated requests hundreds of times without stopping". The report reads: "Claude Code entered an infinite loop, repeatedly sending the same requests for several hours (~1 minute interval between each). This resulted in $500+ of unexpected token usage."
The steps to reproduce describe an unattended run. More than 100 MCP tools were configured, and the report says their definitions took "~33.4%" of the context window, with 42% used "before any conversation begins". The context ran out during a task; the user ran /compact, asked "Please finish the last task", then left. "Next day: the task is still running. Check the bill → $500+ spent on repeated requests."
The cause in the report is labelled a "Root Cause Hypothesis": after compaction the agent "Immediately runs out of context again" and "Retries", "repeating this loop indefinitely". The reporter asked for loop detection, "a maximum retry limit or cumulative cost guardrail for unattended sessions".
Other users replied with their own guards: a hook that "tracks the last N tool calls and aborts if it sees the same call repeated more than 3 times in a row", and a rate limit of "30 events per minute per user". The thread holds no reply from Anthropic. A bot closed it on 17 April 2026 as inactive, with the state "not planned". This is one user's report, with figures the vendor has not confirmed. An earlier report, #15909 (31 December 2025), describes a similar pattern: one npm install command run "300+ times" over "~4.6 hours", consuming "~27 million tokens".