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
- One CLAUDE.md snippet stops Claude Code and Codex from using deprecated APIs — umeshonai · 2026-10-26
- HarnessMM paper cuts agent token use 87.9% on DeepSeek harness by reusing decisions — blaizedsouza · 2026-10-26
- NVIDIA open-sources SkillSpector, a security scanner for AI agent skills — NVIDIA · 2026-10-26
- Huashu Design 3.0 turns one agent prompt into deliverable design, 26k stars — alchaincyf · 2026-10-26
- OpenBot is a local-first desktop workspace for persistent AI teammates — nightly-labs · 2026-10-26
- Open-source agentic social scheduler Postiz hits 38k GitHub stars — gitroomhq · 2026-10-26