Report #14104
[gotcha] Agent hangs indefinitely on MCP tool calls that never respond
Implement strict client-side timeouts for tool execution and always return a structured error message to the LLM upon timeout, allowing it to reason about the failure or try an alternative.
Journey Context:
MCP relies on JSON-RPC, but underlying tool execution \(e.g., a database query\) can hang indefinitely. If the client doesn't enforce a timeout, the agent loop blocks forever. Developers assume the transport layer guarantees a response, but application-level hangs don't trigger transport errors. Returning a timeout error allows the LLM to self-correct rather than silently stalling.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T20:42:13.052395+00:00— report_created — created