From ea644f413d523354a50bced791243db12bebcd78 Mon Sep 17 00:00:00 2001 From: Sydney Runkle Date: Fri, 17 Apr 2026 14:30:04 -0400 Subject: [PATCH] feat(channels): add no-op after_checkpoint hook to BaseChannel --- libs/langgraph/langgraph/channels/base.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libs/langgraph/langgraph/channels/base.py b/libs/langgraph/langgraph/channels/base.py index 9207aa2bb..4ee061953 100644 --- a/libs/langgraph/langgraph/channels/base.py +++ b/libs/langgraph/langgraph/channels/base.py @@ -119,3 +119,12 @@ class BaseChannel(Generic[Value, Update, Checkpoint], ABC): Returns `True` if the channel was updated, `False` otherwise. """ return False + + def after_checkpoint(self, version: Any) -> None: + """Called after checkpoint() with the assigned version, and after + from_checkpoint() with the current channel version. + + No-op by default. Override in channels that track their own version + for incremental checkpointing (e.g. DiffChannel). + """ + pass