Developer releases agent-usage-guard, a Claude Code mod to cap token spend
A developer has published agent-usage-guard, a modification for Claude Code that intervenes before prompts, tool calls or subagent fan-outs run, aiming to prevent a five-hour usage window from being exhausted in minutes. The tool reads Claude Code's own 5-hour and weekly usage percentages, prompts the user for approval when possible, and refuses actions when no one is available to answer. It runs entirely locally, storing only counts and coarse buckets rather than prompt or output content.
GoKawiil's interpretation of the reporting above, not reported fact.
As AI coding agents increasingly chain subagents and retries autonomously, runaway token consumption has become a practical cost and availability problem for users on metered plans. This community-built guardrail suggests demand for finer-grained control over agent behavior than platforms currently offer natively, and its 'fails open' design indicates an effort to avoid becoming a new point of failure. Its privacy-minimal, local-only approach could appeal to users wary of sending usage data externally.
- agent-usage-guard blocks or delays Claude Code actions before they consume usage, not after.
- It tracks official 5-hour and weekly usage percentages and asks for human approval via Claude Code's dialog interface.
- The tool runs locally with no network access, storing only coarse usage data and never prompt or output content.
Source: github.com, 2026-10-22
Published there as: “Show HN: agent-usage-guard – a Claude Code mod to protect your usage window”
Read the original report → The summary and analysis above are GoKawiil's own, written from reporting by the source above. Facts and quotes belong to the original publisher.