The idempotency fence is a database-level unique constraint on every write operation. When a duplicate arrives — from a retry, a timeout recovery, or a concurrent duplicate request — the constraint catches it before any provider API is called. The cached response is returned. The provider is never hit twice.
LLM-based agents are non-deterministic. Networks time out. Events fire twice. Without idempotency enforcement at the infrastructure level, every retry is a potential duplicate refund, double-send, or duplicate order. The fence makes retry logic trivial to build and safe to run.