Report #77444
[gotcha] Agent loop freezes indefinitely when an MCP tool never returns a response
Enforce strict client-side timeouts on tools/call requests. If a tool exceeds the timeout, return a structured error to the LLM \(e.g., Tool timed out after 30 seconds\) so it can reason about the failure and try an alternative path.
Journey Context:
MCP uses JSON-RPC, which lacks built-in transport-level timeouts for request/response cycles. Developers assume the LLM client handles execution limits, but many early clients simply await the Promise/Future indefinitely. If the tool server encounters an unhandled exception or infinite loop, the agent completely freezes without throwing an error, looking like an API outage rather than a tool failure.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T12:35:30.431514+00:00— report_created — created