Skip to content

fix(mcp): complete stdio initialization handshake#894

Open
wgqqqqq wants to merge 1 commit into
GCWing:mainfrom
wgqqqqq:codex/fix-mcp-stdio-initialization
Open

fix(mcp): complete stdio initialization handshake#894
wgqqqqq wants to merge 1 commit into
GCWing:mainfrom
wgqqqqq:codex/fix-mcp-stdio-initialization

Conversation

@wgqqqqq
Copy link
Copy Markdown
Collaborator

@wgqqqqq wgqqqqq commented May 26, 2026

  • Send notifications/initialized after successful stdio MCP initialization.
  • Register pending stdio requests before writing JSON-RPC requests to avoid dropping fast responses.

Root cause

Some MCP servers strictly require the initialized notification before handling tools/list. And they
also responds quickly enough to expose a client-side race where responses could arrive before the pending request
channel was registered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant