microsoft / microsoft/vscode

Chat session and history disappear when opening a folder/project in a window that started with an empty workspace

Open
#333,885 0 comments 0 reactions 1 assignee Claimed by @roblourens View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

## Description
When a Copilot Chat session is started in a window with an empty workspace (no folder open), and a folder/project is then opened in that same window (e.g. via the "Open Folder" button in Explorer), the current chat session and the chat history both disappear. The window reloads to load the new workspace, but the chat panel comes back empty with no way to get back to the previous session.

If a *new* window is opened instead and the chat panel is checked there, the session history *is* visible — so the history data itself isn't lost, it's just not being shown/restored in the window whose workspace changed.

## Steps to Reproduce
1. Open VS Code with an empty workspace (no folder open).
2. Start a Copilot Chat session and have some back-and-forth conversation.
3. In the Explorer, click "Open Folder" and pick a project folder.
4. The folder loads in the same window (window reloads).
5. Open the Chat panel again.

## Expected Behavior
The chat session (or at least an entry in chat history to restore it) should still be accessible after the workspace changes in the same window — i.e. no loss of context when transitioning from an empty workspace to a folder workspace.

## Actual Behavior
The chat panel shows no session and no history entry for the conversation that happened before the folder was opened. Opening a brand new window shows the session in its history there, but it's not accessible from the window where the project is now open.

## Environment
- Version: 1.135.0 (user setup)
- Commit: 08d4889f9ec4a1685d257b9b95de036c8e1ce1e5
- Date: 2026-08-25T14:26:52Z
- Electron: 42.8.1
- Chromium: 148.0.7778.280
- Node.js: 24.18.1
- OS: Windows_NT x64 10.0.26200

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.