One research prompt: 394 Claude Code subagents, 341 at once, 84M tokens in ten minutes. Locked out.
So I built agent-usage-guard, a mod that caps agent fan-out across sessions and asks before heavy context burns your window. Free, MIT.
https://t.co/2zGWSSRZ3g
One email at 07:45 replaced my calendar, my RSS reader and the news sites I used to check.
467 headlines from 80 sources in, 30 out, each with why it matters to me. No API bill.
How it picks, and why I trust it enough to stop checking:
https://t.co/xoMC8rTda7
I priced six months of my Claude Code logs at API rates: $35,757, for about £700 in Max fees.
On Max 5x, a 5-hour window held a median $155 before the limit hit. 86% of that was the context sent again, not Claude's answers.
No sign the limits were cut.
https://t.co/f6MyCcVI8L
@PublicAI_ Not yet. The run compares the two ends: the bare harness and my full config.
On Claude Code, bare had the same success rate and the full config cost 1.35× as much, so on this benchmark the minimum was nothing.
A per-job config sits in between. That needs its own run.
My Claude Code config adds 8.8k tokens to every model call. Over a Terminal-Bench task, that's 1.35× the cost, with no gain in success. On Pi, 1.67×.
It's rent, not an entry fee.
540 runs, including a replication of Berkeley's HarnessTax:
https://t.co/UUcjZqZxFk
@SamuraiPhonk The main session is the one that runs into the limit, so once the window passes 95% the guard tells it to finish the step it's on and write down what's left for after the reset.yes
My agent loop told Claude Code to stop and ask when a decision was mine.
That stopped the agent, not the loop: the gate stayed red, so it ran the task again, and the next pass could guess.
The fix: a file the loop checks before the gate.
https://t.co/mxjb5lHwVJ
@TH33ORACL3 Claude Code now waits at the limit and carries on at reset, so that's close to the default. It just carries on mid-edit, hours later, with the cache expired.
Shipped agent-usage-guard 1.1.0. At 95% of your Claude Code window, every session now gets told to finish its step and say what's left, so a lockout finds them at a clean stop instead of mid-edit.
https://t.co/phtIaSsgG3
@tokenrouter Not a per-session token budget. It caps agents across every session on the machine: 4 at once, 12 starts and 10M subagent tokens per 10 min. It also asks before a prompt re-reads 500k+ tokens of context, and from 80% of your window. Write-up: https://t.co/vfXaHi2ti2
One research prompt: 394 Claude Code subagents, 341 at once, 84M tokens in ten minutes. Locked out.
So I built agent-usage-guard, a mod that caps agent fan-out across sessions and asks before heavy context burns your window. Free, MIT.
https://t.co/2zGWSSRZ3g
@tokenrouter It blocks. At the keyboard the call waits in Claude Code's own question dialog until you answer. With nobody there (claude -p, the SDK) it refuses and tells Claude why. Some rules always refuse: new agents at 95% of the window, and agents starting agents.
@HoagiemanApps Ha, honestly it's more impatience than patience. I didn't trust my eyes, so I got a robot to check for me. Bottling Bear's feel is the harder job, there's no test you can run for "nice to write in"
Made an Obsidian theme that's easy to read and easy to scan.
I didn't want to trust my eyes, so Tela is contrast-audited on 346 screens: notes, canvas, bases, menus, settings, dark and light, desktop and phone.
One optional setting. Free, MIT.
https://t.co/fj2TdQtE9R
@mariioalexandre Checked that run. Each subagent's first request was about 29k with the task included, so the starts came to about 10M, an eighth of the total.
The rest was the agents working.
@swordBluesy The second scene in the video is that test. Claude starts five agents with a limit of four, and the question comes up before the fifth one starts.
Agents running in other Claude Code sessions on the same machine count toward the four too.
@LankC11 Claude Code added one in July, four weeks after that lockout. It caps each session at 20 subagents running at once (CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS).
Nothing limits how many a session starts over time, though, and each session only counts its own.
@Joshua_WD Expensive lesson. Sixty days of logs afterwards showed it wasn't a one-off: 12 lockouts. So the cap had to be on by default, not something you remember to set.
@karanjagtiani04 Exactly, so it lives in a hook: the model asks for an agent, the mod decides. A refusal comes back with a reason the model can act on, so it waits or batches instead of retrying.