Claude Code · Usage limits

Hit your Claude Code usage limit? How the limits work and what you can do

Claude Pro and Max plans cap Claude Code twice: a session allowance that resets every five hours, and a weekly allowance. When you hit one, you can wait, upgrade, turn on Anthropic's usage credits, or point Claude Code at a pay-per-token API. This page puts the four options side by side.

Facts checked

What the limits are (October 2026)

Only officially published facts are listed. Weekly amounts and message counts are not published; your account's Settings > Usage is the source of truth.

PlanPrice / month5-hour windowWeekly limitNotes
Claude Pro$20 ($17/mo billed yearly)YesYesFable requires usage credits
Claude Max 5x$1005x Pro (per 5 hours)Yes (amount not published)Separate weekly Fable limit; includes $100/mo API credits that can't be used in Claude Code
Claude Max 20x$20020x Pro (per 5 hours)Yes (amount not published)Same as above; includes $200/mo API credits
ChatGPT Plus (Codex)$20YesMay applyAbout 15–160 local messages per 5 hours on GPT-6.1 Sol (OpenAI estimate)
ChatGPT Pro (Codex)$100 / $200 / $500None currentlyIncluded allowanceYou can buy credits when it runs out

Providers can change limits at any time. Anthropic also reserves the right to limit usage in other ways (weekly/monthly caps, model or feature limits). Facts checked 2026-10-10.

Official sources:claude.com/pricingWhat is the Max plan? (Claude Help Center)Use Claude Code with your Pro or Max planCodex pricing (OpenAI)Using Codex with your ChatGPT plan (OpenAI Help)

Why Claude Code hits limits fast

  1. 1

    Every turn resends the whole conversation

    Files read, tool output and diffs are counted again with each message. The longer a session runs, the heavier each turn gets.

  2. 2

    Opus uses more than Sonnet

    Anthropic suggests Sonnet for routine coding and Opus for hard problems, or /model opusplan (Opus plans, Sonnet executes).

  3. 3

    Subagents, agent teams and scheduled tasks each draw usage

    Anthropic's docs note that agent teams use about 7x the tokens in plan mode.

  4. 4

    Cache misses

    Come back after the cache expires and your first message reprocesses the full context.

  5. 5

    Growing context

    Large pastes, many MCP servers and a long CLAUDE.md make every turn bigger.

Save allowance: /clear between tasks, /compact mid-task, and /usage to see what is eating your allowance.

Your four options

No option is always best. Pick by how much you use and how soon you need to keep working.

OptionHowCostBest for
WaitCheck the reset time; Claude Code v2.1.234+ can wait and continue automaticallyTimeNot in a rush
UpgradePro → Max 5x → Max 20x$100–$200/mo, still weekly-cappedPeople who max it out every week
Usage creditsTurn on in Settings > Usage, or run /usage-credits in Claude CodeStandard API rates, prepaid, monthly cap optionalOccasional overflow while staying on your plan
Pay-as-you-go APISet an API key and base URL in Claude CodePer token from your balance, separate from your Claude planSprints, overflow, per-key team budgets

Pay-as-you-go is billed per token, and rate and concurrency limits still apply as described in our docs. You can also set daily, monthly or total spend caps on each API key. docs.aicodewith.ai

The math: what a Claude Code workday costs

Below are three workday intensities priced at Opus 5.5 official API rates. Most Claude Code tokens are cache reads, so the cache-read price matters a lot.

Assumptions

  • Opus 5.5 official prices per 1M tokens: input $4, output $20, cache read $0.20, 5-minute cache write $5.
  • 22 workdays per month; token mix per day as in the table, in millions of tokens.
  • Anthropic's reference: enterprise deployments average about $13 per developer per active day, and 90% of users stay under $30 per active day. The typical and heavy scenarios sit in that range.
Scenario (per active day)Cache readCache writeUncached inputOutputOfficial API / day22 days / month
Typical15M0.6M0.15M0.15M$9.60$211
Heavy40M1.2M0.3M0.4M$23.20$510
Extreme (multi-agent / long sessions)120M3M0.8M1.2M$66.20$1,456

The same usage on aicodewith

At current public prices, Claude models on aicodewith start from 19% of the official price (price depends on the channel; the pricing page is authoritative).

ScenarioOfficial API / dayaicodewith from / dayaicodewith from / month
Typical$9.60from $1.82from $40.13
Heavy$23.20from $4.41from $96.98
Extreme (multi-agent / long sessions)$66.20from $12.58from $277

Claude model prices (per 1M tokens)

ModelOfficial input / outputaicodewith from, input / output
Claude Opus 5.5$4 / $20from $0.76 / $3.8
Claude Sonnet 5.5$2 / $10from $0.38 / $1.9
Claude Haiku 5.5$0.1 / $0.5from $0.019 / $0.095

See Claude model prices|/pricing

Compared with a subscription

Max 5x is $100/month and Max 20x is $200/month, but both have 5-hour and weekly caps. Beyond that, usage credits bill at official API rates.

Bottom line

If you reliably use your whole Max allowance every week and rarely hit the cap, Max is usually cheaper.

Pay-as-you-go wins for:

  • Overflow after you hit a cap
  • Uneven usage, such as a few days of sprinting
  • Not wanting a 5-hour window to break your flow
  • Teams that need per-key accounting and budgets

Your real token mix can differ a lot. Run /usage or /cost in Claude Code and plug in your own numbers.

Switch Claude Code to aicodewith in 1 minute

Claude Code reads the API endpoint and key from environment variables. The config below is the same one the dashboard gives you.

  1. 1. Create an API key

    Create an API key in the aicodewith dashboard. You can set a daily or monthly spend cap on it.

  2. 2. Edit ~/.claude/settings.json

    Add the env block below (on Windows: %USERPROFILE%\.claude\settings.json). ANTHROPIC_BASE_URL is the bare domain, with no /v1.

    ~/.claude/settings.json
    {
      "env": {
        "ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",
        "ANTHROPIC_API_KEY": "",
        "ANTHROPIC_BASE_URL": "https://api.aicodewith.ai"
      }
    }
  3. 3. Restart and verify

    Restart Claude Code and send a message. Pick Opus 5.5 or Sonnet 5.5 with /model, then confirm the request in your aicodewith usage records.

If an API key is set, Claude Code uses API billing instead of your subscription allowance.

Switching back

Remove the env block and run /login in Claude Code.

Codex users: config.toml guide

Limit messages, decoded

Claude Code messages are quoted from Anthropic's errors documentation.

What you seeWhat it meansWhat to do
You've hit your session limit · resets 3:45pmYour 5-hour session allowance is used up (all models)Wait / usage credits / switch to pay-as-you-go
You've hit your weekly limit · resets Mon 12:00amYour weekly allowance is used upSame as above; switching models won't help
You've hit your Opus limit / Sonnet limitOne model family's allowance is used upSwitch to the other family with /model
You've used 85% of your session limitEarly warningRun /compact and move from Opus to Sonnet
Usage credits required for 1M context1M context needs usage creditsSwitch back to standard context with /model
Codex: usage limit reachedYour Codex 5-hour or weekly allowance is used upWait / buy credits / use an API key
429 / rate limited (on aicodewith)Requests exceeded our rate limitLower concurrency and retry; see the 429 guide

FAQ

Does Claude Max have a usage cap?

Yes. Every tier has a session allowance that resets every five hours and a weekly allowance, and Anthropic may apply other caps.

How much can Max 20x use per week?

Anthropic only publishes that it is 20x Pro per 5-hour session. Weekly amounts are not published; check Settings > Usage.

Are Claude Code and claude.ai limits separate?

No. claude.ai, the desktop app and Claude Code share one pool.

When does the weekly limit reset?

Each account has a fixed weekly reset time shown in Settings > Usage. It is not tied to when you subscribed.

Can Max's monthly API credits be used in Claude Code?

No. Anthropic says they apply to the Claude Platform only, not Claude Code or usage credits.

Does pay-as-you-go have a 5-hour limit?

Pay-as-you-go bills your balance per token and does not use your Claude plan's 5-hour or weekly allowance. Rate and concurrency limits still apply as described in our docs, and you can set a spend cap per API key.

Is aicodewith affiliated with Anthropic?

No. aicodewith is an independent third-party API service. Claude is a trademark of Anthropic.

Is pay-as-you-go always cheaper than Max?

No. If you reliably use your whole Max allowance, the subscription is usually cheaper. Pay-as-you-go fits overflow, sprints and teams that need per-key accounting.

Switch Claude Code to aicodewith in 1 minute

Pay-as-you-go is billed per token, and rate and concurrency limits still apply as described in our docs. You can also set daily, monthly or total spend caps on each API key.

Related

Official sources

Claude and Claude Code are trademarks of Anthropic PBC; ChatGPT and Codex are trademarks of OpenAI. This page is not affiliated with or endorsed by either company. Limit facts come from official public docs, checked 2026-10-10, and may change.