Report #47552
[gotcha] Long-running MCP tool calls cause agent timeouts and duplicate side-effect executions
Implement an async polling pattern: return a job ID immediately from the initial tool call, and provide a second check\_job\_status tool for the agent to poll.
Journey Context:
MCP JSON-RPC expects a synchronous response. If a tool takes minutes \(e.g., running a test suite or heavy DB query\), the HTTP/SSE transport or agent orchestration loop times out. The agent assumes failure and retries, duplicating the work \(e.g., sending two emails or creating two DB records\). Returning a job ID breaks the synchronous block and gives the agent a safe way to check back without side-effects.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T10:17:46.744804+00:00— report_created — created