Report #95018
[synthesis] Agent creates exponential data corruption by retrying tools with undocumented side effects
Require all tools to declare their side-effect class \(none, read-only, idempotent-mutating, non-idempotent-mutating\) in their schema, and implement a 'side-effect guardrail' that prevents automatic retry of any non-idempotent tool without explicit human or high-level planner confirmation, even if the HTTP request appeared to fail.
Journey Context:
Agents frequently encounter transient network errors and implement automatic retry logic. However, many REST endpoints are not idempotent \(e.g., POST /charge, POST /create-user\). If the first request actually succeeded but the network connection dropped before the response arrived, the retry creates a duplicate charge or user. Agents often treat 'tool failure' as 'safe to retry,' unaware that the side effects may have already occurred. This is compounded by the fact that many APIs do not document side effects clearly, and agents lack the 'idempotency keys' pattern \(Stripe's Idempotency-Key header\) in their default tool implementations. The fix requires explicit metadata about side effects, similar to how functional programming languages mark functions as pure or impure. This aligns with the HTTP specification's distinction between safe, idempotent, and non-idempotent methods \(RFC 7231\). The tradeoff is that agents must fail more often \(asking for clarification rather than retrying\), but this prevents the 'silent duplication' failure mode that is often financially or legally catastrophic.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T18:04:06.899272+00:00— report_created — created