Custom agent frontmatter is not automatically loaded on VSCode startup.
@aeschli is already working on this.
Since Jun 17, 2026.
Assessment
This issue has not been assessed yet.
Description
- Copilot Chat Extension Version: Built-in
- VS Code Version: 1.124.2 (Universal)
- OS Version: macOS 26.5.1 (25F80)
- Feature (e.g. agent/edit/ask mode): agent
- Selected model (e.g. GPT 4.1, Claude 3.7 Sonnet): GPT-5.4 (but happens with other models as well)
Problem:
After restarting VS Code, selecting a custom agent does not reliably load the metadata configured in its frontmatter into the chat UI.
The chat window keeps using the model and tools that were already active in the chat session instead of switching to the model and tools configured for the selected agent. Agents with user-invocable: false are still shown in the UI.
It seems that this does not only affect the UI, but the whole chat functionality, in particular this also affects subagents.
The configuration only starts working after opening the corresponding agent file and saving it again without making any changes. After that, the configured model and tools are applied correctly and non user invocable agents disappear.
Steps to Reproduce:
- Enable
allowInvocationsFromSubagents - Create one or more custom agents and subagents with frontmatter that defines description, model, and tools.
- Restart VS Code.
- Open the chat view and select one of the configured agents.
- Observe that the chat UI does not update to the model and tools defined in the selected agent's frontmatter.
- Ask the agent to trigger a subagent.
- Observe in Debug View that the subagent request uses the model and tools currently active in the chat window instead of the ones configured in the selected subagent.
- Open the corresponding
.agent.mdfile. - Save the file again without making any changes.
- Observe that after saving, the agent metadata is loaded and the configured model/tools are then applied.
Expected:
Selecting an agent or subagent after restarting VS Code should immediately apply the frontmatter-defined description, model, and tools.
Actual:
After restart, custom agent frontmatter is not automatically loaded. Easily visible by non user-invocable agents still appearing in the UI, but also causing sideeffects to agents that are selected and subagents that are indirectly called.
Logs:
This log snippet shows that the description of the research and scout agents was not loaded:
<agent>
<name>research</name>
</agent>
<agent>
<name>scout</name>
</agent>
<agent>
(Taken from Debug Chat Panel - subAgent Tool call - Requests - System)
In other logs, for example tool/runSubagent-..., the model used for the subagent does not match the model configured in the subagent frontmatter.
Example frontmatter configuration:
model:
[
GPT-5.4 mini (copilot),
Gemini 3.5 Flash (copilot),
Claude Haiku 4.5 (copilot),
]
Observed in logs:
model : gpt-5.4
resolved model : gpt-5.4-2026-03-05
The same logs also show that the tools used are the ones active in the chat window at that moment, not the tools configured in the subagent frontmatter.
- 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 ·