Skip to content

Configurable recursion limit in dcode - #5054

Merged
Mason Daugherty (mdrxy) merged 5 commits into
mainfrom
docs/dcode-configurable-recursion-limit
Jul 23, 2026
Merged

Configurable recursion limit in dcode#5054
Mason Daugherty (mdrxy) merged 5 commits into
mainfrom
docs/dcode-configurable-recursion-limit

Conversation

@langsmith-fleet

Copy link
Copy Markdown
Contributor

Fixes DOC-1422

Summary

  • Adds a new [runtime].recursion_limit section to config-file.mdx documenting the config.toml key, env var (DEEPAGENTS_CODE_RECURSION_LIMIT), and --recursion-limit CLI flag for configuring the agent's LangGraph recursion limit.
  • Adds --recursion-limit to the command-line options table in cli-reference.mdx.
  • Adds DEEPAGENTS_CODE_RECURSION_LIMIT to the environment variable reference in configuration.mdx.

Default is 2000 (raised from 1000). Valid range: 25–100,000. Precedence: CLI > env > config.toml > default. Introduced in langchain-ai/deepagents#4994.

Links

Verification

Not run; docs-only copy change.

Reviewers

Requested review from: Naomi Pentrel (@npentrel), Lauren Hirata Singh (@lnhsingh)

Add docs for the new --recursion-limit CLI flag,
DEEPAGENTS_CODE_RECURSION_LIMIT env var, and [runtime].recursion_limit
config.toml key introduced in langchain-ai/deepagents#4994.

Default is 2000 (raised from 1000). Valid range: 25-100000.
Precedence: CLI > env > config.toml > default.
@github-actions github-actions Bot added deepagents For docs changes to Deep Agents oss external User is not a member of langchain-ai labels Jul 23, 2026
@mdrxy
Mason Daugherty (mdrxy) marked this pull request as ready for review July 23, 2026 15:49
Mason pointed out 'single session' was wrong. recursion_limit is the
LangGraph graph step budget (max node invocations per graph invocation,
i.e. per turn), not a session-wide cap. Updated all three files.

@npentrel Naomi Pentrel (npentrel) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM % nits

Comment thread src/oss/deepagents/code/config-file.mdx Outdated
Comment thread src/oss/deepagents/code/configuration.mdx Outdated
Mason Daugherty (mdrxy) and others added 2 commits July 23, 2026 17:08
Co-authored-by: Naomi Pentrel <5212232+npentrel@users.noreply.github.com>
Co-authored-by: Naomi Pentrel <5212232+npentrel@users.noreply.github.com>
@mdrxy Mason Daugherty (mdrxy) changed the title Document configurable recursion limit for dcode (--recursion-limit, env var, config.toml) Configurable recursion limit in dcode Jul 23, 2026
@mdrxy
Mason Daugherty (mdrxy) merged commit c4ded0b into main Jul 23, 2026
22 checks passed
@mdrxy
Mason Daugherty (mdrxy) deleted the docs/dcode-configurable-recursion-limit branch July 23, 2026 21:09
@github-actions

Copy link
Copy Markdown
Contributor

Mintlify preview branch generated: preview-docsdc-1784841011-9449b82

Site preview: https://langchain-5e9cc07a-preview-docsdc-1784841011-9449b82.mintlify.site

Important

Preview links may take a few minutes to start working while the deployment finishes.

Changed documentation pages (preview deep links):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deepagents For docs changes to Deep Agents external User is not a member of langchain-ai oss

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants