claude-code - 💡(How to fix) Fix [BUG] /model switch to standard context doesn't clear 1M context credits gate — /compact still fails after switching back

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

API Error: Usage credits required for 1M context · run /usage-credits to turn them on, or /model to switch to standard context This error appears on every command after auto-escalation, including after /model has already been used to switch back to Sonnet 4.6.

Fix Action

Fix / Workaround

  • The 1M context escalation was never explicitly enabled by the user — it was triggered automatically by session length with no opt-in prompt or confirmation dialog
  • Once escalated, /model, /compact, and auto-compact all fail — there is no in-session recovery path
  • Workaround: close the session and start a new one
  • Suggested fix: either (a) require explicit user confirmation before auto-escalating to 1M context, or (b) ensure /model switching fully resets the context tier so /compact can run

Code Example

API Error: Usage credits required for 1M context · run /usage-credits to turn them on, or /model to switch to standard context
This error appears on every command after auto-escalation, including after /model has already been used to switch back to Sonnet 4.6.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

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

What's Wrong?

After Claude Code auto-escalates to the 1M context window (without the user explicitly opting in), switching back to standard context via /model → Sonnet 4.6 does not clear the 1M credits gate. The session remains stuck — every subsequent API call, including /compact and auto-compact, fails with the credits error. The only escape is restarting the session entirely.

What Should Happen?

Switching to a standard-context model via /model should fully exit the 1M context tier and restore normal session behaviour. /compact should run successfully on Sonnet 4.6 standard context after the switch.

Error Messages/Logs

API Error: Usage credits required for 1M context · run /usage-credits to turn them on, or /model to switch to standard context
This error appears on every command after auto-escalation, including after /model has already been used to switch back to Sonnet 4.6.

Steps to Reproduce

  1. Start a Claude Code session with Sonnet 4.6 (standard context, default settings)
  2. Work through a long conversation until the session approaches the context limit
  3. Observe Claude Code auto-escalate to 1M context window (no user prompt or confirmation)
  4. Run /model → select Sonnet 4.6 · Best for everyday tasks (standard)
  5. Confirm the picker shows Sonnet 4.6 selected with no 1M indicator
  6. Run /compact or continue the session until auto-compact triggers
  7. Observe the credits error fires despite being on standard context

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.157 (Claude Code)

Claude Code Version

2.1.157 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

  • The 1M context escalation was never explicitly enabled by the user — it was triggered automatically by session length with no opt-in prompt or confirmation dialog
  • Once escalated, /model, /compact, and auto-compact all fail — there is no in-session recovery path
  • Workaround: close the session and start a new one
  • Suggested fix: either (a) require explicit user confirmation before auto-escalating to 1M context, or (b) ensure /model switching fully resets the context tier so /compact can run

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] /model switch to standard context doesn't clear 1M context credits gate — /compact still fails after switching back