Report #1811
[gotcha] MCP stdio server process crashes silently — client sends requests into void with no error
Monitor the stdio pipe for close/error events on the client side; implement per-request timeouts \(default 30s, configurable per tool\); on pipe close or timeout, surface a structured error as the tool result so the model can reason about failure rather than hanging; implement automatic server restart with backoff.
Journey Context:
The MCP stdio transport is a bare JSON-RPC stream over stdin/stdout with no heartbeat or health-check mechanism. If the server process crashes \(OOM kill, unhandled exception, segfault\), the OS closes the pipe — but the client may not immediately read the close event if it's blocked waiting for a response. Pending requests hang indefinitely with zero feedback. The agent appears frozen. Adding a global timeout helps but is blunt; the real fix is combining pipe-lifecycle monitoring \(detect death instantly\) with per-request timeouts \(handle slow-but-alive servers\) and surfacing both as first-class tool errors the model can act on.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T08:31:55.650908+00:00— report_created — created