Verdict: A recursive language model never actually reads your giant prompt. It treats the prompt like a file on disk — stored as a variable in a Python environment — then writes code to search it, slice out the interesting pieces, and recursively call smaller copies of itself on just those pieces. The result: a model with an ordinary context window can reason over 10 million tokens, beating models with far bigger windows at similar or lower cost.
Imagine the difference between forcing someone to memorize a 10,000-page encyclopedia before answering your question, versus handing them the encyclopedia plus the power to hire research assistants. The second person never reads the whole thing. They check the index, send assistants to read specific chapters, and combine the reports. That's the whole trick: stop making the context window bigger, and start treating the prompt as an environment the model can explore instead of a message it must swallow whole.
The paper — Recursive Language Models, from MIT CSAIL, December 2025 — sets up a simple loop:
1. The prompt lives outside the model. Your 10M-token document is loaded as a string variable in a persistent Python REPL. The root model never sees it directly. All it gets is metadata: how long it is, a short preview, and instructions for poking at it.
2. The model explores with code. Instead of "reading," the model writes Python: regex searches, slicing out ranges, counting occurrences, printing snippets. It observes the outputs and decides where to look next — like a detective with a search warrant for a very large filing cabinet.
3. It recruits itself. When it finds a promising chunk, it spawns a recursive sub-call — another instance of the model — pointed at just that snippet, which does dense, careful reasoning over a small piece of text and returns a short answer. The root stitches the answers together.
4. It stops when done. The loop ends when the model sets a Final variable in the REPL. From the outside, the whole thing looks exactly like a normal LLM call: prompt in, answer out.
The results are the reason people are paying attention. RLMs handled inputs up to two orders of magnitude beyond their physical context window — 10M+ tokens — and dramatically outperformed both base models and standard long-context scaffolds (like RAG) across four different long-context tasks, at comparable or cheaper cost per query. On BrowseComp+, a hard research benchmark, an RLM built from GPT-4o (with GPT-4o-mini doing the sub-calls, no fine-tuning at all) scored 91.3% versus 51% for RAG with BM25 retrieval.
It also seems to be a trainable skill, not just a prompting trick. The authors took a model that struggled with long-context tasks and fine-tuned it on only 1,000 examples from unrelated domains to act as a better recursive orchestrator — median improvement of 28.3% across the four tasks. A thousand examples is nothing in model-training terms, which suggests "knowing how to delegate to yourself" is a compact, learnable behavior.
The industry has been in a context-window arms race: 128K, 1M, 10M tokens of raw attention, each step more expensive than the last because attention scales quadratically. And bigger windows have a dirty secret the paper names context rot: model quality degrades as the input grows, even when everything technically fits. Stuffing more in doesn't mean the model uses it well.
RLMs reframe the problem as inference-time scaling instead of a bigger window. The model's working memory stays small and sharp; the bulk data lives in a symbolic environment it can query precisely. It's the same move computers made decades ago with virtual memory: your program doesn't need 10GB of RAM if the OS can page the right chunks in and out.
Cost is spiky. Average cost per query is comparable to a base model call, but the variance is high — a confused root model can keep spawning sub-calls and iterating, and you pay for every one.
Latency follows the same curve. Sequential rounds of explore → delegate → stitch are inherently slower than one big forward pass, especially on tasks that need many hops.
The failure modes are weird. The paper reports emergent "sysadmin behaviors" — models poking at their REPL environment in unexpected ways — and genuinely bizarre breakdowns when the recursion goes wrong. An orchestrator that can write arbitrary code against its own prompt is powerful, which is exactly why its mistakes are stranger than a normal model's.
The deepest idea here isn't the REPL or the recursion — it's the shift from "the prompt is what the model reads" to "the prompt is what the model operates on." That turns long-context reasoning from a hardware problem (bigger windows, more memory) into an algorithms problem (better search, better delegation), and algorithms problems are where small teams beat big labs. Expect every serious agent framework to grow a recursive-exploration mode within a year. The context window isn't dead — it's just no longer the whole game.