Recursive Language Models (Zhang et al., 2025)

URL: https://arxiv.org/abs/2512.24601

The paper proposes Recursive Language Models (RLMs): the LM is given a Python REPL programming environment in which the input prompt is bound to a string variable, and the LM writes Python code that programmatically transforms the prompt and calls llm_query() to invoke sub-LMs on derived snippets. Intermediate results accumulate in named REPL variables; only constant-size metadata about each step's stdout feeds back into the root LM's history. The architectural claim, quoted: "Given a prompt P, the RLM initializes a Read-Eval-Print Loop (REPL) programming environment in which P is set as the value of a variable... code running inside the environment must be able to invoke the model on programmatically constructed transformations of P, storing intermediate results symbolically." The empirical claim is processing inputs "two orders of magnitude beyond model context windows" with comparable cost to vanilla LLMs.

Adopted

The architectural shape RLM proves at single-recursion scale -- code-execution environment with state in named variables, LM-as-tool inside the environment, token-space discipline (data lives in variable space; only metadata feeds back to the LM) -- is a microcosm of the harness-as-tool inversion this graph names in [[Agent Harnesses Drive the Runtime, Not the Reverse]]. The paper's named limitations (sub-calls are blocking; recursion depth bounded; REPL state evaporates on process death) are exactly what the eight runtime primitives the eOS Continuum substrate provides as primitives address: asynchronous events for blocking sub-calls, orthogonal persistence for recursion that survives restarts, capability separation for code that does not escape the bounded namespace.

Not adopted (yet)

The paper does not endorse orthogonal persistence as foundational, single-coherence-domain by design, or capability-OS-tradition lineage. RLM works on Python -- the wrong substrate for what the paper's own limitations section asks. eOS Continuum's substrate-LAYER answer extends the architectural shape RLM proves at user-space scale; the deeper architectural commitments are this project's, not endorsed by the cited authors.

Sources

Relations