Waits, Reminders, Retries and Duplicate Events
Make long-running workflows reliable when people are slow and systems fail.
Waiting is part of the process
Real processes wait: for a signature, a payment, a few days before a follow-up. Model waits explicitly. A wait for an event, such as all signers done, should resume as soon as the event arrives and also be checked on a schedule in case the event was missed. A timed wait should store its wake-up time so it survives restarts.
Reminders with a limit
Reminders help, but endless reminders annoy. Remind every few days up to a fixed number of times, then continue down a path that tells a person. Record each reminder so the history shows exactly what the client received and when.
Retries and duplicates
External services fail sometimes. Retry a failed step a small number of times with growing gaps, such as minutes then half an hour, before marking it failed and telling someone. Refund or do not charge for attempts that failed on your side. Also expect duplicate events, for example a webhook sent twice. Make steps idempotent: check whether the work already happened before doing it again.
XDQ teams treat every step as safe to run twice, which makes retries and restarts uneventful.
- Retry with growing gaps, then alert a person
- Do not charge for failed attempts
- Make steps safe to run twice
- Store wake-up times so waits survive restarts
Worked example: a signature that never came
A workflow sent a contract for signature and then waited. It reminded the signers every two days, up to two times. When the document was still unsigned after the second reminder, the workflow continued to a task for the account manager to call the client, and recorded the outcome.
During the same week, an email provider outage made one step fail. The workflow retried after a few minutes, then half an hour later, and succeeded without anyone noticing.
Common reliability mistakes
Long-running workflows meet every kind of failure eventually. Designing for it from the start is cheaper than fixing incidents.
- Waits that do not survive a restart
- Unlimited reminders
- Retrying instantly in a tight loop
- Steps that double-charge or double-send when run twice
- Model waits explicitly and resume on events or schedules.
- Limit reminders and record each one.
- Retry with growing gaps before failing.
- Make every step safe to run twice.
List the waits, reminders and external calls in your workflow. For each external call, write the retry plan and how the step detects that its work already happened.
Check your understanding
1. Why check event waits on a schedule too?
2. What makes a step idempotent?
3. How should retries be spaced?
Turn what you learn into monthly income
Resell AI agents and apps under your own brand. Up to 30% off credits, up to 30% recurring share, and apps built by XDQ Labs for your clients. Free to join.
From USD 49 or INR 2,999 a month. A person approves every step.
Templates from our playbooks
Copy ready templates with when to use each one and why it works.