Resume after compaction loses conversation content — exports truncated
Resolved 💬 4 comments Opened Apr 3, 2026 by belumume Closed Apr 3, 2026
Description
When a long session is compacted (via /compact) and then resumed later (via --resume or /resume picker), the resumed session loads from a late checkpoint instead of the compaction point. This causes:
- Truncated exports — /export from the resumed session produces a fraction of the content vs /export from the original running session (527 lines vs 8,902 lines for the same session)
- Lost context for Claude — Claude operates with partial conversation history after resume, degrading response quality
- Non-deterministic checkpoint selection — the same session ID resumes from different points depending on when you resume
Reproduction
- Start a session, work for several hours (4,000+ messages)
- /compact mid-session
- Continue working (adds ~2,000 more messages)
- /export from the running session → complete export (8,902 lines)
- Exit
claude --resume <session-id>- /export from resumed session → truncated export (527 lines, starts from a random late point)
Expected
Resume should load from the compaction point (or the full session), and exports should be identical regardless of whether exported from the original or resumed session.
Environment
- Claude Code v2.1.91
- Opus 4.6 (1M context)
- Windows 11 / MSYS2/Git Bash
- Session JSONL: 41MB, 6,149 lines, 4,451 messages
- Multiple compactions in the same session
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗