[Feature Request] Allow configuring Copilot agent/skill/instruction discovery paths via settings
Nobody has claimed this yet.
Assessment
This issue has not been assessed yet.
Description
Currently, VS Code has two separate systems for discovering Copilot agent files:
Workbench-side (.agent.md files): Already configurable via the chat.agent.fileLocations setting.
Agent host-side (Copilot SDK session discovery in sessionCustomizationDiscovery.ts): Paths are hardcoded and cannot be customized.
The agent host side scans a fixed set of directories for agents, skills, and instruction files:
Workspace:
.github/agents, .agents/agents, .claude/agents (agents)
.github/skills, .agents/skills, .claude/skills (skills)
.github/instructions (instructions)
User home:
.copilot/agents (agents)
.agents/skills (skills)
.copilot/instructions (instructions)
Instruction files (AGENTS.md, CLAUDE.md, GEMINI.md, etc.) are also discovered from hardcoded paths.
Problem
Teams and individuals who organize their repositories differently (e.g., monorepos, custom tooling conventions, or non-standard directory layouts) cannot point the agent host discovery to their preferred locations. There is no escape hatch — the only option is to restructure the repository to match the hardcoded paths.
In contrast, the workbench-side already demonstrates that this is solvable: PromptsConfig.AGENTS_LOCATION_KEY allows users to specify custom paths for .agent.md files via settings. The agent host side lacks an equivalent mechanism.
Proposed Solution
Expose the agent host searchRoots (and optionally agentInstructions) as a VS Code setting, similar to how chat.agent.fileLocations works for the workbench side. For example:
// settings.json
"chat.agent.hostDiscoveryPaths": {
"workspace": {
"agents": [".github/agents", "my-team/agents"],
"skills": [".github/skills"],
"instructions": [".github/instructions"]
},
"user": {
"agents": ["/.copilot/agents", "/.my-org/agents"]
}
}
The setting should:
Accept relative paths (resolved from workspace root) and ~/-prefixed paths (resolved from user home).
Default to the current hardcoded values so existing behavior is preserved.
Be marked as restricted: true (workspace trust) consistent with the existing chat.agent.fileLocations setting.
Relevant Code
Hardcoded discovery: src/vs/platform/agentHost/node/copilot/sessionCustomizationDiscovery.ts (searchRoots, agentInstructions)
Configurable workbench-side equivalent: src/vs/workbench/contrib/chat/common/promptSyntax/config/promptFileLocations.ts (DEFAULT_AGENT_SOURCE_FOLDERS)
Setting registration: src/vs/workbench/contrib/chat/browser/chat.shared.contribution.ts (AGENTS_LOCATION_KEY)
Use Cases
Monorepos where agents live in a subdirectory (e.g., packages/ai-tools/agents)
Organizations with a shared agents directory outside the standard .github/ convention
Users who want to keep agent files alongside their dotfiles in a non-default home directory path
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.9k
- PR merge metrics
- PR metrics pending
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
new release
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
All issues in microsoft/vscode
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·