Skip to main content
The Retry-Safe Automation Playbook

Recognize repeats. Recover uncertain outcomes.

A practical field guide for making payments, webhooks, jobs, and AI workflows safe when networks retry, workers restart, or events arrive again.

Get the playbookSee the contract
An automation retry reaches an identity gate that permits one completed action and blocks the duplicate path
The ambiguity

A timeout does not mean the action failed.

The caller may lose the response after the server commits the work. Retrying is necessary, but a new attempt must remain the same business intent. Otherwise resilience becomes duplication.

01 / INTENT

What should happen once?

Charge this invoice, create this follow-up, ingest this transcript, or apply this usage debit.

02 / ATTEMPT

How many deliveries occurred?

Networks, queues, webhooks, users, and schedulers can deliver the same intent more than once.

03 / CONTRACT

What does replay return?

The same key and parameters should return the stored result without repeating the side effect.

The retry-safe contract

Make one intent recognizable at every mutating boundary.

Assign a stable intent ID

Use the upstream event, usage record, call, order, or operation ID - not a new random value for every attempt.

Claim atomically

Coordinate workers with a unique record or transactional claim. Also define recovery if that worker stops after the provider acts.

Fingerprint parameters

Reject reuse of the same key with different business inputs. A key identifies one specific intent.

Store the outcome

Persist status, provider reference, error class and timestamps. If the outcome is unknown, reconcile it before executing again.

Bound retries

Retry only retryable failures with timeouts, exponential backoff, jitter, and a clear terminal state.

Test the ambiguity window

Force timeout-after-success, duplicate delivery, concurrent workers, restart mid-step, and late replay.

The crash gap matters. A provider may finish the action before your worker stores the result. A local claim alone cannot make those steps atomic. Use the provider’s documented idempotency contract or reconcile by a stable operation reference. If the outcome cannot be established, route it for review before retrying.

Built from first-party corrections

One pattern protected five different kinds of work.

Recorded PONO implementation work describes retry-safe boundaries for payment events, usage debits, call follow-up tasks, transcript ingestion, and synchronization. Each chose a stable upstream identity appropriate to the business intent. The lesson is shared without exposing customers, amounts, transcripts, tasks, endpoints, or credentials.