[PR #6108] feat(langgraph): prevent arbitrary resumes w/ multiple pending interrupts #4842

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

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

State: closed
Merged: Yes


The idea here is that we don't want to allow resuming a graph w/ an arbitrary resume value if there are multiple interrupts in the queue, because the order in which interrupts enter the queue is not deterministic. We want to instead enforce that each resume value is mapped to an interrupt id.

Instead, when multiple interrupts are present, a user should invoke w/ a resume map, mapping interrupt id -> resume value.

The logic was more complex than expected because there are 2 copies of an interrupt in checkpoint_pending_writes for the cases w/ the functional API, because an interrupt in a task interrupts the task and entrypoint.

This is technically breaking (users resuming multiple hanging interrupts w/ multiple resume calls can no longer do this... but the behavior for this case was non-deterministic in the first place so we can sell this as a fix).

**Original Pull Request:** https://github.com/langchain-ai/langgraph/pull/6108 **State:** closed **Merged:** Yes --- The idea here is that we don't want to allow resuming a graph w/ an arbitrary resume value if there are multiple interrupts in the queue, because the order in which interrupts enter the queue is not deterministic. We want to instead enforce that each resume value is mapped to an interrupt id. Instead, when multiple interrupts are present, a user should invoke w/ a resume map, mapping interrupt id -> resume value. The logic was more complex than expected because there are 2 copies of an interrupt in `checkpoint_pending_writes` for the cases w/ the functional API, because an interrupt in a task interrupts the task and entrypoint. This is technically breaking (users resuming multiple hanging interrupts w/ multiple resume calls can no longer do this... but the behavior for this case was non-deterministic in the first place so we can sell this as a fix).
yindo added the pull-request label 2026-02-20 17:50:50 -05:00
yindo closed this issue 2026-02-20 17:50:50 -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#4842