[ALERT] interrupt() when called second time is not waiting for the response. #2927
Replies: 5 comments 6 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.
-
Similar usecase for me too... want to have an interrupt after every loop which is not supported
|
Beta Was this translation helpful? Give feedback.
-
Similar case here, I want to collect a list of elements given by a user in various messages, but when I try to use Interrupt more than once, it doesn't stop to give the user the chance to add new elements |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
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