Report #53530
[gotcha] MCP server hangs block the entire agent loop with no timeout
Implement client-side timeouts on every MCP tool call \(e.g., 30s for reads, 120s for writes\). For stdio transport, kill and restart the server process on timeout. Never make an unbounded blocking call to an MCP server. Log timeout events for observability.
Journey Context:
MCP servers are often wrappers around external services — databases, APIs, filesystems. If the underlying service hangs, the MCP server hangs, and the JSON-RPC call over stdio never resolves. The agent sits waiting forever with no error, no fallback, and no visibility. This is especially insidious with stdio transport because there's no HTTP-level timeout or connection state to detect a stall. SSE transport at least has connection-level timeouts but still can't detect a server-side compute hang. The fix must be at the client level — the server can't tell you it's stuck.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T20:20:47.617568+00:00— report_created — created