recursion_limit
A configuration parameter of the LangGraph graph executor that limits the maximum number of steps allowed between the start node and the end node. When the limit is reached, a GraphRecursionError is raised to forcibly terminate the graph run. The default value is 25.
Timeline (last 90 days)
recursion_limit counts only steps and is unaware of the tokens or dollars actually consumed at each step, so it cannot replace真正的 budget control.
Relying only on a step limit cannot answer the key question of "how much did this agent spend per minute."
LangGraph sets a recursion_limit by default at the underlying level of create_agent(), with a default value typically of 25, and a GraphRecursionError is raised once this threshold is exceeded
LangGraph's recursion_limit mechanism cannot distinguish between meaningful reasoning and spinning in place by an Agent, cannot intervene to correct the situation before a crash, and does not save state after a crash.
LangGraph's built-in recursion_limit can prevent infinite loops, but cannot distinguish between meaningful reasoning and spinning in place, nor can it intervene or save state before a crash.
LangGraph's built-in recursion_limit can only prevent infinite loops; it cannot distinguish meaningful reasoning from dead loops, cannot intervene before a crash, does not save state after a crash, and cannot control costs.
All Facts (6)
LangGraph sets a recursion_limit by default at the underlying level of create_agent(), with a default value typically of 25, and a GraphRecursionError is raised once this threshold is exceeded
60%Unverifiedrecursion_limit counts only steps and is unaware of the tokens or dollars actually consumed at each step, so it cannot replace真正的 budget control.
50%UnverifiedRelying only on a step limit cannot answer the key question of "how much did this agent spend per minute."
50%UnverifiedLangGraph's recursion_limit mechanism cannot distinguish between meaningful reasoning and spinning in place by an Agent, cannot intervene to correct the situation before a crash, and does not save state after a crash.
50%UnverifiedLangGraph's built-in recursion_limit can prevent infinite loops, but cannot distinguish between meaningful reasoning and spinning in place, nor can it intervene or save state before a crash.
50%UnverifiedLangGraph's built-in recursion_limit can only prevent infinite loops; it cannot distinguish meaningful reasoning from dead loops, cannot intervene before a crash, does not save state after a crash, and cannot control costs.
50%