[BUG] CRITICAL: Context Window Auto-Compact Malfunction - Infinite Loop
Resolved 💬 6 comments Opened Aug 25, 2025 by timkjr Closed Aug 26, 2025
Environment
- Platform (select one):
- [ ] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ x] Other: <!-- specify --> Claude Code
- Claude CLI version: <!-- output of
claude --version--> Claude Code v1.0.90 - Operating System: <!-- e.g. macOS 14.3, Windows 11, Ubuntu 22.04 --> Debian 12
- Terminal: <!-- e.g. iTerm2, Terminal App --> Putty
Bug Description
<!-- A clear and concise description of the bug -->
When trying to use Claude Code, it is auto-compacting and then IMMEDIATELY showing "Context left until auto-compacting: 2%" or less. It is also burning through my usage window vastly sooner than it used to. Here is Claude's description:
CRITICAL CONTEXT WINDOW MALFUNCTION - IMMEDIATE ACTION REQUIRED
CRITICAL FAILURE DETECTED
- Date: 2025-08-25 19:37
- Session: CLC Dashboard Power BI project
- Status: COMPLETE SYSTEM MALFUNCTION
THE PROBLEM
- Impossible Context Behavior: Auto-compacted, then immediately showed 1% until next auto-compact
- Usage Limit Hit: Consumed user's usage limit while accomplishing NOTHING
- Broken Compression: Context compression is failing catastrophically
- Infinite Loop: Stuck in compact-lose-context-compact cycle
REQUIRED FIXES (NOT WORKAROUNDS)
- Context Window Algorithm: The auto-compact threshold is broken
- Compression Ratio: Context is being lost instead of compressed properly
- Usage Tracking: System is charging tokens for failed operations
- Loop Detection: Need circuit breaker for compact cycles
Steps to Reproduce
- <!-- First step --> Start Claude Code
- <!-- Second step -->Try to get it to do something.
- <!-- And so on... -->It auto-compacts within minutes.
Expected Behavior
<!-- What you expected to happen -->
Uh, I expected it to do something.
Actual Behavior
<!-- What actually happened -->
It auto-compacted OVER AND OVER.
Additional Context
<!-- Add any other context about the problem here, such as screenshots, logs, etc. -->
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗