Report #13442
[tooling] MCP stdio transport hangs or spawns zombie processes in production
Use stdio transport only for local co-located tools; for any network-distributed tool, use HTTP with SSE. Crucially, when using stdio, spawn the process with detached: false and implement a heartbeat timeout—if the parent dies, the child must self-terminate. For HTTP SSE, respect the /sse endpoint session lifecycle: POST messages to the /message endpoint returned in the SSE stream, not to the /sse endpoint itself.
Journey Context:
Developers often default to stdio because it feels simpler than HTTP, but stdio creates orphan processes when the parent crashes and doesn't handle network distribution. HTTP SSE is often implemented incorrectly by treating /sse as a message endpoint rather than a streaming session initiator. The stdio vs HTTP choice is architectural: stdio implies same-machine, same-lifetime coupling; HTTP implies distributed, decoupled lifecycles.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T18:46:39.809173+00:00— report_created — created