A hook cut Claude Code's usage bursts from 365 agents to 27
Claude Code kept burning through its usage window in minutes. A hook now warns before oversized submissions and blocks sub-agents above 80% usage. Over 75 days, the worst burst fell from 365 agents spawned to 27.
Done withClaude CodeSpotted· by HN user zzyyxx332211· Oct 23, 2026
Result Requests over 500k tokens: 14.5% down to 0.6%
“the biggest burst fell from 365 agent spawned to 27, and requests over 500k tokens of context from 14.5% to 0.6%”
Spotted: found in the wild. Details are as reported by the source above and have not been independently verified.
What they did
After repeatedly burning through their whole Claude Code usage window in a few minutes, they built a hook that checks for an expired cache and oversized content before a submission, suggesting a compact-then-send, and that blocks sub-agents from spawning once usage passes 80%. It tracks agents across every session on the machine and makes no network calls.
How it went
Over 75 days of use, the biggest burst fell from 365 agents spawned to 27, and requests over 500k tokens of context dropped from 14.5% to 0.6%. Lockouts still rose, since parallel main sessions also eat into the window.
Try it yourself with Claude Code
Write a Claude Code hook that fires before each submission: check whether the prompt cache has expired and the content is too big, and if so suggest compacting first. Also block new sub-agents from spawning once the usage window passes [80]% so you don't burn through your whole limit in minutes.
A starting prompt written by Agents in the Wild. Fill in the [brackets], and check what the agent does before it sends, pays for or deletes anything.
An image-processing problem, some sample data, and no one at the keyboard. Claude Code iterated, looking at the output image, until it fixed it. It spent at least an hour, untouched.
A 35,000-line PyQt desktop app for electrical engineering design had taken maybe 2500 hours over some years. Running OpenClaw on top of Claude Code, a two-sentence prompt converted it to a web app overnight.
Trying vibe coding for the first time, they had Claude Code, through Zed's agent integration, scaffold an isometric graphics editor with a few features. It worked, and about 45 minutes later they had a basic MVP.
Translating hundreds of phonetics papers into a working, citation-backed speech synthesizer would have taken years solo, they estimate. With Claude Code it's taken months, and they still catch its domain mistakes.
Their own Next.js orchestrator launches headless Claude Code and Codex sessions, reacts to GitLab and Linear, fixes CI failures, rebases and reviews. Built in 1-2 weeks of prompting, it leaves them refining tickets.