You are mid-refactor at 1:40 PM. Claude Code stops answering and shows a usage-limit warning with a countdown. That countdown is the 5-hour limit, and the first thing most people get wrong about it is assuming it resets on a fixed clock.
It is a rolling window, not a daily reset
The 5-hour window on Claude subscription plans does not reset at midnight or on the hour. It starts counting from the first message you send in a session block and ends five hours after that first prompt. Hit the cap at 1:40 PM after starting your block at 9:00 AM, and you wait until 2:00 PM, not until some global reset time.
Exact allowances differ by plan tier, and Anthropic adjusts them over time. Treat any specific token number you read, including ours, as a snapshot rather than a contract, and check your live status with the /status command inside Claude Code. Weekly usage caps sit on top of the 5-hour windows on every plan, so heavy weeks can trigger a second wall even when each individual window felt fine.
What actually burns the window
The window tracks how much context you push through it. Prompt-cache discounts reduce what you pay, but they do not stretch the window: cached or not, every token re-sent still flows through the meter. Volume is what matters, and coding agents are wasteful customers:
- Full-file reads on big modules. The agent opens a 1,500-line file to check one function. The other 1,475 lines ride along at full weight.
- Conversation re-sends. Every turn re-sends the accumulated history. A 20-turn session with a 50,000-token payload pushes roughly 1,000,000 tokens through the window, whether or not anything changed.
- Verbose test and build dumps. Failed suites dump hundreds of lines of logs into context, and the agent re-reads that noise on every later turn.
- Parallel background agents. Two subagents on the same account burn the same window twice as fast.
A concrete shape: a multi-file task with raw reads pushes 150,000 to 250,000 tokens through the window in a morning. The same task with sliced reads stays under roughly 12,000. These are illustrative examples sized against measured aggregates in the public real-repo benchmark, not exact quotes for your repo.
How to make the same window last all day
Ranked by what actually moves the needle:
- Shrink what each read sends. Keep the function being edited, fold the rest into signatures. This is the single biggest lever.
- Stop re-reading unchanged files. Identical bytes across turns should hit a local cache, not the window.
- Keep test output short. Failing assertions in, passing logs out.
- One heavy session at a time. Queue background agents for off-peak hours instead of running them midday.
- Match the plan to the workload. If you consistently hit the wall on a lighter tier, upgrade math may beat optimization math for a while. Do both if AI is how you ship.
The measured version
We replayed a 20-turn Claude Code session over a real Python repository and priced every turn. The uncached baseline pushed 1,420,800 input tokens through the windows across 20 turns. With local AST slicing and prefix locking, the same 20 turns pushed 220,200: an 84.5% cut in raw wire volume, with 90.8% of the remainder served at Anthropic's cached rate. The full turn-by-turn table is in our Claude Code session audit, and the cache mechanics are in KV-cache prefix locking explained.
Cutting input volume by ~85% is the difference between the window dying before lunch and the window covering a full workday. That is the entire game: the limit is fixed, the volume is not.
Set it up once
npx tokensafe@latest init
TokenSafe hooks into Claude Code locally and slices reads before they leave your machine. Your 5-hour windows start behaving like full workdays. See the quickstart docs or start a 7-day team trial to stretch the windows across your whole team.
The 5-hour limit is not a wall. It is a bucket with a hole in it. Plug the hole, and the same bucket lasts all day.