@@ -54,6 +54,65 @@ All agents share context through `vscode/memory`. A shared status log lets the O
5454
5555---
5656
57+ ## Memory Architecture
58+
59+ Squads use the VS Code ** memory tool** (` vscode/memory ` ) to persist and share context.
60+ The tool is enabled by default and can be toggled with the
61+ ` github.copilot.chat.tools.memory.enabled ` setting.
62+
63+ ### Memory Scopes
64+
65+ Three scopes serve different lifetimes. Use the right scope for the right data:
66+
67+ | Scope | Path prefix | Persists | Use for |
68+ | ---| ---| ---| ---|
69+ | ** User** | ` /memories/ ` | Across all workspaces and sessions | Coding preferences, general patterns |
70+ | ** Repository** | ` /memories/repo/ ` | Across sessions in this workspace | Codebase conventions, build commands, architecture decisions |
71+ | ** Session** | ` /memories/session/ ` | Current conversation only (cleared when chat ends) | Task handoff files, in-progress plans, status logs |
72+
73+ > ** First 200 lines of user memory are automatically loaded** into every agent's context
74+ > at session start. Keep user-scope files brief and well-structured.
75+
76+ ** Squad handoff files always live under ` /memories/session/ ` ** so they are scoped to the
77+ task at hand and do not pollute future sessions. See ` references/memory-conventions.md `
78+ for the full file layout and naming conventions.
79+
80+ ** Repository-scoped facts** (e.g., "this project requires ` Guid.CreateVersion7() ` ") belong
81+ under ` /memories/repo/ ` . Only the ` create ` command is supported for that path.
82+
83+ ### Managing Memory Files
84+
85+ VS Code provides two commands accessible via the Command Palette:
86+
87+ - ** Chat: Show Memory Files** — lists all memory files across scopes; select one to view
88+ its contents. Memory file references in chat responses are also clickable.
89+ - ** Chat: Clear All Memory Files** — removes all memory files across all scopes.
90+ Deleting individual files is not yet supported; ask the agent to overwrite specific
91+ files with updated content instead.
92+
93+ ### Local Memory Tool vs. Copilot Memory
94+
95+ The local ` vscode/memory ` tool and ** Copilot Memory** (GitHub-hosted) are complementary
96+ but distinct systems:
97+
98+ | | Local memory tool (` vscode/memory ` ) | Copilot Memory (GitHub) |
99+ | ---| ---| ---|
100+ | Storage | Local machine | GitHub-hosted (remote) |
101+ | Scopes | User, repository, session | Repository only |
102+ | Shared across Copilot surfaces | No (VS Code only) | Yes (coding agent, code review, CLI) |
103+ | Created by | Agent or user during chat | Copilot agents automatically |
104+ | Enabled by default | Yes | No (opt-in) |
105+ | Expiration | Manual management | Automatic (28 days) |
106+
107+ Squad handoff files use the ** local memory tool** — they are session-scoped and live only
108+ on the developer's machine. Copilot Memory is for durable repository insights that should
109+ be shared across all Copilot surfaces. Enable it via GitHub personal or organization
110+ settings and the ` github.copilot.chat.copilotMemory.enabled ` VS Code setting.
111+
112+ Reference: [ Memory in VS Code agents] ( https://code.visualstudio.com/docs/copilot/agents/memory )
113+
114+ ---
115+
57116## Workflow
58117
59118### Step 1 — Capture Intent
0 commit comments