Agent FixboardAgentFixboard

Agent repeats the same tool call until it hits the recursion limit

The agent keeps calling tools until the log says Recursion limit of 20 reached without hitting a stop condition. The same line tells you to set the recursion_limit config key. The log prefixes the line with Exception:.

From GitHub

langchain-ai/langgraph

Difficulty
Easy
Time
~5 min
Steps
2
Fixed in
—
Last checked

No upstream fix: these steps work around it. Source: issue closed (not planned) without a merged fix. Last checked 2026-10-25.

Symptom

The agent keeps calling tools until the log says Recursion limit of 20 reached without hitting a stop condition. The same line tells you to set the recursion_limit config key. The log prefixes the line with Exception:.

Evidence what you'll see

  • The same log shows query_databricks failing with REQUIRES_SINGLE_PART_NAMESPACE and SQLSTATE: 42K05, then more calls, then the recursion line. The troubleshooting URL in the log is GRAPH_RECURSION_LIMIT.
  • The report already passed recursion_limit through with_config on create_agent. The run still stopped at 20. The report says a 0.6 line of langgraph did not loop with the same configuration.

Why it happens

A failing tool result is sent back to the model, which calls the tool again. Nothing in the run stops on a repeated tool failure, so the graph continues until recursion_limit. The maintainer closed the issue as not planned and treated that as something the caller limits, not a library defect.

Affected versions

langgraph 1.0.6, langgraph-prebuilt 1.0.6, langchain 1.2.6, langchain-core 1.2.7, Python 3.12.12, Darwin kernel 24.6.0.

Fix steps

0 of 2 done

Your check marks stay in this browser only.

How to check it worked

  • The run stops when the tool-call limit fires, and the log does not reach Recursion limit of 20 reached without hitting a stop condition.

If it still fails

  • The linked issue does not include a library patch. It was closed not_planned on 20 Feb 2026. Later comments advertise other projects and are not a fix for this graph.

Sources and credit

Summarized in our own words from these public reports. Credit goes to their authors.

Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change

Hit an error we don't cover? Submit it