Recursive Language Models: the paradigm of 2026
Prime Intellect implements the Recursive Language Model scaffold (Zhang et al., Recursive Language Models) in their verifiers RL training library as RLMEnv and runs initial ablations on four environments (DeepDive, math-python, Oolong, verbatim-copy) against GPT-5-mini and several open models including their own INTELLECT-3. Their version adds (1) a parallel llm_batch for sub-LM calls, (2) tools that only sub-LMs can use (so verbose tool output never touches the main RLM’s context), and (3) an answer = {"content": ..., "ready": ...} variable through which the model must commit its final answer, enabling iterative answer editing. The headline claim is that the RLM scaffold is now training-ready and that RL’ing models end-to-end as RLMs is their next research bet for long-horizon agents.
Key claims
Section titled “Key claims”- Prime Intellect’s RLM tools are sub-LM-only, so the main RLM never sees raw tool output and stays in a small main-model context even when sub-LMs burn millions of tokens through search/open [§The RLM].
- Final answers must be written into a special
answervariable with areadyflag — this lets the model iteratively edit a long answer over many REPL turns (a “diffusion-over-reasoning-chain” pattern) before committing [§The RLM]. - REPL output to the main model is capped at 8192 characters per turn (user-tunable), forcing the model to use Python + sub-LMs rather than just
printeverything [§The RLM]. - On DeepDive without environment-specific tips, the RLM is worse than the standard LLM; with tips (“decompose, dispatch via
llm_batch, synthesize”) it wins — i.e. an untrained RLM under-uses its own scaffold, and most of the benchmark lift comes from teaching it how to scaffold itself [§Results across environments]. - On math-python the RLM hurts GPT-5-mini relative to the same model with a plain Python tool, even though the RLM strictly subsumes that capability — attributed to overfitting of base models to the standard Python-tool harness, and expected to be fixed by training the model as an RLM [§Results across environments].
- On Oolong (long-context aggregation) the RLM improves reward and dramatically reduces main-model token count, with sub-LMs absorbing the per-chunk classification work [§Token Usage, §Main Model Token Efficiency].
- On verbatim-copy the RLM improves reward because it can write a draft into
answer["content"], print it back, diff against the source, and patch withstr.replace— a capability the base LM doesn’t have [§Verbatim copy]. - RLM rollouts take significantly longer wall-clock than base LM in all settings tested, attributed to GPT-5-mini not always parallelizing sub-LM calls and to the cost of producing code rather than direct answers — both seen as training-fixable [§Timing by Environment].
- The whole exercise is framed around a stated bet that teaching models to manage their own context end-to-end through RL will be the next major breakthrough, and is positioned as a major focus area for Prime Intellect’s research, scaffolded on INTELLECT-3 (106B MoE on GLM 4.5 Air Base, 512-GPU H200 cluster, two months) [§intro, §Models].
Method
Section titled “Method”Three artifacts are described:
-
RLMEnv — the scaffold inside
verifiers(Prime Intellect’s RL training library): a persistent Python REPL withanswer = {"content": "", "ready": False}pre-initialized in a sandbox (Prime Sandboxes / Modal / e2b / etc.). The main LM sees REPL stdout truncated to 8192 chars/turn. A pip-installable subset of packages is available (numpy/scipy/sympy in math-python, etc.). Tools registered on the environment are exposed only through sub-LM calls invoked viallm_batch(prompts), which dispatches sub-LMs in parallel. -
Environment suite on the Environments Hub — for each of {DeepDive, math-python, Oolong, verbatim-copy}, three variants are published: standard LLM scaffold, RLM scaffold (no tips), RLM scaffold + an environment-specific tips block (e.g. for DeepDive: “decompose, batch-dispatch sub-LMs over sub-questions, synthesize”).
-
Ablation runs — 50 rollouts/env, default settings only (no hyperparameter tuning), main model GPT-5-mini; open models (GLM 4.6, GLM 4.5 Air, INTELLECT-3) compared via OpenRouter. The point is relative LLM-vs-RLM comparison on each env, not absolute SOTA.
Results
Section titled “Results”- DeepDive (deep-research with
search/opentools): RLM without tips < LLM. RLM + tips > LLM. Sub-LM tokens dominate; main RLM context is sharply compressed. - Oolong (long-context aggregation, real D&D split): RLM > LLM. Main-model context length drops; sub-LMs absorb the classification per chunk. Long Oolong prompts that exceed GPT-5-mini’s window are flat-out rejected by the API for the base LLM but handled fine by the RLM (these get scored as zero-token zero-reward for the LLM, which slightly biases the Token Efficiency plot in the LLM’s favor).
- math-python: RLM < LLM at the same model. Author interpretation: base models are over-fit to the canonical Python-tool prompting and need training to use the richer RLM harness.
- verbatim-copy: RLM > LLM via draft-edit-print loops on
answer["content"]. - Token efficiency: huge gains for DeepDive (sub-LMs absorb tokens out of the main-model count); mixed for Oolong (API rejections of long prompts distort the comparison); negative for math-python and verbatim-copy.
- Wall-clock: RLM is always slower than LLM in the current implementation; attributed to under-parallelized sub-LM calls and decode-heavy code generation vs. prefill-heavy direct answers.
Why it’s interesting
Section titled “Why it’s interesting”Two things from a Luma perspective. First, this is the first public RLM implementation aimed explicitly at RL training rather than inference — the answer-variable / ready-flag setup and the sub-LM-only tools are concrete affordances for end-to-end policy learning over the scaffold, not just better inference scaffolding. Second, the negative result on math-python is the more informative half of the paper: a base LM dropped into a strictly-more-capable harness gets worse, suggesting the scaffolding-vs-base-LM gap is a learnable harness-use skill that gets erased by single-tool overfitting in standard agentic post-training. If that’s right, the team’s next agent post-training run almost certainly needs to include RLM-style trajectories in the mix.
See also
Section titled “See also”- Recursive Language Models — the Zhang/Kraska/Khattab paper this scaffold implements; covers the BrowseComp+ / OOLONG / OOLONG-Pairs / CodeQA evaluation and the out-of-core framing.
- Original RLM blog: https://alexzhang13.github.io/blog/2025/rlm/
- Reference impl: https://github.com/alexzhang13/rlm
- Prime Intellect’s
verifiers(RLMEnv lives here): https://github.com/PrimeIntellect-ai/verifiers prime-rlfor RL training on top: https://github.com/PrimeIntellect-ai/prime-rl- Related context-folding methods cited in the post: Context-Folding (arXiv:2510.11967), AgentFold (arXiv:2510.24699), Agentic Context Engineering (arXiv:2510.04618).