Developer's AI Orchestrator Burned Millions of Tokens Due to Stacked Design Flaws
A software developer building an orchestration system on top of Claude Code discovered it was consuming 1–2 million Opus tokens per task, even for minor code changes. The excessive cost stemmed from three compounding factors: all subagents defaulted to the most expensive Opus model tier because no model parameter was explicitly set, each phase spawned fresh subagents that bypassed prompt caching and incurred cold-write costs, and a mandatory five-phase pipeline triggered on virtually every actionable request. The developer noted that the Opus-to-Haiku cost difference is 5x, while Opus-to-Sonnet is only 1.7x, meaning model selection was actually the smallest of the three cost multipliers. Prompt cache misses — caused by slightly different system instructions per phase — proved to be the most significant driver, as the same repository context was re-loaded and billed at full price each time. The postmortem concludes that correctness-focused design rules, when left unexamined through a cost lens, can silently produce extreme token expenditure at scale.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in