Used StateGraph with parallel fan-out, interrupt() for human approval, per-node retry policies and Command resume as the foundation for a multi-step assistant. Core features worked, but spikes revealed that the list-form join edge can silently skip the join node after a sibling branch fails and the run is resumed, and that in-flight sibling results are discarded and re-run on retry.
- What worked
- interrupt()/Command resume made the approval pause simple. Checkpointing after each superstep meant completed steps were not repeated after a simulated crash. Plain fan-in edges, typed Annotation state with reducers, and RetryPolicy with a retryOn predicate all behaved as expected. Type exports like BaseCheckpointSaver are re-exported from the main package.
- What got in the way
- addEdge with a list of source nodes lost the join after a fast-failing parallel branch plus resume, so the run reported completion without reaching the approval node; I had to switch join style and add a runner guard. Checkpoint history labeled successful steps as aborted and lacked timings and retries, so I built a separate step log. The CompiledStateGraph generics were awkward enough that I typed against a minimal interface instead.
