Claude Code Usage Limits: How the Weekly Limit, 5-Hour Window and Reset Times Work

Claude Code Usage Limits: How the Weekly Limit, 5-Hour Window and Reset Times Work

Most people find out about the Claude Code usage limit the same way. You are forty minutes into a good session, the agent is mid-refactor, and the terminal says You've hit your session limit · resets 3:45pm. Nothing warned you, or if it did, you were not looking. Now you have a half-finished change and a few hours to think about how it happened.

The frustrating part is that the rules are not complicated. They are just spread across a help center article, a costs page and an errors reference, and none of them gives you a number to plan around. So most advice online is either a table of guessed "prompts per hour" or a rant.

This guide is the version I wanted. It covers how Claude Code usage limits work on Pro and Max, when the weekly limit and the 5-hour window reset, what actually drains them, how to see where you stand, how to make the allowance last, and what your options are when it runs out. I checked everything against Anthropic's documentation on October 28, 2026. Limits and plan details change often, so if something here has drifted, trust the docs over me. I list the sources at the bottom.

How Claude Code Usage Limits Work

On a Pro or Max plan, Claude Code usage is governed by two limits at the same time: a rolling 5-hour session limit and a weekly limit. Claude Code and claude.ai draw from the same pool, so chatting in the browser uses the same allowance as coding in the terminal.

Here is what each part means in practice.

The 5-hour session limit. It is a rolling window, not a clock-hour reset. Your usage counts against it, and when you run out, Claude Code blocks requests until the reset time shown in the error message. Hitting it does not mean you are done for the day. It means you are done until that time.

The weekly limit. This is a second ceiling over a longer period. The errors reference says usage counts against the session and weekly allowances at the same time, and that a large burst of activity can exhaust the weekly allowance before the session window resets. In other words, you can have plenty left in your 5-hour window and still be blocked, because the week is spent.

The shared pool. The help center says all activity in Claude and Claude Code counts against the same limits. That includes the IDE extensions. If you spend the morning in long claude.ai conversations, you start the afternoon coding session with less.

Separate model limits. Max plans also have a separate weekly limit for Fable. On the pricing page, Pro can reach Fable only through usage credits, while both Max tiers get it at 50% of weekly limits. Separately, you can see model-family messages such as You've hit your Opus limit or You've hit your Sonnet limit. Those apply only to that family, and switching to a model outside it keeps you working. The session and weekly limits apply across all models, so switching does nothing there.

One more recent change worth knowing: a promotion that raised Claude Code weekly limits by 50% ran from May 13 through September 13, 2026. It has ended, but Anthropic says part of it stayed. Since September 14, weekly limits in Claude Code are 25% higher than before the promotion. The 5-hour limits were never part of it. If you read an older guide that mentions a 50% boost or an August cutoff, it is out of date.

When Does the Claude Code Usage Limit Reset?

When you hit a limit, the message includes the reset time:

text
You've hit your session limit · resets 3:45pm
You've hit your weekly limit · resets Mon 12:00am

Those are the examples from Anthropic's error reference. The times are examples, not a schedule. The docs do not spell out exactly when a window starts counting, so do not do the arithmetic yourself. Read the reset time from the message, or run /usage, which shows your plan limits and reset times.

Two things worth knowing about resets:

  • The weekly limit and the 5-hour window are independent. The 5-hour window resetting does not refill the weekly allowance. If the weekly limit is what stopped you, the 3:45pm reset in your head is wrong.
  • There is no documented way to reset early. What the docs describe instead are ways to keep working: usage credits (/usage-credits), a model outside the affected family for Opus and Sonnet limits, API billing, or a higher plan. I cover each below.

If you stay in the session, Claude Code can wait for the reset and pick the task back up on its own. That is covered in the section on hitting the limit.

What Are the Claude Code Limits Per Plan?

This is the question most pages answer with a confident table, and it is where I will disappoint you. Anthropic does not publish exact token or message counts for Pro, Max 5x or Max 20x. The help center article describes the structure (a 5-hour limit and a weekly limit) and says nothing about capacity in numbers. Any "you get 45 messages per window" figure you see is a third-party estimate, and the estimates disagree with each other.

What is official is the price and the relative size:

PlanPriceUsage compared with ProClaude Code
Pro$20/month ($17/month billed annually)BaselineIncluded
Max 5x$100/month5xIncluded
Max 20x$200/month20xIncluded
API (Console)Pay per tokenNo plan window, billed per tokenPay as you go

The Max price points match the table in my June pricing survival guide. The practical reading is simple: Max 5x gives you five times the room Pro gives you, and Max 20x gives you twenty times. Since nobody publishes what the Pro baseline is in tokens, the honest way to size a plan is empirical. Use it for a week and watch /usage.

Anthropic's own upgrade advice is similarly empirical. The help center suggests Pro users consider Max 5x if they "consistently hit limits and need more capacity for larger repositories," and Max 5x users consider Max 20x if they keep hitting limits. Notice the phrase "larger repositories." Repository size matters because it changes how much context every request carries, which is the next section.

Claude Code limits on the Pro plan

Pro includes Claude Code, with the same two limits as Max, only smaller. Three Pro details from the help center and pricing page:

  • Fable is available on Pro only through usage credits, not the plan allowance.
  • The "wrapping up" allowance is more limited on Pro. If you hit the 5-hour limit mid-response, Claude Code may finish the step in progress, and on Pro that can happen up to once per weekly usage period. On Max it can apply each time you reach a 5-hour limit. The help center says this is rolling out gradually, so you may not have it yet.
  • The suggested upgrade path is Max 5x if you consistently hit limits, especially on larger repositories.

If Pro is your plan, the habits in the stretching section matter more, because you have the least headroom for a long session.

For teams, the allowance works the same way at a per-seat level: a rolling five-hour window and a weekly window, shared with chat and Cowork, with the size depending on the seat tier (Standard or Premium).

What Burns Through Your Claude Code Limit Fastest

The limit is a usage allowance, and usage is tokens, not messages. That one fact explains most "I barely did anything and I'm out" stories. The costs page lists the real causes, and I have put them roughly in the order they bite.

1. Long context. Claude Code sends your whole conversation with every request, and every tool use sends another request carrying that batch of tool results. Prompt caching means the history is re-read at the cheaper cached rate, but it is still re-read. The docs spell out the consequence: a one-line question in a session that has been open all day still draws usage for the entire conversation. A session you never clear is the most common way to burn an allowance without noticing.

2. Cache misses after a break. Your first message after a pause longer than the cache lifetime misses the cache and reprocesses the full context. Coming back from lunch to a huge session is more expensive than the same question in a fresh one.

3. Subagents and agent teams. Every subagent sends its own requests on top of the main conversation. The docs say subagent requests "still draw on your usage." Agent teams are heavier: they use roughly 7x more tokens than a standard session when teammates run in plan mode, because each teammate keeps its own context window. I like subagents for keeping noisy output out of the main context, but they are a trade, not a free lunch.

4. Model and thinking effort. Sonnet handles most coding work and costs less than Opus. Extended thinking is on by default and thinking tokens bill as output tokens, with a default budget that can reach tens of thousands of tokens per request. The docs note that on current models you cannot turn thinking off, so the lever is the effort level, not an on/off switch.

5. Heavy background habits. Session-scoped scheduled tasks fire on their interval even while the session is idle, and each firing sends your full context. Messages from other sessions and goal check-ins can start new turns on an idle session too. A /loop you forgot about is a slow leak.

6. Bloated setup. A long CLAUDE.md is loaded at the start of every session and sits in context for every request. MCP servers add overhead too, though tool definitions are deferred by default now so only names and server instructions enter context until a tool is used.

7. Compaction itself. /compact reads the whole conversation it summarizes, so compacting a huge context is a large request. When you want a clean slate rather than continuity, /clear costs nothing.

If I had to pick one lesson from that list, it is that long sessions are the tax. Almost every other item gets worse as the context grows. The 32,784-line workflow post is about shipping a lot of code in short, scoped steps, and part of why that works is that small steps keep each request cheap.

How to Check Your Claude Code Usage

You do not have to guess where you stand. There are three places to look.

The /usage command

Run /usage inside Claude Code. On Pro, Max, Team and Enterprise plans it shows your plan usage bars, activity stats and a breakdown of what counts against your limits. The pieces worth knowing:

  • Attribution. Recent usage broken down by skills, subagents, plugins and individual MCP servers, each as a percentage of the total.
  • Recommendations. Suggested changes, one per row, each starting with a share of your recent usage (at least 10%), for example 25% Trim ~/code/api/CLAUDE.md · 49k tokens per request. The share tells you how much of your usage the row applies to, not how much the change saves.
  • Loops. The heaviest scheduled tasks that ran recently, with how often they fire and how many tokens they used.
  • Time range. Press d or w to switch between the last 24 hours and the last 7 days.
  • The f shortcut. When the footer shows a hint like f to fix 2 of 3, pressing f has Claude Code act on the recommendations it can, such as running an /effort change. It needs Claude Code v2.1.305 or later.

Two caveats. The figures are approximate and computed from local session history on the machine you are using, so usage from other devices or claude.ai is not included. And the Session block at the top shows a dollar figure computed at list price. That is meant for API users, so on a subscription ignore the dollar number and look at the plan bars.

/cost still works as an alias in older write-ups, and the commands cheat sheet covers the rest of the slash commands. The help center also points at /status for monitoring your remaining allocation, so if /usage looks different on your version, try that.

Warnings before you hit the wall

Claude Code can warn you before a window runs out, with messages like You've used 85% of your session limit · resets 3:45pm. They are easy to miss in a busy terminal, which is why I prefer a permanent display.

A status line that shows it

A custom status line can show both limits all the time. Status line scripts receive rate_limits.five_hour.used_percentage, rate_limits.seven_day.used_percentage and rate_limits.five_hour.resets_at. These fields only appear for claude.ai Pro and Max subscribers and only after the first API response, so give them a fallback. My status line guide has a full walkthrough, including a setup that stays quiet until the 7-day limit crosses a threshold.

If you only do one thing from this post, put the 5-hour percentage in your status line. Knowing you are at 80% before you start a big refactor changes what you start.

How to Make Your Claude Code Limit Last Longer

None of these are magic. They all do the same thing: send fewer tokens per request, or send fewer requests. Ordered by how much they usually save.

Clear between unrelated tasks. Use /clear when you switch work. Stale context taxes every message that follows. Run /rename first so you can /resume the old session later. This is the highest-value habit on the list, and it costs nothing.

Compact on purpose. When you want continuity, /compact summarizes the conversation. You can steer it: /compact Focus on code samples and API usage tells Claude what to keep. You can also pin the behavior in CLAUDE.md:

markdown
# Compact instructions

When you are using compact, please focus on test output and code changes

Compact before a long break, not after. Coming back to a big context after the cache expires is the expensive version.

Use plan mode for anything non-trivial. A wrong first step is the most expensive thing in a session, because you pay for the wrong diff and then pay again to redo it. Planning first is cheap insurance. The plan mode guide covers the details, including opusplan, which uses Opus for planning and switches to Sonnet for the edits.

Pick the model for the job. Run /model to switch mid-session or set a default in /config. Sonnet for the bulk of the work, Opus for hard architectural decisions. One detail from the docs that people miss: a switch to Opus also applies to subagents that inherit your session's model. For simple subagent tasks you can set model: haiku in the subagent configuration.

Lower the effort level. For simple tasks, /effort reduces how much thinking each request does. The /usage recommendations will even suggest it when it spots a pattern, for example Switch from max to high effort · /effort high.

Keep CLAUDE.md lean. The docs suggest under 200 lines, with specialized instructions moved into skills, which load on demand rather than at session start. Detailed workflows for PR reviews or database migrations do not need to be in context while you fix a CSS bug.

Disable MCP servers you are not using. Run /mcp to see what is configured, and /context to see what is eating space. Where a CLI tool exists, such as gh or aws, the docs say it is still more context-efficient than an MCP server because it adds no per-tool listing.

Filter noisy output before Claude sees it. A hook can grep a 10,000-line log down to the error lines before they enter context. The costs page has a working PreToolUse example that trims test output to failures only, and the hooks guide shows how to build your own.

Write specific prompts. "Improve this codebase" triggers broad scanning. "Add input validation to the login function in auth.ts" does not. A tight prompt means fewer file reads.

Stop wrong turns early. Press Esc the moment Claude heads the wrong way, and use /rewind to go back to a checkpoint. Letting a bad direction run for ten minutes is paid for twice.

Delegate noisy work, carefully. Running tests or reading logs in a subagent keeps the verbose output out of your main context. That saves context, but the subagent's own requests still count, so pair it with a smaller model.

Be careful with parallel sessions. Running several sessions or git worktrees at once is great for throughput, but every session burns the same shared allowance. Three sessions working at once pull from that one allowance together, so I treat parallelism as something to spend deliberately, not a default.

What Happens When You Hit the Claude Code Limit

When you run out, the message tells you which limit you hit and when it resets:

text
You've hit your session limit · resets 3:45pm
You've hit your weekly limit · resets Mon 12:00am
You've hit your Opus limit · resets 3:45pm

Claude Code blocks further requests until the reset time shown. Your options, in the order I would think about them:

Let it wait for you. On Claude Code v2.1.234 or later, in an interactive session signed in with a claude.ai subscription, Claude Code can wait in the open session and continue the interrupted task on its own after the limit resets. You will see lines like Usage limit reached · limit resets 3:45pm and Continuing automatically at 3:45pm · Esc to cancel. Keep the session open. A few details from the docs: it prompts Claude to pick the task up where it stopped rather than resending your last message, it still asks for permissions as usual so it can stall on a prompt while you are away, and it gives up after hitting the limit again twice in a row. Press Esc at an empty prompt to cancel, or use /rate-limit-options to manage it.

Switch model families, if it is an Opus or Sonnet limit. Run /model and pick a model outside that family. This does not help with the session or weekly limits, which are shared across models. It also has a cost: each model has its own prompt cache, so the next request re-reads the whole conversation.

Buy usage credits. Run /usage-credits to turn on or manage extra usage on Pro and Max. It opens the usage settings on claude.ai, where you can switch usage credits on, set a monthly spend limit and check your balance. Credits are billed at standard API rates, which are different from your plan pricing. They cover the five-hour, weekly and Fable weekly limits. On Team and Enterprise, the same command sends a request to your admin.

Upgrade. Pro to Max 5x, or Max 5x to Max 20x, if you keep hitting the wall. Upgrade only after a few weeks of data. A habit change is cheaper than $80 a month.

Move to API billing. You can switch to a Console account and buy API credits. There is a trap here: if an ANTHROPIC_API_KEY environment variable is set, Claude Code uses it instead of your subscription, and you get API charges without noticing. If a bill surprises you, run env | grep ANTHROPIC_API_KEY to see whether the variable is set.

Use something else for the gap. If your work cannot stop, a second tool is a legitimate answer. I compared the realistic options in Claude Code alternatives, and the Claude Code vs Codex comparison covers how the two handle plans and limits.

Claude Code Usage Limits vs Rate Limits (429 Errors)

People search for "Claude Code rate limit" and mean two different things.

A usage limit is the subscription allowance above: the 5-hour window and the weekly cap. The message starts with You've hit your... and gives a reset time.

A rate limit is a short-lived throttle on how fast you send requests, and it is unrelated to your allowance. Server is temporarily limiting requests and Request rejected (429) are this kind. Claude Code retries temporary 429s automatically, up to 10 times with exponential backoff by default, and the spinner shows Retrying in Ns · attempt x/y. A 529 overloaded error is a capacity problem on Anthropic's side and does not count against your quota. Wait and retry before you assume you are out.

On API and Console billing, rate limits are the real constraint. The costs page gives per-user starting points for requests-per-minute and tokens-per-minute by team size, for example 200k to 300k TPM and 5 to 7 RPM per user for teams of 1 to 5. Those apply at the organization level, so one user can briefly exceed their share when others are idle.

Claude Code vs Codex: Which Has the Better Limits?

I get asked this one, and the honest answer is that a number-for-number comparison is not possible. Neither side publishes exact capacity, and the third-party tables that claim otherwise are estimates. What you can compare is structure. Claude Code runs a rolling 5-hour window with weekly limits on top. Codex on Plus meters local messages per 5-hour window and calls those numbers estimates, and my notes say its Pro tiers currently have no 5-hour limit. Those details move, so check the vendor pages before you pay. My Claude Code vs Codex comparison goes through plans, models and limits side by side. If you want the wider field, Claude Code alternatives covers the rest.

What About Headless Mode and the Agent SDK?

If you run claude -p, the Agent SDK or Claude Code in CI, the picture is murkier, and it has changed more than once. Anthropic announced that this usage would move to a separate monthly credit pool, then paused the change. As of the last update in that guide, Max and Team plans include monthly API credits covering the Agent SDK, claude -p, the Claude API and Managed Agents. I walk through the whole timeline in the pricing survival guide, and I would read that before you build anything on automated usage.

A Sensible Routine for Staying Under the Limit

If you want something concrete to copy, this is the routine I would give a developer on Pro or Max:

  1. Add the 5-hour and 7-day percentages to your status line.
  2. Start each new task in a clean session with /clear.
  3. Use plan mode when the change touches more than a couple of files.
  4. Default to Sonnet. Use Opus on purpose.
  5. Keep CLAUDE.md short and move workflow detail into skills.
  6. Compact before you step away, not when you come back.
  7. Run /usage once a week and follow the top recommendation.
  8. Leave a session open if you hit the limit mid-task, so auto-continue can pick it up.

That is it. None of it costs quality, and most of it makes sessions faster as well as cheaper, because smaller contexts are quicker to process.

Frequently Asked Questions

What are the Claude Code usage limits? On Pro and Max, two limits apply at once: a rolling 5-hour session limit and a weekly limit. Both are shared with claude.ai. Anthropic does not publish exact token counts per plan.

How long is the Claude Code usage limit? The session limit is a rolling 5-hour window, and there is a separate weekly limit. The error message shows the exact reset time, for example resets 3:45pm.

When does Claude Code usage reset? The reset time is shown in the limit message, and /usage shows your plan limits and reset times. Claude Code can wait and continue your task automatically after the reset if the session stays open.

When does the Claude weekly limit reset? The weekly limit message shows its own reset time, for example resets Mon 12:00am in Anthropic's docs. Read the time from your message or /usage, because it is independent of the 5-hour window.

Can you reset the Claude Code usage limit early? There is no documented way. You can keep working past the limit with usage credits (/usage-credits), API billing, a model outside the affected family for Opus and Sonnet limits, or a higher plan.

What are the Claude Code Pro limits? Pro has the same two limits as Max, at the smallest allowance. Anthropic does not publish token counts, Fable is available only through usage credits, and the suggested upgrade is Max 5x if you consistently hit the wall.

What is the difference between a usage limit and a rate limit? A usage limit is the 5-hour and weekly subscription allowance. A rate limit, such as a 429 or Server is temporarily limiting requests, is a short throttle that Claude Code retries automatically.

Which has better limits, Claude Code or Codex? Neither publishes exact capacity. Compare plans and structure in the Claude Code vs Codex comparison, and test on the cheap tier first.

Do Claude and Claude Code share the same limit? Yes. The help center says all activity in both tools counts against the same limits, including IDE usage.

Does switching models fix a session or weekly limit? No. Those limits are shared across all models. It only helps with model-family limits such as the Opus limit or Sonnet limit.

How do I check my Claude Code usage? Run /usage. It shows plan usage bars, a breakdown by skills, subagents, plugins and MCP servers, and recommendations. You can also show the 5-hour and 7-day percentages permanently in a custom status line.

Why did I hit my limit so fast? Usually a long, never-cleared session, subagents or agent teams, Opus with high effort, or a cache miss after a long break. Run /usage and read the attribution and recommendation rows.

What is the difference between Pro, Max 5x and Max 20x? Price and relative capacity. Pro is the baseline at $20 a month. Max 5x gives five times Pro's usage at $100 a month, and Max 20x gives twenty times at $200 a month.

Can I keep working after hitting the limit? Yes. You can buy usage credits with /usage-credits, switch to a model outside an affected family, move to API billing, or upgrade your plan. Usage credits are billed at standard API rates.

Will Claude Code continue my task after the limit resets? On v2.1.234 or later, in an interactive session signed in with a claude.ai subscription, it waits and continues automatically. Keep the session open, and cancel with Esc if you do not want it.

Does the Agent SDK or claude -p count against my limit? It has changed more than once. See the pricing survival guide for the current state and how I would plan for it.

Sources, all checked October 28, 2026: Use Claude Code with your Pro or Max plan, Manage costs effectively, Claude Code error reference, Interactive mode, Claude pricing, and the Claude Code weekly limit promotion article.