mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-26 17:42:24 +02:00
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).