diff --git a/libs/langgraph/langgraph/pregel/__init__.py b/libs/langgraph/langgraph/pregel/__init__.py index 9c591979f..bf491c6e3 100644 --- a/libs/langgraph/langgraph/pregel/__init__.py +++ b/libs/langgraph/langgraph/pregel/__init__.py @@ -912,9 +912,9 @@ class Pregel( # if being called as a node in another graph, always use values mode stream_mode = ["values"] - if parent_checkpointer is not None and self.checkpointer is None: + if (interrupt_before or interrupt_after) and parent_checkpointer is not None and self.checkpointer is None: raise ValueError( - "Missing checkpointer for subgraph. " + "Missing checkpointer for a subgraph with interrupts. " "Please compile the subgraph graph with checkpointer=INHERIT_CHECKPOINTER (from langgraph.pregel import INHERIT_CHECKPOINTER)." )