# Claude Code says “You've hit your session limit”: what it means and what to do

> Markdown mirror of https://router.one/claude-code-usage-limit for AI assistants and crawlers. Router One is a unified, OpenAI-compatible LLM API gateway.
> Last updated: 2026-10-24

Claude Code prints `You've hit your session limit · resets 3:45pm` (or the weekly, Opus or Sonnet variant) when a session signed in with a Claude subscription has used up one of its plan's usage limits. Per Claude Code's error reference (checked 2026-10-24), it blocks further requests until the reset time in the message; the session and weekly limits are shared across all models, and the Opus and Sonnet limits apply only to that model family. The limit belongs to your Claude plan, so you can wait for the reset, buy usage credits, or move terminal sessions to another billing path. A Claude Code session set up for Router One sends its requests to https://api.router.one with your Router One key in ANTHROPIC_AUTH_TOKEN, a credential Claude Code's authentication docs (checked 2026-10-24) rank above the subscription login, so Router One bills it, not your Claude plan.

## What the message means

Per Claude Code's error reference (checked 2026-10-24), subscription plans include a rolling usage allowance, and the message appears when it runs out. Usage counts against the session and weekly allowances at the same time, so a single burst of heavy activity, such as a large workflow fanout, can use up the weekly allowance before the session window resets. Anthropic's help center (checked 2026-10-24) says Claude Pro and Max both have a five-hour session limit and a weekly limit, shared across Claude and Claude Code, so all activity in both counts against the same limits. Claude Code's costs docs (checked 2026-10-24) describe the same pattern for Team and Enterprise seats: a per-seat allowance that resets on a rolling five-hour window and a weekly window, shared with Claude chat.

## The variants and what each asks you to do

Per Claude Code's error reference (checked 2026-10-24), the message names the limit that ran out and when it resets. The spend-limit messages at the end appear when usage credits would pay for the request and have reached a spend limit:

| What Claude Code prints | Which limit | What to do |
| --- | --- | --- |
| `You've hit your session limit · resets 3:45pm` | The rolling session allowance, shared across all models | Wait for the reset; switching models does not restore access |
| `You've hit your weekly limit · resets Mon 12:00am` | The weekly allowance, shared across all models | Wait for the reset, or turn on usage credits |
| `You've hit your Opus limit · resets 3:45pm` | The limit for the Opus family only | Run /model and pick a model outside the Opus family, or wait |
| `You've hit your Sonnet limit · resets 3:45pm` | The limit for the Sonnet family only | Run /model and pick a model outside the Sonnet family, or wait |
| `You've hit your monthly spend limit · raise it at https://claude.ai/settings/usage?from=cc_cli_limit_message` | Your plan's included usage can't cover the request, and your usage credits reached your monthly spend limit | On Pro and Max, raise the limit in Settings > Usage on claude.ai, or run /usage-credits |
| `You've hit your individual spend limit · ask your admin for a higher limit`, or the `org's monthly spend limit` and `team's shared budget` variants | A spend limit your Team or Enterprise organization set on usage credits | Ask an admin to raise it; /usage-credits sends that request for you |

- When one of your plan's windows is what ran out, a spend-limit message also says when that window resets, for example `· your session limit resets 3:45pm`, and access returns then without anyone raising the limit.
- On organizations with usage-based billing, the message says usage limit in place of spend limit, as in `You've hit your individual usage limit`.

## Warnings before the limit

Per Claude Code's error reference (checked 2026-10-24), Claude Code can warn you before a window runs out, with a message such as `You've used 85% of your session limit · resets 3:45pm`, and Anthropic's help center (checked 2026-10-24) says you'll see warning messages as you approach any limit. To watch the allowance continuously:

- Add the rate_limits fields to a custom status line. Per Claude Code's status line docs (checked 2026-10-24), for claude.ai Pro and Max subscribers they hold a rolling five-hour window and a weekly seven-day window, each with the percentage used and the reset time, from the session's first response.
- In the Claude Desktop app, click the usage ring next to the model picker.

## When it resets, and where to check

The message prints the reset time, and per Claude Code's error reference (checked 2026-10-24) /usage shows your plan limits and when each resets. Two things in /usage are easy to misread:

- Per Claude Code's costs docs (checked 2026-10-24), a `Showing last-known usage` note means the request for your plan limits failed, most often because the usage endpoint is rate limited, and a line such as `rate limited until 3:14am` means Claude Code can't fetch your plan limits again until then, not that your work with Claude is limited. Press r after that time for fresh data.
- The dollar figure in the Session block is an estimate Claude Code computes locally from token counts at list price (per the same docs). It is not what a subscription costs you, and in a session on Router One it is not what Router One charges; how Router One bills is further down this page.

## Let Claude Code continue after the reset

Per Claude Code's interactive-mode docs (checked 2026-10-24), automatic continue is on by default in interactive sessions signed in with a claude.ai subscription and requires Claude Code v2.1.234 or later. Claude Code waits in the open session and continues the interrupted task on its own after the limit resets:

- While it waits, the bottom of the session shows `Usage limit reached · limit resets 3:45pm` and `Continuing automatically at 3:45pm · esc to cancel`. Keep the session open; at the reset Claude Code prompts Claude to pick the task up where it stopped, without resending your last message.
- To cancel, press Esc at an empty prompt or Ctrl+C while those lines show, or run /rate-limit-options and pick Don't continue automatically.
- 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`.
- For a reset more than 24 hours away, which a weekly limit can be, Claude Code does not start the wait on its own; the usage-limit options menu it opens has a row that starts Wait here, then continue automatically.
- In the Code tab of the Claude Desktop app, the session-limit card has an Auto-continue when limits reset checkbox; the weekly-limit card does not.
- Anthropic's help center (checked 2026-10-24) also describes `Usage limit reached · wrapping up`: when the five-hour session limit arrives partway through a response, Claude Code may keep working briefly to finish the step in progress, and that usage counts toward the weekly limit. The help center says it is rolling out gradually.

## Keep working: wait, add usage credits, switch family, or switch billing

Per claude.com/pricing (checked 2026-10-24), when you reach a limit you can wait for it to reset, move to a higher plan, or, on paid plans, turn on usage credits to keep working at standard API rates. In practice:

- Wait for the reset time in the message, or let automatic continue pick the task up.
- Turn on usage credits with /usage-credits. Per Claude Code's costs docs (checked 2026-10-24), on Pro and Max it opens Settings > Usage on claude.ai; on Team and Enterprise it opens your organization's usage settings if you have billing access, or sends a request to your admins. It works only with a claude.ai subscription sign-in, not with API key authentication.
- For an Opus or Sonnet limit, run /model and pick a model outside that family. Per Claude Code's error reference (checked 2026-10-24), each model has its own prompt cache, so the next request re-reads the whole conversation with no cache hits.
- Switch to a Claude Console account. Anthropic's help center (checked 2026-10-24) suggests it for intensive coding sprints, and says that with ANTHROPIC_API_KEY set, Claude Code uses that key instead of your subscription, so the session is billed as API usage rather than drawing on your plan's included usage. A Router One session does not need ANTHROPIC_API_KEY, so leave it unset.
- Point Claude Code at a gateway with its own credential, such as Router One. Per Claude Code's authentication docs (checked 2026-10-24), ANTHROPIC_AUTH_TOKEN comes second in the credential order and the subscription login from /login comes last; per its gateway docs (checked 2026-10-24), while a gateway credential is set, requests carry it in place of your claude.ai login and the subscription's usage limits don't apply to them. Setting ANTHROPIC_BASE_URL alone does not replace the subscription: the saved login stays the active credential, so its usage limits and billing apply.
- Cloud sessions stay on your plan: per the authentication docs, they always use your subscription credentials, even if you set ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN in the cloud environment.

## Set up Claude Code with Router One

Run the one-click command with your Router One key. It installs Claude Code if it is missing, backs up an existing ~/.claude/settings.json, writes ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN into that file's env block and sends one test request. You can keep your claude.ai login: per Claude Code's gateway docs (checked 2026-10-24), it stays saved and unused while the variable is set, and Claude Code goes back to it when you remove the variable. Run /status to confirm: an Auth token line naming ANTHROPIC_AUTH_TOKEN means the Router One key is the active credential, while a Login method line naming a claude.ai account means the variable did not reach the session.

`terminal`

```bash
curl -fsSL https://router.one/install/claude-code.sh | bash -s -- sk-your-api-key
# Windows PowerShell:
$env:ROUTER_ONE_API_KEY = "sk-your-api-key"; irm https://router.one/install/claude-code.ps1 | iex
```

## On a Router One plan: pin the models a tier lists

As of the 2026-10-24 plan response, claude-opus-5 is in the Premium models tier, claude-sonnet-5 in the Mid-tier models tier and claude-haiku-4-5 in the Standard models tier of all three Router One plans, and no plan tier lists claude-opus-5-5, claude-sonnet-5-5 or claude-haiku-5-5. Per Claude Code's model configuration docs (checked 2026-10-24), Claude Code defaults to Opus 5.5 from v2.1.280, the sonnet alias resolves to Sonnet 5.5 from v2.1.284 and the haiku alias to Haiku 5.5 from v2.1.293, so without pins those requests bill per token to the wallet even on a plan. On a plan, set the Opus and Sonnet lines below; if the one-click command wrote your setup, put them in the env block of ~/.claude/settings.json, whose values override a shell export of the same variable. The Haiku line is optional for everyone: it moves haiku-alias requests and background tasks to Claude Haiku 4.5. Without a plan, every model bills to the wallet at its posted rate (see /models), so the pins only choose the model:

`~/.zshrc or ~/.bashrc`

```bash
export ANTHROPIC_BASE_URL=https://api.router.one
export ANTHROPIC_AUTH_TOKEN=sk-your-router-one-key
unset ANTHROPIC_API_KEY
export ANTHROPIC_MODEL=claude-opus-5   # on a plan: keeps the session on plan quota
export ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-5   # on a plan: /model opus and opus subagents too
export ANTHROPIC_DEFAULT_SONNET_MODEL=claude-sonnet-5   # on a plan: the sonnet alias
export ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-haiku-4-5   # optional: the haiku alias and background tasks
```

## How Router One bills these sessions

Without a Router One plan, each request is billed to your Router One wallet at the posted per-token rate of the model it names (see /models), and every request the gateway sends to a model is recorded in Dashboard → Logs with its tokens and cost. On a Router One Pro, Max or Ultra plan, a model that a plan tier lists draws on that tier's allowance first, and calls beyond the allowance are billed to the wallet at the posted rates: as of the 2026-10-24 plan response, claude-opus-5, the model the pins above select, is in the Premium models tier of all three plans (/pricing lists each plan's allowances). Router One's request and token limits on a key and on an account are platform defaults, raised on request through support@router.one, and Router One's own error codes are in the error-codes reference (https://router.one/llm-api-error-codes).

## Messages that are not this usage limit

Per Claude Code's error reference (checked 2026-10-24), these look related but mean something else:

| What Claude Code prints | What it means |
| --- | --- |
| `API Error: Server is temporarily limiting requests (not your usage limit)` | A short-lived server-side throttle unrelated to your plan quota; from v2.1.199 Claude Code retries it automatically with backoff before showing it |
| `API Error: Request rejected (429) · …` | The rate limit configured for the API key or cloud project in use; behind a custom ANTHROPIC_BASE_URL the trailing text names the gateway host. Run /status to check which credential is active |
| `API Error: Usage credits required for 1M context · …` | An entitlement check for the 1M-token context window, not an exhausted quota; /model switches to standard context |
| `Credit balance is too low` | A Claude Console organization out of prepaid credits, or a Console API key in your environment sending requests you meant to bill to your subscription |
| `spend limit reached`, followed by the period and reset time | A spend cap set by the operator of a Claude apps gateway, not your plan's limit |
| `Not logged in · Please run /login` | No valid credential reached the session (https://router.one/claude-code-403) |

## FAQ

### Is “You've hit your session limit” a Router One error?

No. Per Claude Code's error reference (checked 2026-10-24), it is Claude Code's message for a usage limit of a Claude subscription, on a session signed in with that subscription. A Claude Code session set up for Router One sends its requests to https://api.router.one with your Router One key in ANTHROPIC_AUTH_TOKEN and is billed by Router One. If you expected the session to use Router One, run /status: per Claude Code's gateway docs (checked 2026-10-24), an Auth token line naming ANTHROPIC_AUTH_TOKEN confirms the gateway credential is active, while a Login method line naming a claude.ai account means the variable did not reach the session.

### When does my Claude Code usage limit reset?

At the time printed in the message, and per Claude Code's error reference (checked 2026-10-24) /usage shows your plan limits and when each resets. Anthropic's help center (checked 2026-10-24) says Claude Pro and Max have a five-hour session limit and a weekly limit, shared across Claude and Claude Code. Usage counts against both at the same time, so a heavy burst can use up the weekly allowance before the session window resets.

### Why doesn't switching models with /model help?

Because the session and weekly limits are shared across all models. Per Claude Code's error reference (checked 2026-10-24), only the Opus and Sonnet limits apply to a single model family, so /model helps only after “You've hit your Opus limit” or “You've hit your Sonnet limit”: pick a model outside that family. Each model has its own prompt cache, so the next request re-reads the whole conversation with no cache hits.

### Can Claude Code continue on its own after the reset?

Yes, in interactive sessions signed in with a claude.ai subscription. Per Claude Code's interactive-mode docs (checked 2026-10-24), Claude Code v2.1.234 and later waits in the open session by default, shows “Continuing automatically at 3:45pm · esc to cancel” and picks the task up after the reset; Esc, Ctrl+C or /rate-limit-options cancels the wait. If the task hits the limit again, it re-arms the wait at most twice in a row. Keep the session open: the wait does not restart when you resume a session you exited.

### What does “rate limited until 3:14am” in /usage mean?

That /usage could not refresh your plan limits. Per Claude Code's costs docs (checked 2026-10-24), Claude Code can't fetch them again until that time, which does not mean your work with Claude is limited. Meanwhile /usage may show the usage bars it loaded earlier on this machine, with a Showing last-known usage note; press r after that time for fresh data.

### Can I keep working without waiting?

Yes. Per claude.com/pricing (checked 2026-10-24), on paid plans you can turn on usage credits to keep working at standard API rates (run /usage-credits), or move to a higher plan. Per Anthropic's help center (checked 2026-10-24), a Claude Console API key bills the session as API usage instead of your subscription's included usage. Or point Claude Code at a gateway with its own credential, such as Router One: with your Router One key in ANTHROPIC_AUTH_TOKEN, Router One bills the session, from a Router One plan tier that lists the model or from your wallet at posted rates. Cloud sessions always use your subscription credentials.

### Does a Claude Code session on Router One count against my Claude plan?

Requests sent with your Router One key are billed by Router One, not by your Claude plan. Per Claude Code's gateway docs (checked 2026-10-24), while a gateway credential such as ANTHROPIC_AUTH_TOKEN is set, requests carry it in place of your claude.ai login, and the subscription's usage limits don't apply to them; the login stays saved and unused, and Claude Code goes back to it when you remove the variable. Setting ANTHROPIC_BASE_URL alone does not replace the subscription: the login stays the active credential, so its limits and billing apply. Your chats in the Claude apps and Claude Code cloud sessions stay on your Claude plan, and so do Claude Code sessions in the Claude Desktop app: per Claude Code's authentication docs (checked 2026-10-24), Desktop and cloud sessions do not read ANTHROPIC_AUTH_TOKEN and sign in with OAuth, except a Desktop session running a third-party inference configuration, which uses that configuration's credential.

### Does a Router One plan have usage limits too?

Yes. Router One's Pro, Max and Ultra plans carry monthly quotas by model tier: a model that a plan tier lists draws on that tier's allowance first, and calls beyond the allowance, or to a model no tier lists, are billed to the wallet at posted rates. As of the 2026-10-24 plan response, claude-opus-5 is in the Premium models tier, claude-sonnet-5 in the Mid-tier models tier and claude-haiku-4-5 in the Standard models tier of all three plans; /pricing lists each plan's allowances. Request and token limits on a key and on an account are platform defaults, raised on request through support@router.one.

### Does this setup work from Mainland China?

Yes. The gateway is reachable from Mainland China without a VPN, and the setup is the same as anywhere else: the same one-click command or the same environment variables. Top up the wallet with a card, Alipay or stablecoins.

## See also

- Claude Code 401 & 403 fix: https://router.one/claude-code-403
- Claude Max alternative: https://router.one/claude-max-alternative
- Claude Code in China: https://router.one/claude-code-china
- Claude Code setup guide: https://router.one/blog/claude-code-setup-guide
- Pin the model in Claude Code: https://router.one/blog/claude-code-opus-5-5-setup
- Codex usage limit: https://router.one/codex-usage-limit
- Error codes reference: https://router.one/llm-api-error-codes
- CLI setup guide: https://router.one/docs/guides/cli-setup
- Claude Code's error reference: https://code.claude.com/docs/en/errors
- Canonical page: https://router.one/claude-code-usage-limit
- Models and per-model token rates: https://router.one/models (markdown: https://router.one/models.md)
- Pricing: https://router.one/pricing
- API docs (markdown): https://router.one/docs.md
- Company facts: https://router.one/facts/company.md
