[BUG] Compact is now being run automatically
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: 0.2.52 (Claude Code)
- Operating System: macOS 15.3.2
- Terminal: iTerm2
Bug Description
Claude Code now runs /compact automatically when context space is low.
Steps to Reproduce
- long conversation
Expected Behavior
When context space is low, I usually finish my current task before running /compact. This is because /compact causes Claude to lose all existing context, such as the files that it had reviewed to inform its implementation. After /compact, its output can no longer be trusted and it cannot complete the task without starting over. That is why I finish completing the task before running /compact.
Actual Behavior
/compact was run automatically when context space began to run out, erasing all the research that Claude had done for the implementation of my request, and ruining its ability to actually properly complete the task.
Additional Context
Before this, there was only an indicator when context space was running low, and I was free to allow Claude to finish a properly informed implementation before running /compact by choice.
6 Comments
You can disable auto-compact in
/configif you like. Let us know if that addresses your issue!oh, thank you, that does help!! sorry, I couldn't access the config while the model was running, so I couldn't stop the compact from running itself at least once 😭
@ashwin-ant could we maybe reopen this until ~~claude does not reset this setting on every update? in the middle of a task rn and noticed that the setting reset itself after the most recent update. now thinking claude won't be able to finish thinking before the reset automatically happens, since I can't run /config while it is thinking~~ you add back the old copy that doesn't imply the setting is enabled if it isn't? (I just hit esc to verify and this setting is off... please restore the old copy when the setting is off, if possible)
ty <3
This should be fixed in 0.2.54
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.