[BUG] /model switch to standard context doesn't clear 1M context credits gate — /compact still fails after switching back
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?
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
- Start a Claude Code session with Sonnet 4.6 (standard context, default settings)
- Work through a long conversation until the session approaches the context limit
- Observe Claude Code auto-escalate to 1M context window (no user prompt or confirmation)
- Run /model → select Sonnet 4.6 · Best for everyday tasks (standard)
- Confirm the picker shows Sonnet 4.6 selected with no 1M indicator
- Run /compact or continue the session until auto-compact triggers
- 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
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗