[BUG] Sonnet 4.6 blocked by false "usage credits required" error

Open 💬 18 comments Opened May 23, 2026 by mmmfx1

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Description

Sonnet 4.6 is consistently blocked by a false "usage credits required for 1M context" error that should only apply to Opus with extended context.

Error Message

API Error: Usage credits required for 1M context · run /usage-credits to turn them on, or /model to switch to standard context

Steps to Reproduce

  1. Start Claude Code
  2. Run /model and select Sonnet 4.6
  3. Attempt any operation (Discord, CLI command, etc.)
  4. Error thrown immediately

Expected Behavior

Sonnet 4.6 works without requiring usage credits.

Actual Behavior

All operations blocked. Error is incorrect for model being used.

Workaround

Switch to Haiku 4.5

Notes

  • Reproducible and consistent
  • Blocks all operations (Discord, CLI, session management)
  • Haiku unaffected
  • Bug happens on multiple attempts

What Should Happen?

It was working fairly solid for the last 3 weeks like that...continue to work as it was.

Error Messages/Logs

## Description
Sonnet 4.6 is consistently blocked by a false "usage credits required for 1M context" error that should only apply to Opus with extended context.

## Error Message
API Error: Usage credits required for 1M context · run /usage-credits to turn them on, or /model to switch to standard context

## Steps to Reproduce
1. Start Claude Code
2. Run `/model` and select Sonnet 4.6
3. Attempt any operation (Discord, CLI command, etc.)
4. Error thrown immediately

## Expected Behavior
Sonnet 4.6 works without requiring usage credits.

## Actual Behavior
All operations blocked. Error is incorrect for model being used.

## Workaround
Switch to Haiku 4.5

## Notes
- Reproducible and consistent
- Blocks all operations (Discord, CLI, session management)
- Haiku unaffected
- Bug happens on multiple attempts

Steps to Reproduce

Description

Sonnet 4.6 is consistently blocked by a false "usage credits required for 1M context" error that should only apply to Opus with extended context.

Error Message

API Error: Usage credits required for 1M context · run /usage-credits to turn them on, or /model to switch to standard context

Steps to Reproduce

  1. Start Claude Code
  2. Run /model and select Sonnet 4.6
  3. Attempt any operation (Discord, CLI command, etc.)
  4. Error thrown immediately

Expected Behavior

Sonnet 4.6 works without requiring usage credits.

Actual Behavior

All operations blocked. Error is incorrect for model being used.

Workaround

Switch to Haiku 4.5

Notes

  • Reproducible and consistent
  • Blocks all operations (Discord, CLI, session management)
  • Haiku unaffected
  • Bug happens on multiple attempts

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Claude Code version 2.1.147

Platform

Other

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Windows Terminal

Additional Information

Haiku prepared tis infromation.

View original on GitHub ↗

18 Comments

github-actions[bot] · 1 month ago

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/60707
  2. https://github.com/anthropics/claude-code/issues/61089

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

giruuuuj · 1 month ago

Analysis

This is not a duplicate of #60707 or #61089 in the sense that the error keeps hitting different users across versions, but all share the same root cause:

Root Cause

The API is returning "Usage credits required for 1M context" for Sonnet 4.6 when it should only apply to Opus with extended context. Based on the changelog:

  • Line 2107: "Opus 4.6 (fast mode) now includes the full 1M context window" — 1M context is Opus-only
  • Line 2127: "Sonnet 4.5 with 1M context is being removed from the Max plan in favor of our frontier Sonnet 4.6 model, which now has 1M context" — Sonnet 4.6 has 1M context only on Max/Team/Enterprise plans
  • Line 1694: "Added 1M context window for Opus 4.6 by default for Max, Team, and Enterprise plans (previously required extra usage)"

The bug: something is causing Sonnet 4.6 to be treated as a 1M-context model for Pro plan users who don't have usage credits. The API then rejects the request. This could be:

  1. API-side: The plan-tier check for Sonnet 4.6 is missing — it treats all Sonnet 4.6 requests as 1M context
  2. CLI-side: The model selection code is selecting the 1M-context variant of Sonnet 4.6 even for Pro users

Given it affects both CLI (v2.1.147) and VSCode extension, the API side is the more likely culprit.

Workaround

Set the CLAUDE_CODE_DISABLE_1M_CONTEXT environment variable (added in v2.1.49, line 2106):

export CLAUDE_CODE_DISABLE_1M_CONTEXT=1
claude

This forces standard 200K context and bypasses the usage-credits check. For VSCode, set it in terminal.integrated.env.linux or terminal.integrated.env.osx.

The Fix Needed

The API's plan-tier check for 1M context needs to be corrected for Sonnet 4.6:

  • Pro plan: Sonnet 4.6 should use standard 200K context — no usage credits required
  • Max/Team/Enterprise plan: Sonnet 4.6 can use 1M context — usage credits check applies

This is likely a configuration fix on the API side (model-to-plan-tier mapping) rather than a CLI code fix.

garyw-stack · 1 month ago

Mine is saying "Usage credits are required for long context request" but still have 60% weekly and just started 5 hour usage left. Curious if these issues are related.

giruuuuj · 1 month ago

@garyw-stack Likely related — same root cause (Sonnet 4.6 being misclassified as a 1M-context model requiring credits), but a different symptom. Your case suggests the API's plan-tier check is blocking Sonnet 4.6 even when credits are available. Try the same workaround:

export CLAUDE_CODE_DISABLE_1M_CONTEXT=1
claude

That bypasses the 1M context path entirely and uses standard 200K, which should dodge the false credit check. If it works, it confirms the same root cause.

garyw-stack · 1 month ago

@giruuuuj as soon as I did that it did auto compact as I was at like 400k, but now it is running smoothly with that additional context disabled setting.

Thank you. Hopefully they will get figured out soon as I will have to compact more frequently for the time being but it's better than nothing.

giruuuuj · 1 month ago

Good to know the workaround confirmed it. Frequent compaction is the trade-off — the API-side fix needs the model-to-plan-tier mapping corrected for Sonnet 4.6 so Pro users get standard 200K without the false credit check.

mjbonov · 1 month ago

Reproducing on Claude Desktop / Max plan — adding data point + workaround

Confirming this on Max plan (Claude Desktop, macOS, May 2026). Same API Error: Usage credits required for 1M context · turn on usage credits at claude.ai/settings/usage, or use --model to switch to standard context error on every Sonnet 4.6 request.

Plan usage at time of failure (well below all limits):

5h limit: 8%
Weekly all-models: 49%
Weekly Claude Design: 0%
Sonnet-only weekly: 21%
So the error isn't actually about exhausted credits — it's the 1M context credit gate firing.

Smoking gun: /context on a fresh Sonnet 4.6 chat shows 140.9k / 1.0M (14%) — Sonnet 4.6 is being force-routed at 1M ceiling, not the standard 200k. Sonnet 4.5 shows the correct 200k in the same harness.

Workaround that works (no credits needed):

/model claude-sonnet-4-6
Typing the fully-qualified plain alias hits the 200k variant correctly and Sonnet 4.6 works as expected. Has to be re-entered every fresh chat.

What's broken: the picker entry labeled "Sonnet 4.6" in the Claude Desktop model selector is wired to the 1M variant by default, with no plain 200k entry available in the UI. The CLI alias works; the picker doesn't.

What I tried that didn't help:

/model sonnet (short alias) — same 1M routing
Picker → "Sonnet 4.6" — same 1M routing
Fresh chat (not just mid-session switching) — same 1M routing
Toggling Claude Desktop default model — same
Comparison point: I was on Antigravity for 2+ months before switching to Claude Desktop a few days ago, never saw this. Antigravity correctly routed Sonnet at 200k by default. So this is specifically a Claude Desktop picker/routing regression.

Environment:

Claude Desktop 1.8555.2 (a476c3), build 2026-05-22T23:04:37Z
macOS
Max plan
Sonnet 4.6 (broken), Sonnet 4.5 (works), Opus 4.7 (works, auto-1M)

Happy to provide additional data — full /context output, screenshots — if useful for triage.

stanlrt · 1 month ago

Very annoying bug. One workaround is to tell the agent that spawns the subagent to use Opus.

Andrewdroidsky · 1 month ago

Environment

  • Plan: Pro
  • Platform: Windows
  • Claude Code version: latest

Bug Description

I am unable to use Claude Code at all. Every session — including brand new ones with zero context — immediately throws:

API Error: Usage credits required for 1M context · run /usage-credits to turn them on, or /model to switch to standard context

Steps to Reproduce

  1. Open a new Claude Code session
  2. Select claude-sonnet-4-6 via /model
  3. Send any prompt (even a single word)
  4. Error is thrown immediately

Expected Behavior
Sonnet 4.6 should use the standard 200K context window by default. The 1M context tier should only be engaged when explicitly requested or when context actually exceeds 200K tokens.

Actual Behavior
Every request to Sonnet 4.6 is routed to the 1M context tier regardless of actual session size. The error appears on a completely fresh session with near-zero context.

Additional Context

  • Switching to Haiku 4.5 avoids the error but the model is not capable enough for my use case (complex code)
  • Opus 4.6 has the same issue
  • /compact fails with "conversation could not be reduced below the context limit"
  • This started happening suddenly with no changes on my end
  • I have NOT enabled usage credits and should not need to for standard context requests

This is a blocking issue that makes Claude Code completely unusable on the Pro plan. Please fix the default context routing for Sonnet 4.6.

garyw-stack · 1 month ago

I finally got the 1m context to work on mine for Visual Studio extension. Had to log in to Claude website, turn on extra usage, then I set the limits to $0. Went back to VSC and switched model to Sonnet(1M Context). Has been working since

AnadarProSvcs · 1 month ago

The /model claude-sonnet-4-6 command didn't work for me on the dekstop app. It keeps trying to use the 1M contact. I switched to Opus but that's not a good solution either. This needs to be fixed.

sstraus · 1 month ago

Confirming this affects Opus 4.6/4.8 on Max plan as well — not just Sonnet. Fresh session after /clear, standard context, immediately hits the 1M credit gate. CC 2.1.160, macOS.

kiriz · 1 month ago

Facing the same issue,

❯ /model
  ⎿  Set model to Sonnet 4.6 and saved as your default for new sessions

❯ continue
  ⎿  API Error: Usage credits required for 1M context · run /usage-credits to turn them on, or /model to switch to standard
     context
garyw-stack · 1 month ago
Facing the same issue, `` ❯ /model ⎿ Set model to Sonnet 4.6 and saved as your default for new sessions ❯ continue ⎿  API Error: Usage credits required for 1M context · run /usage-credits to turn them on, or /model to switch to standard context ``

Go to you claude web dashboard, turn on extra usage, set amount to $0 (insure don't rack up unwanted bill), should work after that.

Fynaritra · 1 month ago

Same here!

<img width="996" height="272" alt="Image" src="https://github.com/user-attachments/assets/5e3490d7-9d60-484b-8b0b-09ebcce86021" />

constantinosbou · 1 month ago

are they going to fix this or we switch to Codex ? That's shady AF

PaulaDynowska · 1 month ago

Same problem here

sam-fakhreddine · 28 days ago

Can confirm

<img width="1202" height="459" alt="Image" src="https://github.com/user-attachments/assets/caebe238-436b-4155-b114-85b1e0ab7a74" />