Skip to content

[langgraph]: Recursion limit description is confusing #1563

@FrederikTijhuis

Description

@FrederikTijhuis

Type of issue

issue / bug

Language

Python

Description

In this paragraph:
https://docs.langchain.com/oss/python/langgraph/graph-api#accessing-and-handling-the-recursion-counter

The documentation currently states:
The recursion limit check follows the logic: step > stop where stop = step + recursion_limit + 1.

This is mathematically impossible, because if:
stop = step + recursion_limit + 1
then stop is always greater than step, so the condition step > stop can never be true.

This creates confusion about how LangGraph actually computes and enforces recursion limits.

Metadata

Metadata

Assignees

No one assigned

    Labels

    langgraphFor docs changes to LangGraph

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions