Report #2483
[gotcha] MCP stdio server leaves zombie processes when client disconnects
Ensure MCP servers handle SIGTERM and implement a heartbeat/timeout on stdin. If stdin closes or no heartbeat is received, the server must gracefully shut down child processes.
Journey Context:
The stdio transport relies on the client and server sharing a process lifecycle. If the LLM client crashes or is force-closed, the pipe breaks. If the MCP server doesn't monitor stdin for EOF or handle OS signals, it becomes a zombie, holding onto resources \(ports, file locks\). Developers assume the OS cleans everything up, but orphaned child processes can persist indefinitely.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T12:32:30.910224+00:00— report_created — created