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
-
Confirmed gh aw mcp-server --help works from the command line (exit code 0).
-
Verified gh auth status is authenticated.
-
Removed and reinstalled the extension (gh extension remove github/gh-aw + gh extension install github/gh-aw) — no change.
-
Killed three stale gh-aw processes that were locking the binary — no change after reinstall.
-
Tried adding "type": "stdio" explicitly to mcp.json — no change.
-
Tried "disabled": true — VS Code still prompts (separate issue).
-
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
-
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.
gh aw mcp-serverinstdiomode 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 awversion: v0.68.3ghversion: 2.89.0 (2026-03-26)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
Confirmed
gh aw mcp-server --helpworks from the command line (exit code 0).Verified
gh auth statusis authenticated.Removed and reinstalled the extension (
gh extension remove github/gh-aw+gh extension install github/gh-aw) — no change.Killed three stale gh-aw processes that were locking the binary — no change after reinstall.
Tried adding
"type": "stdio"explicitly to mcp.json — no change.Tried
"disabled": true— VS Code still prompts (separate issue).Root-caused by piping a raw MCP initialize request to the server:
Output (all on stdout):
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
initializeresponse.Expected behavior
All diagnostic/banner output from
gh aw mcp-servershould be written to stderr so the stdout channel remains a clean JSON-RPC stream.