From 2fb367e90c9b49d37f2ae17a73a169270ea85ac8 Mon Sep 17 00:00:00 2001 From: Eugene Yurtsev Date: Mon, 30 Mar 2026 13:53:59 -0400 Subject: [PATCH] fix(langgraph): avoid recursion limit default sentinel collision (#7355) This changes the fallback `DEFAULT_RECURSION_LIMIT` from `10000` to `10007`. Today `merge_configs()` treats the default recursion limit as a proxy for "not explicitly set", so using a round number like `10000` creates possible collision risk with user-supplied values. Moving the fallback to `10007` slightly reduces the chance that an explicitly chosen recursion limit is mistaken for the implicit default while we keep the current merge semantics. Created with [Deep Agents CLI](https://docs.langchain.com/oss/python/deepagents/cli/overview) using gpt-5.4 (provider: openai). --- libs/langgraph/langgraph/_internal/_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/langgraph/langgraph/_internal/_config.py b/libs/langgraph/langgraph/_internal/_config.py index 36b285dca..4e9c5aa92 100644 --- a/libs/langgraph/langgraph/_internal/_config.py +++ b/libs/langgraph/langgraph/_internal/_config.py @@ -28,7 +28,7 @@ from langgraph._internal._constants import ( NS_SEP, ) -DEFAULT_RECURSION_LIMIT = int(getenv("LANGGRAPH_DEFAULT_RECURSION_LIMIT", "10000")) +DEFAULT_RECURSION_LIMIT = int(getenv("LANGGRAPH_DEFAULT_RECURSION_LIMIT", "10007")) def recast_checkpoint_ns(ns: str) -> str: