Knowledge · Business Operations

    Retries, Idempotency and Failure States

    Automations fail. What retry actually means, why idempotency prevents duplicates, and which failures should never be retried automatically.

    What is idempotency in automation?

    Idempotency means running the same operation twice produces one result, not two. It is what stops a retry from creating a duplicate invoice or sending a second text. Retries handle temporary failures; idempotency keys make retries safe. Without both, a flaky connection becomes a duplicate customer message.

    Key takeaways

    • Retry fixes transient failures. It makes permanent failures worse.
    • Never retry a rejection — a 4xx-class refusal will be refused again.
    • Idempotency keys are what make a retry safe to attempt at all.
    • Exactly-once delivery does not exist across systems; aim for at-least-once plus deduplication.
    • A run that exhausts its attempts must settle as failed and become visible, not vanish.

    Two kinds of failure, two responses

    A transient failure is the network dropping, a provider being briefly overloaded, or a timeout. The same request, sent again in a minute, will probably work. Retry is the correct response.

    A permanent failure is a rejection: an invalid phone number, a missing required field, a refused authorisation, a record that no longer exists. Retrying it produces the identical rejection at increasing cost. The correct response is to stop, mark the run failed, and put it in front of a human.

    Backoff, and why the gaps grow

    Retries should get further apart, not closer together. Immediate hammering of a struggling provider is how a small outage becomes your outage too. Exponential spacing — a minute, then two, then four — gives the other side room to recover.

    There must also be a ceiling. After a fixed number of attempts the run settles permanently as failed. An automation that retries forever is a slow-motion incident nobody is looking at.

    Idempotency in plain terms

    If the system asks 'create this invoice' twice because the first response was lost, you want one invoice. An idempotency key is a stable identifier attached to the request: the receiving side recognises the repeat and returns the original result instead of doing the work again.

    This is the only thing standing between a retry mechanism and duplicate records. Any action that creates something — a task, an invoice, a message — needs a key derived from the thing it represents, not a fresh random value per attempt.

    The honest position on delivery guarantees

    • At-most-once: might not happen. Safe for things you must never duplicate.
    • At-least-once: will happen, possibly twice. Safe when paired with deduplication.
    • Exactly-once: not achievable end-to-end across independent systems. Anyone claiming it is describing at-least-once plus deduplication.
    • No rollback: a failed later step does not undo an earlier one. Order actions accordingly.

    Retry decision table

    CapabilityFailureRetry?Why
    Network timeoutYes, with backoffLikely transient
    Provider 5xxYes, with backoffTheir side, likely temporary
    Rejected request (4xx)NoThe same request will be refused again
    Invalid recipientNoNeeds a data fix by a person
    Permission deniedNoNeeds a configuration change

    Where URBLD fits

    URBLD stores queued automation work as runs with a kind, status, attempts counter and scheduled time. A failed run is re-queued on exponentially increasing delays until it reaches the maximum attempt count, after which it settles as failed and stays visible. Scheduling accepts an idempotency key. Outbound webhook delivery retries only on 5xx and network errors — never on a 4xx rejection — and persists the attempt count and response.

    Principles reinforced

    This page rests on the following foundational ideas.

    FAQ

    Frequently Asked Questions

    Straight answers about how URBLD runs the business end-to-end.

    More in Business Operations

    The daily mechanics: workflows, checklists, scheduling and handoffs.

    Browse Business Operations
    Share this page