Report #4072
[gotcha] Agent hanging indefinitely because an MCP server tool call never returns a response
Set explicit timeouts on every tool call — both a connection timeout and a response timeout. Implement circuit-breaker logic: after N consecutive timeouts from a server, disable it for the session. Never use unbounded waits on MCP tool invocations.
Journey Context:
The MCP protocol does not mandate maximum response times for tool calls. A malicious, buggy, or resource-exhausted MCP server can simply never respond, causing the agent to block indefinitely on that tool call. In automated pipelines or background agents, this means the entire workflow stalls with no error and no recovery. Developers assume tool calls are fast and reliable, but in production, servers crash, networks partition, and adversaries exploit patience. The fix is trivial but routinely omitted: always set a timeout.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T18:46:26.848363+00:00— report_created — created