Blocked by "Usage credits required for 1M context" with no in-session recovery path
Open 💬 3 comments Opened Jun 15, 2026 by cespinoa
Description
Occasionally Claude Code gets stuck and refuses to process any further
prompts, showing this error:
API Error: Usage credits required for 1M context · run /usage-credits to turn them on, or /model to switch to standard context.
This happens even when usage credits are already enabled and the session
has been working normally up to that point.
Workaround
The following sequence restores the session without losing context:
- Run
/modeland switch to Haiku. - Send a simple question (e.g. "ok").
- This forces conversation compaction.
- Run
/modelagain and switch back to the original model. - The session resumes normally.
Expected behavior
Either the error should not appear when credits are enabled, or Claude Code
should trigger compaction automatically instead of blocking the session.
The suggested commands in the error message (/usage-credits, /model)
do not resolve the issue directly — the fix requires the extra compaction
step, which is not obvious.
Environment
- Platform: Linux
- Model at time of error: Sonnet 4.6
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗