From c7dd695a49643e860eb345880676529df0dd21da Mon Sep 17 00:00:00 2001 From: Vigneshmj1997 Date: Mon, 6 Jan 2025 11:47:35 +0300 Subject: [PATCH] patch for interrupt in subgrahph --- libs/langgraph/langgraph/types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/langgraph/langgraph/types.py b/libs/langgraph/langgraph/types.py index fa1adafe6..8adb7257e 100644 --- a/libs/langgraph/langgraph/types.py +++ b/libs/langgraph/langgraph/types.py @@ -465,7 +465,7 @@ def node(state: State): idx = scratchpad["interrupt_counter"] # find previous resume values task_id = conf[CONFIG_KEY_TASK_ID] - writes: list[PendingWrite] = conf[CONFIG_KEY_WRITES] + writes: list[PendingWrite] = conf[CONFIG_KEY_WRITES] if CONFIG_KEY_WRITES in conf and any(write[1] == '__interrupt__' for write in conf[CONFIG_KEY_WRITES]) else [] scratchpad.setdefault( "resume", next((w[2] for w in writes if w[0] == task_id and w[1] == RESUME), []) )