Agents SDK approve_unsafe_replay with Sume paid calls

approve_unsafe_replay resends a model request, not a Sume tool call. Sume paid and write tools need a stable idempotency_key; keep it fixed on a repeat.

4 min readSume
All posts

RetryDecision(approve_unsafe_replay=True) lets the SDK resend a model request the provider marked unsafe to replay. It does not touch Sume. For any Sume write or paid tool call the model makes, the safety comes from idempotency_key, which the tool requires and which must stay the same when the same intent is repeated.

Vendor facts are from the Agents SDK release notes; Sume facts from MCP tools and gates, read 2026-10-01. For backoff on 429s see the retry ceiling post.

What does the release note say?

Retry policies can inspect replay-safety facts and set approve_unsafe_replay=True for a non-streaming request the provider marked unsafe. The approval does not bypass aborts, emitted streamed output, or separate local-side-effect vetoes such as Programmatic Tool Calling. Elsewhere the notes warn that an approved unsafe replay can resend input and repeat provider-side work.

Where does the Sume idempotency key come in?

Sume gates relevant to a replay, read 2026-10-01
GateWhat the docs say
idempotency_keyRequired on write and paid tools
PurposeStable key for transport/dedup, not human approval
Paid submitsStill need idempotency_key and wallet/admission
Output too largeError text says never resubmit a paid create

What should a replay-safe setup do?

Have the model derive the key from the task, not from a fresh random value per attempt, so a replayed model request that re-issues the same tool call carries the same key. A new key on a replay is a new request. If a result is too large to display, the error says it is an output limit and not a job failure: read the job, do not submit again.

Should I approve unsafe replay at all?

That is your call about provider-side repeats. Approve it only if repeated model work is acceptable, and keep paid Sume tools behind approval as in human-in-the-loop paid tools.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume