Description
When creating a node with multiple parents using the list syntax in graph.add_edge,
I expected the child node to run once after all parent nodes have completed.
Example:
graph.add_edge(START, "step_1")
graph.add_edge(START, "step_2")
graph.add_edge("step_2", "step_3")
graph.add_edge(["step_1", "step_3"], "step_4")
graph.add_edge("step_4", END)
Expected Behavior
step_4 should execute only once, after both step_1 and step_3 have finished.
Actual Behavior
step_4 is executed twice:
-
once after
step_1completes -
again after
step_3completes
This results in multiple executions of the same node (e.g., LLM called twice with slightly different results),
even though the intent was to wait for all parents and run only once.
Why this matters
For workflows that aggregate results from multiple branches (e.g., synthesis step),
we need the child node to run once with the combined inputs, not multiple times.
Question
-
Is the current behavior (multiple triggers) by design?
-
If so, could we add an “all parents must complete” semantics for list-style edges?
-
Or should this require an explicit join node in user code?