Skip to content

Interactive mode fails on invalid MCP output schema while noninteractive mode succeeds; blocks all turns #5557

Backlog

Description

@zachbryant

Describe the bug

A local MCP tool advertising outputSchema.anyOf: null causes interactive Copilot CLI to fail before answering, even when the prompt does not require the tool.

The error identifies only a tool index, not the offending MCP server or tool. Reproduced with one generic dummy tool, without Agency or Transmog.

Affected version

1.0.115-7, launched through Agency 2026.11.16.5 on Linux/WSL

Steps to reproduce the behavior

Requires Node.js and an authenticated Copilot CLI. Extract the attached reproduction and run commands from its directory. copilot-mcp-schema-repro.json

  1. Start interactive mode:

    copilot --additional-mcp-config @mcp.json
  2. Enter:

    Reply with exactly OK. Do not call any tools.
    
  3. The turn fails before any tool invocation:

    400 [MapParam] [tools[25].output_schema.anyOf]
    [invalid_type] Invalid type for 'tools[25].output_schema.anyOf':
    expected an unknown value, but got null instead.
    

    The numeric tool index may vary.

  4. Exit and restart with only the invalid schema field omitted:

    MCP_REPRO_VALID=1 copilot --additional-mcp-config @mcp.json

    Submit the same prompt. Result: OK.

  5. The invalid schema also succeeds in noninteractive mode:

    copilot --additional-mcp-config @mcp.json -p "Reply with exactly OK. Do not call any tools."

    Result: OK.

Expected behavior

Detect the invalid MCP schema and identify the server, tool name, and offending field with an actionable diagnostic, rather than failing the entire turn with positional indexes.

Interactive and noninteractive modes should handle the same invalid schema consistently.

Additional context

  • The reproduction exposes one generic tool and requires no npm packages.
  • Removing only anyOf: null makes the interactive test succeed.
  • No tool invocation is required to trigger the failure.
  • The failure also reproduced with deferred loading, but deferred loading is not required.
  • Other Copilot versions and model backends have not been tested.

Activity

  1. added theissue type on Nov 23, 2026
  2. changed the title [-]Interactive mode fails on invalid MCP output schema while noninteractive mode succeeds[/-] [+]Interactive mode fails on invalid MCP output schema while noninteractive mode succeeds; blocks all input[/+] on Nov 23, 2026
  3. changed the title [-]Interactive mode fails on invalid MCP output schema while noninteractive mode succeeds; blocks all input[/-] [+]Interactive mode fails on invalid MCP output schema while noninteractive mode succeeds; blocks all turns[/+] on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions