Idle subagents woke a pricey Claude 283 times a week

A Claude Code user has put numbers on a quiet cost of working with subagents, the helper agents a main session hands jobs to. In a comment on a GitHub issue about tokens wasted on “Waiting” notifications, they report that in one October week their main session was woken 283 times by task notifications, and 132 of those only said that a subagent was waiting on its own background work. They also share the workaround they now run and argue that the real fix belongs in Claude Code itself.
Where the tokens go
The setup is a common one for people who want to save money. A lead session runs on Opus, the expensive model, and hands whole tickets to subagents running on cheaper models. The trouble starts when a subagent launches a command in the background and then simply waits for it. Each time, the lead gets a notification, and each wake makes the lead re-read its whole context just to learn that the subagent is “still waiting”.
The worst cases in the week of October 23 to 29 were two subagents that started a background loop checking a log file every ten seconds for the word DONE. Those kept pinging the lead for 15 to 16 hours, until they were killed.
This is a different leak from the one Anthropic closed earlier in November. Then, Claude Code moved the status line it refreshes for each background subagent every 30 seconds over to Haiku 5.5, which writes it from short notes, cutting the cost of each update by about 99%. The notifications described here wake the lead model itself.
The workaround
The author uses a hook, a small script Claude Code runs before a tool is used. It only touches commands run inside a subagent, so the main session is never affected. When a subagent asks to run a shell command in the background, the hook quietly switches it to run in the foreground with a 10-minute timeout. A foreground command keeps no model request open, the author explains, so the subagent waits for free and doesn’t end its turn mid-job, and the lead hears nothing.
There are a few exceptions. A job that really needs more than 10 minutes can stay in the background if the command carries a # long-job comment, but never for a bare wait loop. Commands that start a process and leave it running are blocked unless the same command also stops what it started, which the author says also keeps forgotten dev servers from pinning the CPU.
They tested it on Claude Code 2.1.314: a subagent told to run a 150-second sleep in the background got the full output inline after 150 seconds, with no task created and no notification to the lead.
What comes next
The author plans to report how many wakes the lead gets after a week with the hook, compared with before. The hook is meant as a stopgap until Claude Code offers an option for this. The proper fix, they argue, is in Claude Code itself: a subagent that is only waiting on its own background work shouldn’t notify the lead at all, or at most once.
Up next
Some Claude refusals are billed like answers
Ask Claude’s newer models to write out their thinking in the answer and they may refuse. Anthropic’s API docs say that refusal is billed like any other request. Have you ever asked AI to show its reasoning before it answers?
Related stories
- Claude Code cuts subagent update cost 99%, session use 5%
- Dating app CEO says Claude erased skin-tone preferences
- Google stretches Neon quota in Antigravity by nearly 75%
- How to hand off PR chores to Claude Ship
- Claude Ship: Claude can now approve your pull requests
- GLM-5.4 arrives with vision and 50% more quota
Comments
No comments yet. Be the first.
Join the conversation
Sign in to leave a comment. It appears after moderation.

