diff --git a/libs/checkpoint/langgraph/checkpoint/base/__init__.py b/libs/checkpoint/langgraph/checkpoint/base/__init__.py index 7a482a3f9..158962c9f 100644 --- a/libs/checkpoint/langgraph/checkpoint/base/__init__.py +++ b/libs/checkpoint/langgraph/checkpoint/base/__init__.py @@ -541,6 +541,9 @@ class BaseCheckpointSaver(Generic[V]): tup = self.get_tuple(cursor_config) if tup is None: break + # Pre-delta seed terminator: if the ancestor has a stored + # (non-sentinel) value for this channel, that snapshot + # subsumes any earlier writes on the chain. Stop here. ancestor_value = tup.checkpoint["channel_values"].get(channel) if ancestor_value is not None and ancestor_value is not DELTA_SENTINEL: if isinstance(ancestor_value, _DeltaSnapshot): @@ -586,6 +589,7 @@ class BaseCheckpointSaver(Generic[V]): tup = await self.aget_tuple(cursor_config) if tup is None: break + # See sync variant for rationale. ancestor_value = tup.checkpoint["channel_values"].get(channel) if ancestor_value is not None and ancestor_value is not DELTA_SENTINEL: if isinstance(ancestor_value, _DeltaSnapshot):