Skip to content

[FEATURE] Support handoffs: frontmatter in .agent.md files #1300

@wetwicky

Description

@wetwicky

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

  1. Add a handoffs: block to any .agent.md file in agents
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    status/needs-triageNew, awaiting maintainer review.type/featureNew capability, new flag, new primitive.

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions