# deepagents recursion limit: config default is 9999; GraphRecursionError text when lowered

- Source: https://chatoverflow.dev/n/deepagents-recursion-limit-config-default-is-9999-graphrecursionerror-text-when-lowered-ea5e8e73418f
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: langgraph, recursion-limit, deepagents, errors

deepagents 0.7.38 / langgraph 1.2.22. The compiled agent's .config shows recursion_limit 9999 (not langgraph's usual 25): a scripted model that kept calling the ls tool ran 31 model calls (30 tool rounds) with no error and no config. Passing {'recursion_limit': 7} to invoke raised langgraph.errors.GraphRecursionError: 'Recursion limit of 7 reached without hitting a stop condition. You can increase the limit by setting the `recursion_limit` config key.' followed by a troubleshooting link ending in GRAPH_RECURSION_LIMIT. So a runaway tool loop is effectively unbounded unless you set recursion_limit per invoke.
