Claude Code Usage Limit Reached? 5 Ways to Keep Working (Auto-Continue, Usage Credits, OpenRouter)
When Claude Code stops with “You’ve hit your session limit”, you have five real options: let Claude Code wait and continue on its own, switch models (this only helps for Opus- or Sonnet-specific limits), turn on usage credits with a monthly spend cap, upgrade your plan, or run Claude Code on a pay-per-token key such as a Claude Console account or OpenRouter until the limit resets. Which one is right depends on the exact message you see and on whether you would rather wait or pay. This guide explains each limit in plain language, shows exactly what to click or type, and lists the mistakes that quietly cost money. Every step below was checked against Anthropic’s Claude Code documentation, the Claude Help Center and OpenRouter’s own tutorial on October 29, 2026.
Key facts:
- Two limits run at once on Pro and Max: a session limit that resets every five hours and a weekly limit. Max plans also have a separate weekly limit for Fable. (Claude Help Center)
- Claude Code and the Claude apps share the same pool. Chatting on claude.ai or in Claude Desktop uses the same allowance as Claude Code. (Help Center)
- Auto-continue is on by default in interactive Claude Code sessions signed in with a claude.ai subscription (Claude Code v2.1.234 or later). (Claude Code docs)
- Usage credits let Pro and Max keep working past a limit at standard API rates, billed separately from your subscription. (Help Center)
- The monthly API credits included with Max plans can’t be used in Claude Code, including for usage credits. (Help Center)
If you are hitting limits often, also read our guide to reducing Claude Code token overhead. Fixing the cause is cheaper than paying for overflow.
Step 1: Read the exact message first
Claude Code tells you which limit you hit. The error reference lists these messages:
| Message you see | What it means | Does switching models help? |
|---|---|---|
You've hit your session limit · resets 3:45pm | Your five-hour allowance is used up | No. It is shared across all models |
You've hit your weekly limit · resets Mon 12:00am | Your weekly allowance is used up | No. It is shared across all models |
You've hit your Opus limit · resets 3:45pm | You used up the allowance for the Opus family | Yes. Switch to Sonnet or Haiku with /model |
You've hit your Sonnet limit · resets 3:45pm | You used up the allowance for the Sonnet family | Yes. Switch to a model outside the Sonnet family |
Credit balance is too low | Claude Code is billing a Console API account that ran out of prepaid credit | Not a plan limit; see the troubleshooting section below |
Context limit reached · /compact or /clear to continue | The conversation is too long for the model | Not a usage limit at all. Run /compact or /clear |
Two things are worth knowing before you choose a fix:
- Usage counts against the session and weekly allowances at the same time. Anthropic warns that one heavy burst, such as a large fan-out of subagents, can use up the weekly allowance before the five-hour window even resets. (errors reference)
- You usually get a warning first, such as
You've used 85% of your session limit · resets 3:45pm. That is the moment to wrap up, save a summary, or turn on one of the options below.
To see where you stand at any time, type /usage in Claude Code. On Pro, Max, Team and Enterprise plans it shows your plan usage bars, when each limit resets, and a breakdown of what used your allowance (skills, subagents, plugins and individual MCP servers), with suggestions. Press d or w to switch between the last 24 hours and the last 7 days. (Claude Code docs)
In the Claude Desktop app, click the usage ring next to the model picker to see the same thing.
What “wrapping up” means
If you hit the five-hour limit while Claude is partway through a reply, you may see Usage limit reached · wrapping up. Claude Code keeps working briefly so it can finish the step in progress instead of stopping mid-edit. This allowance is small and capped, and it counts toward your weekly limit. On Pro it applies at most once per weekly period; on Max it can apply each time you reach a five-hour limit. Anthropic says it is rolling out gradually, so you may not have it yet. (Help Center)
Option 1: Let Claude Code wait and continue on its own (free)
If the reset is a few hours away and the task can wait, this is the cheapest option. Since Claude Code v2.1.234, an interactive session signed in with a claude.ai subscription waits in the open window and picks the task back up after the reset. It is on by default. (interactive mode docs)
While it waits, the bottom of the screen shows something like:
Usage limit reached · limit resets 3:45pm
Continuing automatically at 3:45pm · Esc to cancel
What you need to do: nothing, except leave the session open. At the reset you will see Usage limit reset · Continuing automatically, and Claude Code asks Claude to pick up where it stopped. It does not resend your last message.
Things that catch people out:
- Permission prompts still appear. The continued task asks for permissions as usual, so if you walk away it can stall on a “May I run this?” question. If you want unattended work, look at our guide to Claude Code permissions and auto mode before the limit hits.
- Closing Claude Code cancels the wait. It does not restart when you resume the session. Switching accounts with
/login, clearing or rewinding the conversation, or opening another session with/resumealso ends it. - If your computer sleeps for more than about 30 minutes and the limit resets during that time, you will see
Your usage limit has resetandPress enter to continue. Press Enter. - It gives up after repeated hits. If the continued task hits the limit again, Claude Code re-arms the wait at most twice in a row, then shows
Automatic continue stopped after repeated usage-limit hits · /rate-limit-options to try again. - Weekly limits usually don’t auto-wait. Claude Code doesn’t start the wait on its own when the reset is more than 24 hours away. Instead it opens a menu where you can pick Wait here, then continue automatically yourself. You can open that menu any time with
/rate-limit-options. - It is not available in background sessions, in
-p(non-interactive) runs, or when you are paying per token through an API key or cloud provider, because there is no reset to wait for.
To cancel a wait: press Esc at an empty prompt (or Ctrl+C), or run /rate-limit-options and choose Don’t continue automatically.
To turn auto-continue off entirely: type /config and switch off Continue automatically at usage limit.
In the Claude Desktop app’s Code tab, the session-limit card has its own Auto-continue when limits reset checkbox (the weekly-limit card doesn’t). It is a separate setting from the one in the terminal, so turn each off on its own if you don’t want it. (errors reference)
Option 2: Switch models (only for Opus or Sonnet limits)
If the message names a model family, such as You've hit your Opus limit, type /model and pick a model outside that family. Your conversation is kept. (errors reference)
One cost to know about: each model has its own prompt cache, so the first message after a switch re-reads the whole conversation without cache savings. In a very long session, run /compact first so the switch is cheaper.
This does not work for the general session or weekly limit, because those are shared across all models.
A good habit to avoid hitting the Opus limit in the first place: Anthropic’s help article suggests planning with Opus and executing with Sonnet, which is built in as /model opusplan. (Help Center)
Option 3: Turn on usage credits (pay only for what you use past the limit)
Usage credits let Pro, Max 5x and Max 20x subscribers keep working after a limit instead of being blocked. Requests switch to pay-as-you-go at standard API rates, and your plan limits still reset as usual. The charges appear separately on your bill. (Help Center)
How to turn them on:
- In Claude Code, make sure you are signed in with your claude.ai subscription (run
/loginif not). - Type
/usage-credits. On Pro or Max this opens Settings > Usage on claude.ai in your browser. - In the Usage credits section, turn usage credits on. The same screen shows your credit balance, this month’s spend, and your monthly spend limit.
- Set a monthly spend limit before you need it. Without one, the usage-credits row in
/usageshowsUnlimited.
What you will see when it kicks in: you may briefly still see the “approaching your limit” warning. Once the next request goes through on credits, it changes to Now using credits. You have not been cut off. (Help Center)
Gotchas:
/usage-creditsonly works when you signed in with a subscription. It isn’t available if Claude Code is using an API key.- On Team and Enterprise plans, members without billing access can’t turn this on themselves. Running
/usage-creditsasks you to confirm and then sends a request to your organization’s admins. - If you started the wait from Option 1 and then add credits with
/usage-credits, Claude Code checks right away and continues if usage is available. It does not notice a purchase you make separately in a browser tab. - When you reach your monthly spend limit with credits still available, Claude Code offers to raise or remove the limit without leaving the terminal. Think before you say yes.
- Choosing a model with the 1M-token context window (the
[1m]variants) can require usage credits on some plans even when your normal allowance isn’t used up. If you seeUsage credits required for 1M context, pick the variant without[1m]in/model. (errors reference)
Option 4: Upgrade your plan
If you hit limits regularly, Anthropic’s own suggestion is to move up a tier: Pro to Max 5x, or Max 5x to Max 20x. (Help Center) Check current prices at claude.com/pricing.
If you are in the middle of a wait from Option 1 and you upgrade with /upgrade and sign back in, Claude Code checks whether usage is available and continues right away.
Before upgrading, run /usage and look at the breakdown. If one MCP server, a runaway loop, or a giant CLAUDE.md file is behind most of your usage, fixing that may be enough. Pressing f in /usage (Claude Code v2.1.305 or later) lets Claude apply the recommendations it can, after showing you each change. (Claude Code docs)
Option 5: Run Claude Code on a pay-per-token key until the reset
A pay-per-token key has no five-hour or weekly window. You pay for every token instead. There are two common ways to do this.
5a. A Claude Console account (Anthropic’s own API billing)
Anthropic’s help article lists “switch to a Claude Console account and purchase API usage credits” as an option for intensive coding sprints on both Pro and Max. (Help Center)
- Type
/loginand sign in with your Claude Console account instead of your subscription. The first time you do this, a workspace called “Claude Code” is created for you in the Console to track the spend. (Claude Code docs) - Add credit in the Console’s billing settings, and set a workspace spend limit so one long session can’t drain your balance.
- When your subscription resets, run
/loginagain and sign back in with your claude.ai account.
5b. OpenRouter (a third-party gateway)
OpenRouter published a step-by-step tutorial on October 28, 2026 for exactly this situation. It routes Claude Code to Anthropic’s Claude models through an OpenRouter key, billed per token. (OpenRouter)
Keep in mind that Anthropic says it “doesn’t endorse, maintain, or audit third-party gateway products.” (LLM gateway docs) OpenRouter itself recommends setting Anthropic as your first-choice provider for Claude Code, because Claude Code is only guaranteed to work with Anthropic.
The easiest route, per OpenRouter: its Ori Harness tool starts the Claude Code already on your computer with OpenRouter settings for that session only. You sign in to OpenRouter in a browser, so there is no key to copy and paste. Plain claude keeps using your subscription. OpenRouter documents the install command and the ori claude start command on its tutorial page; if you don’t use the terminal much, paste that page into your AI agent and ask it to set this up for you.
The manual route: OpenRouter’s tutorial shows a small shortcut command, claude-or, added to your terminal’s startup file. It sets three values only when you type claude-or:
ANTHROPIC_BASE_URLpoints Claude Code at OpenRouter (https://openrouter.ai/api).ANTHROPIC_AUTH_TOKENholds your OpenRouter key.ANTHROPIC_API_KEYmust be set to empty, or Claude Code may try to sign in to Anthropic instead.
You can ask Claude Code (or any coding agent) to add it for you, for example: “Add a shell function called claude-or to my shell profile that runs claude with ANTHROPIC_BASE_URL set to https://openrouter.ai/api, ANTHROPIC_AUTH_TOKEN set to my OPENROUTER_API_KEY environment variable, and ANTHROPIC_API_KEY set to an empty string. Don’t change my normal claude command.” Then open a new terminal window. The exact function, including optional lines that pick the model for Sonnet, Opus, Haiku and subagents, is in OpenRouter’s tutorial.
Do these three things before real work:
- Set a credit limit on the key on OpenRouter’s API keys page. OpenRouter set theirs to $4 in testing, so even a long session couldn’t spend more.
- Check that it really bills the key. Send one tiny prompt, then look at the key’s usage on OpenRouter. If usage didn’t go up, the settings weren’t picked up; open a new terminal and try again.
- Start on Sonnet. OpenRouter’s own figures (prices as of October 21, 2026; session costs are medians over 2 to 9 messages):
| Model | Input, per 1M tokens | Output, per 1M tokens | Typical short session |
|---|---|---|---|
| Claude Opus 5.5 | $4.00 | $20.00 | about $0.31 |
| Claude Sonnet 5.5 | $2.00 | $10.00 | about $0.16 |
| Claude Haiku 5.5 | $0.10 | $0.50 | under $0.01 |
Source: OpenRouter. Switch to Opus with /model opus only for genuinely hard problems, then switch back.
Don’t trust the dollar figure Claude Code prints here. OpenRouter reports that Claude Code showed $0.375 for a run it was billed $0.008 for, because Claude Code estimates cost from Anthropic’s price list and guesses when it doesn’t recognize a model name. Anthropic’s docs also describe that figure as a local estimate. Check your OpenRouter activity page instead.
Switching back: when your plan resets, just type claude instead of claude-or. Nothing needs undoing, because the settings live only inside the shortcut.
One important trap: Anthropic’s gateway docs note that setting only ANTHROPIC_BASE_URL without a gateway credential does not replace your subscription. Your saved claude.ai login stays the active credential and its limits still apply. That is why the token line matters. (LLM gateway docs)
Which option should you pick?
| Your situation | Best option |
|---|---|
| Session limit, reset in an hour or two, task can wait | Option 1: leave the session open and let it auto-continue |
| ”You’ve hit your Opus limit” | Option 2: /model to Sonnet |
| Weekly limit, deadline today, you want to stay on your plan | Option 3: usage credits with a monthly spend cap |
| You hit limits most weeks | Option 4: upgrade, after checking /usage for waste |
| One intensive sprint and you want hard spending control | Option 5: Console account or an OpenRouter key with a credit limit |
| Context limit, not a usage limit | /compact or /clear |
If you can hand the work off rather than babysit it, running Claude Code in the cloud is another way to keep long tasks going; see how to use Claude Code in the cloud. Check how cloud sessions are billed on your plan before relying on them as overflow.
Troubleshooting
“Credit balance is too low” even though I pay for Pro or Max. Claude Code is probably sending requests with a Console API key instead of your subscription. Run /status and look at the API key row. If an ANTHROPIC_API_KEY is set on your computer, it takes over from your subscription. Ask your agent to remove it from your shell profile, close the terminal, reopen it, and run /login with your subscription. (errors reference)
The auto-continue lines never appeared. Check your version with claude --version (you need v2.1.234 or later), make sure you are signed in with a claude.ai subscription rather than an API key, and check that Continue automatically at usage limit is on in /config. For a weekly limit more than 24 hours away, open /rate-limit-options and pick the wait row yourself.
/usage says “rate limited until 3:14am”. That only means Claude Code can’t refresh your plan numbers until then. It does not mean your work is limited. Press r after that time. (Claude Code docs)
Unknown command: /usage-credits. On some Enterprise setups (self-serve Enterprise, Enterprise trials, and organizations billed through AWS Marketplace) the command needs Claude Code v2.1.248 or later. Update Claude Code. (Claude Code docs)
OpenRouter key ran out mid-task. OpenRouter stops the request and returns an error. openrouter_key_limit means the key hit its own limit; openrouter_credits means the account is out of credit. Raise the key limit or add credit, or switch back to claude if your plan has reset. (OpenRouter)
I burn through my limit by lunchtime. Anthropic’s help article says almost every such report traces back to five habits: not clearing between tasks, using Opus for routine work, pasting whole files instead of pointing to them, a bloated CLAUDE.md, and skipping a plan before big changes. (Help Center) Our token overhead guide walks through each fix, and our daily-driver setup shows how to structure a working day around them.
FAQ
Does chatting on claude.ai use up my Claude Code limit? Yes. Usage across claude.ai, Claude Desktop and Claude Code counts toward the same limit. (Help Center)
When exactly does the limit reset?
The message shows the reset time, for example resets 3:45pm. Run /usage to see both the session and weekly reset times.
Can I use my Max plan’s monthly API credits to keep going? No. Anthropic says those credits can’t be used in Claude Code or the Claude apps, including for usage credits. (Help Center)
Are the models on OpenRouter the same as on my plan? OpenRouter says they are Anthropic’s Claude models, served from Anthropic and from cloud providers like Amazon Bedrock and Google Vertex. Anthropic doesn’t support routing Claude Code to non-Claude models through any gateway. (OpenRouter, Anthropic)
Can I watch my remaining allowance all the time?
Yes. In the Desktop app, use the usage ring next to the model picker. In the terminal, you can add the rate_limits fields to a custom status line; ask Claude Code to set this up using the status line docs.
For more practical AI tool guides, browse the 7minAI homepage, or see how a competing agent handles plans and pricing in our Grok Build setup guide.