VS Code extension: chat history splits one session into multiple entries after extension restart
Description
After restarting Claude Code in VS Code (e.g. reloading the window or restarting the extension host), the chat history view splits what was previously a single chat session into multiple separate session entries. The fragments all appear with the same recent timestamp (e.g. all showing "1m ago") in the local sessions list.
This is a variant of the existing session-persistence bugs (#9258, #13872): instead of sessions being lost entirely, the extension appears to recover fragments of the session and register each fragment as its own distinct entry.
Expected behavior
Per the VS Code extension documentation, conversations should resume "with the full message history" — i.e. one session in, one session out across an extension restart.
Actual behavior
A single session is shown as several distinct session entries after extension restart. Each fragment seems to capture a different slice of the original conversation.
In the screenshot below (to be attached), the entries shown at "1m ago":
- "Find GitHub issue on legacy CPA surgical case"
- "Review barcode GUDID alignment issue docs"
- "Document project architecture and key compone…"
- "write the missing tests"
…were all part of a single ongoing chat session before the restart.
Reproduction
- Have an active, multi-turn chat session in the Claude Code VS Code extension panel
- Restart the extension host or reload the VS Code window
- Open the local chat history list (clock icon at the top of the Claude Code panel)
- Observe: the previously single session is now shown as several distinct entries, all with the same recent timestamp
Screenshot
In the screenshot below, the sessions tagged at "1m" + the currently selected session (4 in total) were a single chat session prior to the extensions update / restart:
<img width="737" height="519" alt="Image" src="https://github.com/user-attachments/assets/1f88d7ed-f7b2-4e51-b8e1-ddba9510cb39" />
Related issues
- #9258 — History Sessions lost in VSCode plugin
- #13872 — Chat history lost on VSCode restart - session files not saved (marked duplicate of #9258)
Environment
- OS: macOS (Darwin 25.3.0)
- Surface: Claude Code VS Code extension
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗