Skip to content

observal agent pull --harness copilot-cli generates an agent file that fails Copilot CLI schema validation (missing per-server tools on mcp-servers) #1502

Description

@Lokesh7025

Checked for duplicates?

  • This issue is not a duplicate

What are the steps to reproduce this bug?

Run:
observal agent pull task-ceator --harness copilot-cli --no-prompt --dir .
Confirm the file was written:
cat .github/agents/task-ceator.agent.md
Frontmatter looks like:
mcp-servers:
github:
type: stdio
command: observal-shim
args: [...]
notion-api:
type: stdio
command: observal-shim
args: [...]
(Note: no tools: field under either MCP server.)
Launch Copilot CLI from the same repo root:
copilot --agent task-ceator
Observe the error:
✗ Custom agent "task-ceator" not found. Available agents: none
Inside an interactive session, /agent also shows no agents.

Expected behaviour

The pulled agent should be loadable by Copilot CLI immediately after observal agent pull --harness copilot-cli. Either:

  • Observal should emit a tools: array per MCP server entry under mcp-servers (e.g., tools: ['*']), matching Copilot CLI's schema ({command, args, tools, type?, cwd?, env?,
    timeout?}); or
  • Observal should omit the mcp-servers block from the .agent.md entirely and rely solely on the MCP definitions written to .copilot/mcp-config.json (which it already populates
    correctly).

Support bundle

No response

(Optional) Anything else you want to share?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliCLI changes

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions