[BUG] Desktop app: messages from before a compaction disappear from Code sessions
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?
In the Claude desktop app's Code tab, once a session has been compacted, I can no longer see anything from before the compaction. Scrolling up stops at the compaction point.
The messages aren't deleted. In most of my compacted sessions, compaction moved the session into a new transcript file, and the app now only shows that new file. The earlier conversation is still in the older .jsonl files in ~/.claude/projects/, but there's no way to see it in the app.
What I tried:
- Scrolling to the top of the session. The earlier messages don't load. I'm on 2.9939.2, which includes the fix for "earlier messages sometimes not loading when you scroll up in a long session".
- Help > Troubleshooting > Import Claude Code CLI sessions. It says there are no CLI sessions to import.
What Should Happen?
A session should always show the whole conversation from the first message, including everything before each compaction. Compaction should change what Claude sees, not what I can see.
Error Messages/Logs
Steps to Reproduce
- Open the Claude desktop app and start a local session in the Code tab.
- Have a long conversation.
- Run /compact.
- Scroll to the top of the session. Messages from before the compaction are gone.
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.281 (bundled with Claude desktop app 2.9939.2)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
This is similar to #88168 but seems triggered specifically by compaction (it also becomes visible after restarting the app)