Durable execution
Durable execution is the workflow / agent pattern where long-running multi-step processes survive crashes, restarts, and queue failures — state checkpointed after each step, resume from last checkpoint. Inngest, Temporal, Restate, AWS Step Functions are 2026 implementations.
In more detail
What it means
Naive long-running scripts die when the process restarts: a queue worker crash mid-step means starting over. Durable execution engines flip this: every step's input + output is checkpointed; on crash the engine resumes from the last checkpoint, no work lost. Critical for: multi-hour agents, multi-day onboarding flows, payment processing with retries, AI [[background-agent]]s that take 10+ minutes. Implementations: code looks linear (`await emailUser(); await waitForResponse(); await chargeCard()`) but the engine intercepts each step. Trade-offs: cognitive complexity (workers are short-lived but logic looks long-lived), debugging requires understanding the checkpoint log, harder to reason about side effects.
Part 1 of 2
When to use it, and when not
Use it for
- Long-running agents / workflows that must survive restarts.
- Payment / regulatory flows where data loss is unacceptable.
Part 2 of 2
Common mistakes
- Side effects without idempotency keys — restart re-runs charges / emails.
- Storing state in process memory — defeats the durability promise.
FAQ
Questions readers ask.
What is durable execution?
Durable execution is the workflow / agent pattern where long-running multi-step processes survive crashes, restarts, and queue failures — state checkpointed after each step, resume from last checkpoint. Inngest, Temporal, Restate, AWS Step Functions are 2026 implementations.
When should you use durable execution?
Long-running agents / workflows that must survive restarts. Payment / regulatory flows where data loss is unacceptable.
What are the common mistakes with durable execution?
Side effects without idempotency keys — restart re-runs charges / emails. Storing state in process memory — defeats the durability promise.
Last updated: 2026-06-01. Raw markdown: https://promtable.com/glossary/durable-execution.md. Found a mistake? Tell us.