[BUG] Auto-compact does not fire when context exceeds 100%, leading to "1M context usage credits" error
Resolved 💬 2 comments Opened Jun 4, 2026 by varigg Closed Jun 4, 2026
What's Wrong?
Auto-compact is enabled, but when context grows beyond 100% (verified repeatedly via /context), auto-compact never fires. The session continues accumulating context until it hits the 1M extended context threshold, which then fails with:
API Error: Usage credits required for 1M context · run /usage-credits to turn them on, or /model to switch to standard context
What Should Happen?
Auto-compact should fire before context reaches 100%, preventing the session from ever attempting to use the 1M extended context window.
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
Steps to Reproduce
- Enable auto-compact (
/config→ auto-compact: true) - Run a long-lived session with tool-heavy turns (many tool calls per turn producing substantial output)
- Run
/context— observe context at >100% - Continue for several more turns — auto-compact never fires
- Eventually receive "Usage credits required for 1M context" error
Claude Model
Sonnet
Is this a regression?
I don't know
Claude Code Version
2.1.162 (Claude Code)
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
Other (tmux)
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗