Chat history sessions lost after VSCode update — .jsonl conversation files deleted while session directories preserved

Resolved 💬 3 comments Opened Mar 8, 2026 by gh0stintheshe11 Closed Mar 11, 2026

Bug Description

After updating VSCode and restarting, most of my open chat history sessions disappeared. I previously had ~5-6 visible sessions but only 2 remained.

Environment

  • macOS 15.6.1
  • Claude Code v2.1.71
  • VSCode (version unknown — updated right before the bug occurred)
  • Using Claude Code VSCode extension

What happened

After a VSCode update + restart, sessions-index.json at ~/.claude/projects/<project>/ only contained 2 of my ~6 sessions.

Investigation revealed that the main .jsonl conversation files for the missing sessions were deleted, while their session directories (containing subagents/ and tool-results/ subdirectories) were preserved. This means the conversation data is unrecoverable.

Evidence

sessions-index.json — only 2 entries remain (Jan 29 and Mar 2 sessions).

12 session directories exist on disk (dating Jan 10–26), but only 5 .jsonl files exist — 2 indexed, 2 from the current day, and 1 for the active session. The other ~8-10 session directories have no corresponding .jsonl file:

# Directories with NO matching .jsonl (lost sessions):
0579a2bb-f2e5-4985-a77e-9a41a32f22cb/   (Jan 10)
13bc22a3-1f20-4d8c-97aa-d260e9e58d15/   (Jan 16)
2839651c-97f6-4f02-8d7a-c270ceb29e1d/   (Jan 14-17)
46c24522-6e4d-4ba4-9ede-52c3f3cfd75b/   (Jan 10)
5e5833bb-6da9-44ea-89b8-0969fcd4e84f/   (Jan 26)
8c9d7b56-9574-4a09-ae47-20a6ae507516/
a22dca81-ec44-4477-a11c-d7a740662165/   (Jan 14)
b2640c40-4f28-499b-8e9f-7e7a064b6d8c/   (Jan 13-21)
d6680b7d-71e3-42de-ba20-d3b5c932c02a/   (Jan 13)
e6d368ca-10d9-48e7-b2bc-76d67f6aa94e/

Each directory still contains subagents/*.jsonl and/or tool-results/ data, confirming these were real sessions with substantial conversation history.

Expected behavior

  • Chat history should persist across VSCode updates
  • If session cleanup occurs, it should be all-or-nothing per session (not delete .jsonl but keep directories)
  • sessions-index.json should stay in sync with existing session files

Actual behavior

  • Main conversation .jsonl files were deleted for most sessions
  • Session auxiliary data directories were preserved (orphaned)
  • sessions-index.json was truncated to only 2 entries
  • Conversation data is unrecoverable

View original on GitHub ↗

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