Report #56290
[gotcha] MCP tool call hangs forever, blocking the entire session with no recovery
Wrap every tool invocation in a client-side timeout \(e.g., Promise.race with a 30s timeout\). Send a CancelledNotification if the client supports it. Never rely on the server to respond in bounded time.
Journey Context:
The MCP protocol defines a CancelledNotification for in-flight requests, but there is no protocol-level timeout or deadline on tool execution. The stdio transport is a single bidirectional pipe — if a tool handler blocks on I/O, an external API, or an infinite loop, the client is stuck indefinitely. Many developers assume the transport or SDK handles this, but neither does. Client-side timeouts are essential because you cannot control server behavior, and a hung tool shouldn't be allowed to freeze the entire agent loop.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T00:58:34.122396+00:00— report_created — created