Problem
VS Code agents can produce episodic records while the native dashboard still shows every episode counter at zero.
The dashboard process inherits LEAN_CTX_PROJECT_ROOT from the extension host and /api/episodes hashes only that selected root. When the inherited value belongs to another workspace, the dashboard reads an empty store even though non-empty episode stores exist. Separately, MCP startup under WSL can accept /mnt/<drive>/Users/<user> as a markerless project root, so new episodes are persisted under a broad user-profile hash rather than the active repository.
Reproduction
- Start VS Code with an inherited
LEAN_CTX_PROJECT_ROOT for workspace A.
- Open workspace B and run agents that record episodes.
- Open the native lean-ctx dashboard from workspace B.
- Observe
/api/episodes scoped to workspace A and zero counters while episode stores for the agent session are non-empty.
Expected
- The VS Code dashboard is explicitly scoped to the active workspace folder.
- VS Code MCP configuration supplies
${workspaceFolder} as LEAN_CTX_PROJECT_ROOT.
- WSL-mounted Windows user profiles are rejected as broad project roots, while repositories below them remain valid.
- Multi-root detection never enumerates an unsafe broad root.
Scope
- pass the active workspace as
--project when the extension launches the dashboard
- write
LEAN_CTX_PROJECT_ROOT=${workspaceFolder} in VS Code MCP entries
- classify
/mnt/<drive>/Users/<user> as broad/unsafe
- apply the shared broad-root guard before project and multi-root detection
- add focused regression coverage
Related
This issue covers the complementary VS Code launch/configuration and WSL broad-root paths.
Problem
VS Code agents can produce episodic records while the native dashboard still shows every episode counter at zero.
The dashboard process inherits
LEAN_CTX_PROJECT_ROOTfrom the extension host and/api/episodeshashes only that selected root. When the inherited value belongs to another workspace, the dashboard reads an empty store even though non-empty episode stores exist. Separately, MCP startup under WSL can accept/mnt/<drive>/Users/<user>as a markerless project root, so new episodes are persisted under a broad user-profile hash rather than the active repository.Reproduction
LEAN_CTX_PROJECT_ROOTfor workspace A./api/episodesscoped to workspace A and zero counters while episode stores for the agent session are non-empty.Expected
${workspaceFolder}asLEAN_CTX_PROJECT_ROOT.Scope
--projectwhen the extension launches the dashboardLEAN_CTX_PROJECT_ROOT=${workspaceFolder}in VS Code MCP entries/mnt/<drive>/Users/<user>as broad/unsafeRelated
This issue covers the complementary VS Code launch/configuration and WSL broad-root paths.