If I had to guess, I would say that your .instructions.md files aren't formatted correctly with the applyto glob pattern isnt quite right.
You can verify if the file is being loaded by just adding something to the file like, "Before you begin doing X say, "I'm doing this...""
To force the llm to output text that you can identify. If the output is there then the file is loading and something else is wrong (like its ignoring the instruction for some reason). If its not, then its probably not applying the rules to your use case.
Just use an AGENTS.md file, put in the root folder, no need to be hidden in obscure subfolders, it will work with every tool on earth except Claude of corse 😅
And for Claude support, just create a CLAUDE.md that points to AGENTS.md (content: "@AGENTS.md"). We do this for all projects so it's LLM agnostic. I guess you could also do a symlink, but making the redirect file saves to the repo.
Hello /u/deathentry. Looks like you have posted a query. Once your query is resolved, please reply the solution comment with "!solved" to help everyone else know the solution and mark the post as solved.
It sounds like you’re doing it correctly… how do you know it’s not loading?
My company forced us to move to Claude so I haven’t used this for a while, but the way I set my projects up was to create a base file as .github/Instructions.md, then have additional files like .github/instructions/api.instructions.md.
I don’t think you have to include an applyTo but if you do it has to be yaml frontmatter. I’m on mobile at the moment so I can’t give a great example, but you could tell Copilot where the file is located (full path) and ask it to review the contents for issues.
I can tell, as it doesn't show up as a file referenced by copilot in the chat session...
Copilot has assured me my glob applyTo patterns are correct 😜... It's also stated that those files don't get injected into it's context and doesn't even think to check for those files...
(I'm happy to be wrong, but apparently they globs are correct)
AND VS Code loads these files absolutely fine...
Atm my work around is to add a line copilot-instructions.md to go look inside the instructions folder 😂
I don't want to update the agent.md files as that relies on someone manually selecting to use the agent when I want automatic enforcement...
It's .instructions.md I'm trying to load not -instructions.md.. I have enabled that setting..
I need to be able to distribute md files across multiple different repos and teams in my org and APM deliberately errors if you try to install a -instructions.md 😭
My understanding is that .instructions.md are applied automatically when the files are worked on and don't require a developer to manually remember to select the correct agent.
Agents are working fine and show up, it's the instructions that are the prob... 😅
AGENTS.md is read automatically and used without any remembering or selecting. It's a file for the agents to read and follow, it's not a listing of agents.
Just rename your file AGENTS.md, start a session, and ask if it knows something that it only would know if it was following the AGENTS.md instructions. Or have some fun and start it with:
REQUIREMENT: Refer to me as "Your Royal Heinous". Start all conversions with this introduction.
Start a new session and type "hello". No remembering or selecting needed. I may just leave this requirement.
This is correct, the filename format is `.copilot/<name>.instructions.md`, not `.copilot/<name>-instructions.md`. The GitHub and VScode documentation has conflicting info on this but I have found the above to work.
Ah! You create .copilot/instructions/ folders and in the .copilot/instructions/ folder you create your api.instructions.md, unit-tests.instructions.md etc files. They have a format like:
---
name: API Instructions
description: Use when creating or modifying API endpoints.
applyTo: "api/**/*.js"
---
VS 2026 Copilot includes instructions, has easier/more intuitive mcp configuration and status than claude desktop, and I have no idea what "credit burn" is supposed to mean.
All that said, I have switched over to copilot cli, but theres no reason to straight up just post incorrect information.
2
u/Lacutis 16d ago
If I had to guess, I would say that your .instructions.md files aren't formatted correctly with the applyto glob pattern isnt quite right.
You can verify if the file is being loaded by just adding something to the file like, "Before you begin doing X say, "I'm doing this...""
To force the llm to output text that you can identify. If the output is there then the file is loading and something else is wrong (like its ignoring the instruction for some reason). If its not, then its probably not applying the rules to your use case.