Users Pricing

forum

Home Forums How do I prevent duplicate actions when retrying an OpenAI tool call? – MindStick

How do I prevent duplicate actions when retrying an OpenAI tool call?

Magdalena Michalska 71 17 Oct 2026

I’m connecting an OpenAI-powered assistant to our booking system. Looking up available appointments is straightforward, but I’m unsure how to handle retries once a tool can actually create a booking.

The awkward case is a timeout: our service submits the booking, the booking system saves it, and the response never reaches us. If we retry the workflow, the assistant might request the same action again.

Where should duplicate protection live?

  • Should our application create an operation ID before asking the model to act?
  • Is a tool-call ID suitable for identifying the same booking across retries, or only for matching a particular call and response?
  • How should the assistant respond when the action’s outcome is still unknown?

I’m looking for a practical approach to idempotency keys for tool calls, especially when a user repeats “yes, book it” after seeing no confirmation. How do you distinguish a retry from an intentional second booking without relying on the model to decide?


0 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md