Skip to content

[smoke-detector] 🔍 Smoke Test Investigation - Copilot CLI Rejects MCP Config with 'type': 'local' Field - Run #32 #2296

@github-actions

Description

@github-actions

🔍 Smoke Test Investigation - Run #32

Summary

Copilot CLI version 0.0.349 is rejecting the MCP server configuration due to an invalid schema. The configuration includes "type": "local" fields for both github and safe-outputs MCP servers, which causes the CLI to fail with "Invalid input" errors before the agent can even start execution.

Failure Details

  • Run: 18785278805
  • Commit: 73251b6
  • Branch: copilot/update-copilot-agent-engine
  • Trigger: workflow_dispatch
  • Duration: 1.1 minutes
  • Copilot Version: 0.0.349

Root Cause Analysis

Primary Error

Invalid MCP server configuration in --additional-mcp-config: 
mcpServers.github: Invalid input; 
mcpServers.safe-outputs: Invalid input

Configuration Structure

The generated MCP configuration includes a "type": "local" field that Copilot CLI 0.0.349 does not recognize:

{
  "mcpServers": {
    "github": {
      "type": "local",  // ← This field causes validation error
      "command": "docker",
      "args": ["run", "-i", "--rm", ...],
      "env": { ... }
    },
    "safe-outputs": {
      "type": "local",  // ← This field causes validation error
      "command": "node",
      "args": ["/tmp/gh-aw/safe-outputs/mcp-server.cjs"],
      "env": { ... }
    }
  }
}

Why This Happened

The commit that triggered this failure (73251b6) includes:

  • Message: "Format, lint, and fix tests for --additional-mcp-config changes"
  • Key change: "Add container field support to buildCustomMCPConfig for MCP servers using docker images"

This suggests recent refactoring of the MCP config generation logic that added the "type": "local" field, but this field is incompatible with Copilot CLI 0.0.349's schema expectations.

Failed Jobs and Errors

Job Status Conclusion
activation success
agent failure
detection ⏭️ skipped
create_issue failure
missing_tool ⏭️ skipped

Agent Job Error (22_Execute GitHub Copilot CLI.txt:54):

  • Agent exits with code 1 immediately upon validation of --additional-mcp-config
  • No agent logs are produced since execution never starts
  • Error occurs during CLI parameter validation, before MCP servers are even initialized

Investigation Findings

Schema Incompatibility

The "type": "local" field is not part of the expected MCP server schema for Copilot CLI 0.0.349. Possible causes:

  1. The field was added by recent refactoring but is invalid for this CLI version
  2. The correct field name might be "stdio" instead of "local"
  3. The schema may have changed between CLI versions

Timing Context

According to issue #2294, Copilot CLI 0.0.350 was released on October 24, 2025 (the same day as this failure). The new version may include support for the updated MCP configuration schema.

Comparison with Previous Failures

This is distinctly different from previous Copilot smoke test failures:

  • Previous issues (runs 18779136174, 18778382550, 18777690706): Agent started successfully but had permission/config parsing errors during execution
  • This issue: Agent fails to start at all due to schema validation error

Recommended Actions

Immediate Fix (Choose One)

  • Option 1: Update Copilot CLI to version 0.0.350 (just released) which may support the new schema
  • Option 2: Remove the "type": "local" field from MCP config generation for Copilot
  • Option 3: Change "type": "local" to "type": "stdio" if that's the correct field value
  • Option 4: Revert commit 73251b6 and related changes until schema compatibility is resolved

Investigation Steps

  • Review buildCustomMCPConfig function in pkg/workflow/mcp.go (or similar)
  • Check Copilot CLI 0.0.350 release notes for MCP schema changes
  • Verify expected MCP server schema for Copilot CLI 0.0.349 and 0.0.350
  • Test whether removing "type" field allows agent to start
  • Examine why tests passed in commit 73251b6 but runtime fails

Code Locations

  • Config generation: Likely pkg/workflow/mcp.go - buildCustomMCPConfig() function
  • Commit introducing change: 73251b6
  • Test files: pkg/cli/workflows/ - tests mentioned in commit message

Prevention Strategies

  1. Schema Validation Tests: Add tests that validate generated MCP configs against CLI schema
  2. Version Compatibility Matrix: Document which MCP schema fields are supported in which CLI versions
  3. Integration Tests: Add tests that verify agent can actually start with generated configs, not just that JSON is well-formed
  4. CLI Version Guards: Add version-specific config generation if schema differs between versions
  5. Pre-release Testing: Test against new CLI versions before they're set as default

Historical Context

This is part of a series of Copilot smoke test failures on the copilot/update-copilot-agent-engine branch:

Date Run ID Pattern Status
Oct 24 12:11 18779136174 Permission denied for safe-outputs tools Previous
Oct 24 11:34 18778382550 Config treated as character array Previous
Oct 24 11:04 18777690706 Malformed JSON config Previous
Oct 24 16:02 18785278805 Invalid MCP schema with 'type': 'local' Current

Each failure has revealed a different layer of the MCP configuration system. This latest failure suggests the configuration generation logic itself needs alignment with Copilot CLI's schema expectations.


Pattern ID: COPILOT_INVALID_MCP_CONFIG_SCHEMA
Severity: Critical
Category: Configuration/Schema Error
Investigation stored: /tmp/gh-aw/cache-memory/investigations/2025-10-24-18785278805.json

AI generated by Smoke Detector - Smoke Test Failure Investigator

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions