Skip to content
anythingai.space
Agentic Systemsadvanced13 min · 9 steps

Durable Execution

Keep long-running agents alive through crashes and deploys: journal every step, replay deterministically, make side effects exactly-once, and pause for days without burning compute.

step 4 statecharge $120WHAT HAPPENEDWorkersteps 1–4charge✕retry step 5…Cardtime →Worker 1runs agent loopkilledState checkpointsaved before step 5Payments APIcharges a card×2
errordatarequesttool callresponsesignal
1 / 9
ProblemStep 1 of 9

Crash after the charge, before the record

The agent calls a tool that charges a card. The charge commits — then the worker is killed by a deploy before it records the result. On restart, a naive retry runs the step again: two charges.

After a mid-step crash you can't tell whether the side effect committed or only its acknowledgement was lost. A checkpoint saved between steps still leaves that unsafe window.

Watch outCheckpoints capture state. Durable execution captures the journal of steps — and you can't safely resume mid-side-effect from a snapshot alone.

Lesson 11 of 15 in Agentic Systems