Session history disappears when continuing a session with a new topic
Resolved 💬 3 comments Opened Feb 13, 2026 by sotarofujimaki Closed Feb 17, 2026
Description
When a session is continued (using -c or /continue) and a new conversation topic is started, the original conversation becomes invisible in the history tab.
Steps to Reproduce
- Start a new conversation in Claude Code (e.g., "YouTube strategy discussion")
- Have a long conversation (300+ lines)
- End the conversation
- Later, continue the same session with
-cor/continue - Start a new topic (e.g., "Playwright で MCP できないかな")
- Check the history tab
Expected Behavior
- Both conversations should be visible in history
- OR each conversation should be treated as a separate session
Actual Behavior
- Only the second conversation's first prompt appears in history
- The original conversation (YouTube strategy) is not visible in the history tab
- The
sessions-index.jsoncontains: firstPrompt: Points to the second conversation's first messagecreated: Timestamp of the second conversation start (not the original)messageCount: Only counts messages from the second conversation
Evidence
=== sessions-index.json ===
firstPrompt: "Playwrightで。MCPでできないかな" ← Wrong (should be first conversation)
created: "2026-02-13T16:13:08.567Z" ← Wrong (20 min after actual start)
messageCount: 10 ← Wrong (actual file has 300 lines)
=== Actual session file ===
Line 1-255: YouTube strategy conversation (started 15:52:32)
Line 256+: Playwright/MCP conversation (started 16:13:46)
Workaround
Manually edit ~/.claude/projects/<project>/sessions-index.json to fix the metadata.
Environment
- Claude Code version: 2.1.39 (from session file)
- OS: macOS Darwin 24.6.0
- IDE: VSCode extension
Suggested Fix
When continuing a session, the index should:
- Preserve the original
firstPromptandcreatedtimestamp - OR create a new session entry for the continued conversation
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗