Skip to content

XML tags in copilot-instructions.md prevent content from being loaded #1312

@PlaneInABottle

Description

@PlaneInABottle

Description

When using XML-style tags (e.g., <global-instructions>, <role-and-identity>) in the copilot-instructions.md file, the content within those tags is not loaded into the agent's context.

Steps to Reproduce

  1. Create a .copilot/copilot-instructions.md file with the following structure:
---
description: "System prompt"
applyTo: "**"
---

Instructions:

<global-instructions>
<role-and-identity>
You are a helpful assistant.
</role-and-identity>
</global-instructions>
  1. Start a Copilot CLI session
  2. Check the agent's context - the instructions within XML tags are not visible

Expected Behavior

The content within XML tags should be treated as regular markdown and loaded into the agent's context, or at minimum, the documentation should clarify that XML tags are not supported in instruction files.

Actual Behavior

Content wrapped in XML tags (e.g., <global-instructions>, <role-and-identity>) is ignored/not loaded. The <custom_instruction> section in the agent's context shows empty Instructions: field.

Workaround

Remove XML tags from the instruction file - use plain markdown or other formatting instead.

Environment

  • Copilot CLI version: 0.0.403
  • Platform: macOS

Impact

This prevents users from organizing complex instructions using XML-style semantic tags, which is a common pattern for structured prompts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions