vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Copilot instructions in multi-root should apply per folder

Open bpasero opened this issue 5 months ago • 6 comments

Steps to Reproduce:

  1. be in a multi root workspace with several folders where each has a instructions file checked into the workspace
  2. do any agentic session
  3. note that every folders instructions is used as reference
Image

I would argue that the instructions should be applied depending on which folder a file is generated in, similar to the applyTo pattern.

But I can be convinced otherwise if you have thought about it and feel the current behaviour is correct, but please then explain why.

//cc @digitarald @isidorn @alexdima

bpasero avatar Jul 10 '25 18:07 bpasero

I would expect all to be included to give the AI an idea of what workspaces it has open; but I can see how it throws off tasks that only need to focus on one of the folders.

As we implement recursive instruction files, it might be worth exprimenting with how well this works.

digitarald avatar Jul 10 '25 19:07 digitarald

I lean towards Ben's suggestion.

(not related to MR worksapce) In general we should just be inspired by claude code's approach https://www.anthropic.com/engineering/claude-code-best-practices - check out the "Create CLAUDE.md files" section.

isidorn avatar Jul 10 '25 19:07 isidorn

@isidorn from the section, do you mean the recursive nature described in "You can place CLAUDE.md files in several locations"; which is also done by codex, gemini code, amp?

digitarald avatar Aug 05 '25 01:08 digitarald

Yes.

isidorn avatar Aug 07 '25 09:08 isidorn

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!

I also think it has to be all. The agent can potentially write to all of the workspace folders.

aeschli avatar Dec 10 '25 16:12 aeschli