# "Recursive Language Models — Alex Zhang, MIT PhD"
<!--
ref: @content/youtube/latent-space/recursive-language-models-alex-zhang-mit-phd
tags: [recursive language models, RLM, agent harnesses, GPU Mode, KernelBench, agent swarms, Prime Agent, open-endedness, research taste, graduate research]
version: 2
updated_at: 2026-11-22T12:56:58.769Z
-->

**[Watch on YouTube](https://www.youtube.com/watch?v=kog7mwsDqnk)**

# Recursive Language Models — Alex Zhang, MIT PhD

*Synthesized from Alex Zhang in conversation with the hosts on Latent Space, 2026-10-02.*

Alex Zhang (named "Alex Jung" in the garbled captions, Zhang in the title) is an MIT PhD student known for the recursive language model (RLM) idea and for involvement with GPU Mode; the hosts are not named. The transcript is a rough machine translation with many garbled product and model names, and it ends near the 100-minute mark.

## Core Thesis
Alex argues that today's coding harnesses (Claude Code, Codex, Pi and similar) are essentially the same design, and that real gains will come from different harness and system designs. His RLM is a deliberately simple example: an environment where the model's only tool is code, the context lives in the software environment (for example the file system), and the model can call itself as a sub-agent. He treats a harness as an inductive bias that can improve generalization and data efficiency, not just as packaging.

## Key Insights
- **Skills issue.** He opens by saying the models are capable of more if you make the effort, and wants someone, ideally in academia, to test how far a leading model can get on month-long sustained work. He cites a figure for a large swarm run: 10,000 agents for 88 hours, about 130 billion tokens, roughly $40 million at public prices.
- **GPU Mode and KernelBench.** GPU Mode started as a Discord community (originally CUDA Mode) for GPU kernel writing. He became involved in 2023 while interning, and the Popcorn leaderboard came from the idea that GPU programming resembles competitive programming and could supply data to automate kernel writing. KernelBench grew from that. Recent leaderboard entries are mostly AI-generated, but a long-time human participant steering the AI produced the only top-10 kernel that held up in complex real systems, so expertise still acts as the verifier.
- **Fused kernels.** He is doubtful that models need to write "mega-kernels"; compilers may handle fusion better.
- **Research taste for grad students.** Work on what industry labs are not attending to, make large bets (most will fail), and take advantage of not being subject to bureaucracy. Benchmarks such as SWE-bench only look worthwhile once a system like Devin makes the goal real; simple ideas like Quiet-STaR, ReAct and RLM tell a story about what a system should be. He suggests people consider the "design space" beyond text-to-text decoders.
- **RLM definition.** An environment where code is the only tool, software calls sub-agents (including itself), and the main context is stored in memory or on disk rather than in the prompt. It aims to give compositionality and a central context to draw from, unlike tool-call loops. His point is that each sub-call stays "locally in-distribution" even when the overall task is not.
- **Generalization claim.** When he trains an RLM on short tasks, the learned strategy transfers to tasks about eight to nine times longer, and across superficially different tasks (search versus aggregation, math versus writing) because the top-level strategy is the same while sub-agents see different sub-problems. He argues this implies harness design affects data efficiency and generalization, and wonders whether the RLM behavior could be learned implicitly in a forward pass.
- **Trajectory as prompt.** He calls the standard environment style "trajectory as a prompt", keeping the whole execution history in context, and thinks teams should run scaling experiments on new environment designs. In his internal results one model family was best at RLM because it had dynamic worker processes.
- **Prime Agent.** A harness built on Pi (the minimalist Pi Mono) where IPython is the only tool, with a "continual harness" that lets the agent modify chosen parts of its own harness (skills, sub-agents, system prompt), plus a code-based communication system between a root agent and persistent sub-agents. He joined the Prime team after their blog post about RLMs and a friend from GPU Mode connected them; he is not involved in their model training.
- **Third-party work.** Harvey retrained an RLM-style model on legal document review; a collaboration with Base10 built a continuously thinking system with token-cost controls; an Axe project combined DSPy with RLM; several ARC AGI 3 Kaggle entries referenced RLM-like abstractions.
- **Swarms.** Discussing OpenAI's reported 10,000-agents-for-88-hours run, he says the token count is surprisingly small, and that the key lesson from a report on runtime environment tax is that details of the harness matter less than how agents are combined. He guesses that around 95% of a swarm may be wasted work and notes a coordinator "gather all" bottleneck, comparing a Cursor architecture to a software team's org chart.
- **A fast text-model release.** He is excited by a recent release (name garbled, called "Jev"/"Jeb") that changes the output space and is about 100 times cheaper for some tasks, as evidence that new model designs, calibration and mixed fast/slow systems are possible. He is skeptical that Thinking Machines can beat frontier labs by copying their approach.
- **Open-endedness and labs.** He compares open-ended search to unsolved math problems and says the hard part is filtering a pile of outputs for real discoveries. He is positive on Sakana (a research lab with Japanese-language models) and says Google DeepMind seems bureaucratic.
- **Speculative tool calls.** He calls speculatively launching tools while the model is still writing code "almost obvious", via static analysis of the generated code.
- **His own workflow.** Idea triage: he keeps 10 to 15 ideas, most fail, and he drops everything to pursue one once it feels promising. Human attention, not agents, is his scarce resource.
- **Language and thought.** He and a host discuss whether English is a good medium for model reasoning, Sapir-Whorf and the comparison between autoregressive and diffusion-style generation.

## Actionable Takeaways
1. Consider designing a harness where code is the only tool and context lives in the file system; Prime Agent on Pi is one concrete example.
2. When training, test whether a strategy learned on short tasks transfers to much longer ones.
3. Keep humans as verifiers for kernels and similar tasks where AI-generated solutions look fast but fail in real systems.
4. Use an off-the-shelf small harness (Pi) as a baseline instead of building from scratch.
5. For research students: choose problems industry labs ignore and place large bets.
6. Use persistent sub-agents you can re-prompt rather than ephemeral ones for long-running work.

## Notable Quotes
> "you just have to do big bets, and many of them will fail" — Alex Zhang

> "the true value of RLM is whether can you do it right to train the system" — Alex Zhang

---

*Related: `@content/youtube/no-priors/from-note-taking-app-to-ai-workspace-the-simon-last-interview` · `@content/youtube/latent-space/claude-codes-bitter-lesson-prompts-harnesses-mods-and-agents-thariq-shihipar-anthropic` · `@content/youtube/david-ondrej/cloudroom-just-destroyed-all-ai-coding-apps-fully-open-source` · `@content/youtube/indy-dev-dan/are-agent-swarms-useful-openai-s-gpt-6-astra-swarm-takeaways` · `@content/youtube/langchain/fireside-chat-with-erik-bernhardsson-modal`*

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*