State and Handoff
In multi-step workflows, information tends to get lost at the seams. Deciding what to retain and what to pass forward is state management.
Do Not Rely on Conversation History
The simplest handoff carries the conversation history into the next step. But as history grows, what matters gets buried, and rerunning only the failed step becomes impossible.
| Approach | Partial rerun | Findability |
|---|---|---|
| Conversation history only | Not possible | Harder as history grows |
| Explicit state | Possible | Structured and clear |
What to Retain as State
graph LR
S1["Step 1"] -->|deliverable + assumptions| State["State"]
State -->|only what is needed| S2["Step 2"]
S2 -->|deliverable + assumptions| StateThree kinds of information belong in state.
| Kind | Example |
|---|---|
| Deliverables | Generated files, research results, decisions |
| Decision assumptions | Rejected options and why, confirmed constraints |
| Progress | Completed steps, remaining steps, failure counts |
What does not belong: trial-and-error detail and intermediate data already consumed.
Fix the Handoff Format
Fix the format so the receiving side never has to interpret. With a stable format, a step’s internals can be replaced without disturbing its neighbors.
# Example handoff format
status: completed | failed | needs_review
output: reference to the produced deliverable
decisions: what this step settled
open_issues: unresolved items carried to the next stepCarrying open_issues keeps undecided points from disappearing silently.
Progress Enables Reruns
Holding completed steps as state allows resuming from the failure point. This is also the prerequisite for failure detection and recovery. A design that restarts everything means every late-stage failure costs the whole run.
Summary
- Handing off through conversation history buries information and prevents partial reruns
- State should hold deliverables, decision assumptions, and progress
- A fixed handoff format makes steps swappable
- Holding progress as state allows resuming from the failed step