# I was maxing my Claude 5-hour limit daily and still wasting weekly quota every night, so I built a tool that spends it while I sleep

> Source: <https://dev.to/rohanprichard/i-was-maxing-my-claude-5-hour-limit-daily-and-still-wasting-weekly-quota-every-night-so-i-built-a-5bmi>
> Published: 2026-07-27 18:23:40+00:00

Like a lot of you I hit the 5-hour cap most days. What actually annoyed me was realizing the weekly limit doesn't line up with that. Even capping out daily, I ended every week with quota unused. It expires overnight even after I paid for it.

So I built [claude-overnight](https://github.com/rohanprichard/claude-overnight). I queue questions during the day, `/queue how do sqlite WAL checkpoints work?`

right inside Claude Code, and a scheduler runs them at night once my limits reset, through `claude -p`

on the subscription. Morning brings markdown reports and a digest of what ran and what happened.

Every job saves its claude session, so `overnight resume <id>`

reopens the conversation that wrote the report. You can argue with it about its conclusions over coffee. Or `overnight followup <id> "go deeper on X"`

and it continues tomorrow night.

Coding tasks work too. They run in a throwaway git worktree on an `overnight/*`

branch, only against repos I've explicitly trusted, so the agent never touches my working tree. Morning review is just `git diff main..overnight/whatever`

.

Since people will ask how it reads limits when there's no official API: Claude Code stores an OAuth token locally (Keychain on Mac, `~/.claude/.credentials.json`

elsewhere), and `GET https://api.anthropic.com/api/oauth/usage`

with that token plus an `anthropic-beta: oauth-2025-04-20`

header returns your 5h and weekly utilization with reset times. Same trick the menubar trackers use. It's undocumented and the response shape already changed once while I was building this, so the tool survives without it.

The design constraint I cared most about: don't eat my own morning quota. It won't start above 20% of the 5h window, stops at 60%, skips entirely past 80% weekly, rechecks between jobs.

In the morning it opens a page in the browser with the whole batch on it — what ran, how long it took, the resume command for each one, and every report rendered inline so you're not clicking through files half-awake.

Check it out at [https://github.com/rohanprichard/claude-overnight](https://github.com/rohanprichard/claude-overnight)

Curious what you'd queue overnight, honestly. Let me know!
