Repository navigation
Description
Describe the feature or problem you'd like to solve
When using the Copilot CLI connected to a VS Code IDE workspace (via /ide), the CLI does not read the .code-workspace file to discover additional root folders. This means: 1. Instruction files (e.g., AGENTS.md) in additional workspace folders are not discovered or loaded 2. File context from additional workspace folders is not available for search/indexing — the agent only sees the primary cwd/git-root 3. Workspace settings like github.copilot.chat.codeGeneration.instructions that reference files in additional folders are not applied The VS Code extension handles this correctly — it reads all root folders from the .code-workspace file and includes their context and instruction files. Example Given this productivity.code-workspace: { "folders": [ { "path": "." }, { "path": "../../repos/TeamCerebro" }, { "path": "../../../../projects/XSPM-PostureEffectivenessScore" } ], "settings": { "github.copilot.chat.codeGeneration.instructions": [ { "file": "AGENTS.md" } ] } } The VS Code Copilot Chat extension indexes all 3 folders and loads the AGENTS.md instruction file. The CLI only sees the primary folder (cwd).
Proposed solution
When connected to a VS Code IDE workspace via /ide:
- Read the .code-workspace file to discover all root folders
- Include instruction files from all workspace roots (respecting the same discovery rules: AGENTS.md, .github/copilot-instructions.md, etc.)
- Make all workspace folders available for file search/context (same as the extension does)
Alternatively, support a CLI flag or config option like --workspace <path-to-.code-workspace> for standalone use without /ide.
Example prompts or workflows
The agent can manually read the .code-workspace file, resolve the relative paths, and access the additional folders — but this requires explicit manual navigation rather than automatic discovery
Additional context
- Related: Custom instructions are not included automatically despite the documentation saying they should be #713 (instruction file discovery gaps)
- Related: Can't distinguish git worktrees when calling /ide #1559 (multi-workspace /ide confusion with git worktrees)
- OS: Windows 11
- CLI version:
0.0.421 - Connected via /ide to VS Code with multi-root workspace
Activity
andyleejordan commentedon Apr 14, 2026
This would be great, I was just looking for a way to do this as the PowerShell Extension for VS Code is a multi-root workspace (the server and client are separate repos but of course work in tandem), and am struggling to get Copilot CLI to understand them both simultaneously.
ayeltsov commentedon May 14, 2026
This is an adoption blocker for me.
I organized my work around 2 workspaces: the main repo/workspace (where the work is performed) and auxiliary repo/workspace that has my specific instructions and skills. I store this auxiliary repo on OneDrive, making it auto-synched on all machines I work on - it's very convenient to have my setup travel with me.
ermse commentedon May 27, 2026
I frequently ask agents to work across multiple repos scattered in different places on the disk, so I adopted vscode workspace files as a sort of directory based replacement for Visual Studio IDE
*.slnxfiles. Quickly and visually giving the agent needed context.IMHO vscode workspaces is a
killerfeature of vscode copilot chat.I would also consider adding some sort of guid into workspace file, so copilot can restore all workspace related sessions if I move the workspace somewhere, or clone repo with it in another vm.
Codex does not have anything similar yet..
Adding that support into
copilot cliwould be great. This is what codex said:Q:
tell me what should I know about the Project concept in codex. How it is different from vscode workspace. I used to work with copilot in a mutli-root workspace where it combines instructions and skills from all roots. Can I get similar experience with projects?
A
Short version: Codex Projects are not VS Code multi-root workspaces. A Codex project is closer to an agent execution context: current working directory, project/root discovery, trust, sandbox permissions, AGENTS.md guidance, repo skills, and project-local .codex config.
The big difference: Codex does not appear to automatically merge instructions and skills from every folder in a VS Code .code-workspace. Official docs say Codex builds guidance from:
global ~/.codex/AGENTS.md
then AGENTS.md files from the project root, usually the Git root, down to the current working directory
later, closer files override earlier guidance
Source: AGENTS.md discovery
Skills work similarly but with their own discovery path: Codex reads repo skills from .agents/skills from your current working directory up to the repo root, plus user/admin/system skills. Source: Agent Skills
So for your old Copilot setup:
What you can get:
Multi-repo file access/editing: yes, via permission profiles or workspace roots.
Shared instructions across repos: yes, put them in ~/.codex/AGENTS.md, or in a shared parent/umbrella project where appropriate.
Shared skills across repos: yes, put them in $HOME/.agents/skills, package them as a plugin, or symlink/duplicate repo skills.
Project-specific instructions: yes, use AGENTS.md in each repo or subdirectory.
Project-specific config: yes, .codex/config.toml, but only after the project is trusted. Source: config reference
What you probably do not get as a direct equivalent:
“Open one multi-root workspace and automatically combine all root instructions/skills” as a first-class Codex behavior.
Sibling repo AGENTS.md / .agents/skills files merged just because they are all part of some workspace.
The closest Codex pattern is: create a shared permission profile that grants access to all related roots, keep cross-cutting behavior in global AGENTS.md / global skills, and keep repo-local rules inside each repo.
jmeza96-not-an-llm commentedon Jul 17, 2026
I need this feature 🙏
Kreynar commentedon Nov 18, 2026
It's the same in my case as well.
It worked perfectly with "Local" harness and it's the biggest issue switching to "Copilot".
I believe, this setup may be quite common among developers. Many may be affected by the issue, just simply not be aware of it. Because e.g. skills seem to get loaded successfully, but copilot-instructions.md not.
As a workaround on my second repo I've renamed copilot-instructions.md to general.instructions.md. Then moved it under instructions/. And in workspace file added: