VS Code (GitHub Copilot Chat)¶
VS Code’s built-in GitHub Copilot Chat persists readable transcript snapshots
and mutations under the workbench user-data directory. agentgrep treats those
files as a JSON-transcript backend, with prompt records available under
--exhaustive and full conversation records behind the conversation scope.
Targeted effort cannot route this backend.
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 1.132.0 (observed 2026-08-08).
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 under a per-workspace workspaceStorage/<hash>/chatSessions/ directory (windowless sessions live in globalStorage/emptyWindowChatSessions/). Current sessions are a .jsonl mutation log: the first kind:0 line holds the whole session snapshot under v, then kind:1 lines set a value at key-path k and kind:2 lines replace the array at k from index i with v (truncate + append), rebuilding the requests[] list that older .json sessions store as one object. Either way 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:
VS Code
- Role:
primary_chat- Format:
json_object- Coverage:
default_search- Path:
${HOME}/.config/Code/User/workspaceStorage/<hash>/chatSessions/<uuid>.jsonl- Adapter:
vscode.chat_sessions_json.v1- Data version:
-- Version strategies:
-- Observed:
VS Code 1.132.0 (2026-08-08)
- Default search:
yes
Record keys observed (1.132.0, 2026-08-08)
- Keys:
attachments,contrib,creationDate,customTitle,hasPendingEdits,i,initialLocation,inputState,inputText,isImported,k,kind,lastMessageDate,mode,requesterAvatarIconUri,requesterUsername,requests,responderAvatarIconUri,responderUsername,selectedModel,selections,sessionId,v,version
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:
VS Code
- 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 1.132.0 (2026-08-08)
- Default search:
yes
SQLite tables observed (1.132.0, 2026-08-08)
- ItemTable columns:
key,value- cursorDiskKV columns:
key,value
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:
VS Code
- 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 1.132.0 (2026-08-08)
- 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:
VS Code
- Role:
app_state- Format:
sqlite- Coverage:
private- Path:
${HOME}/.config/Code/User/globalStorage/state.vscdb- Adapter:
-
- Data version:
-- Version strategies:
-- Observed:
VS Code 1.132.0 (2026-08-08)
- Default search:
no
Record schema¶
Chat sessions¶
vscode.chat_sessions covers per-workspace transcripts under
workspaceStorage/<hash>/chatSessions/<uuid>.jsonl; sessions opened without a
folder live under globalStorage/emptyWindowChatSessions/. Current sessions
are a JSONL mutation log — the first kind:0 line holds the whole session
snapshot under v, then kind:1 lines set a value at a key-path and kind:2
lines replace an array from index i with v (truncate, then append),
rebuilding the requests[] turn list that older single-object .json sessions
store directly. agentgrep replays the log in file order, so the same fields
drive both shapes:
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 prompt scope under --exhaustive;
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.
Inline-edit history¶
vscode.inline_history lives in the workbench
globalStorage/state.vscdb SQLite database. Its ItemTable has an
inline-chat-history key 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 origin.cwd: 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. That origin is available to
current-project search and the
cwd: field in Origin fields.
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.