[BUG] Error: Error during compaction: Error: Conversation too long. Press esc twice to go up a few messages and try again.
Resolved 💬 7 comments Opened Jan 30, 2026 by pratyusht123 Closed Mar 5, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Every session in the CLI shows this error
[Error: Error during compaction: Error: Conversation too long. Press esc twice to go up a few messages and try again. ]
I am running v2.1.27 in the CLI.
What Should Happen?
/compact should not throw this error
Error Messages/Logs
Steps to Reproduce
start Claude in CLI
use till context is exhausted and you see /compact message
starting /compact gives this error
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.21
Claude Code Version
2.1.27
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
_No response_
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗