You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature Request: Agent mode should support working across multiple workspace folders simultaneously #318936
When using agent mode in a multi-root workspace (or a workspace with multiple folders), the agent is effectively limited to operating within a single folder context. It cannot reason about, navigate, or make changes across multiple repositories/folders in the same session.
This is a significant limitation for developers working on projects that span multiple repositories — for example, a frontend app + backend API, a monorepo with multiple packages, or microservices that need coordinated changes.
Current behavior
Agent mode (the new dedicated agents window) scopes its understanding and actions to a single workspace folder
There is no way to instruct the agent to "work across repo A and repo B" in a single session
In contrast, the Copilot Chat panel in the normal editor view works fine with multi-root workspaces — it can see and reference files across all folders in the workspace
Expected behavior
Agent mode should be able to:
Understand code across all folders in a multi-root workspace, matching the behavior already available in the normal Chat panel
Read and edit files across multiple workspace folders in a single agent session
Maintain context about how code in one folder relates to code in another (e.g., API contracts, shared types, service boundaries)
Use cases
Coordinating API changes between a backend and frontend repo
Refactoring shared types/interfaces across multiple packages in a workspace
Making changes that span service boundaries in a microservices architecture
Reviewing or understanding cross-repo dependencies
Current workarounds
Opening separate VS Code windows (one per repo) with independent agent sessions — loses cross-repo context
Using CLI-based AI tools that can operate across directories
Environment
VS Code Version: 1.122.0
OS: Windows 11
Reacted by coolstim, JohnMark Sill, deaken123, Matthias Mayer, mikeho-cin7, matthieu, Thomas Dekelver, yossigorshomov, akzent-e, Tim Siebigteroth and 33 more
Thanks for creating this issue! It looks like you may be using an old version of VS Code; the latest stable release is 1.122.1. Please try upgrading to the latest version and checking whether this issue remains.
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!
Reacted by yossigorshomov, Julien Tahon, JoernHentsch, Neil Horner, David Klötzer and Scott T
🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.
For us we have a mono-repro. It has multiple apps (flutter) and has a C# api.
In that there is a root .agents folder. This is the governance for the entire monorepro so we don't have to repeat ourselves. The root of the repro isn't loaded when working on any of the apps or the API because then it would see all of the rest and cause VS code to get slow.
In this we have agents.md, routing.md, and shared skills in a skills folder.
And then in ./Api we have an other .agents folder with agents.md, routing.md and shared skills for .net and our api.
And in ./Apps we have another .agents folder with agents.md, routing.md and shared skills for all of our flutter apps.
And each app, has a .agents folder with the same.
The apps and api use workspace files. Apps specifically open the App's folder, plus our shared library and our api library as folders in the workspace so that vs code doesn't get distracted by the other apps.
At every one of those levels we also have a .mcp.json (although I really wish the standard was to put mcp.json in .agents/)
What I would expect VS Code to do is:
Start at the root of repro and find ./.agents and load everything in there and find the root .mcp.json and load that in.
Walk up. So if an App workspace (which the workspace file lives in the Apps folder), find the on in /Apps for .agents/ and .mcp.json and load those.
Look in all loaded folders under App and load those. (and Api would just have the single folder with the workspace file being in the root of the repo and opening ./Api so the logic holds)
This would allow us to never repeat ourselves, only load mcps that are relevant to the workspace loaded, and share the code nicely.
A setting on the workspace file for "Allow repository agent instructions" or similar would solve this if the above logic was followed.
And this wouldn't cause security issues because it's already working on the entire repo.
There's already a setting that allows skills to do exactly this, although I'm not sure that it works right on multi-folder workspaces loading all of the folders in the workspace AND everything above every one of those, but it should be expanded.
This is the reason I'm unable to use Copilot harness in VS Code - I always use workspaces with multiple roots, and I rely on instructions from them to be auto-discoverable. So sticking with VS Code Local harness until this is implemented
Activity
vs-code-engineering commentedon May 29, 2026
Thanks for creating this issue! It looks like you may be using an old version of VS Code; the latest stable release is 1.122.1. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!
tdekelver-bd commentedon May 29, 2026
Still experiencing this limitation on VS Code 1.122.1 — agent mode remains scoped to a single folder in multi-root workspaces.
johnmarksilly commentedon Jun 4, 2026
Would also like this. We use multi root instead of mono-repos.
Ideally all behavior with the project mirrors the normal VS code view, whether it spans multiple roots or not.
vs-code-engineering commentedon Jun 5, 2026
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!
vs-code-engineering commentedon Jul 4, 2026
🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!
JohnGalt1717 commentedon Jul 15, 2026
For us we have a mono-repro. It has multiple apps (flutter) and has a C# api.
In that there is a root .agents folder. This is the governance for the entire monorepro so we don't have to repeat ourselves. The root of the repro isn't loaded when working on any of the apps or the API because then it would see all of the rest and cause VS code to get slow.
In this we have agents.md, routing.md, and shared skills in a skills folder.
And then in ./Api we have an other .agents folder with agents.md, routing.md and shared skills for .net and our api.
And in ./Apps we have another .agents folder with agents.md, routing.md and shared skills for all of our flutter apps.
And each app, has a .agents folder with the same.
The apps and api use workspace files. Apps specifically open the App's folder, plus our shared library and our api library as folders in the workspace so that vs code doesn't get distracted by the other apps.
At every one of those levels we also have a .mcp.json (although I really wish the standard was to put mcp.json in .agents/)
What I would expect VS Code to do is:
This would allow us to never repeat ourselves, only load mcps that are relevant to the workspace loaded, and share the code nicely.
A setting on the workspace file for "Allow repository agent instructions" or similar would solve this if the above logic was followed.
And this wouldn't cause security issues because it's already working on the entire repo.
There's already a setting that allows skills to do exactly this, although I'm not sure that it works right on multi-folder workspaces loading all of the folders in the workspace AND everything above every one of those, but it should be expanded.
ayeltsov commentedon Oct 1, 2026
This is the reason I'm unable to use Copilot harness in VS Code - I always use workspaces with multiple roots, and I rely on instructions from them to be auto-discoverable. So sticking with VS Code Local harness until this is implemented