Describe the bug
Summary
A personal AGENTS.md placed in a directory listed in COPILOT_CUSTOM_INSTRUCTIONS_DIRS used to be injected globally into the system prompt (inside the <custom_instruction> block). As of 1.0.66 it is instead registered as a path-scoped "nested" instruction file, so its full body is no longer loaded into context at session start. It only loads if the file is later read, and it behaves as if scoped to its own directory subtree rather than applying globally.
This is a behavior change with no corresponding changelog entry.
Evidence
- Session logs: in a 1.0.65 session the file body is embedded in the base system prompt
<custom_instruction> block (immediately after </tools>). In every 1.0.66 and 1.0.67 session the body is absent from the prompt and only the directory-scoped listing is present.
- Comparing published
@github/copilot-win32-x64 1.0.65 vs 1.0.66: the JS instruction-collection code is effectively unchanged (only @-import expansion was added). The deciding logic is the native call repoBuildNestedAgentsInstructionsTable; runtime.node changed substantially between the two versions (about 39.6 MB to 46.5 MB), so the routing change is in compiled native code, not the JS bundle.
Impact
Users relying on COPILOT_CUSTOM_INSTRUCTIONS_DIRS to load personal, always-on instructions across all repos lose that behavior silently after updating. There is no documentation or changelog note describing the new scoping.
Requests
- Confirm whether this change was intentional.
- If intentional, document the scoping of
COPILOT_CUSTOM_INSTRUCTIONS_DIRS (global vs path-scoped) and note it in the changelog.
- Provide a supported way to load a personal, always-global instruction file from an arbitrary directory (for example, honoring a broad
applyTo in a .instructions.md, or an inlined mode for custom dirs).
Affected version
1.0.66 and 1.0.67 (regressed from 1.0.65, the last version with the old behavior).
Steps to reproduce the behavior
- Create a personal instructions file at
C:\path\to\personal\AGENTS.md with recognizable content.
- Set the env var:
COPILOT_CUSTOM_INSTRUCTIONS_DIRS=C:\path\to\personal
- Start a Copilot CLI session in an unrelated repository (not the one containing the personal dir).
- Inspect the initial context / system prompt (for example via
/context or the session events log).
- Note that the personal
AGENTS.md body is not present; only a directory-scoped listing entry appears.
- Downgrade to
1.0.65 and repeat: the body is inlined into the <custom_instruction> block and applies globally.
Expected behavior
The personal AGENTS.md from a COPILOT_CUSTOM_INSTRUCTIONS_DIRS directory should be loaded globally into the system prompt at session start and apply to the whole session, regardless of the current working directory or repo, as it did in 1.0.65.
Describe the bug
Summary
A personal
AGENTS.mdplaced in a directory listed inCOPILOT_CUSTOM_INSTRUCTIONS_DIRSused to be injected globally into the system prompt (inside the<custom_instruction>block). As of 1.0.66 it is instead registered as a path-scoped "nested" instruction file, so its full body is no longer loaded into context at session start. It only loads if the file is later read, and it behaves as if scoped to its own directory subtree rather than applying globally.This is a behavior change with no corresponding changelog entry.
Evidence
<custom_instruction>block (immediately after</tools>). In every 1.0.66 and 1.0.67 session the body is absent from the prompt and only the directory-scoped listing is present.@github/copilot-win32-x641.0.65 vs 1.0.66: the JS instruction-collection code is effectively unchanged (only@-import expansion was added). The deciding logic is the native callrepoBuildNestedAgentsInstructionsTable;runtime.nodechanged substantially between the two versions (about 39.6 MB to 46.5 MB), so the routing change is in compiled native code, not the JS bundle.Impact
Users relying on
COPILOT_CUSTOM_INSTRUCTIONS_DIRSto load personal, always-on instructions across all repos lose that behavior silently after updating. There is no documentation or changelog note describing the new scoping.Requests
COPILOT_CUSTOM_INSTRUCTIONS_DIRS(global vs path-scoped) and note it in the changelog.applyToin a.instructions.md, or an inlined mode for custom dirs).Affected version
1.0.66and1.0.67(regressed from1.0.65, the last version with the old behavior).Steps to reproduce the behavior
C:\path\to\personal\AGENTS.mdwith recognizable content.COPILOT_CUSTOM_INSTRUCTIONS_DIRS=C:\path\to\personal/contextor the session events log).AGENTS.mdbody is not present; only a directory-scoped listing entry appears.1.0.65and repeat: the body is inlined into the<custom_instruction>block and applies globally.Expected behavior
The personal
AGENTS.mdfrom aCOPILOT_CUSTOM_INSTRUCTIONS_DIRSdirectory should be loaded globally into the system prompt at session start and apply to the whole session, regardless of the current working directory or repo, as it did in1.0.65.