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).
This commit is contained in:
Eugene Yurtsev
2026-03-30 13:53:59 -04:00
committed by GitHub
parent 0475497127
commit 2fb367e90c
@@ -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: