Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By rbartoliv1.2.1MITIn 2 marketplaces
A Claude Code mod that holds subagent fan-out, heavy-context prompts and retry loops before they spend your usage window. It reads your plan's usage, counts agents across every session, and asks in Claude Code's own dialog.
Trending plugins
7-day copy clicks
Code that runs inside Claude Code on every session, as you, unsandboxed.
1 critical to review before installing
JavaScript or TypeScript that runs inside Claude Code as you, unsandboxed. Read from its source, it sees, changes or blocks tool calls; reads files; reads environment variables (AGENT_GUARD, AGENT_GUARD_AGENT_MAX, AGENT_GUARD_AGENT_TOKENS_MAX, AGENT_GUARD_BURN_PERCENT, AGENT_GUARD_CONTEXT_HARD, AGENT_GUARD_CONTEXT_WARN, AGENT_GUARD_DEPTH_MAX, AGENT_GUARD_DORMANT_CONTEXT, AGENT_GUARD_DORMANT_MAX, AGENT_GUARD_DORMANT_SECONDS, AGENT_GUARD_FUSE_MAX, AGENT_GUARD_FUSE_SECONDS, AGENT_GUARD_HAIKU_EXEMPT, AGENT_GUARD_JOURNAL, AGENT_GUARD_JOURNAL_DAYS, AGENT_GUARD_LIMIT_ASK_PERCENT, AGENT_GUARD_LIMIT_DENY_PERCENT, AGENT_GUARD_PEER_TTL_SECONDS, AGENT_GUARD_ROLLING_MAX, AGENT_GUARD_TOOL_CONTEXT, AGENT_GUARD_TOOL_FAILURE_MAX, AGENT_GUARD_TOOL_MAX, AGENT_GUARD_WINDOW_SECONDS); reads or rewrites your prompts; sends prompts on its own.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
2 marketplaces, most starred first
mod, usage, rate-limit, subagents, context, guardrails, cost
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Stops Claude Code from spending your five-hour usage window in ten minutes.
agent-usage-guard is a Claude Code mod: it runs inside Claude Code and holds runaway spend before it happens. It reads your plan's live usage, and it holds subagent fan-out, heavy-context churn and retry loops.
Recorded from Claude Code's interactive UI with the guard loaded. A scripted local API stands in for Claude, so the sessions and token counts are staged and no usage is spent. Every question on screen is the guard's own. Rebuild it from the Northstar fixture.
It acts before the spend, not after it: before an agent starts, a prompt is sent, or a tool call runs. Agent limits hold across every Claude Code session on your machine, and fan-out and heavy context are capped at any usage level, not only near the limit. When you are at the keyboard it asks you, in Claude Code's own question dialog. When nobody can answer, it refuses and tells Claude why, so the model can wait, batch the work, or stop. /agent-guard report shows what it did.
Run these commands inside Claude Code v2.1.287 or later:
/plugin marketplace add rbartoli/agent-usage-guard
/plugin install agent-usage-guard@agent-usage-guard
/reload-plugins
Then run /agent-guard to see what it sees, and /agent-guard simulate concurrency to see the question it asks when too many agents run, with nothing held or spent. Mods are on by default; the overview lists the settings that turn them off.
One afternoon I gave Claude Code a research prompt at max effort. It spawned 394 subagent calls, 341 of them running at once, and pushed 84M context tokens through the API in ten minutes. Session over: "Claude usage limit reached." Locked out until the window reset.
That wasn't a one-off. Sixty days of my own logs held 12 lockouts and 166 ten-minute windows with agent bursts. The failure mode multiplies: a large context × rapid tool loops × parallel agents × blind retries. Each protection below removes one factor.
And it's not just me: 339 subagents from a single prompt, half a weekly Max plan consumed by recursive spawning, and multi-agent runs using ~15× the tokens of a chat session.
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub rbartoli/agent-usage-guard --plugin agent-usage-guardPlugins from other owners that cover similar ground