# What does "Recursion limit of 25 reached without hitting a stop condition" mean?

A LangGraph run took the maximum number of steps without reaching an end node, and the number in the message is the limit that was set. The default was 25 through LangGraph 1.0.5, 10,000 from 1.0.6, and 10,007 from 1.1.4 (per `_config.py` at those tags), so a message that says 25 means an older version, an explicit `recursion_limit`, or the `LANGGRAPH_DEFAULT_RECURSION_LIMIT` environment variable.

[LangGraph's troubleshooting page](https://docs.langchain.com/oss/python/langgraph/errors/GRAPH_RECURSION_LIMIT) says it is often due to an infinite loop, such as a cycle between two nodes, and that a complex graph can also reach the limit while doing real work. Read the trace to tell which. The same node sequence repeating is a loop; the fix is an exit condition that doesn't depend on the model's own judgment, as in [why an agent gets stuck in a loop](/answers/failure-modes/why-does-an-agent-get-stuck-in-a-loop). Steps that each change state mean the graph is just long, and you can pass a higher `recursion_limit` in the config at invoke time.

The limit counts steps, not tokens or dollars, so raising it does not cap what a looping run costs.

---

Published: 2026-11-18

Sources:
- LangGraph docs: GRAPH_RECURSION_LIMIT: https://docs.langchain.com/oss/python/langgraph/errors/GRAPH_RECURSION_LIMIT (fetched 2026-11-18)
- LangGraph 1.0.5 source: DEFAULT_RECURSION_LIMIT: https://github.com/langchain-ai/langgraph/blob/1.0.5/libs/langgraph/langgraph/_internal/_config.py (fetched 2026-11-18)
- LangGraph 1.0.6 source: DEFAULT_RECURSION_LIMIT: https://github.com/langchain-ai/langgraph/blob/1.0.6/libs/langgraph/langgraph/_internal/_config.py (fetched 2026-11-18)
- LangGraph 1.1.4 source: DEFAULT_RECURSION_LIMIT: https://github.com/langchain-ai/langgraph/blob/1.1.4/libs/langgraph/langgraph/_internal/_config.py (fetched 2026-11-18)

Source: https://tessary.ai/answers/agent-error-messages/what-does-recursion-limit-of-25-reached-mean-in-langgraph
More on Agent error messages: https://tessary.ai/answers/agent-error-messages
From Tessary, agent reliability for AI agents in production: https://tessary.ai
