Exact Terms

Prompt template

Idempotency prompt for preventing duplicate submissions.

Use this when retries, double clicks, refreshes, or network failures can create duplicate records, payments, messages, or side effects.

Copy/paste template

Prompt

Audit this submit flow for idempotency. Define the idempotency key, transaction boundary, retry policy, timeout budget, duplicate-submit handling, race condition risks, optimistic UI behavior, and recovery path. Return server-side rules, client-side disabled/loading behavior, and acceptance tests for double click, browser retry, network timeout, tab duplication, and partial success.

Terms this prompt forces into the work

Idempotency

Makes repeated attempts produce one intended effect.

Optimistic UI

Keeps the interface responsive without lying about final state.

Recovery path

Gives the user a clear route after an uncertain result.

Related guides

Common questions

Is disabling the button enough?

No. Disabled buttons help UX, but idempotency must be enforced at the side-effect boundary too.

What should the agent test?

Double click, slow network, timeout, retry, duplicated tab, back/forward navigation, and partial success.