# Symptom

GRAPH_RECURSION_LIMIT: the StateGraph reached the maximum number of steps before hitting a stop condition.

## Confirm

Trace one run step by step (or log node entries). Ask: does this graph have a path to END in the number of steps you expect? Watch for a pair of nodes bouncing back and forth.

## Cause

Two distinct causes, different fixes:

1. Infinite loop: a conditional edge whose condition never selects the exit, or literal `add_edge("a", "b")` + `add_edge("b", "a")` with no conditional exit.
2. Legitimately deep graph: many sequential steps, large fan-outs, long agent loops that really do need hundreds of steps.

## Fix

- Loop: fix the condition so some path reaches END. This is the fix in most cases.
- Deep: raise it for that invocation:

```python
graph.invoke({...}, {"recursion_limit": 1000})
```

## Verify

Re-run and confirm it terminates. If you raised the limit, also confirm the step count is sane; a graph that needs 900 steps to do a 10-step job has a logic problem, not a limit problem.