6 Claude Code agents burned tokens on idle loops until one exit fix cut costs 6×
Icy_Comfort_6220 · reddit · 2026-07-21
A small zero-human publishing setup running 6 Claude Code agents found that the biggest cost driver was not model price, but orchestration mistakes and idle loops.
What went wrong
- The orchestrator used a frontier model for simple triage.
- Heartbeat runs kept waking up, finding nothing to do, and failing to record a clean exit.
- That caused re-wakes and repeated empty runs, which quietly burned tokens.
What changed
- Right-sized the models: routing/triage agents moved from Sonnet 4.6 to Haiku 4.5, while the Writer and Researcher kept the stronger model.
- Added an early-exit gate: if no work is assigned, the run exits immediately before doing deeper checks.
- Used prompt caching for the large static system prompt.
- Added per-agent budgets with soft alerts.
Cost impact
- Orchestrator heartbeat: about $0.40 → $0.06 when idle, or $0.11 when it actually works.
- A typical idle heartbeat now costs $0.06 and exits in 8 seconds.
- The writer remains the biggest cost line item, but that is acceptable because it is the actual product.
The core lesson: the real problem was frequency × giant prompts × idle loops, not token price alone. A cheaper model would have hidden the bug instead of fixing it.
Related event: Recursive Loops in Claude Code Agents Cause Cost Spikes(2 posts)→
More from coding & agent
- Astra storyboards plus Minimax H3 per-shot generation boost video success rates — Hailuo_AI · 2026-09-11
- Codex tip: use Sol with Astra and Luna sub-agents to save usage — pvncher · 2026-09-11
- agents-best-practices: a provider-neutral Agent Skill for designing and auditing agentic harnesses — tom_doerr · 2026-09-11
- Cognition's SWE-2 uses a KKT duality argument in RL to shift the effort Pareto curve — YouJiacheng · 2026-09-11
- First-ever Three.js Conference lands in Paris, with a panel on AI-shortened design workflows — OdinLovis · 2026-09-11
- Agile co-author Ron Jeffries publishes 'Resist AI', urging developers to push back — mborch · 2026-09-11