From 48c6fa1e316e0701f8c7f3990edb06c9d92b8de0 Mon Sep 17 00:00:00 2001 From: Ziyang Fang <127402327+Fangziyang0910@users.noreply.github.com> Date: Mon, 3 Nov 2025 17:08:15 +0800 Subject: [PATCH] Fix InvalidUpdateError in interrupts: remove conflicting edges and clean up imports Root cause: approval node both returned Command(goto=...) and had static edges to proceed/cancel, causing concurrent writes to status in the same step. Fix: Removed the two static edges and rely solely on goto for routing. Cleanup: Removed unused sqlite3 import. Result: Resume now succeeds and status is set exactly once. --- src/oss/langgraph/interrupts.mdx | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/oss/langgraph/interrupts.mdx b/src/oss/langgraph/interrupts.mdx index 6b5d45703..d308c6881 100644 --- a/src/oss/langgraph/interrupts.mdx +++ b/src/oss/langgraph/interrupts.mdx @@ -198,7 +198,6 @@ await graph.invoke(new Command({ resume: false }), config); :::python ```python - import sqlite3 from typing import Literal, Optional, TypedDict from langgraph.checkpoint.memory import MemorySaver @@ -235,8 +234,6 @@ await graph.invoke(new Command({ resume: false }), config); builder.add_node("proceed", proceed_node) builder.add_node("cancel", cancel_node) builder.add_edge(START, "approval") - builder.add_edge("approval", "proceed") - builder.add_edge("approval", "cancel") builder.add_edge("proceed", END) builder.add_edge("cancel", END)