Lesson 2 of 8 · 3 min read
Side Effects That Survive Retries
Durable runs retry activities, and a retried side effect can happen twice. When the target system supports idempotency keys, use them. When it does not, the agent needs a protocol: write an intent record before acting, embed a unique reference in the request so the effect can be found later, treat a timeout as an unknown outcome to be resolved by lookup rather than by retrying, and reconcile periodically against the system of record. The outbox pattern keeps intent and action consistent, and anything the system cannot resolve goes to a person.
free sign-in, no card required
Practise it as an interviewer asks it
What does it mean for an agent to be durable, and why can't a normal loop just retry after a crash?How can an AI agent pay for something? Name the pieces between 'buy this for me' and a settled payment.pass@k or pass^k: which one do you report for a customer-service agent, and why?A worker crashes after the payment call succeeds and before the result is saved. Design recovery.Design a shopping agent that can complete purchases while the user is away.When would you ship a fixed workflow instead of an agent?