# Hit Your Claude Code Usage Limit? How to Keep Coding

What the Claude Code usage limit messages mean, when each limit resets, and six ways to keep coding, from usage credits and upgrades to an API key.

Source: https://sidrune.ai/blog/claude-code-usage-limit

> **TL;DR:** When Claude Code says "You've hit your session limit", you can wait for the five-hour reset, buy usage credits at API rates, upgrade to Max or Ultra, or point Claude Code at an API key. A key has no session or weekly limit. On Sidrune AI's Claude Code route, Opus 5.5 costs 82% below list.

> We build Sidrune AI, an API gateway that sells Claude below the official price, so one of the six options below is ours. Anthropic's limits and prices are from the Claude Help Center, the Claude Code docs and [claude.com/pricing](https://claude.com/pricing), checked on 6 November 2026. Our prices are from [Model Plaza](https://global.sidrune.ai/model-plaza?aff=7T2JFVEH79XA), last checked on 16 November 2026.

## What does the Claude Code usage limit message mean?

Claude Code shows a different message for each limit, and the fix depends on which one you hit. The messages below are from Anthropic's [Claude Code error reference](https://code.claude.com/docs/en/errors) and the Claude Help Center.

| Message | What ran out | Does `/model` help? |
|---|---|---|
| You've hit your session limit · resets 3:45pm | The five-hour session limit, shared by all models | No |
| You've hit your weekly limit · resets Mon 12:00am | The weekly limit, shared by all models | No |
| You've hit your Opus limit · resets 3:45pm | A limit on one model family | Yes, switch to Sonnet or Haiku |
| You've hit your Sonnet limit · resets 3:45pm | A limit on one model family | Yes, switch to another family |
| You've used 85% of your session limit · resets 3:45pm | Nothing yet, this is a warning | Not needed |
| Usage limit reached · wrapping up | The session limit, hit mid-response | Not needed, see below |

The last message is the [wrap-up allowance](https://support.claude.com/en/articles/17040437-claude-code-wrap-up-allowance). When the five-hour limit arrives in the middle of a response, Claude Code may keep going briefly to finish the step in progress. The allowance is small and capped, counts toward your weekly limit and applies only to a response already running. On Pro it applies up to once per weekly period, on Max each time you reach a session limit. It needs Claude Code 2.1.277 or later and is still rolling out.

A full context window is a separate problem. If Claude Code warns about context or auto-compact, run `/compact` or `/clear`. That warning is separate from your plan's usage.

## How do Claude Code usage limits work?

Paid plans have two usage limits. The [session limit](https://support.claude.com/en/articles/11647753-how-do-usage-and-length-limits-work) starts with your first message and resets in full five hours later. The weekly limit resets at a fixed day and time assigned to your account, whatever day you subscribed.

Claude Code shares both limits with the rest of Claude. Chat on claude.ai, Claude Desktop, Claude Code in the terminal and the [IDE extensions](https://support.claude.com/en/articles/11145838-use-claude-code-with-your-pro-max-or-ultra-plan) all draw from the same allowance. A long chat in the morning leaves less for coding in the afternoon.

Usage also counts against both limits at once. Anthropic's error reference notes that one burst of heavy work, such as a large workflow fan-out, can use up the weekly limit before the session window resets.

| Plan | Price | Session limit | Weekly limit |
|---|---|---|---|
| [Pro](https://support.claude.com/en/articles/8325606-what-is-the-pro-plan) | $20 per month, or $17 per month billed yearly | Yes | Yes. Fable only through usage credits |
| [Max](https://support.claude.com/en/articles/11049741-what-is-the-max-plan) | $100 per month | 5x Pro | 5x Pro, plus a separate Fable limit |
| [Ultra](https://support.claude.com/en/articles/17728952-what-is-the-ultra-plan) | $200 per month | None on verified accounts | 10x Pro, plus a separate Fable limit |

Ultra is the former Max 20x plan, renamed with no change in price. A new Ultra account has a temporary session limit until Anthropic verifies it from account and payment history. If Settings > Usage shows no Current session bar, your account is verified.

Anthropic does not publish a token or message count for any plan. How far the allowance goes depends on the model, the effort level, the length of the conversation and the files Claude reads. Anthropic also reserves the right to add weekly or monthly caps, or caps on specific models.

## How do you check how much usage you have left?

Run `/usage` inside Claude Code. On Pro, Max and Ultra it shows [plan usage bars](https://code.claude.com/docs/en/costs) with reset times, plus a breakdown of what used your allowance: skills, subagents, plugins and individual MCP servers. Rows such as "Trim CLAUDE.md · 49k tokens per request" point at the biggest savings, and pressing `f` asks Claude Code to apply the ones it can.

The plan usage bars are also in Settings > Usage on claude.ai. To watch them while you work, add the `rate_limits` fields to a custom status line, or click the usage ring in the Claude desktop app.

Ignore the dollar figure in the Session block of `/usage` if you are on a plan. Claude Code computes it at list price for API users, and it has nothing to do with your subscription bill.

## Six ways to keep coding after the limit

| Option | How fast you are back | Extra cost | Main drawback |
|---|---|---|---|
| Wait for the reset | Up to 5 hours, or several days for the weekly limit | None | You lose the time |
| Switch model | At once | None | Works only for an Opus or Sonnet limit |
| Use a limit reset | At once | None | Only if Anthropic gave you one |
| Usage credits | At once | API list price per token | Billed on top of the plan |
| Upgrade to Max or Ultra | At once | $100 or $200 per month | Still has a weekly limit |
| Switch to an API key | About five minutes the first time | Per token, list price or below | Separate balance and setup |

### 1. Wait, and let Claude Code continue on its own

Since version 2.1.234, Claude Code [waits in the open session](https://code.claude.com/docs/en/interactive-mode#wait-for-a-usage-limit-to-reset) and continues the interrupted task after the reset. You will see "Continuing automatically at 3:45pm · Esc to cancel" at the bottom of the screen. Automatic continue is on by default for claude.ai logins.

Keep the session open: exiting, `/clear` or `/resume` cancel the wait. Permission prompts still appear, so the task can stop on one while you are away. After three automatic continuations in a row, Claude Code stops, and you pick the next step with `/rate-limit-options`. For a reset more than 24 hours away, such as most weekly limits, Claude Code does not start the wait on its own: pick it yourself in `/rate-limit-options`.

### 2. Switch to another model

This works only after a model-specific message such as "You've hit your Opus limit". Run `/model` and pick a model outside that family, for example Sonnet 5.5. Each model has its own prompt cache, so the first request after the switch re-reads the whole conversation without cache hits.

For the session and weekly limits, switching models changes nothing, because those limits cover every model.

### 3. Use a limit reset, if you have one

Anthropic [occasionally gives eligible plans a limit reset](https://support.claude.com/en/articles/17007452-what-is-a-limit-reset) that sets the session or weekly limit back to full. The "Reset for free" button is in Settings > Usage on the web or in Claude Desktop, and on the limit message there. The button is missing in Claude Code in the terminal or IDE and in Claude Mobile. A reset you use on the web still applies to Claude Code.

### 4. Turn on usage credits

[Usage credits](https://support.claude.com/en/articles/12429409-manage-usage-credits-for-paid-claude-plans) keep Claude working past any limit on Pro, Max and Ultra. You prepay a balance in Settings > Usage, and once a limit runs out your requests switch to pay-as-you-go and the warning changes to "Now using credits". Run `/usage-credits` in Claude Code to open that page.

Credits are billed at standard API rates, so Opus 5.5 costs $4 per 1M input tokens and $20 per 1M output tokens. Set a monthly spend limit before you start. The monthly API credits included with Max and Ultra cannot pay for usage credits or interactive Claude Code sessions.

### 5. Upgrade your plan

Moving from Pro to Max, or from Max to Ultra, applies the new limits right away. Max gives 5x the Pro allowance per session and per week for $100. Ultra gives 10x per week and no session limit on verified accounts for $200. Both still have a weekly limit, and both are billed monthly only.

### 6. Switch Claude Code to an API key

With an API key, Claude Code bills every token to that key and has [no usage cap](https://support.claude.com/en/articles/14552983-models-usage-and-limits-in-claude-code). A key from the Claude Console bills at list price. A gateway that accepts the Anthropic Messages format can bill less. The variables are described in Anthropic's guide to [connecting Claude Code to an LLM gateway](https://code.claude.com/docs/en/llm-gateway-connect), written for gateways an organization runs itself. Sidrune AI is a third-party gateway and is not affiliated with Anthropic, so compare what each route offers before you top up.

A gateway variable takes precedence over your claude.ai login without deleting it. Unset the variable and Claude Code goes back to your subscription. That makes a key a good overflow: use the plan while it lasts and the key for the hours in between.

## How do you switch to an API key when you hit the limit?

The setup below keeps your subscription as the default and uses the key only when you ask for it. It assumes a key from a Claude group on [global.sidrune.ai](https://global.sidrune.ai/keys?aff=7T2JFVEH79XA); any Anthropic-compatible key works the same way.

**Step 1. Add an alias to your shell.** Put this line in `~/.zshrc` or `~/.bashrc`, with your key in place of `YOUR_SIDRUNE_API_KEY`:

```bash
alias claude-key='ANTHROPIC_BASE_URL=https://global.sidrune.ai ANTHROPIC_AUTH_TOKEN=YOUR_SIDRUNE_API_KEY claude'
```

Open a new terminal so the alias loads. Plain `claude` still uses your plan.

**Step 2. Continue the same conversation on the key.** When the limit hits, exit Claude Code and run this in the same project folder:

```bash
claude-key --continue
```

`--continue` loads the most recent conversation in the current directory, so you keep the context you built. The new endpoint has no cache of that conversation yet, so expect the first request to cost more than the ones after it.

**Step 3. Check which credential is active.** Run `/status`. The `Anthropic base URL` line should show `https://global.sidrune.ai` and the `Auth token` line should name `ANTHROPIC_AUTH_TOKEN`.

**Step 4. Go back after the reset.** Exit and start `claude --continue` without the alias. Claude Code uses your claude.ai login again.

Two things break this setup. If `ANTHROPIC_BASE_URL` or `ANTHROPIC_AUTH_TOKEN` is set in the `env` block of `~/.claude/settings.json`, that value wins over the shell, and plain `claude` never returns to the plan. The Claude desktop app also ignores these variables: it reads gateway settings from its own [third-party inference configuration](https://code.claude.com/docs/en/llm-gateway-connect).

For a key that stays on permanently, with a test request and a troubleshooting table, see [How to Use Claude Code With a Cheaper API Key](./claude-code-cheaper-api-key).

## What does it cost to keep coding past the limit?

Anthropic puts the average Claude Code cost at about [$13 per developer per active day](https://code.claude.com/docs/en/costs), with 90% of users under $30, measured across enterprise deployments at API rates. That is roughly what a day on usage credits or a Console key costs, since both bill at list price.

| A day of Claude Code | Usage credits or Console key, 1x | Sidrune AI, 0.18x | Sidrune AI, 0.36x |
|---|---|---|---|
| Average day, $13 at list price | $13.00 | $2.34 | $4.68 |
| Heavy day, $30 at list price | $30.00 | $5.40 | $10.80 |

Prices per 1M tokens, input / output, for the routes that suit Claude Code:

| Route | Opus 5.5 | Sonnet 5.5 |
|---|---|---|
| **Anthropic list price, usage credits**<br>1x | $4.00&nbsp;/&nbsp;$20.00 | $2.00&nbsp;/&nbsp;$10.00 |
| **Claude-Max-STANDARD INJECT-ONLY CC**<br>0.18x, Claude Code only | $0.72&nbsp;/&nbsp;$3.60 | $0.36&nbsp;/&nbsp;$1.80 |
| **Claude-Max-LIMIT INJECT**<br>0.22x, any client | $0.88&nbsp;/&nbsp;$4.40 | $0.44&nbsp;/&nbsp;$2.20 |
| **Claude-Max-NO INJECT**<br>0.36x, any client | $1.44&nbsp;/&nbsp;$7.20 | $0.72&nbsp;/&nbsp;$3.60 |
| **Claude-Anthropic-Official**<br>0.7x | $2.80&nbsp;/&nbsp;$14.00 | $1.40&nbsp;/&nbsp;$7.00 |

INJECT routes add an instruction to each request, and Model Plaza notes it may lower output quality in some cases. NO INJECT adds nothing. Opus 5.5 in fast mode costs 2x on every route, the same as on Anthropic's API. The 0.18x route accepts requests from Claude Code only, which fits this use.

If you hit the limit most weeks, compare a month of overflow with the price of the next plan up. Break-even points for each plan are worked out in [Claude Code Pricing 2026](./claude-code-pricing).

## How can you make your limit last longer?

Anthropic's [usage guide for Claude Code](https://support.claude.com/en/articles/14552983-models-usage-and-limits-in-claude-code) traces most early limit hits to five habits:

1. **Clear between tasks.** Every turn resends the whole conversation, so run `/clear` before unrelated work and `/compact` in the middle of a long task.
2. **Match the model to the job.** Opus 5.5 costs twice as much per token as Sonnet 5.5 and uses more of your allowance. Use Sonnet for routine coding, or `/model opusplan` to plan with Opus and execute with Sonnet.
3. **Point at files instead of pasting them.** A path lets Claude read selectively. The `@` prefix loads the whole file into context.
4. **Keep CLAUDE.md short.** It loads on every turn. Anthropic suggests staying under about 200 lines.
5. **Ask for a plan before big changes.** A plan costs a few hundred tokens. A wrong 400-line diff costs thousands, twice.

Lowering the effort level for routine edits also saves usage, because higher effort uses more tokens.
