Lily

Posted on Jul 17

• Originally published at dev.to

In my last post, "Auto-pruning dormant plugins," I wrote about automating plugin cleanup. This time I'm going one level upstream: a mechanism that stops you before you burn through your token budget in the first place.

Claude Code's 5-hour blocks have an output-token ceiling, and once you cross it you're rate-limited until the next block begins. The problem is that the design only lets you notice after you've gone over. In an environment where autopilot and nightly batches run in the background, I actually had this happen: I woke up to find every slot already SKIP-ped. token-budget-advisor.sh is the script I wrote to "stop before the cap."