[PR #4406] Support multiple resume values with Command.resume #3803

Closed
opened 2026-02-20 17:49:11 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langchain-ai/langgraph/pull/4406

State: closed
Merged: Yes


  • Adding support for mapping interrupt ids -> resume values with the Command.resume_map argument, like:
resume_map = {
    i.interrupt_id: f"human input for prompt {i.value}" 
    for i in parent_graph.get_state(thread_config).interrupts 
}

parent_graph.invoke(Command(resume=resume_map), config=thread_config)
  • Adds an interrupts attribute on StateSnapshot so that we can access that directly rather than having to do get_state(thread_config).tasks and then iterate over tasks to find interrupts

  • Deprecates undocumented feature where (if interrupting a graph from the level of an interrupt), you could pass a dict mapping task ids -> resume values. Now we recommend and endorse the interrupt_id approach above.

I'll note, from an internal perspective, I would love if we didn't have to pass around this map, but it seems like the best way right now to make the necessary resume information necessary at different levels in a graph with subgraphs.

Fix https://github.com/langchain-ai/langgraph/issues/4028

Slotted to be included in our v0.4.0 release early next week!

**Original Pull Request:** https://github.com/langchain-ai/langgraph/pull/4406 **State:** closed **Merged:** Yes --- * Adding support for mapping interrupt ids -> resume values with the `Command.resume_map` argument, like: ```py resume_map = { i.interrupt_id: f"human input for prompt {i.value}" for i in parent_graph.get_state(thread_config).interrupts } parent_graph.invoke(Command(resume=resume_map), config=thread_config) ``` * Adds an `interrupts` attribute on `StateSnapshot` so that we can access that directly rather than having to do `get_state(thread_config).tasks` and then iterate over tasks to find interrupts * Deprecates undocumented feature where (if interrupting a graph from the level of an interrupt), you could pass a dict mapping task ids -> resume values. Now we recommend and endorse the `interrupt_id` approach above. I'll note, from an internal perspective, I would love if we didn't have to pass around this map, but it seems like the best way right now to make the necessary resume information necessary at different levels in a graph with subgraphs. Fix https://github.com/langchain-ai/langgraph/issues/4028 Slotted to be included in our v0.4.0 release early next week!
yindo added the pull-request label 2026-02-20 17:49:11 -05:00
yindo closed this issue 2026-02-20 17:49:11 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#3803