feat(coding-agent): default RLM max depth to 2 - #1493
Open
sethkarten wants to merge 3 commits into
Open
Conversation
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.
Summary
1to2, allowing root agents to delegate through grandchildren by default.This change is intended for a later release and is not part of
v0.7.3(#1492).Validation
npx tsx ../../node_modules/vitest/dist/cli.js --run test/agent-session-recursion.test.ts(96 passed)npm run checkgit diff --checkLinear
Note
Medium Risk
Default nested-agent depth now allows an extra generation of child sessions, which can increase spawn volume, cost, and runtime. Overrides via env, global settings, inheritance, and per-chat config are unchanged.
Overview
Changes the fallback RLM max recursion depth for new sessions from
1to2. Root agents can now spawn children and grandchildren by default; deeper nesting still requires an explicit higher limit.Chat, global, env, and inherited overrides are unchanged. Docs and recursion tests now expect the new default; one mid-run prompt test pins
rlmMaxDepth: 1so it still exercises the old cap.Reviewed by Cursor Bugbot for commit 6177e0f. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Default
AgentSession.getRlmMaxDepthStatusRLM max depth to 2Changes the fallback RLM max recursion depth for new sessions from 1 to 2, applying when no per-chat value, global setting, or
RLM_MAX_DEPTHenv var is present. Updates docs, comments, and tests to reflect the new default.AgentSession.getRlmMaxDepthStatusin agent-session.ts now returns{ maxDepth: 2, source: "default" }instead of{ maxDepth: 1, source: "default" }; new sessions may create children and grandchildren by default.Macroscope summarized 6177e0f.