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

  1. Have a long conversation with many messages
  2. Exit the session
  3. Resume with claude --resume and select the conversation
  4. 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: 3 and has incorrect firstPrompt

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.json should accurately reflect the conversation's message count and first prompt
  • Resume should restore the full conversation history as stored in the .jsonl file

Actual Behaviour

  • sessions-index.json metadata 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 .jsonl file 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.

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗