Show HN: agent-usage-guard – a Claude Code mod to protect your usage window
A developer has created 'agent-usage-guard,' a plugin for Claude Code designed to prevent runaway API spending caused by recursive subagent calls and heavy context usage. The tool allows users to set hard limits and monitor agent activity to avoid unexpected account lockouts.
Why it matters
As AI agents become more autonomous, managing costs and preventing 'infinite loop' spending is becoming a critical operational challenge for developers.
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 .
Get smarter about the news
Sign up free for a feed built around what you actually care about, Dive Deeper research on any story, and the full text of every article.
Create free accountAlready have an account? Sign in