autoCompactEnabled does not trigger automatically despite being set to true
Bug Report
Claude Code version: 2.1.158
OS: Linux 6.17.0-35-generic
Description
autoCompactEnabled: true is set in the global ~/.claude/settings.json, but auto-compact never triggers automatically during a session. Sessions have reached 300,000+ tokens without any compaction occurring. The user has had to manually initiate compaction each time.
Configuration
~/.claude/settings.json (relevant section):
{
"autoCompactEnabled": true
}
Note: Previously also had "autoCompactWindow": 150000 set (suggested by Claude in a prior session). This has been removed to use the default threshold, but the issue existed both with and without that setting.
Expected behaviour
Auto-compact should trigger automatically when the conversation approaches the context limit, without requiring manual intervention.
Actual behaviour
Auto-compact never triggers. Sessions grow past 300K tokens with no automatic compaction.
Steps to reproduce
- Set
autoCompactEnabled: truein~/.claude/settings.json - Start a long interactive session
- Observe that compaction is never triggered automatically, even past 300K tokens
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗