Skip to content

Weird interrupt related issue #3061

Closed Answered by vbarda
CymDanus asked this question in Q&A
Jan 16, 2025 · 1 comments · 5 replies
Discussion options

You must be logged in to vote

it doesn't ask for input

is your expectation more like input() in python? if so, LangGraph interrupt() doesn't do this. It just stops the graph execution and you need to resume it using Command(resume) to provide the value

i think there is actually an issue in your code example: Command(resume) should be used after the graph is halted by interrupt(), to provide the interrupt value, not in the value returned by the node function

e.g.

...
def human_feedback_node(state: State) -> Command[Literal[SUPERVISOR_NODE]]:
    """Human feedback node that processes user input and updates the state."""
    
    # Get the user feedback from the state
    user_feedback = interrupt("Do you approve of th…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@CymDanus
Comment options

@vbarda
Comment options

Answer selected by CymDanus
@CymDanus
Comment options

@vbarda
Comment options

@CymDanus
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants