Auto-compaction triggers at 3% context usage despite DISABLE_AUTO_COMPACT=1
Resolved 💬 2 comments Opened Apr 10, 2026 by wanqiao-square Closed May 24, 2026
Bug Description
Auto-compaction (Recombobulating) triggers at the very start of a conversation when context usage is only ~3%, despite DISABLE_AUTO_COMPACT=1 being explicitly set.
Environment
- Claude Code version: v2.1.89
- Model: Opus 4.6 (1M context)
- Platform: macOS (Darwin 25.3.0)
- Shell: zsh
- Plan: Claude Enterprise
Configuration
~/.claude/settings.json has:
{
"env": {
"DISABLE_AUTO_COMPACT": "1"
}
}
Steps to Reproduce
- Set
DISABLE_AUTO_COMPACT=1insettings.jsonunderenv - Open a Claude Code session (or resume one)
- Context usage is at ~3%
- Auto-compaction ("Recombobulating...") triggers anyway, taking ~1m 10s and compressing to 8.7k tokens
- All prior context is lost
Expected Behavior
- Auto-compaction should NOT trigger when
DISABLE_AUTO_COMPACT=1is set - Even if the env var were not set, compaction should not trigger at 3% context usage (docs say default threshold is ~95%)
Actual Behavior
- Recombobulating triggered at 3% context usage
- Took 1m 10s, compressed everything down to 8.7k tokens
- All previous conversation context was lost
Additional Context
- Multiple Claude Code tabs were open simultaneously (4 sessions)
- This may be related to session resume behavior rather than a fresh session
- The
DISABLE_AUTO_COMPACTenv var appears to not be respected when set viasettings.jsonenvfield
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗