Feature Request: Support handoffs: frontmatter in .agent.md files
Summary
apm compile crashes with 'list' object has no attribute 'startswith' when an .agent.md file contains a handoffs: block in its YAML frontmatter. APM 0.13.0 does not recognize this field and fails trying to call .startswith() on the list value.
Context
handoffs: is a VS Code Copilot Chat feature (introduced in VS Code 1.106) that enables guided sequential workflows between custom agents. It is defined in the VS Code custom agents documentation and follows this schema:
handoffs:
- label: Start Implementation
agent: implementer
prompt: 'Implement the plan outlined above.'
send: false
Steps to Reproduce
- Add a
handoffs: block to any .agent.md file in agents
- Run
apm compile
Result:
[x] Compilation failed with 1 errors:
[x] Distributed compilation failed: 'list' object has no attribute 'startswith'
Expected: APM passes through the handoffs: field unchanged, the same way it handles other VS Code-specific frontmatter fields like argument-hint and model.
Workaround
Remove the handoffs: block from the frontmatter before compiling, then restore it after.
Requested Behavior
APM should treat handoffs: as a pass-through frontmatter field — preserve it in the compiled output without attempting to parse or transform it, consistent with how other unrecognized agent frontmatter fields are handled.
Environment
- APM version:
0.13.0
- OS: Windows
- Target:
copilot
- Compilation strategy:
distributed
Related
Feature Request: Support
handoffs:frontmatter in.agent.mdfilesSummary
apm compilecrashes with'list' object has no attribute 'startswith'when an.agent.mdfile contains ahandoffs:block in its YAML frontmatter. APM 0.13.0 does not recognize this field and fails trying to call.startswith()on the list value.Context
handoffs:is a VS Code Copilot Chat feature (introduced in VS Code 1.106) that enables guided sequential workflows between custom agents. It is defined in the VS Code custom agents documentation and follows this schema:Steps to Reproduce
handoffs:block to any.agent.mdfile in agentsapm compileResult:
Expected: APM passes through the
handoffs:field unchanged, the same way it handles other VS Code-specific frontmatter fields likeargument-hintandmodel.Workaround
Remove the
handoffs:block from the frontmatter before compiling, then restore it after.Requested Behavior
APM should treat
handoffs:as a pass-through frontmatter field — preserve it in the compiled output without attempting to parse or transform it, consistent with how other unrecognized agent frontmatter fields are handled.Environment
0.13.0copilotdistributedRelated
applyTo: ['*'](list instead of glob string) andexcludeAgent: ["..."](list instead of string) in.instructions.mdfrontmatter — same root cause, same crash.