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

  1. Start a new conversation in Claude Code (e.g., "YouTube strategy discussion")
  2. Have a long conversation (300+ lines)
  3. End the conversation
  4. Later, continue the same session with -c or /continue
  5. Start a new topic (e.g., "Playwright で MCP できないかな")
  6. 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.json contains:
  • firstPrompt: Points to the second conversation's first message
  • created: 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:

  1. Preserve the original firstPrompt and created timestamp
  2. OR create a new session entry for the continued conversation

View original on GitHub ↗

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