[BUG] Conversation compaction loses entire history, ctrl+e unresponsive
Status Closed — not planned
Maintainer reply None cached
Activity 15 comments · opened Jan 21, 2026 · closed Mar 26, 2026
Description
After conversation compaction, the entire conversation history is lost. Only the compact summary notes remain visible.
Steps to Reproduce
- Work on a task until compaction triggers
- After compaction completes, conversation shows only compact notes
- Previous messages/task context completely gone
Expected Behavior
- Compacted conversation should preserve context
- Ctrl+O should restore previous messages
- Ctrl+E should show full transcript
Actual Behavior
- Entire last task forgotten after compaction
- Ctrl+O only shows compact notes (not full history)
- Ctrl+E does not respond / no full transcript available
- Conversation effectively lost
Impact
Task progress lost, must restart work from scratch.
Environment
- Platform: Windows
- Application: Claude Code CLI
15 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
This is NOT a duplicate of the scroll buffer issues.
Key difference: The suggested duplicates (#7424, #13446, #18204) describe losing the ability to scroll up in the terminal after compaction.
This issue describes: After compaction,
ctrl+e(conversation history) shows nothing at all - the entire conversation history appears to be deleted, not just the terminal scroll buffer. The data itself is gone from the session, not just hidden from view.This is a more severe bug - complete data loss vs. visual scroll buffer clearing.
Reproduction - Jan 23, 2026:
After compaction, Claude Desktop stopped responding again. Was in the middle of:
Session showed "14 steps" and "Verifying script relationships and validating symbol references" then froze with just "F read_file" visible.
Same pattern as original report:
Additional symptom from same incident:
After the freeze/compaction, Claude Desktop responded with:
This shows Claude:
The compaction is not just freezing - it's corrupting/losing the conversation state, forcing Claude to guess what was being discussed.
Additional impact discovered:
The compaction bug also caused file truncation. CLAUDE.md was truncated from ~860 lines to 424 lines - losing the entire bug tracker section and other critical documentation.
This suggests the compaction issue isn't just losing conversation context - it may be corrupting file operations in progress, resulting in partial writes or truncated files.
New error observed: "max compactions exceeded" flashed briefly before the compaction failure.
This suggests there may be a hard limit on compaction attempts that's being hit, causing the cascading failures (history loss, ctrl+e unresponsive, etc.).
Another compaction error observed: "NO compactable messages available"
This appeared in the same session where "max compactions exceeded" was seen. Suggests the compaction system is hitting multiple failure modes.
We've been working on this problem — built Cozempic as an open-source tool to mitigate context loss during compaction.
Cozempic works on two fronts:
Prevention — Reduce what gets lost:
Recovery — Restore what was lost:
.memory/WORKING.mdOne command, then it auto-starts a background guard on every Claude Code session.
It won't make compaction perfect — some conversational nuance will still be lost — but in our testing it significantly reduces the "entire history wiped" problem by ensuring the compactor has cleaner, less redundant input to work with.
Would appreciate if you could test it and let us know if it helps. If specific context is still getting dropped, we can investigate what patterns need additional protection.
This issue is tracked in the consolidated report at #26125, which covers the broken transcript mode (hidePastThinking hardcoded to true), mislabeled Ctrl+O help text, and post-compaction history inaccessibility — with source-level root cause analysis and a community patch. Please add your thumbs-up there to help it reach the oncall triage threshold.
+1 on this. Related note:
/exportalso doesn't include the compaction summary, even though it's stored in the raw transcript.jsonlfile (as anisCompactSummarymessage). So even if you try to export after compaction, the summary is silently dropped.Currently the only way to retrieve it is to dig into the
.jsonlfile manually withjq, or set up a PreCompact hook to auto-save the transcript before compaction.The history loss and Ctrl+E unresponsiveness reported here are confirmed on v2.1.47. Ctrl+E now toggles the status bar text and timing badges, but does not reveal any hidden pre-compaction content — same effective result as "unresponsive" from the user's perspective.
Consolidated into #27242 with JSONL evidence that all conversation data is preserved on disk. The fix is a UI viewer, not a data layer change. If you've been affected by this, please 👍 and comment on #27242 to help get it triaged.
Still Occurring — Now Compounded by Crash Crisis
Compaction history loss is still occurring on v2.1.55. Combined with #21576 (26+ Bun crashes forcing constant restarts), #9796 (instructions lost post-compact), and #28577 (resume loads blank), the full session lifecycle on Windows is broken: sessions crash → can't find them by name → can't resume them → when you do resume, compaction wipes the history anyway.
Can you please share the logs, this shouldn’t be the case with cozempic
guard Installed
Regards,
Junaid Ali Qureshi
On Wed, 25 Feb 2026 at 10:20 PM ThatDragonOverThere <
@.***> wrote:
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
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.