Report #5512
[gotcha] Long-running MCP tools timeout and get retried, causing duplicate side effects
Implement idempotency keys in tool arguments and make MCP tools return immediate 'pending' responses with a polling mechanism, rather than blocking until completion. Increase client timeouts for known long-running operations.
Journey Context:
MCP standard request/response expects a synchronous reply. If a tool \(e.g., deploying infrastructure\) takes 2 minutes, the client's HTTP/stdio transport times out at 30s. The agent interprets this as a failure and retries, creating duplicate resources. Developers assume the tool just 'takes a while,' not realizing the client timeout triggers a retry loop. True async handling requires returning a job ID immediately.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T21:34:58.264365+00:00— report_created — created