TL;DR: A durable agent survives its own process dying. The loop records every step it takes, the model's reply, the tool call, the result, as events in a history, and after a crash a new process replays that history to rebuild the state and continues from the first step that never completed. A plain retry restarts the loop from the beginning, which re-runs side effects that already happened and gives the model a fresh transcript that no longer matches the world. Durability also lets a run wait for days, for a person or an external system, with no process alive, because the history is the state.
How to approach it
Start with the crash, because the failure is what makes the definition concrete. Show where the loop dies and what a retry does wrong. Then introduce the history, replay and idempotency as the three parts of the answer. Finish with the wait, since "agents that wait for a human" is the other half of why this exists.
A strong answer
Take a loop that works until the process dies (Durable Execution):
step 1 model -> call charge_card(order=4471, amount=120.00)
step 2 harness runs it -> charge c_91 created
process killed here, before the result is saved
Retry the whole run and the model sees an empty transcript, calls charge_card again, and the customer is charged twice. Resume from "where it was" and there is nowhere to resume from, because the only record of step 1 was in memory. That is the whole problem: the state of an agent run is the transcript plus the side effects it has caused, and a normal loop keeps the first in memory and the second nowhere.
Durable execution fixes it by making the history the state. Every step appends an event to a store before and after it does anything:
event 1 run started task, budgets, model build
event 2 model replied tool call charge_card(...) id call_3
event 3 call started call_3, idempotency key run7-step1
event 4 call completed call_3 -> charge c_91
event 5 model replied text "Charged 120.00; sending receipt"
...
After a crash, a new worker loads the events and replays them. Replay does not re-run anything: a completed call's result comes from event 4, not from the payment provider. The worker rebuilds the transcript the model had, finds the first step with a "started" event and no "completed" event, and only that step is in doubt.
For that step, idempotency is what makes the doubt safe. The call carried a key derived from the run and the step. Re-issuing charge_card with the same key returns the existing charge instead of making a second one, so the worker can re-run the uncertain step without knowing whether it happened. Side effects that cannot be made idempotent, like an email the provider will happily send twice, get a check-then-act step: look for the receipt before sending it. Without idempotency, replay only tells you a step might have run; with it, you can run it again.
The same mechanism gives you waits. An agent that needs a manager's approval records a "waiting for signal" event and the process exits. Nothing is running for the three days the manager takes. When the approval arrives, a worker loads the history, replays to the wait, appends the signal and continues. A loop that held a process open for three days would be holding memory and a model context hostage to a human calendar, and would lose both on the first deploy.
Two consequences shape the harness. Model calls are side effects too: a replay must not call the model again for a step whose reply is in the history, or the agent takes a different path on recovery than it took before. And the code that interprets events must stay compatible with histories recorded by older versions, or a deploy strands every run in flight; versioning the loop is part of durability.
Authority line: the model proposes each step; the harness records, executes and, after a failure, decides which steps are proven, which are in doubt and which must never run twice.
What interviewers probe next
"Why not just save the transcript to a database after every step?" That is the history, in a weaker form. You still need to know which side effects completed, keys to make re-running them safe, and a rule that replay reads results instead of re-running calls. Saving text does not give you any of the three.
"The tool has no idempotency key." Then the harness supplies the check: before re-running the uncertain step, query for the effect it would have had, the charge with this reference, the ticket with this title. If the check cannot be made, the step is routed to a person on recovery rather than re-run.
"Does durable mean slow?" Each step pays a write to the event store, milliseconds against a model call of seconds. The cost that matters is design: every side effect needs a key or a check, which is work, and the reason teams skip it until the first double charge.
How it's scored
Weak: Says to add retries, or to checkpoint "the state" without saying what the state is.
Hire: Shows the crash between effect and record, describes an event history that is replayed rather than re-run, and puts idempotency keys on side effects.
Strong Hire: Also treats model replies as recorded side effects, explains waits with no live process, names check-then-act for tools without keys, and raises versioning of the loop code against in-flight histories.
Common mistakes
- Restarting the run from the beginning after a crash.
- Replaying by re-running tool calls instead of reading recorded results.
- Side effects with no idempotency key and no check.
- Calling the model again during replay, so recovery takes a different path.
- Holding a process open to wait for a person.