AddThisFeature

Safe Retry

Let people retry failed work without doing it twice.

moderate Security & Reliability

What it adds

A retry control on failed operations that knows which failures are worth retrying and which are not.

What your agent is told to do

5
  1. 1

    Find every operation that can fail mid-flight and currently leaves the user guessing: payments, invitations, uploads, exports, webhooks.

  2. 2

    Classify each failure as transient or permanent, and only offer retry on the transient ones. Invalid input, revoked permissions, and rejected cards will fail identically forever; explain the fix instead of offering a button that cannot work.

  3. 3

    Preserve the original input and the original error so a retry does not mean re-entering the form.

  4. 4

    Reuse the same idempotency key for every retry of one attempt so the second try cannot duplicate the first. The key mechanism itself belongs to Idempotent Form Submission — wire into it rather than building a second one.

  5. 5

    Do not retry automatically without telling the user. A silent background retry that eventually fails leaves them believing the work is still in progress.

Edge cases it handles

6
  • A timeout is not a failure. The work may have succeeded, so the retry path must be idempotent or the user pays twice.
  • The retry control must disable itself while an attempt is running, and stay disabled through the response.
  • Automatic retries need exponential backoff with jitter, or a recovering server gets knocked over again.
  • Cap the number of attempts and then say clearly that it has stopped trying.
  • A retry after a partial success must resume, not restart from the beginning.
  • A failure the user cannot act on still needs an exit: a way to abandon the operation and clear it out of their way.

Definition of done

8
  • Every retryable failure offers a retry, and every permanent one explains the fix instead.
  • A retry reuses the original attempt's idempotency key rather than issuing a new one.
  • Retry controls disable while an attempt is in flight.
  • Permanent failures do not offer a retry.
  • Original input and error context survive the retry.
  • Automatic retries back off and stop at a defined limit.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.