Why does durable execution matter?
Agents frequently call slow APIs or pause overnight waiting for a person to approve a refund. Standard stateless HTTP handlers drop that state on restart or timeout, leaving workflows half-finished or dangerously retried.
Agent work can take minutes or days, especially when it waits for an approval. Durable execution records each step, so a restart doesn’t lose the work and a paused run can resume later.
The hard part is side effects. Blindly replaying an interrupted step can send an email twice, so safe systems resume what is safe to resume and surface the rest for a person to decide.
Key characteristics of durable execution
- Checkpoints every step, tool output, and pending approval to durable storage.
- Survives process restarts, network hiccups, and multi-day approval waits without losing progress.
- Distinguishes safe read steps from external side effects to avoid duplicate writes on recovery.
- Preserves full evidence when a job stops mid-flight so operators can inspect and decide next steps.
How durable execution works step by step
- 1. Checkpoint stepPersist tool outputs to durable log
- 2. Pause cleanlyWait hours for human approval
- 3. Survive restartState stays intact across deploys
- 4. Resume safelyContinue without replaying side effects
Durable execution vs. standard request-response
| Dimension | Durable execution | Standard HTTP request |
|---|---|---|
| Max duration | Minutes, hours, or days (across waits) | Seconds before request timeout |
| Server restart | State preserved; safe steps resume | In-flight progress lost immediately |
| Human approvals | Pauses cleanly and resumes on decision | Requires custom polling and state tables |
| Side-effect safety | Records step outcomes to prevent blind replay | Retries risk duplicate external actions |
Example in practice
How Norilu handles durable execution
Frequently asked questions
- Why shouldn’t a durable runtime automatically replay every interrupted tool call?
- If a crash occurred right after an external API processed a payment or sent an email—before the response returned—blindly replaying that call would trigger the action twice.
- When does an agent need durable execution?
- Whenever runs involve multi-step background jobs, webhooks, schedules, slow tools, or human-in-the-loop approvals that outlive a single HTTP request.