From be7dee1c3b1f6f57893e5b5274cb3c985f99e489 Mon Sep 17 00:00:00 2001 From: Nuno Campos Date: Mon, 17 Mar 2025 18:35:53 -0700 Subject: [PATCH] Fix --- libs/langgraph/langgraph/pregel/debug.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libs/langgraph/langgraph/pregel/debug.py b/libs/langgraph/langgraph/pregel/debug.py index 7bd9e634e..dc2e403a7 100644 --- a/libs/langgraph/langgraph/pregel/debug.py +++ b/libs/langgraph/langgraph/pregel/debug.py @@ -137,7 +137,12 @@ def map_debug_task_results( "result": [ w for w in writes if w[0] in stream_channels_list or w[0] == RETURN ], - "interrupts": [asdict(w[1]) for w in writes if w[0] == INTERRUPT], + "interrupts": [ + asdict(v) + for w in writes + if w[0] == INTERRUPT + for v in (w[1] if isinstance(w[1], Sequence) else [w[1]]) + ], }, }