[Bug] Autocompact thrashing: context refilled within 3 turns repeatedly
Status Fixed / completed
Reported on v2.1.226
Maintainer reply None cached
Activity 3 comments · opened Aug 11, 2026 · closed Aug 11, 2026
Bug Description
Autocompact is thrashing: the context refilled to the limit within 3 turns of the previous compact, 3 times in a row. A file being read or a tool output is likely too large for the context window. Try reading in smaller chunks, or use /clear to start fresh.
Environment Info
- Platform: darwin
- Terminal: xterm-256color
- Version: 2.1.226
- Feedback ID: 09797cca-3a5d-494b-b92a-de9ff946c8f5
Errors
[]
3 Comments
My session context says 5% filled but auto compact says 0% left, I tried changing autocompact with /autocompact but still same issue persist
<img width="1139" height="88" alt="Image" src="https://github.com/user-attachments/assets/2edb573d-de2e-46b1-aa90-ae66b7190cf5" />
I think the issue is with how it handle auto compact, that has corrupted for one of my projects, it is working fine on other projects and, when I tried with auto compact disable on current project, its working fine and I am also monitoring the usage and that looks normal as well.
I found the root cause, somehow this got added by claude code to my
settings.local.json"env": {"CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "5"
},