Agent Mode drops workspace scope at Thinking -> Analyzing transition (files panel clears, workspace MCP count decreases)
@zhichli is already working on this.
Since Jun 10, 2026.
Assessment
This issue has not been assessed yet.
Description
Summary
In VS Code Insiders Agent Mode, a new session starts with the correct workspace
scope and workspace MCP servers visible. After the first prompt, when status
changes from Thinking to Analyzing, the session detaches from workspace scope.
The right-hand files list clears and workspace MCP servers disappear from
Customizations.
Environment
- VS Code: 1.124.0-insider
- Copilot extension: 0.52.2026060802
- OS: Windows
- Workspace: D:/WorkPlannerAgent (opened as workspace)
- MCP setup: workspace
.vscode/mcp.jsonfile present and valid
Repro steps
- Open workspace D:/WorkPlannerAgent in VS Code Insiders.
- Open Agent Mode window.
- Confirm right panel shows workspace files.
- Confirm Customizations shows 12 MCP servers (includes workspace-scoped servers).
- Send first prompt in a new session.
- Observe status transitions from Thinking to Analyzing.
Actual result
- During Thinking: scope remains correct.
- On transition to Analyzing:
- right-hand files panel clears
- workspace scope appears dropped
- MCP count in Customizations drops from 12 to 9
Expected result
Workspace scope should remain attached for the entire session. Workspace files
and workspace-scoped MCP servers should not disappear after first prompt.
Frequency
Happens consistently in this workspace/session flow.
Impact
High. Agent loses repository context and workspace MCP tools, preventing normal
planning workflows.
Additional notes
- Folder selector was explicitly set before first prompt.
- Symptom still occurs exactly at Thinking -> Analyzing transition.
- This suggests failure during tool/context assembly or scope rebind in the analyze phase.
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.9k
- PR merge metrics
- PR metrics pending
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
new release
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
All issues in microsoft/vscode
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·