Report #80291
[gotcha] Slow MCP tool calls block the entire agent loop with no progress or cancellation path
For tools that routinely take >5s, implement an async job pattern: the tool returns immediately with a job/request ID and a separate status-check tool polls for completion; set aggressive client-side timeouts on synchronous tool calls; surface 'tool is running' status to the user; use MCP's request cancellation to abort stale calls.
Journey Context:
MCP tool calls are synchronous from the client's perspective—the client sends a tools/call request and blocks waiting for a response. A tool that calls a slow external API \(code execution, large file processing, complex database query\) blocks the entire agent loop. There is no streaming partial results mechanism for tool calls in the current spec. Users see the agent completely frozen with no feedback. The pattern that works is to make tools fast-returning by design: return a job handle immediately, provide a separate check-status tool, and let the agent poll. This keeps the agent responsive, allows it to inform the user of progress, and permits cancellation of stale operations.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T17:22:43.076958+00:00— report_created — created