AI & Agent Dev Bug Sandbox logo
AI & Agent Dev Bug Sandbox
Back to Radar

Resuming A Compiled Subgraph Re-Runs Sibling Nodes That Completed Successfully

When a subgraph contains parallel nodes and one node interrupts or fails, resuming the graph re-executes already-completed sibling nodes inside the subgraph, causing duplicate side effects and potentially different results. Flat graphs do not exhibit this behavior.

highConfidence 75%LanggraphConditional EdgesPersistenceAffected V1.2.12Affected V1.2.14

Origin Analysis

LangGraph's checkpointing mechanism does not correctly preserve and restore pending writes from nested subgraphs. When a subgraph is resumed, the parent graph's checkpoint only records the subgraph as a single pending step, while the subgraph's internal completed writes are discarded. As a result, the subgraph re-executes its entire super-step, including nodes that had already finished.
1. Define a StateGraph with two parallel nodes: 'gate' and 'agent'. 2. 'gate' interrupts or raises a transient failure on its first invocation; 'agent' calls a model and completes. 3. Compile this graph as a subgraph inside an outer graph with a checkpointer. 4. Invoke the outer graph; on interrupt/failure, resume the graph. 5. Observe that 'agent' is called twice and its result is overwritten by the second call.

Fixing Code Block

Edge Case Audit

This is a temporary workaround and relies on internal LangGraph APIs that may change in future versions. It may not handle all edge cases (e.g., multiple resumes, concurrent tasks, or checkpointers with different storage backends). If the patched method encounters unexpected write formats, it silently falls back. Remove this patch once an official fix is released. Rollback by simply not applying the monkey patch.

Ecosystem Topology

Agent Frameworks

LangChain, LlamaIndex, and Pydantic

  1. highProperty graph relation keys collide when entity IDs or labels contain underscores
  2. highCodeActAgent drops assistant tool-call metadata during handoff, leaving an orphan tool response
  3. high[Bug]: HierarchicalNodeParser async methods return the documents unsplit
  4. highLLM.predict_and_call fails with ValidationError for non-function-calling models when react_chat_formatter is omitted
  5. highAnthropic streaming server-tool input_json_delta overwrites completed client tool_use arguments due to stale cur_tool_call state