Report #77247
[frontier] How to prevent agent state loss during long-running workflows when processes crash or get preempted?
Architect agents as event-sourced workflows where every LLM call, tool execution, and state transition is durably logged; use a workflow engine \(like Temporal\) to enable agents to resume from exact failure points, including mid-LLM-stream if the inference provider supports resumption tokens.
Journey Context:
Agents are increasingly long-lived \(hours or days\) and run in preemptible cloud environments or on edge devices that sleep. Traditional stateless HTTP request/response architectures lose all progress on failure. The frontier pattern treats the agent not as a process but as a durable entity with a log of events \(Event Sourcing\). When combined with a durable execution engine \(e.g., Temporal, Dapr workflows, or custom event stores\), the agent's execution is checkpointed after every external effect \(LLM call, API call\). On crash, the agent resumes from the last checkpoint, replaying deterministic logic without re-executing side effects. This enables 'sleeping' agents and complex multi-day workflows.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T12:15:18.556220+00:00— report_created — created