Recursive Language Models (RLMs) enable large language models (LLMs) to process extremely long inputs by treating the prompt as an external environment and allowing the model to write code that decomposes the input and recursively queries itself. While the RLM framework introduced by Zhang et al. showed strong performance on long-context tasks, existing reference implementations have practical limitations in termination, reproducibility, and deployment. This paper introduces RLM-Extended, a systems-oriented extension of Recursive Language Models that enforces deterministic termination via an explicit answer variable, immutable context semantics to prevent unintended prompt mutation, and local LLM backend support through an Ollama-based interface. These modifications preserve the theoretical power of RLMs while significantly improving reliability, reproducibility, and accessibility. The implementation is open-source and designed to serve as a robust research platform for recursive inference and long-context reasoning.
Devashish Komiya (Tue,) studied this question.