[ALERT] interrupt() when called second time is not waiting for the response. #2927
Replies: 3 comments 3 replies
-
I believe this is working as designed. See the doc https://langchain-ai.github.io/langgraph/reference/types/#langgraph.types.interrupt
Does that answer your question? |
Beta Was this translation helpful? Give feedback.
-
Actually I have a checkpointer already at the parent graph which is the main graph and this ask human node is present inside the sub graph. So now will adding another checkpointer to the sub graph works? |
Beta Was this translation helpful? Give feedback.
-
I have the same problem, maybe an arg to the interrupt to ignore the cached value could be a good solution. Currently I am going to use NodeInterrupt |
Beta Was this translation helpful? Give feedback.
-
def ask_user_node(state: LookupState) -> Command[Literal['lookup_node']]:
agent_request = state['userAgentInteractionInfo']['agentRequest']
user_response = interrupt(agent_request) # First time it waited for user response, but for the second time it got executed keeping the user_response empty "".
By the way, this node is being used inside a subgraph, This subgraph has an agent which has a tool that transfers to this node, if it requires to collect some information from User.
Also how to test this flow in studio.
Beta Was this translation helpful? Give feedback.
All reactions