Make retries boring
A lost response should not turn one intention into two side effects.
Is Agenticis-agentic.com
The score is an at-a-glance summary; the individual checks and evidence are the useful part of the report.
Notes from the Is Agentic checks and report format.
Retry after a dropped response
Press Retry twice and watch the charge count.
Fresh requestBad
0charges created
POST /charges
{ "amount": 4800 }
{ "amount": 4800 }
The first response may be lost.
POST again and hopeSame intentionGood
0charges created
POST /charges
Idempotency-Key: order_1042-refund
Idempotency-Key: order_1042-refund
The first response may be lost.
same key → same resultconst key = `refund:${order.id}:${refundAttempt.id}`;
const response = await fetch('/api/refunds', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Idempotency-Key': key,
},
body: JSON.stringify({ orderId: order.id, amount }),
});
// The server stores key → response atomically with the write.
Why it matters, pros and cons
Why it matters
Agents retry. Networks fail. Once a write can be repeated, idempotency stops transport uncertainty from becoming business damage.
Pros
- Retries are safe after timeouts.
- The original result can be returned again.
- Support can trace one intention by its key.
Cons
- Keys need a clear lifetime and scope.
- The write and key record must be atomic.
- It does not replace approval or authorization.