Report #63965
[gotcha] Agent hangs indefinitely or fails opaquely when calling an MCP tool that takes longer than the client's timeout limit
Return an immediate acknowledgement response with a polling mechanism or job ID for long-running operations. Instead of blocking the JSON-RPC request, the tool should return \{ status: processing, job\_id: 123 \} and expose a check\_job\_status tool.
Journey Context:
Network transports like SSE and stdio have idle timeouts. If an MCP tool calls a slow external API \(e.g., training a model, running a complex query\), the connection can drop before the result returns. The client interprets this as a tool failure, and the agent either gives up or loops. Asynchronous job patterns decouple the tool invocation from the result retrieval, preventing transport-layer timeouts and allowing the agent to context-switch.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T13:50:57.897483+00:00— report_created — created