diff --git a/libs/langgraph/langgraph/types.py b/libs/langgraph/langgraph/types.py index 7dc3aeec2..53dc6bd57 100644 --- a/libs/langgraph/langgraph/types.py +++ b/libs/langgraph/langgraph/types.py @@ -271,7 +271,7 @@ class Command(Generic[N], ToolOutputMixin): """ graph: Optional[str] = None - update: Any = () + update: Optional[Any] = None resume: Optional[Union[Any, dict[str, Any]]] = None goto: Union[Send, Sequence[Union[Send, str]], str] = () @@ -292,8 +292,10 @@ def _update_as_tuples(self) -> Sequence[tuple[str, Any]]: for t in self.update ): return self.update - else: + elif self.update is not None: return [("__root__", self.update)] + else: + return [] PARENT: ClassVar[Literal["__parent__"]] = "__parent__"