Claude Code Subagents Gone Wild: Developer Burns 2.76M Tokens in One Go

swong8 · reddit · 2026-08-01

A developer reported that Claude Opus 5 subagents ran unbounded while analyzing a large codebase, spawning nested subagents and burning through 2.76 million tokens in a single task, which exhausted their 5-hour usage cap.

The developer suspects that Anthropic pruned system prompts in newer models, removing previous safeguards. The issue was compounded by harness defects where failed agents kept running in the background, and their reports failed to reach the main agent, triggering massive retry loops.

Best Practice: When using subagents, explicitly limit the count (e.g., to 3), forbid them from spawning their own subagents, and avoid running them in the background.

Original post →

More from coding & agent

coding & agent channel →