You’ve probably hit “Pay” on a slow checkout page and then sat there wondering if tapping it again would charge you twice. Whether it would comes down to something called idempotency (eye-dem-POH-ten-see). Yeah, it’s a mouthful.
It’s an old engineering idea, but AI agents are dragging it back into the spotlight. Agents retry things constantly, and usually nobody’s watching when they do.
What it means
An action is idempotent when doing it more than once has the same effect as doing it once. Checking your bank balance is idempotent. Refresh it all day and nothing changes. Sending a payment isn’t, unless somebody built it that way on purpose. Plenty of everyday stuff already works like this. Hitting save twice doesn’t make two copies of your document, and locking your car twice doesn’t lock it extra.
The usual fix is an idempotency key, a unique ID attached to each request. If the same ID shows up twice, the system recognizes the repeat and skips it.
Why it matters
Payments run on it. Stripe lets developers attach an idempotency key to each charge, so if the same key arrives twice, the customer only gets billed once. That’s what saves you when a checkout page freezes halfway through.
The internet drops things all the time, and software’s usual answer is to try again automatically. Your phone loses signal in a parking garage, the app never hears back, so it quietly sends the request again. Without idempotency, every retry is a small gamble: a second order, a second email, a second box headed to the same porch.
Agents retry by design. An agent loop (an AI working through a task step by step) hits an error, adjusts and tries again, usually without a person checking each attempt. If the step it’s retrying is “pay the vendor,” you really want that step built so a second try does nothing.
Simple example
The elevator call button in an office lobby is idempotent. Press it once and the elevator comes. Press it fifteen times while staring at your phone and the elevator still comes. Once.
Now think about a coffee app where every tap on “Order” sends another latte. Same impatient thumb, very different morning. That’s why so many checkout screens politely beg you not to hit submit twice. They’re admitting their button isn’t the elevator kind, and hoping you’ll be patient for them.

