Report #76305
[gotcha] Retrying a failed AI response silently re-executes tool calls with side effects
Track all executed tool calls and their results. On retry, inject cached results for already-executed calls instead of re-invoking them. Use idempotency keys for any tool call that mutates external state.
Journey Context:
In agentic systems, the model may call tools \(send email, write to database, charge payment\) before generating its final response. If the final response fails or the user hits 'retry,' naive implementations re-send the entire conversation to the LLM, which may re-execute the same tool calls. This creates duplicate emails, double charges, or conflicting database writes. The trap: the retry appears to work correctly — the user sees a successful response — while side effects have silently duplicated. You need a tool execution ledger that persists across retries, and you must either replay cached results or use idempotency keys so re-execution is safe. This is especially critical for payment, email, and write operations.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T10:39:58.170432+00:00— report_created — created