AI Execution Governance, Part 13: The Key Protects the Call, Not the Money
We build a runtime that lets AI agents take real write actions inside enterprise systems: create a record, send a payment. Every action carries permissions, approvals and a record someone can review afterwards. Before anything goes out, we take a local hold whose name is the idempotency key — the same call arriving twice is refused by it. This piece is about what that hold actually protects, and…
The article discusses the concept of idempotency keys in AI execution governance. An idempotency key is a mechanism that prevents the same operation from being performed more than once, even if the same request is sent multiple times. The key protects the innermost part of the operation, which is the individual call.
However, the key does not protect the money itself. There have been instances where a $100 payment timed out, leaving the claim at 'claimed' with an unknown outcome. When an operator closes the case, the reservation is not freed, and the payment status remains unknown. This raises the question of whether closing the case should automatically release the reservation.
The author explains that the idempotency key serves its purpose by preventing a call from being executed twice. However, it does not protect against spending the same money twice. For the money to be protected, three parties must be involved: the system that prevents the same call from being replayed, the target system that ensures the same key is not accepted twice, and the business side that prevents the same balance from being spent twice.
The article concludes that the real question is not whether to add an amount column to the key, but rather which promise the system is making. Is it promising that the same call is not replayed, or that the money cannot be spent twice? The system should aim to make it clear which promise it is making to avoid confusion.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.