VS Code (GitHub Copilot Chat)¶
Base path: ~/.config/Code/User on Linux
(~/Library/Application Support/Code/User on macOS,
%APPDATA%/Code/User on Windows). Env overrides: VSCODE_APPDATA,
AGENTGREP_WSL_USERS_ROOT.
observed_version: VS Code GitHub Copilot Chat (chatSessions v3)
(observed 2026-06-21).
VS Code’s built-in GitHub Copilot Chat persists conversations client-side
as readable JSON under the workbench User/ directory — one transcript
per session. This makes VS Code a JSON-transcript backend, and unlike
Windsurf’s encrypted conversation blobs, the transcripts are plain text
agentgrep can read directly. Editions are covered side by side: stable
Code, Code - Insiders, VSCodium, and Code - OSS all share the same
layout under their own User/ directory.
Stores¶
- Role:
primary_chat- Format:
json_object- Coverage:
default_search- Adapter:
vscode.chat_sessions_json.v1
- Role:
prompt_history- Format:
sqlite- Coverage:
default_search- Adapter:
vscode.inline_history_sqlite.v1
- Role:
source_tree- Format:
json_object- Coverage:
catalog_only- Adapter:
-
- Role:
app_state- Format:
sqlite- Coverage:
private- Adapter:
-
vscode.chat_sessions¶
GitHub Copilot Chat transcript, one JSON object per session under a per-workspace workspaceStorage/<hash>/chatSessions/ directory (windowless sessions live in globalStorage/emptyWindowChatSessions/). requests[] is the turn list: the user prompt is message.text; the assistant reply is the response parts with no kind (bare MarkdownString), joined; result.metadata.toolCallRounds[].toolCalls[].name names invoked tools; timestamp is epoch-ms. The sibling workspace.json folder URI resolves the project cwd, including vscode-remote://wsl+<distro>/<path> remotes. VS Code does not publish a formal schema — agentgrep’s parser is the reference implementation.
- Agent:
vscode
- Role:
primary_chat- Format:
json_object- Coverage:
default_search- Path:
${HOME}/.config/Code/User/workspaceStorage/<hash>/chatSessions/<uuid>.json- Adapter:
vscode.chat_sessions_json.v1- Data version:
-- Version strategies:
-- Observed:
VS Code GitHub Copilot Chat (chatSessions v3) (2026-06-21)
- Default search:
yes
The primary searchable VS Code store. Distinct from the Cursor IDE fork’s state.vscdb chat and from the inline-edit prompt history.
vscode.inline_history¶
The workbench state.vscdb ItemTable holds an inline-chat-history key: a JSON array of the user’s Ctrl+I inline-edit prompts. agentgrep reads that key alone (token-filtered), so the secret://... auth keys in the same database are never enumerated (see ADR 0001).
- Agent:
vscode
- Role:
prompt_history- Format:
sqlite- Coverage:
default_search- Path:
${HOME}/.config/Code/User/globalStorage/state.vscdb- Adapter:
vscode.inline_history_sqlite.v1- Data version:
-- Version strategies:
-- Observed:
VS Code GitHub Copilot Chat (inline-chat-history) (2026-06-21)
- Default search:
yes
Inline-edit prompts only (no assistant text); complements the full vscode.chat_sessions transcripts.
vscode.editing_sessions¶
Per-chat working-set snapshots written when a Copilot Chat turn edits files: chatEditingSessions/<sessionId>/state.json plus a contents/ tree of pre/post file states, keyed by the same session UUID as chatSessions/. A byproduct of the transcripts (often empty), not a prompt source — documented so future adapters do not mistake the edit snapshots for chat history.
- Agent:
vscode
- Role:
source_tree- Format:
json_object- Coverage:
catalog_only- Path:
${HOME}/.config/Code/User/workspaceStorage/<hash>/chatEditingSessions/<sessionId>/- Adapter:
-
- Data version:
-- Version strategies:
-- Observed:
VS Code GitHub Copilot Chat (chatEditingSessions) (2026-06-21)
- Default search:
no
vscode.auth¶
The same global state.vscdb holds secret://... keys with provider OAuth tokens and API keys alongside the searchable inline-chat-history. Documented but never enumerated: the inline-history adapter is token-filtered to its one key, so these auth keys are never read (see ADR 0001).
- Agent:
vscode
- Role:
app_state- Format:
sqlite- Coverage:
private- Path:
${HOME}/.config/Code/User/globalStorage/state.vscdb- Adapter:
-
- Data version:
-- Version strategies:
-- Observed:
VS Code GitHub Copilot Chat (state.vscdb secrets) (2026-06-21)
- Default search:
no
Record schema¶
vscode.chat_sessions¶
Each session is one JSON object. Per-workspace transcripts live under
workspaceStorage/<hash>/chatSessions/<uuid>.json; sessions opened
without a folder live under globalStorage/emptyWindowChatSessions/.
The turn list is requests[]:
Field |
Record |
|---|---|
|
User prompt ( |
|
Assistant reply ( |
|
|
|
Turn time (Unix milliseconds, normalized to ISO-8601) |
|
|
The assistant reply is reconstructed from the bare MarkdownString
response parts (shape {value, supportHtml, supportThemeIcons}, no
kind); tool-invocation, inline-reference, progress, and warning parts
are skipped. User prompts participate in the default prompt scope;
assistant text requires --scope conversations or --scope all. VS Code
does not publish a formal schema, so agentgrep’s parser is the reference
implementation; a forward-compatible markdownContent response kind and a
per-turn modelId are read when a newer file carries them.
vscode.inline_history¶
The workbench globalStorage/state.vscdb SQLite database has an
inline-chat-history key in its ItemTable holding a JSON array of the
user’s Ctrl+I inline-edit prompts. agentgrep reads that key alone
(token-filtered in SQL), so the secret://… auth keys in the same
database are never enumerated.
Resolving the project directory¶
A chat transcript’s sibling workspace.json records the opened folder as
a URI. agentgrep resolves it to a local path and attaches it as the
record’s cwd metadata: a file:// URI is unquoted, and a
vscode-remote://wsl+<distro>/<path> remote maps to the Linux path
<path>. So a Copilot Chat in a WSL-remote workspace reports its real
project directory (for example /home/you/work/proj) rather than an
opaque storage hash.
Cross-host discovery on WSL¶
When VS Code’s UI runs on a Windows host and edits a project inside WSL,
the chat is written client-side on Windows under
/mnt/c/Users/<user>/AppData/Roaming/Code/User, not inside the distro.
On WSL, agentgrep detects this and also probes the Windows users mount so
those transcripts are searchable from Linux. AGENTGREP_WSL_USERS_ROOT
overrides the mount root (default /mnt/c/Users) for non-default drive
letters, and VSCODE_APPDATA pins a single Roaming directory when you
want to target one install. See ADR 0009: Cross-host discovery and remote-workspace path mapping
for the discovery and remote-URI mapping design.