Docs: document rlmMaxDepth configurability (settings key + /rlm-max-depth) #1673
abhishakenp
started this conversation in
Feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
RLM recursion depth is fully configurable in the code, but this is undocumented:
rlmMaxDepthsettings key exists atpackages/coding-agent/src/core/settings-manager.ts:136/rlm-max-depth [<int> [--global]]slash command exists atpackages/coding-agent/src/core/slash-commands.ts:175RLM_MAX_DEPTHenv fallback exists in_resolveRlmMaxDepthatpackages/coding-agent/src/core/agent-session.tsHowever, neither
docs/settings.mdnordocs/rlm.mdmentions any of these.docs/rlm.mdonly says "Raising the configured depth allows descendants to recurse further" without naming the knob, anddocs/settings.mdhas no Recursion section. Users cannot discover how to raise the default depth of1.Verified behavior
We verified live in a multi-agent fleet:
rlmMaxDepth: 10in user-level settings.json unlocked 10 levels ofrlm(...)recursion/rlm-max-depthreported the effective depth and source (RLM max depth: 10 (global))RLM recursion depth limit reached (RLM_DEPTH=n, RLM_MAX_DEPTH=10)_resolveRlmMaxDepth(): persisted per-chat state → inherited parent value → settings.json →RLM_MAX_DEPTHenv → default1agent-session-recursion.test.ts,daemon-mode.test.ts)Proposed change
Docs-only addition (+15/-1), verified against source:
packages/coding-agent/docs/settings.md— new "Recursion" section documentingrlmMaxDepth(type, default1,0disables recursion), a JSON example, and the full precedence chain.packages/coding-agent/docs/rlm.md— expand the one-line depth mention to namerlmMaxDepth,/rlm-max-depth, the precedence chain, and link to the Settings section.A complete patch is ready on a public fork branch:
https://github.com/abhishakenp/prime-agent/tree/docs/rlm-max-depth
Happy to open a PR against main if maintainers invite/vouch — just say the word.
All reactions