Skip to content

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

Closed

Description

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

Activity

  1. added
    type/feature
    on May 12, 2026
  2. changed the title [-][FEATURE][/-] [+][FEATURE] Support handoffs: frontmatter in .agent.md files[/+] on May 12, 2026
  3. added
    status/needs-triage
    and removed
    status/needs-triage
    on May 13, 2026
  4. github-actions commented on May 29, 2026

    @github-actions

    Triage decision

    accept

    Proposed labels

    theme/portability
    area/cli
    type/feature
    status/accepted
    priority/high
    

    Milestone

    null

    Suggested next action

    Fix the apm compile frontmatter parser to treat any unrecognized list-valued field as a pass-through, covering handoffs:, applyTo: (as list), and excludeAgent: (as list) in the same change.

    Suggested issue comment

    Thank you for the detailed bug report, @wetwicky. The apm compile crash on handoffs: is a real regression for VS Code 1.106 users -- the handoffs field is a valid VS Code Copilot Chat feature and APM should pass it through unchanged, just as it does for argument-hint and model.
    
    Note: the panel reads this as a type/bug (compile crash with a traceback) rather than a type/feature, but we are preserving the existing label. Maintainers: the existing type/feature label may want to be updated to type/bug.
    
    The fix is to treat any unrecognized frontmatter field whose value is a list as a pass-through, rather than calling .startswith() on it. The same root cause also affects applyTo: ["*"] and excludeAgent: ["..."] in .instructions.md files as you noted -- all three should be fixed in the same PR.
    
    This is accepted as priority/high since it causes data loss (apm compile fails, so no output is produced). A PR is very welcome.
    
    See the agent compilation reference at (microsoft.github.io/redacted) for the expected frontmatter passthrough behavior.

    Per-lens notes (collapsed)

    DevX UX Expert -- User-Need Reviewer

    This is a compile crash -- the worst possible failure mode for a packaging tool. The user gets '[x] Compilation failed' with no output when their .agent.md file contains a valid VS Code 1.106 field (handoffs:). The expected behavior (pass through unrecognized fields) is already implemented for argument-hint and model, so this is a regression in the frontmatter parser's handling of list-valued fields. The same root cause affects applyTo: as a list and excludeAgent: as a list in .instructions.md -- a single fix in the YAML frontmatter parser handles all three. High UX impact: any VS Code 1.106 user who adds handoffs: is silently blocked from compiling.

    Supply Chain Security Expert -- Risk-Surface Reviewer

    No risk-surface implication. This is a frontmatter parser type-coercion bug. Pass-through of unrecognized fields does not introduce any new security surface -- the output is a compiled file that the user reviews before deploying. No theme/security needed.

    OSS Growth Hacker -- Contributor-Tone Reviewer

    Activated -- wetwicky has NONE association against microsoft/apm. The author's bug report is thorough (reproduction steps, workaround, environment, related fields). The reply should acknowledge the quality of the report, name the root cause clearly, and invite a PR. Tone: welcoming, concrete, direct. The panel notes the type/bug vs type/feature label discrepancy in the comment so maintainers can correct it -- this is transparent without being critical of the author's label choice (they may have used the default issue template).

    Python Architect -- Architecture Reviewer

    Not activated -- the fix is a targeted type-guard in the frontmatter parser (check if value is a list before calling .startswith()). No cross-cutting design decision required. The fix should be in the YAML frontmatter parsing path shared by agent, instruction, and skill compilation.

    Doc Writer -- Documentation Reviewer

    Activated. The package-authoring docs should note that list-valued frontmatter fields (handoffs:, applyTo: as list, excludeAgent: as list) are supported as pass-through in apm compile. This prevents future users from discovering the behavior by hitting the crash. area/docs-site should ride as a secondary label on the implementing PR.

    APM CEO -- Triage Arbiter

    Compile crashes on valid VS Code agent files are high-priority regressions -- they block any VS Code 1.106 user from using apm compile. The fix is contained, the root cause is clear, and the scope covers three related list-valued field cases in one PR. The existing type/feature label is noted as likely incorrect (this is a bug), but per panel protocol the conflicting human-applied label is preserved and flagged in the comment for maintainer review. Accept as priority/high. NONE author association warrants a warm, action-oriented reply.

    {
      "decision": "accept",
      "decision_detail": "Compile crash on handoffs: list-valued frontmatter field; panel reads as type/bug but preserving existing type/feature label -- see comment for maintainer note.",
      "theme": "theme/portability",
      "areas": ["area/cli"],
      "type": "type/feature",
      "status": "status/accepted",
      "priority": "priority/high",
      "preserved_labels": [],
      "milestone": null,
      "next_action": "Fix the frontmatter parser to pass through any unrecognized list-valued field, covering handoffs:, applyTo: (list), and excludeAgent: (list) in one PR.",
      "comment_markdown": "Thank you for the detailed bug report, @wetwicky. The apm compile crash on handoffs: is a real regression for VS Code 1.106 users -- the handoffs field is a valid VS Code Copilot Chat feature and APM should pass it through unchanged, just as it does for argument-hint and model.\n\nNote: the panel reads this as a type/bug (compile crash with a traceback) rather than a type/feature, but we are preserving the existing label. Maintainers: the existing type/feature label may want to be updated to type/bug.\n\nThe fix is to treat any unrecognized frontmatter field whose value is a list as a pass-through, rather than calling .startswith() on it. The same root cause also affects applyTo: ['*'] and excludeAgent: ['...'] in .instructions.md files as you noted -- all three should be fixed in the same PR.\n\nThis is accepted as priority/high since it causes data loss (apm compile fails, so no output is produced). A PR is very welcome.\n\nSee the agent compilation reference at (microsoft.github.io/redacted) for the expected frontmatter passthrough behavior."
    }

    Triage status: agentic proposal pending human ratification.
    Silence is approval. Maintainers can:

    • Override any label or milestone above by editing it directly --
      human edits are authoritative and will not be reverted on
      subsequent runs.
    • Re-trigger triage by applying the status/needs-triage label, or
      by removing status/triaged to enroll the issue in the next
      daily sweep.

    Posted by the Triage Panel workflow. See .apm/skills/apm-triage-panel for the panel skill.

    Generated by Triage Panel · sonnet46 5.4M · ◷

  5. added
    area/cli
    priority/high
    status/accepted
    status/triaged
    and removed
    status/needs-triage
    on May 29, 2026
  6. added
    status/shepherding
    on Jun 3, 2026
  7. moved this from Todo to In Progress in APM Roadmapon Jun 3, 2026
  8. removed
    status/shepherding
    on Jun 3, 2026
  9. moved this from In Progress to Done in APM Roadmapon Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area/clipriority/highstatus/acceptedstatus/triagedtype/feature

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions