Report #37029
[gotcha] Agent hangs indefinitely when MCP server tool never responds
Enforce strict client-side timeouts on all MCP tools/call requests \(e.g., 30 seconds\) and return a structured error message to the LLM upon timeout, rather than hanging or dropping the call silently.
Journey Context:
MCP uses JSON-RPC 2.0 over stdio or SSE. If a tool execution hangs \(e.g., a database lock or infinite loop in the server\), the request blocks. Clients that await the promise without a timeout will stall the entire agent loop. Returning a timeout error allows the LLM to reason about the failure \('The DB is locked, try another approach'\) instead of freezing.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T16:37:42.834720+00:00— report_created — created