[BUG]
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?
Auto-compaction did not trigger when the conversation reached 100% context usage. The session continued to accept input but context was not compacted automatically. Manual /compact was required to continue.
What Should Happen?
Auto-compaction triggers automatically before or at 100% context, summarizing earlier conversation turns to free up context window space.
Error Messages/Logs
Steps to Reproduce
- Start a long coding session
- Allow context to reach 100% (visible in the status bar)
- Send a new message
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.161 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
Description
Auto-compaction did not trigger when the conversation reached 100% context usage. The session continued to accept input but context was not compacted automatically. Manual /compact was required to continue.
Steps to Reproduce
- Start a long coding session
- Allow context to reach 100% (visible in the status bar)
- Send a new message
Expected Behavior
Auto-compaction triggers automatically before or at 100% context, summarizing earlier conversation turns to free up context window space.
Actual Behavior
No compaction occurred. The session remained at 100% context. The next message was processed without compaction, leaving no room for tool call results and responses.
Environment
- Platform: macOS (darwin 25.5.0)
- Shell: zsh
- Model: claude-sonnet-4-6
Additional Context
The session was a multi-hour coding session involving many file reads, test runs, and code edits. The context meter showed 100% but the auto-compaction hook did not fire. After manually running /compact, the session continued normally.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗