How Claude Code limits work.
Claude Code enforces two rolling quotas on Pro and Max subscriptions: a 5-hour session window for short bursts, and a 7-day weekly window across all projects. Both reset automatically at the timestamp Claude Code reports — never at a fixed daily midnight.

The two windows: 5 hours and 7 days
When you send your first message after a quiet stretch, Claude Code opens a 5-hour session window. Every prompt, reply, tool call and subagent turn during the next five hours draws from that window until its reset timestamp arrives.
At the same time, every session draws from a rolling 7-day weekly window. The 5-hour bar protects against burning your whole week in one afternoon, while the weekly bar sets your ceiling across seven days of work.
Anthropic adjusts exact plan allowances over time and across models, so fixed token tables go stale quickly. The reliable number is the live percentage and reset timestamp that Claude Code itself reports for your account.
Why cache reads look huge in local logs
Claude Code writes a local JSON Lines transcript for each session inside ~/.claude/projects/<project>/<session>.jsonl. Each assistant reply records four token counters: input_tokens, output_tokens, cache_creation_input_tokens and cache_read_input_tokens.
On a long coding thread, cache_read_input_tokens quickly climbs into the millions because every tool step re-reads the cached conversation prefix. Cache reads are cheap and fast; actual new work comes from input, output and cache writes.
Two habits burn through a 5-hour window fastest: keeping one giant conversation open across unrelated tasks, and spawning several parallel subagents that each build their own fresh cache.
Four ways to check your budget on a Mac
- Type /usage inside Claude Code: built in and exact, but only visible inside one terminal tab when you stop to ask for it.
- Configure statusLine in ~/.claude/settings.json: Claude Code pipes a JSON object containing
rate_limits.five_hourandrate_limits.seven_dayto a shell command after each turn. - Run a log analyzer like ccusage: great when you want a terminal table of historical API-equivalent cost from local JSONL files, though log math alone cannot read your live Pro or Max plan percentage.
- Put Claude Usage in the Dockspace bar: one click in Settings › Buddy chains a tiny local script onto your
statusLine(keeping your existing terminal status line intact) so your live session and weekly percentages, reset countdowns and pace mark stay visible beside the macOS Dock — never clipped behind a MacBook notch.
Pace marks and 13-week API value
Raw percentages are hard to judge without knowing how much time is left in the window. Using 60% of your weekly cap on Saturday night is comfortable; using 60% on Tuesday morning means you will run dry before Friday.
Hovering or clicking the Claude Usage or Codex Limits tile in Dockspace opens the agent detail dashboard:
- Pace mark on both bars: shows how much of the 5-hour or 7-day clock has elapsed right next to how much quota you used.
- API-equivalent value & cache share: switches between Today, 7 Days, 30 Days and 13 Weeks so you see what your local tokens would have cost at API rates and what percentage came from cache.
- 13-week activity grid: plots daily activity across 91 days alongside your active day count and busiest day.
Practical ways to stretch a session
- Run
/clearas soon as you finish one feature or bug so the next task starts with a lean prompt instead of carrying old file reads forward. - Run
/compactbefore a long debugging thread forces repeated cache rebuilds. - Check your weekly pace mark before launching parallel subagents or switching to heavier reasoning models.
- Keep Codex or Antigravity visible in the same AI Limits tile so you can hand routine edits to a second agent when your Claude session window is near 90%.
Dockspace runs on macOS 14 Sonoma or later (Apple silicon and Intel) and starts free with 10 permanent widgets. AI limit widgets and the live Coding Agents board are part of Pro: $11.99/year or from $19.99 once, with a 14-day refund.
Common questions
- When does the Claude Code 5-hour session limit reset?
- Your 5-hour window starts when you send your first prompt after an idle gap, not at midnight. It resets five hours after that window opened, at the exact timestamp Claude Code reports to /usage and its status line.
- Why do my ~/.claude JSONL logs show millions of tokens in one session?
- Most of that total is cache_read_input_tokens: Claude re-reading cached conversation context on every turn. New work comes from input_tokens, output_tokens and cache_creation_input_tokens, which are much smaller.
- Does Dockspace need my Anthropic API key or account login?
- No. Dockspace reads the plan percentages that Claude Code itself sends to your local status line script, plus the local JSONL logs in ~/.claude/projects on your Mac. Nothing leaves your Mac.
- What happens if I hit the weekly limit before the 5-hour limit?
- Even if your 5-hour session bar has room left, hitting the 7-day weekly cap pauses plan usage until the weekly reset timestamp passes (unless extra usage billing is enabled on your Anthropic account).
Free to start. Yours to keep.
macOS 14 Sonoma or later · Apple silicon and Intel. Download the disk image and try ten widgets free forever, or unlock all 174 with Pro.