An Ode to Idempotency
The elevator button knows something you don't.
Press the button for the elevator and it lights up. Press it again, harder, four more times because you’re late. The elevator arrives exactly once, exactly when it would have anyway. Your extra jabs changed nothing, and that’s the whole point. The button was built so that hitting it once and hitting it ten times mean the same thing.
There’s a word for this, and it’s one of my favorites in the English language. Idempotent. An action is idempotent when doing it repeatedly has the same effect as doing it a single time. Setting a light switch to “on” is idempotent; it’s already on, and flipping it toward “on” again does nothing. Adding salt to soup is not; the tenth pinch ruins dinner. Most of the machinery that keeps modern life from collapsing into chaos runs on the first kind of action, and almost nobody outside a few technical trades knows the word for it.
I want to make the case that you should. Not because you’ll use it at parties, but because the idea underneath it is one of those rare mental tools that reorganizes how you see ordinary things. Once you have it, you start noticing which of your own habits, requests, and systems are safe to repeat and which ones quietly punish you for repeating them.
A word born in algebra
The word comes from a strange and specific place. In 1870 an American mathematician named Benjamin Peirce circulated a dense little book called Linear Associative Algebra. Peirce was Harvard’s leading mathematician, a founder of the field in America, and the father of the logician Charles Sanders Peirce. In that book he needed names for two kinds of mathematical objects that behaved oddly when multiplied by themselves. One kind, multiplied by itself, collapsed to nothing; he called it nilpotent, from the Latin for “zero power.” The other kind, multiplied by itself, gave back exactly itself; he called it idempotent, from idem and potens, roughly “the same power.”
That second name described a number, or an operation, where doing it again lands you right back where you already were. In the plainest arithmetic you know it too. One times one is one. Zero times zero is zero. Square those and nothing moves. Peirce was after something more abstract, but the flavor is identical: apply the thing to itself and it holds still.
For about a century the word stayed home in mathematics, useful mostly to people who studied logic and abstract algebra. It turns up in Boolean logic, the algebra of true and false that George Boole built in the 1850s and that every computer now runs on. In Boole’s system, “true AND true” is just “true.” “True OR true” is just “true.” Stack the same truth on itself and it doesn’t compound; it repeats. Idempotent, again, though Boole didn’t have Peirce’s word for it yet.
None of this sounds like it should matter to anyone with a to-do list and a job. And for a hundred years, it didn’t much. Then we built a world out of unreliable messages, and the word came roaring back.
The unreliable world made it essential
Here’s the problem that resurrected it. When your phone sends a request across the internet, say, to pay for something, the message can get lost on the way there, or the reply can get lost on the way back. Your phone can’t tell those two failures apart. From where you’re sitting, “the payment didn’t go through” and “the payment went through but the confirmation vanished” look exactly the same: a spinner, then nothing.
So you do what any of us do. You tap “Pay” again.
If the payment system treats each tap as a fresh command, you just paid twice. Multiply that across millions of anxious taps a day and you have a catastrophe. The fix is to make the payment idempotent. The company Stripe, which processes payments for a large slice of the internet, built exactly this and named it after the idea: an idempotency key. Your phone stamps the payment with a unique ticket number. The first time Stripe sees that ticket, it charges you. Every later time it sees the same ticket, it shrugs, says “already handled,” and returns the original result. You can tap “Pay” until your thumb is sore. You get charged once.
That single design choice is why online commerce works at all, and it’s a direct descendant of Peirce’s algebra word. The engineers who built the web baked the same idea into its grammar. When your browser fetches a page or updates a saved setting, those actions are meant to be idempotent: ask for the same page twice, get the same page, no harm done. Submitting a new comment or placing a new order is deliberately not idempotent, which is why your bank warns you not to hit refresh on the confirmation screen. The whole system is sorted, quietly, into actions that are safe to repeat and actions that aren’t.
The deep reason this matters is almost philosophical. In a world of unreliable messengers, you can never be fully certain your instruction arrived. Certainty isn’t on the menu. So instead of chasing it, good engineers design for the opposite: they make repetition harmless. If you can’t know whether the thing happened, build it so that doing it again costs nothing. That’s not a workaround. It’s a wiser stance toward an uncertain world than insisting on perfect knowledge you’re never going to get.
Why you’d want this word
Now bring it back to your desk. You send a colleague a message: “Can you add me to the budget meeting?” You hear nothing. Two days later you send it again. If they’d already done it, you’ve just created a small mess: two calendar invites, a confused exchange, a “wait, didn’t I already?” Your request wasn’t idempotent, and the cost of your reasonable follow-up was friction.
Compare that with how you’d phrase it if you thought like Stripe. “Please make sure I’m on the invite list for the budget meeting.” Now the ask describes an end-state, not an action to perform. Whether they do it once, or you nudge them three times, the target is the same: you, on the list, once. Send that message a dozen times and the world it’s asking for never changes. You’ve made your own request safe to repeat.
This is the move, and it generalizes. Increments are dangerous to repeat; declarations of a desired end-state are safe. “Add a paragraph about pricing” run twice gives you two paragraphs. “The pricing section should cover our three tiers” run twice gives you one correct section. The first tells someone to do something. The second tells them what should be true. Only one of those is safe when you’re not sure if it landed the first time.
Which is precisely where working with AI gets interesting, because you’re now sending instructions into exactly the kind of uncertain channel that made this word necessary in the first place. A model doesn’t remember your last session. A long chat drifts. You re-run prompts constantly: the wifi hiccups, the answer disappoints, you tweak one word and go again. If your prompt is written as an increment (“add three more examples”), running it four times buries you in examples. If it’s written as an end-state (“the piece should include four short examples, one per section”), you can re-run it all afternoon and keep landing in the same clean place. You’ve made your instruction idempotent, and the model’s forgetfulness stops being your problem.
That reframe is worth more than the vocabulary word. Most of us design our commitments and our asks as one-shot actions and then suffer when reality forces a retry, which it always does. The people who build systems that don’t break learned long ago to ask a different question. Not “how do I make sure this happens exactly once?” but “how do I make it safe for this to happen again?”


