Resume shows only partial conversation history due to stale sessions-index.json
Open 💬 5 comments Opened Jan 30, 2026 by bryan-zxc
Description
When using --resume to resume a conversation, only a few recent messages appear instead of the full conversation history. The conversation data file contains the complete history, but sessions-index.json has incorrect/stale metadata.
Steps to Reproduce
- Have a long conversation with many messages
- Exit the session
- Resume with
claude --resumeand select the conversation - Only the last few messages appear, earlier conversation history is missing
Investigation Findings
Examined the conversation files in ~/.claude/projects/<project>/:
- Conversation file (
*.jsonl): Contains 1480 lines with 678 user messages and 741 assistant messages - sessions-index.json: Shows
messageCount: 3and has incorrectfirstPrompt
Example discrepancy:
Actual first message: "i want to run a detailed security review on this code base..."
sessions-index.json firstPrompt: "i want you to create a html file that look like a ppt..."
The firstPrompt in the index corresponds to a message from much later in the conversation, and messageCount is drastically underreported.
Expected Behaviour
sessions-index.jsonshould accurately reflect the conversation's message count and first prompt- Resume should restore the full conversation history as stored in the
.jsonlfile
Actual Behaviour
sessions-index.jsonmetadata becomes stale/out of sync with actual conversation file- Resume uses the incorrect index metadata, showing only partial history
- Full conversation data IS preserved in the
.jsonlfile but not loaded
Environment
- macOS (Darwin 24.6.0)
- Issue occurred on multiple separate conversations
Workaround
The conversation data is intact. Deleting sessions-index.json may force a rebuild, though this hasn't been tested.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗