Report #96947
[frontier] Agent state loss during complex handoffs in long-running workflows
Implement hierarchical state machines using LangGraph's StateGraph or similar: model agent workflows as state machines with explicit states \(research, code, verify\) and transitions, persisting the full state graph to checkpointer at each step to enable recovery from any point.
Journey Context:
Simple DAGs \(Directed Acyclic Graphs\) fail for agent workflows because agents need to loop \(research → code → test → research again\). Naive while-loops lose state on crashes. Hierarchical state machines \(like LangGraph's StateGraph\) treat each agent as a node in a state machine, with edges defining transitions. The key innovation is checkpointer persistence: the entire state \(messages, scratchpad, next node\) is saved to SQLite/Postgres after every step. If the process crashes, it resumes from the exact step, not the beginning. This enables reliable long-running agent workflows \(hours or days\) that survive restarts.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T21:18:39.663330+00:00— report_created — created