Messages render out of chronological order in Claude AI app when switching tabs; "Compacting conversation" shown as working status incorrectly
<img width="912" height="728" alt="Image" src="https://github.com/user-attachments/assets/3205af95-f9c8-43c7-a8d7-9313b38950a7" />
<img width="898" height="422" alt="Image" src="https://github.com/user-attachments/assets/b747627d-2c4f-4cab-bbb0-48b748047817" />
Description
When using Claude Code inside the Claude AI desktop app, messages frequently render out of chronological order. Messages from earlier in the conversation appear at the bottom, or batches of the user's own messages get grouped together at the end instead of interleaved with assistant responses.
Additionally, the "Compacting conversation..." text sometimes appears as the working/status indicator when no compaction is actually occurring.
Steps to reproduce
- Open a Claude Code session in the Claude AI app
- Have a moderately long conversation (many back-and-forth messages)
- Switch tabs (to another Claude Code session, or to a regular Chat tab, etc.)
- Switch back to the original Claude Code session
- Observe that messages are now displayed out of order
Expected behavior
Messages should always render in chronological order regardless of tab switching.
"Compacting conversation..." should only display when compaction is actually in progress.
Actual behavior
- Messages visually jump around and appear in wrong chronological order after tab switches
- Multiple user messages may appear grouped together at the bottom rather than interleaved with responses
- "Compacting conversation..." sometimes shows as the working prompt when no compaction is happening
Environment
- Platform: Claude AI desktop app (macOS)
- Behavior trigger: Switching between tabs (between Claude Code sessions, or between Claude Code and Chat)
- Conversation length: More noticeable in longer conversations
Possible cause
Suspect this may be a React key / list reconciliation issue where switching tabs and re-rendering the message list causes messages to be keyed or sorted incorrectly.
Related issues
- #4896 - React render loop that coincided with a server-side message ordering incident
- #27751 - Session cross-contamination when multiple sessions are active
- #17808 - Compaction re-triggering unnecessarily
- #24146 / #14222 - Long chat rendering performance (separate but compounds this issue)
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗