microsoft / microsoft/vscode

Chat Sessions panel loses all history except current run after tunnel restart — no state.vscdb/chat.ChatSessionStore.index fallback for agent-host storage backend

Open
#334,076 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

**Environment:**
- VS Code: 1.136.0 (connecting via vscode.dev to Remote Tunnel)
- GitHub Copilot Chat: 0.64.0
- OS: Windows (tunnel host)
- Storage backend: newer "agent-host" model (`agent-host.db`, `agent-host-config.json` in `globalStorage`) — not classic `state.vscdb`

**Steps to reproduce:**
1. Use Copilot Chat over a Remote Tunnel connection for multiple days, accumulating chat sessions.
2. Restart the host PC / update the VS Code CLI / reconnect the tunnel.
3. Open the Chat "Sessions" panel.

**Expected:** Sessions panel shows date groups (Today, Yesterday, Older) for all historical sessions, as transcript files for those sessions are still present on disk.

**Actual:** Sessions panel shows only a "Today" group with sessions created in the current run. All prior sessions vanish from the UI despite their `.jsonl` transcript files being fully intact in `workspaceStorage\\GitHub.copilot-chat\transcripts\`.

**Diagnostics performed (read-only):**
- 7 different `workspaceStorage` hash folders exist for the same logical workspace (`-13023312`, `-13023312-1`, `-13023312-2`, `-607bd371`, `-63505535`, `44ab03de`, `5e384efe`), created May–Aug 2026 — consistent with hash-drift on tunnel reconnect (same pattern as #285059, #305818).
- Manually copying 3 orphaned transcript files from `-13023312-1` into the active `-13023312`/transcripts folder did not make them appear in the Sessions panel, even after `Developer: Restart Extension Host` and a full tunnel disconnect/reconnect.
- The documented community workaround (merge `chat.ChatSessionStore.index` key inside `workspaceStorage\\state.vscdb`, per community discussion #129888) does not apply — no `state.vscdb` file exists in any of the 7 hash folders on this install.
- Checked the apparent agent-host equivalent, `globalStorage\agent-host.db` → `sessions` table (`session_uri`, `provider`, `start_time`, `registration_source`, `modified_time`) — 0 rows, so it isn't the source of the visible "Today" entries either. No discoverable persistent index currently backs the Sessions panel on this storage backend.

**Related issues:** #297247, #285059, #305818, microsoft/vscode-remote-release#11207

**Impact:** Days of Copilot Chat history become permanently inaccessible through the UI after any tunnel restart/CLI update, with transcript files orphaned on disk and no supported recovery path for the newer agent-host storage backend.

Contributor guide

Open the contributing guide

Research direction

Start by comparing the workspaceStorage transcript paths, the absent state.vscdb/chat.ChatSessionStore.index, and the globalStorage/agent-host.db sessions table described in the report. Review related issues #297247, #285059, #305818, and microsoft/vscode-remote-release#11207. Done means historical .jsonl sessions remain discoverable in date groups after a tunnel restart or CLI update on the agent-host backend.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
databases, developer-experience
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.