Introduction
A multi-agent pipeline looks elegant on paper: an orchestrator hands tickets to a lead, the lead distributes work to specialists, and everyone reports back when finished. In practice, the waiting between steps can become expensive. This post examines a real case where an AI lead agent spent hours doing nothing but sleeping and checking a task board, burning through millions of tokens in the process. It also explains the structural and operational changes that stopped the waste.
What Happened
The pipeline had three layers: an orchestrator session, a lead agent that owned a ticket board, and worker teams that wrote code and ran tests. The board lived as files on disk, so the lead could check status with a single shell command. The problem appeared when runs slowed down and costs doubled. The lead stopped responding to corrections for half a day because its context had been overwritten by its own polling loop.
Digging into the logs revealed a clear pattern. The agent would sleep for several minutes, grep the board for status, sleep again, and repeat. Of 303 tool calls, 55 were wasted sleeps—nearly 20 percent. A wasted sleep was defined as any pause longer than 100 seconds followed only by board checks. The median sleep ran about 235 seconds, with some stretching to 600 seconds. Across a 19.3-hour window, the lead spent 3.66 hours asleep. While blocked, it could not accept new instructions or fixes.
The token math was striking. Those 55 wake-up turns processed roughly 13.5 million tokens, more than a quarter of everything the lead had handled up to that point. Most of that volume was the same context being re-read from cache. If the agent had simply waited for completion and checked in about five times, the same logic would have cost roughly 1.2 million tokens instead.
Why This Matters
Polling is easy to implement and easy to read in a transcript, but it hides real costs. Every wake-up pulls the full agent context back into the model. Even when prompt caching keeps the per-token price low, millions of repeated reads add up fast. More importantly, a sleeping agent is an unresponsive agent. It cannot take corrections, accept redirects, or respond to human input until it wakes up.
This is not just an Anthropic or Claude issue. Any team building hierarchical AI agents on top of language models can run into the same trap. The deeper the chain of command, the harder it is to see what the middle layer is doing unless someone deliberately goes looking.
Key Takeaways
- Define wasted activity before you measure it. In this case, any sleep over 100 seconds followed only by status checks counted as waste.
- Token cost comes from volume, not just price per token. Cheap cache reads still add up when repeated dozens of times.
- Structural depth creates blind spots. Every extra layer between a human and the working agent is a layer where problems can hide.
- Rules belong in agent definitions, not single-turn prompts. A simple instruction to stop polling is easily forgotten; baked-in constraints persist across runs.
- Small fixes need a fast lane. Minor changes should not go through the same ceremony as full feature work.
Conclusion
The fix had two parts. First, the team flattened the architecture, removing the orchestrator layer so work could be monitored directly. Second, they changed how the lead waits. Sleeps now require a documented reason, and the preferred alternative is a scheduled reminder to check in. Workers still wait, but only on processes that finish by themselves, such as a test suite or a status script.
Two weeks of observation showed the change worked. The lead made 75 additional tool calls with zero wasted sleeps, and ten subsequent leads had none. Median time for small tooling fixes dropped from 23.2 minutes to 5.6 minutes, with the share completed within 15 minutes rising from 27 percent to 71 percent.
The broader lesson is simple: if you run agents that wait on other agents, count the turns that do no work. Define what waste looks like before you start counting, and align your polling intervals with your cache lifetime. Inside the cache window, cost hides. Outside it, every wake-up can rebuild context at a steep multiple of a standard read. One careful look at the logs turned a silent, expensive habit into a solvable problem.

Discussion
Join the conversation
Thoughtful reactions, questions, and follow-up ideas help shape the next story.