Timeouts Are Not Failed Bookings: Designing Duplicate-Safe AI Actions
A DEV Community article argues that an AI assistant should not assume a booking failed just because a request timed out, since the service may have already saved it. It recommends treating each booking as one durable operation with a unique identifier that excludes private customer data. The author proposes a state model (Prepared, Submitted, Confirmed, Uncertain, Escalated) that separates confirmed failures from unknown outcomes. Examples draw on Google Calendar's client-supplied event IDs and Stripe's idempotency keys, with a warning that each provider's documented guarantees must be checked. The piece advises verifying uncertain writes via supported read paths and escalating ambiguous cases to a person rather than creating duplicates.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in