Systems and records
Travel agent tool failure recovery data: did the booking go through?
By SourceX Editorial · Reviewed by Noah Loul ·
9 sections
Short answer
Treat a booking timeout as an unknown outcome. Before retrying, look the reservation up in the system of record by a reference created before the first call, retry only with the same idempotency key, and confirm with the traveler before cancelling a duplicate. Grade recovery on the final reservation and payment state, never on the agent's message. This guide gives a ten-scenario task set for building that recovery data.
Agent run
Travel agent tool failure
Key takeaways
- A timeout means the reservation state is unknown; it may be booked, not booked, still processing or already duplicated.
- Look the booking up in the system of record before any retry, using a reference the agent stored before the first call.
- Retry only with the same idempotency key and payload, inside the provider's published window.
- Confirm with the traveler before cancelling a duplicate, and respect the rate or fare rule that applied at purchase.
- Grade on the final reservation and payment state against ground truth, not on the agent's final message.
- Manual fixes by staff are especially useful real recovery records, once traveler identifiers and card data are removed.
How do you verify booking success after a reservation tool times out?
Treat the timeout as an unknown outcome, not a failure. Before anything is retried, look the reservation up in the system of record using a reference the agent created before the first attempt, then retry only with the same idempotency key, or not at all. The task is finished when the system of record shows exactly one correct reservation and one payment, not when the agent writes a confident reply.
This order matters because a reservation request changes state on the server. The HTTP standard, RFC 9110, says a client should not automatically retry a request with a non-idempotent method unless it knows the request is actually idempotent or can detect that the original was never applied. A create-booking call is usually a POST, so a blind retry after a lost response is exactly how a traveler ends up holding two rooms or two tickets.
For teams building travel agent tool failure recovery data, the practical consequence is that every training or evaluation case needs three things a transcript alone does not hold: what the agent sent, what the booking system actually recorded, and what the agent did between the two. The rest of this guide turns that into a reusable task set.
Why does a lost response leave the booking in one of four states?
When a create call times out, the reservation can be in one of four states: created and confirmed, never created, still being processed, or created more than once by an earlier retry. The agent cannot tell which from the timeout itself, so it has to gather evidence.
Real booking APIs make this concrete. In Amadeus Self-Service's published Flight Create Orders specification, a successful POST to /booking/flight-orders returns 201 with the created order, and the order carries associated records, the airline or Amadeus record locator the reservation is tied to. The companion Flight Order Management specification retrieves or cancels an order by its flight-order id. If the 201 response is lost, the agent never learns that id, so the obvious lookup path is gone and the agent has to find the order another way, by traveler, itinerary and time window, or by a client reference it stored first.
Hotels add another layer. A room booked through a channel or booking engine may show a channel confirmation before the property system has accepted it, and the two confirmation numbers can differ. Any evidence in a recovery case should say which system each number came from and when it was read.
Which retry protections prevent a duplicate reservation, and where do they stop?
Idempotency protections stop duplicates only inside their own rules: the same key, the same payload and a time window the provider publishes. Outside those rules the agent is back to looking the reservation up. The table compares the mechanisms a booking integration is likely to meet.
| Mechanism | What it promises | Where it stops | What the agent should record |
|---|---|---|---|
| Idempotency-Key header (IETF HTTPAPI Internet-Draft; revision 07 has expired and is not an RFC) | A retried request with the same key and payload gets the result of the completed original | A retry while the original is still running should get 409 Conflict; the same key with a different payload should get 422 | Key, payload fingerprint, each status code received |
| request_id field (Google AIP-155) | A provided request ID must make the call idempotent; a duplicate should return the earlier success response | The API chooses how long IDs are honored, and may return the current resource state instead of the original response | Request ID, the honoring window from the provider's docs, the returned resource state |
| Repeatability-Request-ID and Repeatability-First-Sent (Microsoft Azure REST guidelines) | POST operations can be made retriable under the OASIS Repeatable Requests specification | The tracked window must be at least 5 minutes; operations without support should return 501 when the headers are sent | Both header values, the time of first send, any Repeatability-Result |
| Stripe idempotency keys (payment step) | Under API v1, the first result for a key, including a 500 error, is saved and replayed to retries | Keys are kept at least 24 hours and may be removed after; a key reused with different parameters returns an error | Payment object id, key, and whether the window had passed |
| No idempotency support | Nothing; each POST may create a new reservation | Every retry is a new booking attempt | Lookup query, results, and the decision not to retry blind |
What should the tool timeout and duplicate prevention task set include?
The task set below is the asset: ten scenario types, each with a starting state, the evidence the agent must gather, the correct end state and a trap that catches a plausible but wrong recovery. A team can copy it as a test plan and fill each row with real or illustrative cases, labeled as such.
At a glance
What should the tool timeout and duplicate prevention task set include
| Task | Starting state | Evidence the agent must check | Correct end state | Trap |
|---|---|---|---|---|
| T1 Lost success | Create call timed out; the order was in fact created | Lookup by client reference or traveler and itinerary finds one order | No retry; traveler told the booking exists, with its locator | Retrying with a new key creates a second order |
| T2 Never arrived | Timeout before the provider received the request | Lookup finds nothing; provider request log has no entry for the key | One retry with the same key; one order | Telling the traveler it failed and stopping |
| T3 Still processing | Retry sent while the original is running | 409 Conflict on the retry | Wait and look up again; no new key | Reading 409 as a hard failure and switching keys |
| T4 Changed payload | Agent corrected a traveler name and retried with the same key | 422 on the retry; original order status | Modify the existing order if allowed, or ask; do not force a new booking | Generating a new key to get past the 422 |
| T5 Paid, not booked | Payment authorized, reservation call failed | Payment object and reservation lookup disagree | Release or refund per the payment provider's flow; one booking attempt | Leaving a dangling authorization |
| T6 Dependent leg | Flight confirmed, hotel call timed out | Flight order plus hotel lookup | Hotel resolved without touching the flight | Cancelling the trip to start over |
| T7 Expired key | Retry attempted after the provider's key window | Window from the docs; lookup result | Reconcile by lookup; no retry with old or new key | Trusting a replay that can no longer happen |
| T8 Already duplicated | An earlier blind retry created two orders | Both orders, their creation times and cancellation rules | One cancelled within its rule, after the traveler or approver agrees | Cancelling the wrong order or both |
| T9 Price moved | Retry would book at a new fare or rate | Offer re-price result versus the confirmed amount | Traveler re-confirms before any booking | Booking silently at the new price |
| T10 Two confirmations | Channel confirmation present, property record missing | Channel record, property record, timestamps | Escalate or wait per policy; never report confirmed on the channel alone | Treating one system's status field as the outcome |
Which fields does each recovery case record need?
Each case should be a linked record, not a chat log. If a field cannot be filled from the source systems, the case is incomplete and should not be graded.
- case_id, scenario type (T1 to T10) and a label saying whether the case is real (with approval) or illustrative.
- Booking scope: traveler count, products (air, hotel, car, transfer) and the dependency between them.
- Request record: method, endpoint, payload fingerprint, idempotency key or request id, and the provider's published key window.
- Attempts: one entry per call with send time, transport outcome (timeout, reset, status code) and response body if any.
- System-of-record snapshots before the first attempt and after the last, with record locators, order ids and confirmation numbers, each tagged with its source system.
- Payment state: tokenized authorization and capture references and their status, never card data.
- Applicable rule: fare or rate rule and cancellation terms in force at purchase time, with version or retrieval date.
- Permissions: what the agent may do alone and what needs traveler or approver confirmation, with the confirmation event if one happened.
- Ground-truth end state and grader assertions, plus one counterexample case that looks similar but needs a different action.
What limits the fix once the real reservation state is known?
Three constraints decide what the agent may do after it learns the real state: dependencies between bookings, the rule that applied when the booking was bought, and who must approve a change. A recovery that is correct for the system can still be wrong for the trip.
Dependencies come first. A hotel that timed out should be recovered without cancelling a confirmed flight, and a car booked against a flight arrival may need to move if the flight does. Record the dependency explicitly so a grader can check that untouched items stayed untouched.
Purchase-time conditions come next. Whether a duplicate can be cancelled free depends on the rate or fare rule at purchase, not on today's policy page, so store the rule as it applied to that booking. A re-priced offer is a new purchase decision.
Approval is last. The tau-bench airline policy, a public agent benchmark, requires the agent to list the action details and get explicit user confirmation before any action that updates the booking database. Corporate travel adds approvers. The task record should show whether the confirmation came before the action, because a correct cancellation done without consent is still a failed task.
Illustrative case: a hotel night that may have been booked twice
This case is illustrative; the counts and times are invented to show the method. A traveler asks an agent to book two nights at a city hotel for a conference, alongside a flight that is already confirmed. The agent's create call to the booking engine times out after 30 seconds. Its own log shows it then retried with a fresh key, and the second call returned a confirmation.
Starting state: one confirmed flight order, one hotel confirmation the agent received, and one hotel call with no response. Linked evidence: a lookup by traveler, property and dates returns two reservations created four minutes apart, both on a rate that is free to cancel until 48 hours before arrival. The payment provider shows two authorizations.
Decision: the agent should not report success yet. It tells the traveler that two reservations exist, names both confirmation numbers, and asks which to keep, because the policy requires confirmation before a cancellation. After the traveler confirms, it cancels the later reservation inside the free window and checks that its authorization is released.
Verified outcome: one reservation active, one cancelled with a cancellation number, one authorization remaining, flight untouched. The counterexample: the same timeline where the rate is non-refundable. The correct action there is to escalate to a person who can ask the property to waive, not to cancel and leave the traveler with a charge.
What evidence proves the traveler ended with exactly one booking?
The proof is the system-of-record state after the episode, compared with a ground-truth state, plus the traveler-facing facts the agent had to state. A status field or a fluent final message is not proof on its own.
Public benchmarks already grade this way. The tau-bench environment computes a hash of the database after the agent's run, replays the ground-truth actions on a fresh copy, and gives zero reward when the two states differ; it then checks that required facts appeared in the agent's replies. A timeout task set can reuse that design and add assertions specific to recovery.
- Exactly one active reservation per intended product, matching dates, room or cabin and traveler names.
- No payment captured or held for a cancelled or duplicate reservation.
- Every write happened after the required confirmation event, with the same key used across retries of one intent.
- Dependent bookings unchanged unless the task required a change.
- The agent's message states the real state, including any duplicate it found and fixed, and never claims a confirmation the system of record does not show.
Where do real recovery histories come from, and what should be removed first?
Real cases come from the logs and records a travel business already keeps: booking engine request logs with keys and status codes, property or reservation system audit trails, payment provider event histories, and servicing notes where staff fixed duplicates by hand. Those manual fixes are especially useful records, because they show the evidence a person checked before acting.
Before anything leaves the business, strip or tokenize traveler names, contact details, loyalty numbers and record locators that could identify a person, and never carry card data. Access to these logs is not the same as permission to license them: channel, GDS and property agreements can restrict reuse, and the privacy rules that applied when the traveler booked still apply. Counsel should confirm both for the specific records.
For hospitality and travel operators who keep this kind of history, SourceX helps turn selected operational records into licensed, de-identified datasets, handling rights review, contracting and preparation. Checking fit starts with a short company assessment that needs no data upload, and nothing is delivered until the company has approved the scope and signed the agreement.
Frequently asked questions
Should an AI travel agent retry a booking after a timeout?
Only after it has looked the reservation up and found nothing, and only with the same idempotency key or request id as the first attempt. If the provider offers no idempotency support, a retry is a new booking attempt and the agent should treat it that way.
What does a 409 Conflict mean on a retried booking request?
Under the IETF Idempotency-Key Internet-Draft, which expired without becoming an RFC, a 409 on a retry means the original request with that key is still being processed. The agent should wait and look the booking up again rather than switch to a new key.
How long do idempotency keys last?
It depends on the provider, so read its documentation. Stripe keeps API v1 keys for at least 24 hours, Microsoft's Azure guidelines require a repeatability window of at least five minutes, and Google's AIP-155 lets each API choose a reasonable timeframe.
Is a confirmation message from the booking tool enough to grade the task?
No. Grade the state of the system of record against a ground-truth state, and check that the agent told the traveler the real outcome. A status field from one system, such as a channel manager, can disagree with the property or airline record.
Can tool timeout cases be synthetic?
Yes for coverage of rare paths, as long as they are labeled illustrative. Real cases add what synthetic ones lack: the evidence staff actually checked, the provider behavior under load and the dependencies between bookings.
Sources
- RFC 9110 defines idempotent methods and says a client should not automatically retry a non-idempotent request unless it knows the semantics are idempotent or can detect the original was never applied. Source
- The IETF HTTPAPI Idempotency-Key draft says a retry after completion should get the earlier result, a concurrent retry a 409 Conflict, and a reused key with a different payload a 422. Source
- Google AIP-155 says a provided request ID must make the call idempotent, duplicates should return the earlier success, the API chooses the honoring timeframe and may return current state instead. Source
- Microsoft's Azure REST API guidelines describe Repeatability-Request-ID and Repeatability-First-Sent headers for retriable POST, with a tracked window of at least 5 minutes. Source
- Stripe saves the first result for an idempotency key under API v1, keeps keys at least 24 hours, errors on mismatched parameters and advises reconciling after the window. Source
- Amadeus Self-Service Flight Create Orders specification: POST /booking/flight-orders returns 201 with the order and its associated record locators. Source
- Amadeus Self-Service Flight Order Management specification retrieves and cancels a flight order by its id. Source
- The tau-bench airline policy requires listing action details and obtaining explicit user confirmation before actions that update the booking database. Source
- tau-bench computes reward by comparing the final database hash with a ground-truth replay and checking required outputs in the agent's replies. Source
See if your company qualifies
A short company assessment. No data uploads are needed.