langchain-ai/langgraph · error · GraphRecursionError
GRAPH_RECURSION_LIMIT
GRAPH_RECURSION_LIMIT
Error message
Recursion limit of {config['recursion_limit']} reached without hitting a stop condition. You can increase the limit by setting the `recursion_limit` config key. What it means
Error "Recursion limit of {config['recursion_limit']} reached without hitting a stop condition. You can increase the limit by setting the `recursion_limit` config key." thrown in langchain-ai/langgraph.
Source
Thrown at libs/langgraph/langgraph/pregel/main.py:3011
print_mode,
subgraphs,
stream.get,
queue.Empty,
version,
_output_mapper,
_state_mapper,
)
# handle exit
if loop.status == "out_of_steps":
msg = create_error_message(
message=(
f"Recursion limit of {config['recursion_limit']} reached "
"without hitting a stop condition. You can increase the "
"limit by setting the `recursion_limit` config key."
),
error_code=ErrorCode.GRAPH_RECURSION_LIMIT,
)
raise GraphRecursionError(msg)
elif loop.status == "draining":
if loop.control is None:
raise RuntimeError("Draining status requires run control")
raise GraphDrained(loop.control.drain_reason or "shutdown")
# set final channel values as run output
run_manager.on_chain_end(loop.output)
except BaseException as e:
if run_manager is not None:
run_manager.on_chain_error(e)
raise
@overload
def astream(
self,
input: InputT | Command | None,
config: RunnableConfig | None = None,
*,
context: ContextT | None = None,View on GitHub (pinned to 38031739e5)
When it happens
Trigger: Thrown at libs/langgraph/langgraph/pregel/main.py:3011 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of langchain-ai/langgraph@38031739e5 (2026-08-26).
Data as JSON: /api/errors/2b43c47529c0dad3.
Report an issue: GitHub.