Desktop app: transcript viewer shows duplicated messages after repeated auto-compaction (history re-written into JSONL with same UUIDs)
Summary
In the Claude Code desktop app, a long-running session that has been auto-compacted many times displays the same user/assistant messages repeatedly in the transcript view. Scrolling keeps rendering more copies of the same bubbles, which looks like the session is live-generating endless duplicate messages (it isn't — the session is idle).
Root cause (from inspecting the session JSONL)
Each compaction/continuation appears to re-write copies of prior history entries into the same session transcript file, preserving the same uuid and timestamp on each copy. The transcript viewer renders the raw file without de-duplicating by message UUID, so every compaction's replayed history shows up as another visible run of identical bubbles.
Diagnostics from the affected session file (~/.claude/projects/<project>/<session>.jsonl):
- File size: 54 MB, 10,948 JSONL entries
- Auto-compaction/continuation events ("This session is being continued from a previous conversation that ran out of context"): 15
- Distinct user/assistant message UUIDs: 3,384
- UUIDs appearing more than once: 1,538 (max 5 copies of a single message)
- Repeat distribution:
{1: 1846, 2: 256, 3: 429, 4: 362, 5: 491} - Example: one short user message (uuid
7b3012ad…, timestamp2026-06-06T09:15:08.378Z) appears verbatim at file lines 173, 1552, 2886, 4420 and 6365 — identical uuid and timestamp on all five copies.
Expected
Either (a) compaction should not duplicate already-persisted history entries into the transcript file, or (b) the desktop transcript viewer should de-duplicate messages by UUID when rendering.
Impact
- The transcript view is unusable for heavily-compacted sessions (user reported "endless repeat lines — as I scroll down, it just generates more").
- The duplicated history also bloats the file (54 MB here), and presumably compounds the context pressure that causes the next compaction.
Environment
- Claude Code desktop app (CCD), Linux (aarch64, JetPack/L4T host)
- Session had been auto-compacted ~15 times over 3 days of use
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗