require-valid-agent-subagents
Require Copilot custom-agent agents metadata to be *, [], or a non-empty list of explicit agent names.
Rule catalog ID: R017
Targeted pattern scopeâ
.github/agents/**/*.agent.md
What this rule reportsâ
- scalar
agentsvalues other than* - malformed
agentsmetadata that is neither*,[], nor a list of explicit agent names - wildcard list entries such as
['*', 'Planner']
Why this rule existsâ
VS Code documents the agents field as accepting one of three shapes: a list of allowed agent names, * to allow all available subagents, or [] to disable subagent use. Keeping that metadata in one of the documented forms makes subagent orchestration predictable and avoids accidental misconfiguration.
â Incorrectâ
---
description: Coordinate feature work
agents: Planner
---
Use subagents when helpful.
â Correctâ
---
description: Coordinate feature work
agents: ['Planner', 'Reviewer']
---
Use subagents when helpful.
---
description: Stay in the current agent only
agents: []
---
Do not use subagents for this workflow.