Adding memory to VS Code Copilot Chat
one config file, the shape VS Code actually reads, and one honest gap
Copilot Chat opens every conversation from nothing. The chat you had in this repo last week is on disk, in the editor's own store, and nothing consults it while you work — nor the sessions from the terminal agents beside it.
What VS Code already has
Sessions live in the VS Code User folder, one file per conversation under workspaceStorage/<hash>/chatSessions, with chats from windows that had no folder open under globalStorage/emptyWindowChatSessions. Current builds write a JSONL mutation log — a first line holding the session, then one line per change — and older ones a flat .json. deja reads both, and takes the log when a session has both files, the way VS Code does.
Adding recall
Copilot Chat takes memory as an MCP server in agent mode:
deja install vscode
writes mcp.json in the User folder — one per host you have, Code, Insiders or VSCodium. VS Code's config is its own shape: a top-level servers map rather than the mcpServers most agents use, and every entry carries a type. A file in the other shape loads nothing and the chat quietly gets no tools.
Your own servers and any comments in the file are left alone, and uninstall takes only deja's entry.
The same command writes <User>/prompts/deja.instructions.md. VS Code applies a custom-instructions file to every chat when its frontmatter says applyTo: "**", and that is what makes recall arrive without being asked for: the block is in front of the model before it reads your question, and it says to search history first.
What arrives, and what does not
The deja tool with its six modes, in agent mode, and the instruction to use it. Measured on VS Code 1.134.0: with the instructions file installed and deja never mentioned in the question, "the packer keeps refusing our manifest — why?" made Copilot Chat call recall on its own, and answer from a session it had never seen.
What Copilot Chat still does not have is a hook. There is no session-start and no per-prompt event an outside tool can use, so nothing can hand it a block at a fixed moment or react to a failing command — the instructions file steers the agent, it does not inject. A slash command is the other gap: deja serves an MCP prompt and VS Code lists it, but its slash form is not something we have driven end to end.
The part that is not about this harness
The index covers every agent's transcripts on the machine — twenty-five of them today, each in its own format — so a fix found in one tool answers a question asked in another, including sessions from before any of this was installed. That is the reason to index rather than to capture.
Nothing here writes memories, so there is nothing to hallucinate into your history; indexing and search are local, and credentials are stripped as the index is built (privacy). Copilot Chat's own store carries a GitHub account label in the part deja does not read.
Getting started · How the Copilot Chat store is read · Copilot CLI is a different harness