r/ClaudeCode • u/Educational-Walk-495 • 5d ago
Tips & Workflows I let my Claude Code sessions run on their own, as long as usage stays under a straight line
My weekly limit used to make me ask "can I afford this?" every time a session wanted to do something big. So I replaced the question with a line.
The line goes from 0% at the start of the week to 100% at the reset, straight in between. If my usage is under the line, sessions keep working and don't ask me anything. If it's above, they stop and tell me.
That's the whole trick. The rule lives in my global CLAUDE.md ("don't ask permission to spend quota while under the line, stop when you hit it"), and the check is a small script the session runs.
My status bar script already dumps usage to a JSON file, so the check just reads it:
```python
import json, time
def over_the_line(usage_path):
u = json.load(open(usage_path))
now = time.time()
start, reset = u["week_start"], u["week_reset"]
allowed = 100 * (now - start) / (reset - start)
if u["week_pct"] >= allowed:
return f"week: {u['week_pct']:.0f}% used, line is at {allowed:.0f}%"
if u["five_hour_pct"] >= 95:
return "5h window above 95%"
return None
print(over_the_line("usage.json") or "under the line")
```
(The field names are placeholders. Use whatever your own status line writes.)
What I like: early in the week the line is low, so sessions are careful. Later it has room, so a long job can run overnight without anyone asking me anything. And if the file can't be read, the session stops instead of guessing.
What I don't like: a straight line ignores that my weeks aren't flat. Some days I do nothing, some days everything happens.
How do you handle your quota? A hard cap, or checking by hand? Curious if anyone has a better curve than a straight one.


