Skip to content

🐳 MCP Fail Whale: gh aw mcp-server writes diagnostic banners to stdout, poisoning the JSON-RPC stream #26920

@edburns

Description

@edburns

gh aw mcp-server in stdio mode writes informational/diagnostic messages to stdout instead of stderr. This corrupts the JSON-RPC channel, causing VS Code to hang indefinitely on the MCP initialize handshake. The server never successfully connects.

###Environment

  • gh aw version: v0.68.3
  • gh version: 2.89.0 (2026-03-26)
  • VS Code Insiders: 1.117.0
  • OS: Windows

mcp.json (sole MCP server configured)

{
  "servers": {
    "github-agentic-workflows": {
      "type": "stdio",
      "command": "gh",
      "args": [
        "aw",
        "mcp-server"
      ],
      "cwd": "${workspaceFolder}"
    }
  }
}

Symptoms

On every chat prompt, VS Code shows "Starting MCP servers github-agentic-workflows... Skip?" with no option to Start. The MCP output channel shows an infinite loop:

Diagnostic steps

  1. Confirmed gh aw mcp-server --help works from the command line (exit code 0).

  2. Verified gh auth status is authenticated.

  3. Removed and reinstalled the extension (gh extension remove github/gh-aw + gh extension install github/gh-aw) — no change.

  4. Killed three stale gh-aw processes that were locking the binary — no change after reinstall.

  5. Tried adding "type": "stdio" explicitly to mcp.json — no change.

  6. Tried "disabled": true — VS Code still prompts (separate issue).

  7. Root-caused by piping a raw MCP initialize request to the server:

    echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | gh aw mcp-server
    
  8. Output (all on stdout):

    ⚠ No actor specified - all tools will be mounted (actor validation disabled)
    ℹ gh-aw binary path: C:\Users\edburns\AppData\Local\GitHub CLI\extensions\gh-aw\gh-aw.exe
    ℹ Current working directory: E:\workareas\copilot-sdk-java
    ℹ gh CLI: gh version 2.89.0 (2026-03-26)
    ✓ ✅ Configuration validated successfully
    ℹ Pre-cached 1 workflow manifest(s) for safe update enforcement
    ✗ server is closing: EOF
    

These ⚠ ℹ ✓ ✗ diagnostic lines are written to stdout, not stderr. VS Code reads them as the first bytes of the JSON-RPC response, fails to parse them as JSON, and never receives the actual initialize response.

Expected behavior

All diagnostic/banner output from gh aw mcp-server should be written to stderr so the stdout channel remains a clean JSON-RPC stream.

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions