# Agent-usage-guard adds a Claude Code mod that holds runaway usage before it happens

> Original title: Show HN: agent-usage-guard – a Claude Code mod to protect your usage window

- Source: Hacker News · Show HN, AI (20+ points)
- Published: 2026-10-22T18:02:38.000Z
- Bad Influence: https://badinfluence.news/items/ftu84aajewjot4f6bvhxxvii0
- Original: https://github.com/rbartoli/agent-usage-guard

## Summary

Agent-usage-guard is a Claude Code mod that checks agent spawns, heavy prompts, and tool calls before they run to prevent a session from exhausting its five-hour usage window. It reads plan usage percentages, asks the user for approval when they are at the keyboard, and refuses actions when no one can answer. Installation requires Claude Code v2.1.287 or later, and the mod stores counts and coarse buckets locally with no network access.
