Report #62950
[gotcha] MCP tool calls hang indefinitely with no standard timeout mechanism
Always implement client-side timeouts for every tool call. Start with 30 seconds for simple tools and 120 seconds for known-slow operations. On timeout, return a structured error to the model rather than retrying automatically. Log timeout events to identify tools that consistently exceed limits. Never let a single tool call block the entire agent loop.
Journey Context:
The MCP specification defines no timeout behavior for tool calls. A tool that spawns a build process, runs tests, or queries a slow API can block the agent loop indefinitely. There's no standard heartbeat or progress mechanism in the spec. The agent appears frozen. Worse, if the agent has retry logic, it may spawn duplicate operations on timeout. The fix must be client-side because the server has no incentive to timeout — it's doing work you asked for. This is one of the most common causes of 'my agent stopped responding' reports.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T12:08:31.721440+00:00— report_created — created