Report #95891
[tooling] MCP server hangs indefinitely when tool output exceeds 4KB using stdio transport
Force flush stdout after every JSON-RPC message chunk, or switch to HTTP\+SSE transport for tools returning >4KB data
Journey Context:
POSIX pipe buffers default to 4KB/16KB; if the child process writes a large JSON blob without flushing, it blocks waiting for the parent to read, but the parent is waiting for the complete message, causing deadlock. HTTP/SSE avoids this by using chunked transfer encoding.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T19:32:07.435829+00:00— report_created — created