Claude Code Stopped Mid-Task: Which Usage Limit You Hit and How to Resume

Claude Code halts a refactor with 'usage limit reached.' Tell apart the 5-hour window, the weekly cap, and the separate Opus cap, save state, and resume without redoing work. Verified for June 2026.

You’re halfway through a multi-file refactor. Claude Code stops generating and prints something like Claude usage limit reached. Your limit will reset at 4:00 PM. Three files are changed, two still need work, and the agent has no memory of where it was. Come back tomorrow and you start cold.

The fix is not “wait it out.” Claude Code enforces three separate limits, and each one has a different recovery path:

  • A 5-hour rolling window that starts on your first prompt and resets five hours later.
  • A weekly cap (rolling 7-day window) that sits on top of the 5-hour window. Anthropic added it on August 28, 2025.
  • A separate weekly Opus cap — Opus 4.7 can run dry while Sonnet 4.6 and Haiku still have room.

Critically, all three are shared across Claude Code, Claude.ai chat, and Claude Cowork on the same account: tokens you spend in the browser eat into your terminal quota. The job is to identify which limit fired, snapshot your state to disk before you burn another token retrying, and structure future tasks so a limit hit never costs you the whole session.

TL;DR

  1. Stop. Don’t retry — every retry spends quota you may not have. Write a STATUS.md and git commit first.
  2. Run /usage (in-app) to see which bar is full: 5-hour, weekly, or Opus weekly.
  3. If only Opus is exhausted, switch with /model sonnet (or /model haiku) and keep working.
  4. If the 5-hour window is full, note the reset time and resume after it.
  5. If the weekly cap is full, no amount of waiting hours helps — only the 7-day window resets it. Switch models or upgrade.
  6. Resume from STATUS.md in a fresh session, never from agent memory.

Which limit did you hit?

Run /usage inside Claude Code. As of June 2026 this is the canonical command — it prints an ASCII progress bar for each bucket directly in the terminal. (The older /cost command only shows running spend and is meant for API-key users, not Pro/Max subscribers.) Match the symptom below.

Symptom in the error / /usageLimit that firedWhat actually fixes it
”resets at [time today]” or a reset in hours5-hour rolling windowWait for the reset, or switch model tier
”resets [date]” or a reset in daysWeekly cap (7-day window)Switch model, or upgrade plan — hours won’t help
Opus errors but /model sonnet worksSeparate weekly Opus capMove non-critical work to Sonnet/Haiku
”Claude is at capacity, try again” with no reset timeServer-side 429 (not your quota)Wait 1-2 minutes and retry

The single most common mistake is treating a weekly-cap hit like a 5-hour hit. If /usage shows the weekly bar full, waiting until your 5-hour window rolls over does nothing — the weekly cap gates you until the rolling 7-day window clears.

Common causes, by hit rate

  1. 5-hour window exhausted on the current model. The window starts on your first prompt of the block, not on a fixed clock — fire your first prompt at 11 AM and it resets at 4 PM. As of June 2026, Pro gets roughly 10-45 prompts per window, Max 5x roughly 50-225, and Max 20x roughly 200-900. (Anthropic doubled these 5-hour limits on May 6, 2026, and removed the old peak-hour throttling for Pro and Max.)
  2. Weekly cap exhausted. Pro covers roughly 40-80 hours of Sonnet per week; Max 5x roughly 140-280 Sonnet hours plus 15-35 Opus hours; Max 20x roughly 240-480 Sonnet hours plus 24-40 Opus hours. Anthropic added a temporary 50% bump to weekly limits running through July 13, 2026.
  3. Separate Opus weekly cap exhausted while Sonnet still has runway. This is the surprising one: Opus 4.7 has its own, smaller weekly sub-cap, so it can stop while /model sonnet keeps working.
  4. A long session was denser than it looked. A 3-4 hour agentic run with heavy Read / Grep / Bash tool calls burns tokens far faster than your message count suggests — each tool result is re-fed into context.
  5. Parallel sessions competing for one quota. Two Claude Code instances (terminal + IDE), or a background agent, draw from the same account pool. Internal sub-agents launched via the Task tool also share the parent’s quota.
  6. A 429 mistaken for a quota limit. “Claude is at capacity, try again later” is a transient server throttle, not your quota. It has no numeric reset and clears in a minute or two.

Shortest path to fix

Step 1 — Snapshot state before doing anything else

Every retry spends quota you might not have. Capture state first. Paste this prompt:

Before doing anything else, write a STATUS.md in the repo root containing:
- Task: <one sentence>
- Files changed so far (full paths)
- Files still to change (full paths)
- Decisions locked in (e.g., REST not GraphQL)
- The exact next step to resume from
Then run: git add -A && git commit -m "wip: <task>"

The checkpoint commit plus STATUS.md is your resume point. If the session already died and the agent can’t respond, write STATUS.md by hand and commit from your own terminal.

Step 2 — Read /usage and route accordingly

Use the table above. If only the Opus bar is full, you do not need to wait at all — go to Step 3. If the 5-hour bar is full, note the reset time. If the weekly bar is full, plan around the 7-day window or consider an upgrade.

Step 3 — Switch model tier when only one model is capped

/model sonnet
# or, for the cheapest tier:
/model haiku

Sonnet 4.6 handles the vast majority of coding work and draws on the broader weekly pool, so switching off Opus 4.7 frees you immediately when only the Opus cap is hit. Reserve Opus for the genuinely hard reasoning step once its window resets, and route low-risk work — file moves, simple edits, reading and summarizing code, generating the status report — to Haiku 4.5 or Sonnet.

One caveat to remember: the weekly all-models cap is shared across every model, so switching from Opus to Sonnet only helps when the Opus-specific bar is the one that filled. If /usage shows the all-models weekly bar full, dropping to Sonnet or Haiku still spends from the same bucket and buys you nothing.

For an automatic version of this split, run /model opusplan. It is a built-in alias that uses Opus only while you are in Plan mode (toggle with Shift+Tab, or /plan) and switches to Sonnet 4.6 the moment you start executing. You get Opus-grade architecture reasoning where it matters and Sonnet-rate execution everywhere else, which is the single biggest lever for stretching the Opus weekly cap.

Step 4 — Resume from STATUS.md, not from memory

When the window resets, open a fresh session and paste:

Read STATUS.md. It holds the full state of the prior session.
Resume from the "next step" line. Do not redo completed work.
Verify against `git log` which changes are already committed.

A fresh session reading a written snapshot has no fading-memory risk, and it won’t re-apply edits that are already on disk.

Step 5 — Break future tasks into ~30-minute checkpoints

The real bug usually isn’t the limit — it’s that one large task had no checkpoints. Split work into units that each fit in roughly 30 minutes of agent time:

- Unit 1: write the schema migration
- Unit 2: write the migration tests
- Unit 3: update the consumer code
- Unit 4: update the consumer tests

After each unit: commit, append one line to STATUS.md, then pause or continue. A limit hit between units now costs you nothing.

Step 6 — Don’t run parallel sessions on one account

Two Claude Code instances on the same login compete for the same pool. Either run one instance sequentially, or use separate accounts (for example, separate Team seats), each with its own quota. Remember the browser counts too — leaving Claude.ai or Cowork busy in another tab drains the same buckets.

How to confirm it’s fixed

You’re back in business when all three checks pass:

  1. /usage shows the bar that blocked you is no longer full (the 5-hour bar has rolled over, the weekly bar shows headroom again, or the Opus bar cleared after a model switch).
  2. A small real prompt — not a retry of the failed turn — completes without Claude usage limit reached.
  3. git log --oneline -5 shows your wip: checkpoint, and the agent’s first action after reading STATUS.md is the planned next step, not a redo of an already-committed file.

If a prompt still returns Claude usage limit reached with a reset time after /usage looked clear, you likely have a second bar near full (commonly the weekly cap behind a freshly reset 5-hour window) — run /usage again and read every bar, not just the first.

Prevention

  • Watch /usage proactively and stop at a clean boundary before a bar fills, not after.
  • Plan in ~30-minute checkpoints: commit plus a one-line STATUS.md update after each.
  • Tell the three limits apart before reacting — 5-hour, weekly, and Opus-weekly each recover differently.
  • Keep Opus 4.7 for hard reasoning; route routine work to Sonnet 4.6 or Haiku 4.5 to protect the Opus cap. The simplest way to make that automatic is /model opusplan — Opus while planning, Sonnet while executing.
  • Never run two Claude Code sessions on one account, and close idle Claude.ai / Cowork tabs.
  • Don’t pin a deadline to assumed quota. Anthropic’s limits shift — the May 2026 increase and the temporary weekly bump through July 13, 2026 are both examples. Check the official models, usage, and limits doc and the Pro/Max plan page for your current numbers.

FAQ

Does waiting 5 hours reset a weekly limit? No. The 5-hour window and the weekly cap are independent. If /usage shows the weekly bar full, only the rolling 7-day window restores access — waiting a few hours does nothing. Switch models or upgrade instead.

Why did Opus stop while Sonnet still works? Opus 4.7 has a separate, smaller weekly cap. You can exhaust it while the broader weekly pool still has room, so /model sonnet (or /model haiku) keeps running. Reserve Opus for the steps that truly need it.

Does my Claude.ai chat usage count against Claude Code? Yes. As of June 2026 the limits are shared across Claude Code, Claude.ai chat, and Claude Cowork on the same account. A long browser session can drain the quota you wanted for the terminal.

What’s the difference between “usage limit reached” and “Claude is at capacity”? “Usage limit reached” with a reset time is your personal quota — handle it with the table above. “Claude is at capacity, try again” has no reset time; it’s a transient server-side 429 that clears in 1-2 minutes. Don’t restructure your workflow over a 429.

How many prompts do I get per 5-hour window? As of June 2026, roughly 10-45 on Pro, 50-225 on Max 5x, and 200-900 on Max 20x — Anthropic doubled these on May 6, 2026. Actual counts vary with how token-heavy each prompt is; a dense agentic turn with many tool calls counts for far more than a one-line question.

Does switching from Opus to Sonnet save my weekly cap? Only if the Opus-specific bar is the one that filled. Max plans carry two weekly bars: an all-models cap and a tighter Opus cap. Switching to Sonnet or Haiku frees you when the Opus bar is full, but it still draws from the all-models cap — so if that one is full, no model switch helps.

What is /model opusplan and should I use it? It’s a built-in model alias that runs Opus only while you’re in Plan mode and switches to Sonnet 4.6 for execution. For refactors and feature work where you plan first, it gives you Opus-quality planning without burning the Opus weekly cap on routine edits. It’s the lowest-effort way to avoid hitting the Opus cap mid-task.

Tags: #Troubleshooting #Claude Code #Debug #Usage limit