Design state-changing actions to be safely repeatable or reconcilable. Use stable request identifiers and authoritative status checks. Do not let a model's retry decision create a second email, opportunity or booking.
Separate two kinds of repetition
Generating another draft is usually different from sending the same approved draft again. A workflow that treats both as “retry the previous step” can create operational damage even when every individual model response is reasonable.
Keep generation attempts separate from business-action records. The application should know which approved action was requested, whether it completed and how a repeated request should be handled.
A worked CRM handoff
Imagine a reviewed inquiry that should create one opportunity. Assign a stable internal action ID tied to the authorized inquiry and approved operation. If the request is repeated, the execution layer should reconcile the existing result instead of creating a second opportunity.
Do not derive identity only from a mutable generated summary. The same inquiry can receive slightly different wording on each attempt. Use application-owned identifiers and the destination system's supported duplicate-protection mechanisms where available.
Handle the unknown-outcome case
A timeout can occur after the destination accepted the write but before the client received confirmation. The next step is to check the authoritative action status or destination record. Blindly repeating the write can turn a transient network problem into a duplicate business event.
If the status cannot be determined safely, escalate for review. The agent should report uncertainty rather than state that nothing happened or assume success.
Define a durable action record
action_id
authorized_record_id
operation
approved_version
destination
status
destination_result_id
attempt_count
This is an illustrative record outline, not a complete database schema. Choose fields and retention according to the workflow. Avoid storing full private payloads when identifiers and a reviewed reference are sufficient.
Test the race conditions
- The user clicks twice before the first result appears.
- The client retries after a timeout.
- A fallback model proposes the same action.
- A worker restarts after the destination accepted the write.
- An earlier approval is replayed with changed parameters.
Check the destination state, not just the application's success message. A test passes when the intended business action occurs once under the defined conditions and uncertainty is handled explicitly.
Idempotency is not a model capability. It belongs in the trusted integration and storage design. A more careful prompt can encourage good behavior, but only application-level controls can make repeated execution predictably safe.
Researched and published 30 November 2026. Provider capabilities are attributed to official documentation; recommendations and worked examples are editorial analysis. No independent model benchmark or client outcome is claimed. Confirm current access, pricing and terms before implementation.
Build the useful version.
Discuss an AI workflow, knowledge assistant or digital-product brief with Jamil Darwish.
Start a conversation