Show HN: agent-usage-guard – a Claude Code mod to protect your usage window
zzyyxx332211
23 points
9 comments
October 22, 2026
Related Discussions
Found 5 related stories in 129.4ms across 10,306 title embeddings via pgvector HNSW
- Show HN: Policy enforcement for Claude Code, Cursor, and Codex carlosjimenez1 · 12 pts · July 09, 2026 · 67% similar
- Show HN: OpenAPPA – open-source deterministic guardrails that don't break agents motakuk · 23 pts · September 28, 2026 · 63% similar
- Show HN: A local merge queue for parallel Claude Code agents funador · 26 pts · July 30, 2026 · 63% similar
- Agent-Manager: A Tmux TUI for Running Claude Code, Codex and OpenCode yoanwaidev · 95 pts · July 30, 2026 · 62% similar
- Show HN: Littleguys – Claude Code, Codex and OpenClaw agents in your menu bar herval · 15 pts · October 11, 2026 · 62% similar
Discussion Highlights (2 comments)
Robin_Message
I was under the impression a compact resurrected the session anyway so it is not a good idea on a cold session. Is that true or is it actually cheaper?
zzyyxx332211
After consuming my whole usage window in a few minutes multiple times, I realised I needed a hook to do some checks for me and prompt me before submitting when cache had expired and content is too big, so that it can suggest me to "compact then send". It can also prevent sub-agents from spawning when above 80% usage window. Control is handed over to the user. The first I built, based on hooks (run for 75 days), the biggest burst fell from 365 agent spawned to 27, and requests over 500k tokens of context from 14.5% to 0.6%. Lockouts still went up, because lots of parallel main sessions use up the window too. The strength is that it counts agents across every session on the machine. I built https://github.com/rbartoli/agent-usage-guard , MIT-licensed, makes no network calls, needs Claude Code 2.1.287 or later. I have also a post on this: https://rblab.com/what-stops-claude-code-burning-your-usage-...