Menu

LangGraph.js Stops Your Agent at 25 Super-Steps. Set recursionLimit on Purpose
πŸ“°

LangGraph.js Stops Your Agent at 25 Super-Steps. Set recursionLimit on Purpose

DEV CommunityΒ·Gabriel AnhaiaΒ·1 day ago
#5vyuYJcs
#dev#agent#const#article#ama
Reading 0:00
15s threshold

Book: AI That Plans

The series: AI in TypeScript β€” 5 books, from your first LLM call to agents in production β€” all five here

My project: Hermes IDE | GitHub β€” an IDE for developers who ship with Claude Code and other AI coding tools

Me: xgabriel.com | GitHub

Your research agent has been searching for the same answer for a while. The model keeps asking for one more lookup, the tool keeps returning something almost useful, and then the whole run throws. No answer, no partial notes, just GraphRecursionError and a message telling you to raise a config key.

In LangGraph.js that limit counts super-steps. It has nothing to do with tokens or wall-clock time, and if you don't set it, the count is 25. In the current source of @langchain/langgraph 1.5.2 that number is a hardcoded constant: const DEFAULT_RECURSION_LIMIT = 25; .…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.