[BUG] Compact is now being run automatically

Status Fixed / completed
Maintainer reply ✓ Yes — ashwin-ant
Activity 6 comments · opened Mar 20, 2025 · closed Mar 26, 2025
💡 Likely answer: A maintainer (ashwin-ant, collaborator) responded on this thread — see the highlighted reply below.

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

  1. 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.

View original on GitHub ↗

6 Comments

ashwin-ant collaborator · 1 year ago

You can disable auto-compact in /config if you like. Let us know if that addresses your issue!

LoganDark · 1 year ago

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 😭

LoganDark · 1 year ago

@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)

LoganDark · 1 year ago

ty <3

ashwin-ant collaborator · 1 year ago

This should be fixed in 0.2.54

github-actions[bot] · 1 year ago

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.