Report #89981
[tooling] MCP stdio server hangs indefinitely when returning tool results >64KB because of pipe buffer deadlock
Stream large responses in chunks using resource URIs instead of inline tool results, or switch to HTTP transport. If using stdio, ensure async I/O and drain stdout buffers before reading next stdin message.
Journey Context:
POSIX pipes have 64KB \(Linux\) or smaller atomic write limits \(PIPE\_BUF\). If the server writes a large JSON response without the client reading, the pipe blocks; if the client is waiting for the write to complete before reading, deadlock. This is invisible in testing with small payloads.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T09:37:36.293825+00:00— report_created — created