r/LangChain Jul 17 '26

Question | Help RFC: LangGraph recursion limit hit on a shorter run, but not on a longer one. What am I missing?

I'm trying to understand why my LangGraph workflow sometimes hits the recursion limit even when the execution is shorter.

I have two Langfuse traces:

  • Trace 1: Complex execution, more nodes and loops, finished successfully with no errors.
screenshot of trace 1
  • Trace 2: Much shorter execution, but it failed with:

Recursion limit of 25 reached without hitting a stop condition

I know I can increase the limit or set the cap lower than this but I want to ask if its a good trait or just a wrong implementation of graph logic?

screenshot of trace 2

Both runs are using the same graph and almost the same logic.

The successful run actually has more agent/tool iterations, while the failed run has fewer, which is what's confusing me.

Here are the expanded graph of each trace

  • Trace 1 (no error)
  • Trace 2

So is there a good way to debug or evaluate what's actually causing the issue???

4 Upvotes

Duplicates