Configurable recursion limit in dcode - #5054
Merged
Mason Daugherty (mdrxy) merged 5 commits intoJul 23, 2026
Merged
Conversation
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.
langsmith-fleet
Bot
requested review from
Lauren Hirata Singh (lnhsingh) and
Naomi Pentrel (npentrel)
July 23, 2026 15:44
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.
Naomi Pentrel (npentrel)
approved these changes
Jul 23, 2026
Naomi Pentrel (npentrel)
left a comment
Contributor
There was a problem hiding this comment.
LGTM % nits
Co-authored-by: Naomi Pentrel <5212232+npentrel@users.noreply.github.com>
Co-authored-by: Naomi Pentrel <5212232+npentrel@users.noreply.github.com>
Mason Daugherty (mdrxy)
deleted the
docs/dcode-configurable-recursion-limit
branch
July 23, 2026 21:09
Contributor
|
Mintlify preview branch generated: 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): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes DOC-1422
Summary
[runtime].recursion_limitsection toconfig-file.mdxdocumenting theconfig.tomlkey, env var (DEEPAGENTS_CODE_RECURSION_LIMIT), and--recursion-limitCLI flag for configuring the agent's LangGraph recursion limit.--recursion-limitto the command-line options table incli-reference.mdx.DEEPAGENTS_CODE_RECURSION_LIMITto the environment variable reference inconfiguration.mdx.Default is
2000(raised from1000). 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)