DEV Community

Faris Khasawneh
Faris Khasawneh

Posted on

VS Code is silently losing your Copilot chat history — here's why and how to get it back

The Problem

VS Code stores Copilot chat sessions under workspaceStorage/<hash/chatSessions/. That hash is derived from your workspace folder URI. The moment you rename or move the folder — routine project hygiene — VS Code opens under a new hash. Every prior chat session becomes invisible in the UI. No warning. No recovery path.

The data is still there. VS Code just can't see it anymore.

Why It's Non-Trivial to Fix Manually

Each workspaceStorage/<hash/workspace.json holds the original folder URI. The chat sessions are stored as JSONL files — fully self-contained, no workspace context needed to render them. Orphan detection is a single existence check per entry. Yet VS Code has no built-in mechanism for any of this.

What I Built

Browse-CopilotChats — a barebones tool to locate and browse these orphaned sessions directly from the JSONL files. It's a stopgap while the native fix doesn't exist.

The Feature Request

I filed VS Code issue #305818 proposing: startup orphan detection, a browsable panel for orphaned sessions with a ⚠️ indicator, and re-linking when you open a folder matching an orphaned workspace name.

It needs 20 upvotes (👍 reaction on the GitHub issue) within 10 days to enter the official backlog. Currently short.

If you've lost Copilot context this way, a reaction on the issue is the fastest path to a real fix.

Top comments (0)