Original Reddit post

In our project, Claude Code already runs mostly on its own. Tasks are tracked and logged automatically, and it works through them with minimal input from a developer. What stops it from running truly autonomously for long stretches is two walls it can’t see coming: it hits the usage limit halfway through a task and stops, or it gets auto-compacted mid-edit and loses the thread. Both come down to the same gap. Claude can’t see its usage limits, can’t see how full its context is, and can’t compact on its own. So it can’t plan around either wall, and someone still has to step in. Give it those three things, and it can handle both walls by itself: Limit running low? It saves where it stopped, waits for the reset, and picks up where it left off. Context filling up? At a natural break it writes what matters to files, compacts, reads them back, and carries on. Nothing important gets lost, because it decided what to keep. What I’m proposing Show Claude its limits — how much of the 5-hour and weekly limits is left, when they reset, what each agent has spent so far. Show Claude its context — how full it is, so it knows whether the next step fits. Let Claude compact on its own — when it judges the moment right, after saving its notes to files. Three changes, one payoff: an agent you can hand a task to, instead of one you babysit. It also wastes less along the way: no army of agents for a small job, no paying to resend stale context with every message. Why I built the repo — and what you can use today I built as much of this as hooks allow: claude-code-hooks Limits and context, for Cla. Before every message the model gets a short block with each limit and how full its context is, plus a rule that turns the numbers into behaviour: match the effort to the task, and if the work won’t fit before the wall, write down where it stopped so it can resume after the reset. The same, for you. A status line with your limits and your context. A brake on agents. Near a limit it asks you once; right at the edge it refuses. The rest of the kit: a log of what actually happened in each session, a sound when Claude finishes or needs you, working rules, and a reviewer agent that checks every change. No Node, no Python — small ready-made programs for macOS, Linux and Windows. Easiest install: open Claude Code in your project and ask it to install the repo. Why the issue — and why it needs you I couldn’t find a way to give the model a compact button from a hook. Hooks also lean on an undocumented endpoint and cost tokens on every message. The real fix belongs in Claude Code, so I filed it: issue #81691 The catch: requests there get auto-closed when they go quiet. An earlier request for self-compaction was closed just last week as “inactive for too long”. Another one got most of its 👍 after it was already closed. So if you want Claude to work more on its own, leave a comment with your story — not just a 👍. Comments are what keep an issue from going stale. submitted by /u/RomanKryvolapov

Originally posted by u/RomanKryvolapov on r/ClaudeCode