rbartoli’s agent-usage-guard adds approval gates inside Claude Code for work that can quickly consume a subscription allowance. It targets developers running several coding sessions or delegating work to subagents, the smaller assistants a main session starts.
The October 22 releases add a reminder for each session to finish its current step when a usage window reaches 95%. Version 1.1.1 also fixes double-counting a resumed subagent.
- Before a burst: Defaults ask before exceeding four concurrent agents or twelve starts/resumes in ten minutes across sessions on one machine. Nested subagent spawning is refused.
- Near the plan limit: New agents need approval at 80% usage and are refused at 95%. The wind-down message to existing sessions is an instruction to Claude, not a forced shutdown.
- Heavy conversations and loops: It can ask before sending a prompt with 500,000 tokens of conversation context, offer to compress that history, and block repeated identical tool failures.
- Interactive or unattended: At the keyboard, decisions appear in Claude Code’s own question dialog. Without someone to answer, guarded operations are refused instead.
- Access and privacy: The code is MIT-licensed, with no separate licence fee. Claude access is still required. The README says the mod makes no network requests and retains local counters rather than prompt or output text.
Install inside Claude Code 2.1.287 or later, then inspect its status:
/plugin marketplace add rbartoli/agent-usage-guard
/plugin install agent-usage-guard@agent-usage-guard
/reload-plugins
/agent-guard status
/agent-guard report 7 shows recent interventions. Thresholds are configurable through environment variables or Claude Code’s settings.
Caveat: This is a usage-management aid, not a hard spending cap: hook failures generally allow work through, and other machines are outside its accounting.
The current changelog also lists unreleased fixes for plugin-triggered overrides and questions that end without an answer. Those safeguards should not be assumed present in the published 1.1.1 release.