You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Custom agent frontmatter model field rejects array syntax — incompatibility between Copilot CLI and VS Code Copilot Chat #2133
When a custom agent .agent.md file uses an array for the model frontmatter field (as supported by VS Code Copilot Chat), the GitHub Copilot CLI refuses to load the agent and throws a parse error.
Error message from Copilot CLI:
The following agents failed to load:
.github/agents/Coordinator.agent.md: custom agent markdown frontmatter is malformed: model: Expected string, received array
Agent frontmatter that triggers the error:
---
name: Coordinatordescription: Pure managerial agent that orchestrates implementation by delegating all technical work to specialized subagents.argument-hint: Coordinate a plan, phase, feature, or code changetools: [vscode, execute, read, agent, search, web, todo]model: [GPT-5.4 (copilot), Claude Sonnet 4.6 (copilot)]
---
The model field being an array is intentional — it allows the agent to declare multiple model fallbacks or alternatives. VS Code Copilot Chat loads and uses this agent correctly. However, the Copilot CLI strictly expects model to be a string, causing a schema validation failure and preventing the agent from loading entirely.
Affected version
No response
Steps to reproduce the behavior
Create a custom agent file at .github/agents/MyAgent.agent.md with the following frontmatter:
---
name: MyAgentdescription: An agent with multiple model optionsmodel: [GPT-5.4 (copilot), Claude Sonnet 4.6 (copilot)]
---
Run any copilot CLI command that triggers agent loading (e.g. gh copilot suggest or open a session that scans .github/agents/)
Observe the error output on checking /agent
Expected behavior
The Copilot CLI should accept the model field as either a string or an array of strings, consistent with how VS Code Copilot Chat parses the same .agent.md frontmatter. When an array is provided, the CLI could use the first entry as the primary model, or support model fallback/selection semantics.
At minimum, the schema validation for model should align between Copilot CLI and VS Code Copilot Chat to avoid agents that work in one environment failing to load in the other.
Additional context
No response
Reacted by Douglas Hellinger, Fer VT, Aleksander Sjåfjell, Tom van de Logt, Brett Epps, Alex Herring and Madeleine Ellisiv Nøkling
Yeah this is giving me trouble right now in my RadOrchestration project. I'm trying to make my system work cohesively between the vscode and cli and I'm running into a lot of friction aligning my agent definitions between both tools.
Repro from a real VS Code Team Kit plugin on Copilot CLI 1.0.35-4 / Windows.
I hit the same incompatibility when installing the vscode-team-kit plugin and opening the custom agents picker in Copilot CLI. The bundled agent definitions load in VS Code, but Copilot CLI warns that the frontmatter is malformed because model is an array.
---
name: Councillor-GPTdescription: Read-only code reviewer pinned to GPT models. Use directly for a single-model review, or as part of a multi-model council via the council skills.user-invocable: falsemodel:
- GPT-5.4
- GPT-5.3-Codex
---
CLI output:
custom agent markdown frontmatter is malformed: model: Expected string, received array
This looks like a real compatibility gap between VS Code agents and Copilot CLI agents. It would be great if agent frontmatter support were uniform across both surfaces, especially for:
model as a string or array of strings
model identifiers / display names being normalized consistently
clear fallback or selection behavior when multiple models are listed
Right now this blocks using the same agent definitions across VS Code and Copilot CLI without maintaining separate copies.
Confirming this except we got no visible error or notification at all, /agentjust silently listed none of our custom agents. Had to go digging to find the actual root cause of the disappearing agents.
Thanks for the report. As of Copilot CLI v1.0.83, custom agents can list several models in the model field, tried in order until one is available to you (with model-policy: required keeping model changes on that list), and since v1.0.24 the model field also accepts VS Code-style display names and vendor suffixes such as GPT-5.4 (copilot), so definitions like the one above should now load in both tools. If an agent with a model list still fails to load, or silently goes missing from /agent, on the latest version, please reopen with the frontmatter.
Triaged as part of a Copilot SDK backlog review, with help from GitHub Copilot.
Activity
brolnickij commentedon Mar 26, 2026
Hit the same class of issue. In our case it was not array syntax but display names vs slug IDs.
CLI rejected all of these:
Fix: use slug IDs from
~/.copilot/config.json—claude-opus-4.6,gpt-5.4,claude-haiku-4.5, etc.So there are at least 3 incompatibilities between CLI and VS Code for
model::(copilot)— CLI rejects, VS Code uses for handoffsCopilot CLI v1.0.11, macOS.
MetalHexx commentedon Mar 29, 2026
Yeah this is giving me trouble right now in my RadOrchestration project. I'm trying to make my system work cohesively between the vscode and cli and I'm running into a lot of friction aligning my agent definitions between both tools.
cirvine-MSFT commentedon Apr 23, 2026
Repro from a real VS Code Team Kit plugin on Copilot CLI 1.0.35-4 / Windows.
I hit the same incompatibility when installing the
vscode-team-kitplugin and opening the custom agents picker in Copilot CLI. The bundled agent definitions load in VS Code, but Copilot CLI warns that the frontmatter is malformed becausemodelis an array.Affected files from the installed plugin:
C:\Users\cirvine\.copilot\installed-plugins\vscode-team-kit\model-council\agents\councillor-gpt.agent.mdC:\Users\cirvine\.copilot\installed-plugins\vscode-team-kit\model-council\agents\councillor-opus.agent.mdC:\Users\cirvine\.copilot\installed-plugins\vscode-team-kit\model-council\agents\councillor-gemini.agent.mdExample frontmatter shape:
CLI output:
This looks like a real compatibility gap between VS Code agents and Copilot CLI agents. It would be great if agent frontmatter support were uniform across both surfaces, especially for:
modelas a string or array of stringsRight now this blocks using the same agent definitions across VS Code and Copilot CLI without maintaining separate copies.
maddeq commentedon Aug 13, 2026
Confirming this except we got no visible error or notification at all,
/agentjust silently listed none of our custom agents. Had to go digging to find the actual root cause of the disappearing agents.fix(agents): use scalar model in subagent frontmatter for CLI compati…
fix(agents): use scalar model in subagent frontmatter for CLI compati…
fix(harness): agy takes its model as a launcher flag, so it is an ada…
patniko commentedon Oct 26, 2026
Thanks for the report. As of Copilot CLI v1.0.83, custom agents can list several models in the
modelfield, tried in order until one is available to you (withmodel-policy: requiredkeeping model changes on that list), and since v1.0.24 themodelfield also accepts VS Code-style display names and vendor suffixes such asGPT-5.4 (copilot), so definitions like the one above should now load in both tools. If an agent with amodellist still fails to load, or silently goes missing from/agent, on the latest version, please reopen with the frontmatter.Triaged as part of a Copilot SDK backlog review, with help from GitHub Copilot.