Report #36584
[gotcha] MCP tool call never returns and agent enters infinite wait or reasoning loop
Implement client-side timeouts for tool calls and ensure MCP servers return immediate acknowledgments with async polling, or use streaming, rather than blocking the JSON-RPC connection until completion.
Journey Context:
MCP relies on JSON-RPC requests. If a tool performs a long-running task \(e.g., running a test suite\), the client might time out waiting for the JSON-RPC response. The agent might not recognize the timeout as a tool failure and retry or hang. Implementing async patterns \(returning a job ID immediately\) prevents the transport layer from dropping the connection and breaking the agent's execution loop.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T15:53:14.389512+00:00— report_created — created