State Update After Interrupt Not Reaching Subgraph Node on Resume #4730
Replies: 3 comments
-
Hey @wicusverhoef! Just wanted to know if your doubt was ever solved, cause I just arrived to a similar situation using Langgraph: After an interrupt in a subgraph node, when sending the command, the state only has the original attributes of the parent graph ;(, and "erases" the extra ones it got from the subgraph. |
Beta Was this translation helpful? Give feedback.
-
I am currently also stuck in this similar problem, can anyone help me too? |
Beta Was this translation helpful? Give feedback.
-
The unexpected behavior in your example is because you are using the Here is a rewritten version of your code that works as expected:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
LangGraph Nested Graph State Update Clarification Q
This example shows that when resuming a nested LangGraph after a NodeInterrupt, state updates made via update_state do not propagate into the subgraph where the resume occurs. As a result, the resumed node does not see the updated state, raising questions about intended behaviour and best practices for state injection in nested workflows.
Or I am just being very daft.
Context
This minimal example explores LangGraph's checkpointing and state update mechanism for nested graphs with human-in-the-loop-like interruptions.
Scenario
What This Example Shows
update_state
on the graph, setting a flag (resume_flag=True
) and a message, intending for these to be visible to the HIL node on resume. Printing the state at this stage shows the update.Request for Clarification
Key Questions for the Community
Minimal Example
Any insight or clarification would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions