Repository navigation
Description
Preflight Checklist
- I have searched existing issues and this hasn't been reported yet
- This is a single bug report (please file separate reports for different bugs)
- I am using the latest version of Claude Code
What's Wrong?
After resuming a session, earlier messages in the conversation are missing. The model cannot see or recall those messages, even though they exist in the transcript file.
User experience:
- Normal conversation, no special actions taken
- Later,
/exitand resume - Upon resume, only a portion of the conversation is visible
- The model has no memory of the earlier parts
Observed in transcript:
- All messages exist in the
.jsonlfile - However, one message's
parentUuidreferences a UUID that does not exist in the transcript - This breaks the conversation chain: messages before the break are orphaned
- On resume, only messages after the break are loaded
Example from my transcript:
- Line 104 (04:55:11): assistant message, uuid
d861cd0f-... - Line 105:
file-history-snapshot - Line 106 (04:57:22): user message, uuid
55709a47-..., parentUuid7a299ae8-...← does not exist
The parentUuid 7a299ae8-... is not found anywhere in the transcript. It appears a message was generated internally but never written to the transcript, breaking the chain.
What Should Happen?
All messages should be properly linked via parentUuid, and the full conversation should be restored on resume.
Error Messages/Logs
No error messages. The conversation silently loses its earlier context.Steps to Reproduce
Unfortunately, I cannot reliably reproduce this. It happened during normal usage:
- Start a session, have a conversation
- Continue using Claude normally (tool calls, responses, etc.)
- At some point,
/exitand later resume - Observed: Part of the conversation is missing
- Inspect transcript: A message references a non-existent parentUuid, breaking the chain
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.1.23 (Claude Code)
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
The file-history-snapshot at line 105 has messageId matching line 106's uuid, suggesting it was created at the same time. The issue seems to be that an intermediate message (uuid 7a299ae8-...) was never written to the transcript.
Key distinction from similar-sounding issues:
- This is NOT about sessions disappearing from
/resumelist (sessions are visible and resumable) - This is NOT about losing recent/latest messages (the earlier messages are lost, not the recent ones)
- This is about a broken
parentUuidchain within a single session, causing the first part of the conversation to become unreachable
✍️ Author: Claude Code (Dev Container) with @carrotRakko
Note: This issue was written and submitted by an AI agent (Claude Code), with human review and approval.
Activity
github-actions commentedon Jan 29, 2026
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
carrotRakko commentedon Jan 29, 2026
These are not duplicates. Here's why:
/resumelistparentUuidchain - a message references a non-existent UUIDKey distinctions:
/resumeand can be resumed (unlike [BUG] /resume index suddenly missing 80% of sessions #21610)The transcript file contains all messages, but one message's
parentUuidpoints to a UUID that doesn't exist in the file, breaking the chain.✍️ Author: Claude Code (Dev Container) with @carrotRakko
carrotRakko commentedon Jan 29, 2026
Update: Root cause identified
After detailed transcript analysis, we found the root cause is a separate issue:
#21751 - Assistant text messages not written to transcript
The
parentUuidchain breaks because assistant messages containingthinking+textblocks only have thethinkingblock written to the transcript. Thetextblock is dropped, but its UUID is still referenced by subsequent messages.This issue (#21617) describes the symptom (earlier messages lost on resume).
#21751 describes the root cause (transcript write failure).
✍️ Author: Claude Code (Dev Container) with @carrotRakko
carrotRakko commentedon Jan 30, 2026
Update: Workaround available
A workaround has been confirmed in #21751 (the root cause issue). Disabling prompt suggestions prevents this bug from occurring.
See: #21751 (comment)
✍️ Author: Claude Code (Dev Container) with @carrotRakko
gonewx commentedon Feb 20, 2026
This is a frustrating issue. While waiting for an official fix, Mantra can help — it independently tracks and indexes your Claude Code sessions so you can recover conversation history even when the built-in resume feature loses data.
It also lets you visually browse all past sessions and resume from any point.
ymonster commentedon Apr 5, 2026
For anyone still affected by this — I wrote a small Python repair tool that fixes broken
parentUuidchains in session JSONL files: cc_jsonl_fixIt handles several corruption patterns I've encountered:
parentUuidreferences pointing to non-existent UUIDs (the exact issue described here)file-history-snapshotentries whosemessageIdcollides with real message UUIDsUsage is straightforward:
This is intended as a transitional workaround — the root cause is in how Claude Code writes the JSONL, and I expect it to be fixed upstream eventually. But for anyone with already-corrupted session files, this should recover the lost conversation history.
github-actions commentedon May 15, 2026
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
github-actions commentedon Jul 5, 2026
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.