# Recursive Coding Agents

Raymond Weitekamp

AI Engineer World's Fair 2026

[Talk page](https://ai.engineer/talks/3hXJI2q0Jz8-recursive-coding-agents) · [Video](https://www.youtube.com/watch?v=3hXJI2q0Jz8)

## Recursive Coding Agents

Reliable coding agents need more than intelligence: they need ways to decompose work, preserve state, verify delegated results, and reuse successful workflows.

Familiarity with LLM context windows, tool calling, and coding-agent subagents will help; the article introduces the RLM execution model.

### An app one day, an empty wallet the next

[1:07](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=67s)

One day, a long prompt produces an almost working SaaS application. The next day, according to Raymond Weitekamp, Claude Code empties his Solana wallet. The contrast captures the problem with delegating consequential work: an impressive result does not establish that the next result will be safe or useful.

![Slide contrasting agents building a SaaS app with emptying a Solana wallet, above four seated-person illustrations; presenter inset at lower right.](https://ai.engineer/api/talk-essay-media/aeb292a1a5ae0ef3effd85708d11cfc268d2a108b068f6252664695cc2dd4884)

“We all want outcomes”: reliability and trust are the bottleneck.

The opening slide borrows a progression from the AI Engineer Code November 2025 T-shirt: eventually, the human is simply meditating while outcomes arrive. Getting there requires trust. Weitekamp’s thesis is that today’s agents are **mismanaged geniuses**: the missing layer is how we specify, manage, reuse, and verify their work.

He attributes that framing to Alex Zhang, Zed Li, and Omar Khattab at MIT. The related [Recursive Language Models paper](https://arxiv.org/abs/2512.24601) is by Alex L. Zhang, Tim Kraska, and Omar Khattab. Weitekamp develops the connection to coding agents in his [interactive presentation](https://recursivecodingagents.com/) and [Turing Post companion article](https://www.turingpost.com/p/openprose-a-language-for-reliable-agents).

### Make context an object of computation

[2:40](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=160s)

In a **recursive language model**, or RLM, the full prompt is not necessarily text placed inside a model’s context window. It can be a variable, a file, or a collection of files in an executable environment. The model interacts with that environment through a read-evaluate-print loop, or **REPL**; the original paper uses Python. Instead of reading everything at once, the model writes operations that inspect and manipulate the externalized input.

For example, a Python REPL can hold a corpus while exposing only a selected passage to the model. Here, `prompt` remains available for subsequent operations, while the printed result contains a location and a bounded excerpt:

```python
from pathlib import Path

prompt = Path("corpus.txt").read_text(encoding="utf-8")
needle = "authentication"
position = prompt.casefold().find(needle)

if position == -1:
    print({"found": False, "characters": len(prompt)})
else:
    start = max(0, position - 200)
    end = min(len(prompt), position + 800)
    print({"start": start, "end": end, "excerpt": prompt[start:end]})
```

This illustrates the symbolic-access step: the model can reason about offsets and selected content without copying the entire corpus into its context.

The recursive step delegates parts of that investigation to other models. A child can be an ordinary LLM, or another RLM when the allowed recursion depth extends beyond one level. Children examine their assigned material and return intermediate answers; those answers propagate upward through the call tree until the parent can produce a final answer. **The context is something the system computes over, not merely something the model reads.**

![Slide listing Externalize, Operate, and Recurse beside the Recursive Language Models paper, with a branching RLM and LLM call tree below.](https://ai.engineer/api/talk-essay-media/5a87f4094f3a9ad5a7ca8f08cb4e3fb3ea92777cf67c23a3019f2bb94d37342e)

Context as computation: externalize, operate, and recurse.

### Reasoning through execution

[4:20](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=260s)

Weitekamp sees this as a new form of inference-time compute. Chain-of-thought prompting first encouraged models to spell out intermediate reasoning; reasoning models then made extended reasoning an explicit part of inference. Function calling and parallel tool calling developed alongside that progression. RLMs combine the two: executing code becomes part of the reasoning process, and a model call can itself be an operation inside that code.

He introduces Oolong from the original paper as an example of working beyond a context window, then describes RLMs processing tens of millions of tokens. The paper’s abstract supports inputs up to two orders of magnitude beyond model context windows; the talk’s tens-of-millions figure should not be read as a specifically established Oolong input size. The architectural point is that external storage and selective computation remove the requirement that all input fit in one model call.

The same structure can serve as memory: keep information outside the immediate context and let the agent compute over it when needed. Weitekamp describes an unmodified RLM harness as roughly a top-ten memory system in his contemporary comparison. His February 11, 2026 [memory report](https://raw.works/recursive-language-models-as-memory-systems/) gives that claim a concrete setting: baseline `dspy.RLM` with **Gemini 3 Flash** scored 87.2% on LongMemEval, while the structured observational-memory variant reached 89.8%. These are results from his reported experiment, rather than a standing rank for every RLM harness.

### Long reasoning changes the benchmark question

[5:57](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=357s)

[LongCoT](https://longcot.ai/) stresses a different limit: sustaining a long sequence of reasoning steps. A model may understand the individual operations yet lose the thread before completing the problem. Weitekamp reports state-of-the-art results using DSPy’s RLM implementation, combining code execution with recursive subagent calls instead of relying on one uninterrupted analysis sequence.

In the recording, Weitekamp says **Qwen3.5-9B** in an RLM harness beats **Opus** and **GPT-5.4** as ordinary LLMs on these long-reasoning tasks. The available [April 19 companion report](https://raw.works/rlms-are-sota-on-longcot/) documents a different comparison: Qwen3.5-9B with DSPy.RLM scored 15.69%, versus **GPT-5.2** at 9.83%, on the same full-benchmark slice. That report does not establish the spoken Opus/GPT-5.4 comparison. Its inference was hosted through Together AI via OpenRouter; the observation that a nine-billion-parameter model could run on a laptop describes model size, not the hardware used for that experiment.

Harnesses also change what a benchmark score measures. Weitekamp points to Symbolica’s Agentica RLM harness and reports an ARC-AGI-3 score in the thirty-something-percent range within hours of release, against frontier-model scores around 2–3%. The exact evaluation split and action budget are not established here. He interprets ARC Prize’s response as a consolation acknowledgment accompanied by a refusal to conduct the full private evaluation; that account of the dispute is his interpretation.

For LongCoT, he credits his results and Alex Zhang’s with encouraging a separate open-harness leaderboard. The benchmark now distinguishes Raw LLM, Restricted Harness, and Open Harness tracks, while its primary setting excludes tools; the track structure does not itself establish who caused its creation. This separation makes the comparison legible: a model sustaining unaided reasoning and a program coordinating models and execution are different evaluated systems. Weitekamp’s practical preference is to optimize for outcomes, whether the computation happens internally, in reasoning tokens, or through code.

### Who chooses the decomposition?

[9:08](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=548s)

The [companion repository](https://github.com/rawwerks/recursive-coding-agents) includes a rubric for distinguishing RLMs from nearby architectures. It asks for five properties:

| Property | Architectural role |
|---|---|
| Executable environment | Run operations over the input |
| Externalized prompt | Keep the full input outside immediate context |
| Code-driven model calls | Invoke models from the computation |
| Model-selected decomposition | Let the model choose the subproblems |
| Symbolic state | Preserve variables and references between operations |

Together, these describe a system in which the model can decide how to investigate a problem and use execution to carry out that decision.

A plain LLM call or a retrieval-augmented generation pipeline does not, by itself, satisfy the rubric. Coding agents with subagents and loops get closer, but their existence alone does not establish model-directed decomposition. Hard-coded MapReduce is the useful counterexample: a programmer fixes the split, then model calls process the predetermined pieces.

Weitekamp places LambdaRLM in that category, describing it as lambda-calculus-based MapReduce containing LLM calls. His distinguishing question is not whether models appear somewhere in the computation. It is **whether the model decides how to break the problem apart**. That choice allows the decomposition to respond to what the agent discovers.

### From an RLM tool to a harness that calls itself

[10:32](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=632s)

Replacing “LLM” with “coding agent” in the call tree sounds almost trivial. An RLM already writes code, and it already recurses. The useful engineering question is what these principles enable inside a coding-agent harness. Weitekamp dates his experiments to the October 2025 RLM blog post.

His first experiment wrapped Alex Zhang’s RLM package in a CLI, making an RLM available as a coding-agent tool. If the agent needed to sift through a hundred-million-token corpus, it could delegate that investigation to the tool. That is an illustrative workload, but it exposes the boundary clearly: the coding agent remains the outer controller, and the RLM handles a particular operation. The stronger goal was to make the coding-agent harness invoke the exact same version of itself.

That led to [Y-Pi](https://github.com/rawwerks/ypi), named for the lambda-calculus Y combinator and the Pi coding agent. Pi has a deliberately minimal core; its creator, Mario, encourages extensions instead of adding every proposed feature to the main agent. Initially, Pi’s extension interface could not support Weitekamp’s recursive design, so he forked it. Revisiting the project for this talk, he found that the evolved extension system could support the implementation directly.

The resulting pieces are the Pi recursive extension package and Y-Pi as a convenience wrapper. Pi calls Pi, which can call Pi again, with configurable recursion depth. The progression matters: an RLM exposed as a tool delegates one kind of computation; a recursive coding harness delegates to another instance of the same agent environment. Alex Zhang’s original RLM implementation remains the starting reference for the broader ecosystem.

### The executable environment need not be Python

[13:54](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=834s)

The same architecture can take several forms:

- **DSPy:** `dspy.RLM` is Weitekamp’s preferred implementation for benchmarking and the harness behind the results he discusses.
- **Ax:** Originally a TypeScript variation on DSPy, Ax lets an agent write a TypeScript interface to another Ax agent, extending the pattern recursively.
- **Unix RLM:** Dan at OpenProse built an implementation using pure Bash, with the Linux filesystem as its environment.

The Unix example makes the generalization concrete: a REPL need not mean Python variables. Files and shell operations can provide the external state and executable access.

[OpenProse](https://github.com/openprose/prose) approaches the problem at the language level, expressing workflows that can give coding agents RLM behavior. Its repository also includes a coding-agent harness that, as described in the talk, executes Prose programs over either the Codex SDK or Claude Code. The language for declaring the work and the backend performing it are separate concerns.

### When Claude Code becomes an RLM

[15:28](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=928s)

The question “Isn’t this just Claude Code subagents?” appeared immediately around the original RLM announcement. Weitekamp describes the initial answer as no, then points to Omar Khattab’s later acknowledgment of Claude Code’s dynamic workflows. The relevant change is the ability to construct recursive workflows, not a change in the label attached to every Claude Code session.

Anthropic’s [A harness for every task](https://claude.com/blog/a-harness-for-every-task-dynamic-workflows-in-claude-code) describes six workflow patterns. Weitekamp contrasts two companion examples to isolate the architectural difference:

| Workflow | How work is divided | Classification in the talk |
|---|---|---|
| Fixed MapReduce | Script chooses the split | Not an RLM |
| Filesystem deep research | Model chooses what to investigate | RLM-style workflow |

In the research example, the controller selects a handle to some material, assigns an agent to analyze it, and receives findings back. The choice of what to investigate is part of the model’s work. Dynamic workflows make that behavior possible; a fixed script using the same capability can still fall outside the rubric.

![Slide titled “Dynamic workflows made Claude Code recursive,” with six workflow diagrams and two example cards contrasting model-chosen and script-fixed splits.](https://ai.engineer/api/talk-essay-media/f840f1a8ccc3194304ed493cf4eb3478a525ee18afd8f2a5e8ab748a42ba2fea)

Dynamic workflows distinguish model-chosen decomposition from a fixed script.

### Declare the work, verification, and dependencies

[17:16](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1036s)

Dynamic workflows provide a Claude Code-specific route. OpenProse offers another route for users of Claude Code, Codex, Pi, or other coding agents. It is a programming language expressed as a Markdown specification in logical English. In Weitekamp’s description, the coding agent compiles it: the agent interprets the declared work and carries it out.

The `prose write` command asks the coding agent to generate a `.prose.md` workflow. Weitekamp compares this with Claude Code’s `ultracode` trigger word, which prompts workflow construction; it is not a separately established slash command here. The prerequisites he gives for applying Prose’s RLM pattern are filesystem access and subagents.

The workflow makes delegated work explicit. In the two companion `.prose.md` examples, a parent can break a problem into smaller tasks, assign them to subagents, and verify the returned work in the parent session. Delegation therefore does not end at collecting answers: the contract includes checking them before accepting the result.

Skills and tools can also be declared as dependencies, two language features Weitekamp added. A worker may need a particular skill to perform its role, or a specific CLI without which the task cannot run. Wiring those requirements into the workflow is intended to configure the worker with the capabilities its contract assumes. This makes the assignment more precise than simply asking an unspecified subagent to solve a problem.

### Repository work and the golden session

[19:54](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1194s)

Across the Claude dynamic-workflow and OpenProse examples, the useful workloads extend beyond answering questions:

- **Repository migrations:** Split a large refactor across parallel workers, then merge the work into a combined result.
- **Recursive directory analysis:** Start from a directory and investigate, analyze, or process its contents recursively.
- **Audits and bug sweeps:** Delegate searches for defects across the system.
- **Adversarial review:** Use skeptical or red-team agents to challenge proposed work and improve it through independent scrutiny.

These tasks use decomposition for different purposes: distributing implementation, exploring a hierarchy, or obtaining a deliberately contrary assessment.

The final application returns to the opening reliability problem. Weitekamp adds that the cryptocurrency amount was fortunately small, but the contrast remains: one session produces an excellent outcome, while another goes badly wrong. A successful “golden session” contains a process worth recovering, rather than merely an answer worth saving.

His session-to-Prose system uses a Prose program to direct an agent through that recovery:

1. Take a successful session from Claude Code, Codex, Pi, or another supported agent.
2. Have the agent deconstruct how the session achieved its result.
3. Turn that process into a reusable Prose workflow, potentially including recursive delegation.

The intended result is a repeatable way to approach the same quality of outcome. Reusing the workflow does not make LLM execution deterministic, as the companion article explicitly cautions; it captures a useful process that can be run and evaluated again.

### Reliability is an orchestration problem

[21:50](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1310s)

Trust depends on reliable behavior. Weitekamp’s proposed next step is to improve orchestration: how an agent chooses work, executes it, delegates it, and incorporates the result. RLMs make tool calling part of reasoning itself, with another agent available as one of those tools. **Coding agents can be RLMs, but they are not automatically RLMs.** Claude Code dynamic workflows and OpenProse offer concrete ways to build the missing behavior.

![“Recursive Coding Agents FTW” panel beside three takeaways: trust is reliability, a new paradigm of inference-time compute, and coding agents can be RLMs.](https://ai.engineer/api/talk-essay-media/b4fe6c99983ef681e2886ebd0e44d3fd3cf057d493ac54b8e50f63a34d8b5b52)

Closing synthesis: trust is reliability, and coding agents can be RLMs.

The invitation is to explore those implementations through the interactive presentation, while treating their expanded capabilities as a responsibility. A harness that can recursively create more work needs deliberate management of that work. Weitekamp closes with the fitting instruction: “please recurse responsibly.”

## Resources

- [Recursive Coding Agents — interactive slides](https://recursivecodingagents.com/) — The presentation's interactive diagrams, architectural rubric and project links.
- [Recursive Coding Agents examples](https://github.com/rawwerks/recursive-coding-agents) — RLM classification criteria and contrasting Claude Code and OpenProse workflow examples.
- [Recursive Language Models](https://arxiv.org/abs/2512.24601) — The original paper on externalizing prompts into executable environments and recursively querying their contents.
- [Recursive Language Models as Memory Systems](https://raw.works/recursive-language-models-as-memory-systems/) — Weitekamp's LongMemEval experiments comparing baseline RLMs, delegation and structured observations.
- [RLMs are SOTA on LongCoT](https://raw.works/rlms-are-sota-on-longcot/) — April 2026 experiments using DSPy.RLM with small Qwen models on long reasoning problems.
- [LongCoT benchmark](https://longcot.ai/) — Benchmark task definitions, evaluation settings and separate model and harness tracks.
- [A harness for every task](https://claude.com/blog/a-harness-for-every-task-dynamic-workflows-in-claude-code) — Anthropic's introduction to dynamic workflows and six patterns for coordinating subagents.
- [Stop Babysitting Agents, Start Authoring Outcomes](https://www.turingpost.com/p/openprose-a-language-for-reliable-agents) — Weitekamp's guide to OpenProse contracts, explicit skills and converting successful sessions into reusable workflows.
- [Y-Pi](https://github.com/rawwerks/ypi) — Weitekamp's recursive coding agent project built around Pi.
- [OpenProse](https://github.com/openprose/prose) — The open-source language project for expressing agent workflows as contracts.

## Slides

### Recursive Coding Agents

Raymond Weitekamp introduces recursive coding agents: applying lessons from recursive language models to coding agents.

[0:00](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=0s) [Title slide introducing Raymond Weitekamp’s talk on recursive coding agents.](https://assets.ai.engineer/sites/aiecode2025/sha256/7977afebebc081bbba9ea47ee3a49c1555a3b05afc448ef93af1e41651ef30b2.webp)

Recursive Coding Agents

AI ENGINEER WORLD'S FAIR · 2026

Raymond Weitekamp

RAW.works | OpenProse
@raw_works

recursivecodingagents.com

### We all want outcomes

Weitekamp contrasts an almost working SaaS app from one prompt with Claude Code emptying his Solana wallet. A progression ends with a person meditating while outcomes materialize—a vision that requires reliability and trust.

[0:28](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=28s) [Slide contrasts reliable agent outcomes with the need for reliability and trust.](https://assets.ai.engineer/sites/aiecode2025/sha256/0481ba01a6d3dee17e098d83b9b09ea920ac4e7cfec10d6a33bb3f1ed5e33816.webp)

MOTIVATION

We all want outcomes.

Agents that work on our behalf — reliable co-workers — while we're out on a hike.

The bottleneck is not intelligence. It's reliability. It's trust.

One day — my agents build me a full SaaS app from a single prompt.
The next day — they empty the entire contents of my Solana wallet.

Interface text:
recursivecodingagents.com

### Today’s agents are mismanaged geniuses

Agents have the intelligence to do the work, but need better ways to specify, manage, reuse, and verify it. The slide pairs this thesis with articles by Raymond Weitekamp and by Alex Zhang, Zed Li, and Omar Khattab.

[1:55](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=115s) [Slide says agents need better specification, management, reuse, and verification, alongside two article references.](https://assets.ai.engineer/sites/aiecode2025/sha256/c0818be099e7a21c400b467d8e3954ac8b00d4e7e03f5000eb4efb260693d4ca.webp)

THESIS

Today’s agents are mismanaged geniuses

The intelligence is there.

The missing layer is how we specify, manage, reuse, and verify the work.

TURING POST · RAYMOND WEITEKAMP
Stop Babysitting Agents, Start Authoring Outcomes

ALEX ZHANG · ZED LI · OMAR KHATTAB
The Mismanaged Geniuses Hypothesis

Embedded article text: [illegible]

Interface text:
recursivecodingagents.com

### Context itself is the object of computation

An RLM stores the prompt in a REPL and writes code to inspect and transform it. The tree shows sub-RLMs delegating work to further models, whose results can be combined into an answer.

[2:41](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=161s) [Slide describes externalizing, operating on, and recursively querying context, with a paper image and a model tree.](https://assets.ai.engineer/sites/aiecode2025/sha256/b61bfdeb0b40eb1ae888bd747b50cfad91e45736af51b4753d0b701830785445.webp)

RECURSIVE LANGUAGE MODELS

Context itself is the object of computation

Externalize — the full prompt lives in a REPL, not the context window.
Operate — the model writes code to inspect, slice, and transform it.
Recurse — it sub-queries itself over the slices.

Root RLM (depth=0)
├── Sub-RLM A (depth=1)
│   ├── LLM A1 (depth=2)
│   └── LLM A2 (depth=2)
└── Sub-RLM B (depth=1)
    ├── LLM B1 (depth=2)
    └── LLM B2 (depth=2)

Paper image:
Recursive Language Models
Alex L. Zhang · Tim Kraska · Omar Khattab
Abstract
[illegible]
1 Introduction
[illegible]4601v3 [cs.AI] 11 May 2026
ARXIV:2512.24601

Interface text:
recursivecodingagents.com

### Code Execution as Reasoning

The speaker argues that RLMs use code execution as reasoning: they process inputs beyond the context window, act as memory, and can achieve state-of-the-art long-reasoning results even with small models.

[4:18](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=258s) [Slide describes RLMs processing long inputs, serving as memory systems, and handling long reasoning tasks.](https://assets.ai.engineer/sites/aiecode2025/sha256/2d6a93752c3bc2defdbc9eda749d14b58d1634a718356170552ce3b7cfd2c392.webp)

RECURSIVE LANGUAGE MODELS

Code Execution As Reasoning

Can process inputs way beyond the context window.
(Oolong) RLM paper

RLM is itself a powerful memory system.
LongMemEval results

RLM can achieve SOTA on long reasoning tasks, even with very small models. LongCoT results

RLMs are the new reasoning models.

Embedded post:
Raymond Weitekamp
@raw_works

X Article
RLMs are the new reasoning models
Reasoning models were the first clear proof that language model capability can scale with test-time compute. Recursive language models (RLMs) ask what the correct abstraction for spending that compute...

2:50 PM · Apr 20, 2026 · 66.2K Views

Interface text:
16  74  511  861
Read 16 replies
recursivecodingagents.com

### Benchmarking RLM Agents

ARC Prize criticized benchmark-specific targeting in Symbolica’s harness, while LongCoT added separate harness leaderboards. The speaker cares about results regardless of whether reasoning happens in latent space or code.

[7:14](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=434s) [Two social posts discuss agent benchmarking and a LongCoT leaderboard; a caption expresses a preference for results regardless of reasoning method.](https://assets.ai.engineer/sites/aiecode2025/sha256/59bcc7ea19e4cb7ec24d1772cfbb1dbc4f0ae7921040367548ce43b11bd20133.webp)

Raymond Weitekamp
@raw_works · Follow

i'm super confused...

...as far as i can tell, this a "consolation tweet" implying that ARC Prize will not verify the symbolica agent despite their insane score...

...at least that's how i'm interpreting the community leaderboard reminder...

...am i totally mis-reading this?

ARC Prize @arcprize
Today's @symbolica harness is a clear example of what human-crafted targeting can achieve on ARC-AGI-3 public demo set

You can "buy" performance with benchmark-specific prompts/strategies

Their approach could still contain useful ideas, excited to see what the community finds

Sumeet Motwani
@sumeetrm · Follow

LongCoT is adding two new leaderboards! Due to the interest in agents (particularly RLMs), we're adding a “Restricted Harness” and an “Open Harness” leaderboard.

GPT 5.2 RLM from our paper is SOTA on “Open Harness” at 25.12%. We expect tool-use SOTA to exceed this very soon!

On Show more

LongCoT Open Harness Leaderboard
Raw LLM · Restricted Harness · Open Harness
[Leaderboard chart and table text illegible]

I personally do not care if my AI programs do their reasoning in latent space or code.

Interface text:
10:47 AM · Mar 27, 2026
1 · Reply · Copy link
Read more on X

### The RLM Rubric

The rubric distinguishes RLMs from nearby approaches: coding agents lack code that calls the model, while hardcoded map-reduce leaves decomposition to the developer. RLMs pass all five checks.

[9:07](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=547s) [Table compares long-context calls, coding agents, hardcoded map-reduce, and recursive language models across five criteria.](https://assets.ai.engineer/sites/aiecode2025/sha256/01e83cc8329b0acb8f37da33aab8f218628d8b411e499b9ec8d7e5a9356517b2.webp)

THE RLM RUBRIC
Lots of things feel close.

Columns: Executable environment | Prompt externalized | Code calls the model | Model picks decomposition | State stays symbolic

Plain long-context call
RAG / reasoning-only
✗ | ✗ | ✗ | ✗ | ✗

Coding agents + subagents
including loops
✓ | ✓ | ✗ | ✓ | ✓

Hardcoded map-reduce
developer-authored pipeline — e.g. λ-RLM
✓ | ✓ | ✓ | ✗ | ✓

Recursive Language Model
passes every check
✓ | ✓ | ✓ | ✓ | ✓

Open the RLM rubric
recursivecodingagents.com

### RLM and Agent Trees

The two trees share the same three-level structure: root RLMs delegate through sub-RLMs to LLMs, while root agents delegate through sub-agents to more sub-agents.

[10:31](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=631s) [Side-by-side trees compare root RLMs and submodels with root agents and subagents.](https://assets.ai.engineer/sites/aiecode2025/sha256/636229f452493c6b571aa2e4e734358b1d3e0667e23ac331c43afd17d99c41b0.webp)

TOWARDS RECURSIVE CODING AGENTS

RLM / LLM
Root RLM (depth=0)
├── Sub-RLM A (depth=1)
│   ├── LLM A1 (depth=2)
│   └── LLM A2 (depth=2)
└── Sub-RLM B (depth=1)
    ├── LLM B1 (depth=2)
    └── LLM B2 (depth=2)

Agent / Sub-Agent
Root Agent (depth=0)
├── Sub-Agent A (depth=1)
│   ├── Sub-Agent A1 (depth=2)
│   └── Sub-Agent A2 (depth=2)
└── Sub-Agent B (depth=1)
    ├── Sub-Agent B1 (depth=2)
    └── Sub-Agent B2 (depth=2)

Interface text:
recursivecodingagents.com

### Applying RLM Principles to Coding Agents

The speaker accepts that RLMs are already recursive coding agents, then shifts to applying RLM principles usefully in coding agents.

[10:42](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=642s) [A slide contrasts calling RLMs recursive coding agents with applying RLM principles to coding agents.](https://assets.ai.engineer/sites/aiecode2025/sha256/ad8f73b7becb7e445db12ebb31a74cbaf73626c7102a0beeeadffd639e5664f0.webp)

TOWARDS RECURSIVE CODING AGENTS

Either... Trick question: RLMs are Recursive Coding Agents.

Or... How can we apply the principles of RLMs to coding agents?

Interface text:
recursivecodingagents.com

### Finding ypi

Pi extensions can now support recursion: pi-recursive adds it to an existing configuration, while ypi provides a recursive wrapper. Separately, rlm-cli lets a coding agent call an RLM as a tool.

[11:20](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=680s) [A slide describes the ypi wrapper and pi-recursive extension, with cards for two related repositories.](https://assets.ai.engineer/sites/aiecode2025/sha256/989dddc8732ab9f44510f192d9c425682659fce5559ff1e2904c016632fd4015.webp)

MY EXPERIMENTS

Finding ypi

Built on Pi (minimal, extensible). Previously pi extensions could not support recursion — so I forked it. Y is for the Y-combinator.

Wrapper CLI — ypi - a fully recursive Pi agent.
Pi Extension — pi-recursive - make any existing Pi config recursive.

rawwerks/rlm-cli
CLI for Recursive Language Models.
Python · 80 stars · 4 forks · Updated Jun 16, 2026
Open repo

rawwerks/ypi
A recursive coding agent inspired by RLMs.
Shell · 339 stars · 29 forks · MIT · Updated Jun 15, 2026
Open repo · Homepage

Interface text:
recursivecodingagents.com

### Other Notable Projects

RLM implementations range from DSPy’s composable module and Ax’s recursive agents to Unix RLM, which uses the Linux filesystem as its environment. OpenProse adds a declarative language for RLM-style execution.

[13:47](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=827s) [A slide lists five RLM-related projects with short descriptions and programming languages.](https://assets.ai.engineer/sites/aiecode2025/sha256/2815ffe0c9e0c362976e298db791d59a2ce1ee692e5af706b9ddb184c50c9824.webp)

THE RLM ECOSYSTEM
Other notable projects

alexzhang13/rlm — Python
The reference implementation from Alex Zhang and the RLM paper authors — the cleanest place to read the core recursion loop.

stanfordnlp/dspy — Python
dspy.RLM exposes RLM as a composable module inside larger DSPy programs — what I use for most of my own experiments.

ax-llm/ax — TypeScript
A TypeScript, DSPy-style framework with first-class RLM support: AxAgent recursive decomposition and a persistent JS runtime.

openprose/unix-rlm — Shell
An RLM whose sandbox is a full Linux filesystem — one bash script, the whole computer as the environment.

openprose/prose — TypeScript
A declarative markdown language the agent compiles into reliable, RLM-style execution.

Interface text:
recursivecodingagents.com

### Is Claude Code an RLM?

The original answer was no. The speaker says Claude Code arguably became an RLM with dynamic workflows, echoing Omar Khattab’s reaction.

[15:27](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=927s) [A slide compares social media posts under No and Yes, dated Q4 2025 and Q2 2026.](https://assets.ai.engineer/sites/aiecode2025/sha256/08dd48a507eb51852c8c76092059f2e4cda7a38c426e0b23c76eed0df414e5d7.webp)

CLAUDE CODE
Is Claude Code an RLM?

No

alex zhang · Oct 15, 2025
[illegible] · Follow
What if scaling the context windows of frontier LLMs is much easier than it sounds?

We’re excited to share our work on Recursive Language Models (RLMs). A new inference strategy where LLMs can decompose and recursively interact with input prompts of seemingly unbounded length.

Recursive Language Models
[Paper text and chart labels illegible]

Gary Basin
@garybasin · Follow
This is effectively Claude code sub-agents right?
7:44 PM · Oct 15, 2025
3 · Reply · Copy link
Read 2 replies

Q4 2025

Yes

Omar Khattab
@lateinteraction · Follow
Claude Code is finally an RLM (oct 2025), congrats to Anthropic :-)

ClaudeDevs · @ClaudeDevs
New in Claude Code (research preview): dynamic workflows.

Claude writes an orchestration script on the fly, then spins up a large fleet of coordinated subagents in parallel to take on your most complex tasks.

Use the word “workflow” in a prompt to get started.

Claude Code
[illegible]
Dynamic workflow requested
ultracode
> Create a workflow that migrates every internal fetch() call to the new HttpClient wrapper, updating tests as you go.

» auto mode on (shift+tab to cycle)

3:19 PM · May 28, 2026
492 · Reply · Copy link
Read 18 replies

Q2 2026

Interface text:
recursivecodingagents.com

### Dynamic workflows made Claude Code recursive

The speaker contrasts an RLM example, where the model chooses how to split a corpus, with a map-reduce workflow whose split and stopping rule are fixed in code.

[16:19](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=979s) [A slide describes dynamic workflows and contrasts a model-chosen split with a script-fixed split.](https://assets.ai.engineer/sites/aiecode2025/sha256/a2fda45f66ddd99919e199952dda52182a4871ce36545c12588c0999dc7731f3.webp)

Dynamic workflows made Claude Code recursive.

Claude can write an orchestration script, then run a fleet of subagents. The line is whether the model chooses the decomposition, or the script fixes it ahead of time.

Six Workflow Patterns
1 Classify-And-Act
2 Fanout-And-Synthesize
3 Adversarial Verification
4 Generate-And-Filter
5 Tournament
6 Loop Until Done
[Diagram details illegible]

CLAUDE CODE BLOG · HARNESS FOR EVERY TASK

RLM example · model-chosen split
file-handle-clean.workflow.js
Decomposer reads a corpus handle, writes slice handles, then subagents extract and validate those slices.

not-RLM contrast · script-fixed split
hardcoded-map-reduce.workflow.js
It has handles, subagents, and state, but the windows, fan-out, reducer, and stop rule are fixed in code.

Interface text:
[clipped]ttps://claude.com/blog/a-harness-for-every-task-dynamic-workflows-in-claude-code
recursivecodingagents.com

[16:37](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=997s) [Slide contrasts a model-chosen decomposition with a fixed map-reduce workflow and shows six workflow patterns.](https://assets.ai.engineer/sites/aiecode2025/sha256/71e2365697435ecb2b8dda4adfc5c69f4b16f703577abe86bcc9d09d1caab97f.webp)

Dynamic workflows made Claude Code recursive.

Claude can write an orchestration script, then run a fleet of subagents. The line is whether the model chooses the decomposition, or the script fixes it ahead of time.

Six Workflow Patterns
1 Classify-And-Act
2 Fanout-And-Synthesize
3 Adversarial Verification
4 Generate-And-Filter
5 Tournament
6 Loop Until Done
[Diagram details illegible]

CLAUDE CODE BLOG · HARNESS FOR EVERY TASK

RLM example · model-chosen split
file-handle-clean.workflow.js
Decomposer reads a corpus handle, writes slice handles, then subagents extract and validate those slices.

not-RLM contrast · script-fixed split
hardcoded-map-reduce.workflow.js
It has handles, subagents, and state, but the windows, fan-out, reducer, and stop rule are fixed in code.

Interface text:
[clipped]ttps://github.com/rawwerks/recursive-coding-agents/tree/main/claude-dynamic-workflows/rlm
recursivecodingagents.com

### A language compiled by the agent

OpenProse uses a Markdown spec and a declarative contract to define when an agent is done. The speaker presents it as a way for agents with filesystems and subagents to behave like RLMs.

[17:16](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1036s) [Slide introduces OpenProse as a declarative contract for coding agents, alongside a repository card.](https://assets.ai.engineer/sites/aiecode2025/sha256/5454e24b901df5032317b42029db1284e2232ea1d989fde1e704079370b614ad.webp)

FOR (ALMOST) ANY CODING AGENT

A language compiled by the agent, not the computer.

A markdown spec plus a giant prompt, in logical English. No new syntax to learn.

The key: a declarative contract the agent must satisfy to be “done.” That answers the reliability question.

Any agent with a filesystem and subagents can run it — and behave like an RLM.

See “Stop Babysitting Agents, Start Authoring Outcomes” on Turing Post.

openprose/prose
A new kind of language for a new kind of computer.
TypeScript · 1.5k · 121 · MIT
Updated Jun 16, 2026
Open repo · Homepage

Interface text:
recursivecodingagents.com

### OpenProse subagent work

Two demo workflows divide work by handle: one recursively splits nonterminal handles, while the other selects file handles for workers and checks their provenance.

[18:33](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1113s) [Two panels describe recursive handle decomposition and directory handle slicing, with short pseudocode examples.](https://assets.ai.engineer/sites/aiecode2025/sha256/d2bcf67f8f12933de178f775dab04755f5af30ccafbe7a37c6fadcc4fcab0f72.webp)

OpenProse explicitly declares subagent work

Here are two OpenProse examples where the model turns an external handle into smaller handles, then verifies the child-work trace.

RECURSIVE DECOMPOSITION
handle-recursive-reader.prose.md
• Starts from an external prompt_handle; root does not read the whole thing.
• The model decides terminal vs. nonterminal handle.
• Nonterminal handles produce child handles and call the same contract again.

if nonterminal:
  for child in manifest:
    recurse(child.path)

DIRECTORY HANDLE SLICER
directory-handle-slicer.prose.md
• Starts from a repo or directory handle, not copied root context.
• The model uses search to choose relevant file handles for the question.
• Workers inspect only assigned handles; aggregation cites worker evidence.

manifest = model_slice(directory)
for child in manifest:
  worker(child.path only)
validate worker provenance

Interface text:
recursivecodingagents.com

### Applications of recursive coding agents

Agents split migrations into isolated worktrees, investigate repositories and challenge audit findings. OpenProse also turns successful sessions into reusable workflows.

[19:54](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1194s) [Slide lists repository migrations, repository investigation, audits and bug sweeps, and turning successful sessions into programs.](https://assets.ai.engineer/sites/aiecode2025/sha256/ac51f89ed13dea686320a21c542b0c3d945acdc730aa26a8d6301d6e73441c4e.webp)

APPLIED RECURSIVE CODING AGENTS

What can you actually do with recursive coding agents?

Repo-scale migrations — Claude dynamic workflows
Split a large refactor into modules, callsites, or failing tests; workers patch isolated worktrees, then reviewer agents check the merge.

Repo-handle investigation — OpenProse
Start from a directory handle; the decomposer chooses file handles, workers inspect one file each, and aggregation cites their evidence.

Audits and bug sweeps — Claude dynamic workflows
Parallel agents audit routes, auth, data access, and risky patterns; skeptic agents challenge findings before anything reaches the report.

Golden sessions into programs — OpenProse
Mine high-quality Claude, Codex, or Pi sessions into versioned .prose.md workflows with phases, gates, loops, and validation evidence.

Interface text:
[illegible]tps://claude.com/blog/a-harness-for-every-task-dynamic-workflows-in-claude-code
recursivecodingagents.com

[21:18](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1278s) [Four applications: repository migrations, repository investigation, audits, and turning golden sessions into workflows.](https://assets.ai.engineer/sites/aiecode2025/sha256/a6dd420db018353f85c00d7958143bb95d497daf1319efe933a18b3c0c85c5bb.webp)

APPLIED RECURSIVE CODING AGENTS

What can you actually do with recursive coding agents?

Repo-scale migrations — Claude dynamic workflows
Split a large refactor into modules, callsites, or failing tests; workers patch isolated worktrees, then reviewer agents check the merge.

Repo-handle investigation — OpenProse
Start from a directory handle; the decomposer chooses file handles, workers inspect one file each, and aggregation cites their evidence.

Audits and bug sweeps — Claude dynamic workflows
Parallel agents audit routes, auth, data access, and risky patterns; skeptic agents challenge findings before anything reaches the report.

Golden sessions into programs — OpenProse
Mine high-quality Claude, Codex, or Pi sessions into versioned .prose.md workflows with phases, gates, loops, and validation evidence.

Interface text:
[illegible]tps://www.turingpost.com/p/openprose-a-language-for-reliable-agents
recursivecodingagents.com

### Recursive coding agents for the win

Weitekamp argues that trust requires reliability and better orchestration. RLMs combine reasoning with tool calls, including calls to other agents; coding agents can use workflows to become RLMs.

[21:49](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1309s) [Summary slide connecting reliability, inference-time compute, and coding agents that can be RLMs.](https://assets.ai.engineer/sites/aiecode2025/sha256/0e33579a9cfb0fbecfa6c38f8762e18b4839e51239336deb7e0724cb86987617.webp)

Recursive Coding Agents FTW

Trust is reliability
The next step is behavioral, not more model intelligence.

A new paradigm of inference-time compute
RLMs are the new reasoning models → recursive coding agents are the new coding agents.

Coding agents can be RLMs
Claude Code dynamic workflows and OpenProse show two concrete paths.

Interface text:
recursivecodingagents.com

### Please Recurse Responsibly

Raymond Weitekamp closes by inviting viewers to explore recursivecodingagents.com and recurse responsibly.

[23:36](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1416s) [Closing slide with the message “Please Recurse Responsibly,” the speaker’s name, and presentation links.](https://assets.ai.engineer/sites/aiecode2025/sha256/dc0cb0cdd68bcee54c1162d1bac6dcaa30907276df849ddb2d745deda2913134.webp)

UNTIL NEXT TIME...

Please Recurse Responsibly

Raymond Weitekamp

RAW.works | OpenProse
@raw_works

Presentation at recursivecodingagents.com | Companion GitHub repo

Interface text:
recursivecodingagents.com

## Full transcript

[0:00](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=0s) Hello there. My name is Raymond Weitekamp, and today I'm gonna talk about recursive coding agents, which is this idea of applying the lessons of recursive language models, RLMs, uh, to coding agents.

[0:15](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=15s) This is some work that I have done both in my independent research, um, RAW.works, uh, and also more recently

[0:25](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=25s) in my role at OpenProse. So, to motivate this a little bit, we all want outcomes. We all want agents that are working on our behalf. We want reliable coworkers that are getting things done while we are doing something fun, while we're out on a hike, while we're cold chilling, while we're doing the do.

[0:45](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=45s) And my argument, and my experience is that the bottleneck to this is not intelligence. The models are intelligent enough. They know all kinds of things. They know the entire internet, but they can't reliably deliver outcomes, and so I can't trust them.

[1:07](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=67s) So as a very simple example, you know, one day I get almost a fully working SaaS app from a single prompt, granted a long prompt.

[1:16](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=76s) The next day, and I swear this actually happened,

[1:20](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=80s) Claude Code empties the entire contents of my Solana wallet. Oops. Okay. So that [chuckles] doesn't really instill trust. So, uh, at the bottom here, we've got this pr- this progression, okay?

[1:33](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=93s) And we all wanna move towards the, the one on the right where we're just sort of sitting there and meditating and, and things are manifesting. And so where does that come from?

[1:41](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=101s) This is from the AI Engineer Code. It's actually from the back of the T-shirt. AI Engineer Code, November twenty twenty-five. Man, I hope, I hope you were there. If you weren't, watch it on YouTube.

[1:55](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=115s) It was, it was amazing. So here's the thesis. The thesis is: today's agents are mismanaged geniuses. The intelligence is there, and the missing layer is how do we specify and manage and reuse and verify the work.

[2:10](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=130s) So this, uh, framing, this phrase, the mismanaged genius, uh, comes from Alex Zhang, Zed Li, and Omar Khattab at MIT. Um, and Alex and Omar are, uh, part of the authors of the original Recursive Language Models paper.

[2:25](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=145s) Uh, I've also talked a little bit about this recently on Turing Post. Um, I forgot to mention that these slides are actually a website, recursivecodingagents.com. So you can click on them, uh, by going to this website.

[2:40](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=160s) So everything I'm gonna show in here is, is interactive. Okay. What are recursive language models? So I like to say that in an RLM, the context itself is the object of computation.

[2:54](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=174s) Um, and this is essentially a marriage of tool calling and reasoning. We're gonna talk a lot more, more about that in the next slide. But the idea is that the full prompt is not a simple user query.

[3:08](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=188s) The full prompt is a variable. The full prompt could be a file or many files. Um, and we have this Read-evaluate-print loop REPL, um, that the agent is interacting with.

[3:21](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=201s) In the original paper, that's Python. And the RLM is instructed to operate symbolically on that prompt, so don't just read the whole thing into your context window. Um, explore it symbolically.

[3:36](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=216s) And, uh, even more, you don't even directly explore it symbolically, or maybe you do a little bit of poking around, but have, uh, other LLMs, uh, and I guess other RLMs if you allow the recursion depth to be, to be greater than one,

[3:53](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=233s) uh, have these, uh, other recursive, um, subagents, and, and again, we'll get, uh, a little bit into the, the weeds of the, the lingo, um, sub-RLM, sub-LLMs, uh, do this symbolic manipulation to pick apart the answer and then work our way back up to a final answer.

[4:15](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=255s) So it looks something like, like this in this, in this tree below.

[4:20](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=260s) So my take here is that RLMs are the new reasoning models, and I see this as the next paradigm of test-time compute, inference-time compute, whatever you wanna call it.

[4:33](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=273s) And why does it seem obvious or maybe like, "Hey, why is this even a thing?" Um, I think it's very elegant because it's a very elegant marriage of two things, reasoning and code execution.

[4:46](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=286s) So the code execution is reasoning. Um, and so instead of we, we had long, um, we had chain of thought as a prompting strategy that evolved into reasoning models that explicitly expressed the chain of thought as their reasoning tokens.

[5:02](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=302s) We already had function calling, tool calling, parallel tool calling, um, and RLMs really puts that together in a way that gets amazing results. So three very simple examples, one from the original paper, Oolong.

[5:16](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=316s) The RLMs can process information that is many orders of magnitude larger than their context window, tens of millions of tokens. Uh, what I showed in my own independent work was that the default RLM harness is itself a really powerful memory system.

[5:35](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=335s) Um, so RLM with no modifications is essentially like a top ten memory system and like, you know, up there with all the people custom-making memory systems, and there's probably billions of dollars going into that.

[5:48](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=348s) Um, and, uh, with a little bit of modification, you, you can get really amazing results, uh, using it as memory.

[5:57](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=357s) I was also able to show state-of-the-art results where the RLM framework, and specifically the DSPy

[6:04](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=364s) implementation of it was able to get state-of-the-art, uh, results on long reasoning tasks. Now, there's this new benchmark, LongCoT. I won't go into the details in depth, but the idea of this benchmark was that the problems are hard specifically because they require so many, um, steps of reasoning, uh, in, in the, like analysis sequence or in the

[6:28](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=388s) chain of thought, um, that most, uh, reasoning models, including the top ones, can't hold the thread for long enough. Um, if you allow the, uh, RLM to solve the problem, uh, using a combination of code and recursive calls to subagents, then a very small model, Qwen3.5-9B, you could run this on

[6:53](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=413s) a laptop, uh, can actually beat... So Qwen3.5-9B as an RLM can beat Opus and, um, and GPT-5.4, all the top frontier models as LLMs on these long reasoning tasks.

[7:11](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=431s) So they're extremely, extremely powerful. So powerful that they are [chuckles] arguably too hot to benchmark. So two examples here. On the left, a very high-profile, uh, case where, um, the Symbolica team has this RLM agent harness called Agentica.

[7:31](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=451s) Within hours of ARC-AGI-3 being released, where the top scores of all the frontier models were around two or three percent, the, uh, Symbolica team showed 30-something percent.

[7:46](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=466s) This is crazy. They blew it out of the water within hours using RLMs as a framework. So much so that this, uh, very much upset the ARC Prize team.

[7:55](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=475s) And so, uh, they gave them what I'm interpreting as a consolation tweet, which as far as I'm reading the situation, was essentially saying, you know, "La-di-da, congratulations, um, but you didn't solve the problem the right way, and we don't like RLM harnesses, and so, uh, you can have this nice tweet, but we refuse to actually do the

[8:19](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=499s) full private part of the ARC-AGI evaluation," uh, which to me is just insane. Uh, in my own, uh, work and, and w- on the LongCoT benchmark, um, my results, as well as Alex, uh, from MIT, the RLM first author, uh, encouraged, let's say, the, uh, the, uh, leaderboard maintainers to actually make like a separate open harness

[8:44](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=524s) leaderboard, uh, so that the ar- the results of the RLMs could be showcased without contaminating the original intent of the leaderboard, which was basically no tool calling is allowed.

[8:55](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=535s) So my take on this is I don't care. I don't care whether it's latent space or reasoning tokens or code execution. I want results, and I want AI programs that get those results.

[9:08](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=548s) Okay, so this can feel close to a lot of other things, and I h- I built a little rubric. There's a companion GitHub repo for this that you can go through if you wanna see.

[9:19](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=559s) Um, and so what do we need to be an RLM? We have an executable environment. The prompt is externalized. There's code that's actually the thing calling the model. The model is able to pick the decomposition of the problem into the subcalls or subagents, and the state itself is staying symbolic, right?

[9:36](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=576s) So obviously, plain LLMs and RAG and things like that don't, don't meet those. Coding agents and subagents and loops, they get close, but they're not quite there. And again, this rubric here is not to like start fights or nitpick.

[9:51](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=591s) It's just trying to explain like what, what's the essence of, of RLM, uh, and recursive coding agents. Another example that's close, but no cigar would be hard-coded MapReduce, and I would put, um, uh, this, this project called LambdaRLM in that category, which is essentially a way of saying, "Okay, I'm decompose the problem, uh, using lambda calculus into

[10:12](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=612s) a MapReduce," and then there are like LLM calls in that executing the MapReduce. But the, but the LLM is not deciding or the RLM is not deciding how to decompose the problem, and that I see as like a key element of this that makes it very agent native, you might say.

[10:32](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=632s) Okay, so now RLMs, what about recursive coding agents? Okay, it looks the same to me. We just swap RLMs and LLMs for agents and subagents, and don't we have the same thing?

[10:43](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=643s) Uh, and yeah, you do. And I think that you could take this perspective of, "Ha ha, trick question," like, RLM is a coding agent and it's already recursive, so blah-di-blah.

[10:58](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=658s) And that's fine, and I don't think that argument is wrong, but it doesn't really move anything forward. And so what I'm interested in is this question of: How can we apply the principles of RLMs to coding agents and make them actually useful for coding agents?

[11:15](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=675s) And I've been very obsessed with this problem since the October, uh, RLM blog post came out in twenty twenty-five. Okay, so I show some of my experiments on recursive coding agents.

[11:27](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=687s) Um, the first one i- was simply wrapping Alex's RLM package as a CLI. So the idea was, I just wanna give my coding agent an RLM as a tool call.

[11:42](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=702s) So let's say we go, we need to go

[11:45](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=705s) s-sift through a hundred million token corpus. Uh, well, now it just uses that tool, and then the RLM does the RLM thing. So that's interesting, and it can be very useful, uh, and a few other people have built, uh, things like that.

[12:02](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=722s) Uh, but then I thought, well, what would it really mean? What would be possible, or how could it be possible To make the coding agent fully recursive. So the coding agent harness, like, calls itself, like the exact version of itself.

[12:19](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=739s) Um, and how might you implement that? And that is what I called Y-Pi. Uh, Y stands for the lambda calculus, uh, Y combinator, and Pi, in case you haven't heard of it, is a really awesome coding agent.

[12:36](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=756s) It's incredibly minimal, and it's specifically designed to be extensible. So Mario, uh, wants you to write extensions for Pi for new features that you would like, rather than trying to stuff your ideas into the, the main, um, agent.

[12:53](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=773s) So it's meant to be a very minimal core that you extend however you like. And when I originally had the, uh, recursive coding agent idea and wanted to do it with Pi, I was not able to use Pi extensions to achieve this goal.

[13:09](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=789s) Um, and so I had to fork it instead. I'm very excited to report that in anticipation of this talk, I revisited this, and now Pi has evolved, um, and the Pi extensions have evolved such that you can, uh, make it fully recursive with a pure extension.

[13:26](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=806s) So I have both the pure recursive, um, extension Pi recursive, uh, package, as well as the Y-Pi wrapper that is like a convenience wrapper for this. So this is very quite literally a recursive coding agent in the sense that Pi calls Pi, calls Pi, calls Pi.

[13:42](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=822s) You can set the depth however you want. Um, and now I wanna show a few other notable projects in this space. So obviously, there's the original, uh, implementation from Alex, RLM.

[13:54](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=834s) dspy.RLM is, uh, my go-to, uh, when I'm especially doing benchmarking. Um, that's how I got all these amazing results, uh, on some of these benchmarks. Ax, I think is a very interesting one because it's incredibly agent native.

[14:12](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=852s) So the Ax started out as a TypeScript variation on DSPy. When RLMs came out, they obviously implemented it, uh, but they did it in this way that's, um, enables an Ax agent to, like, write a whole TypeScript interface to another Ax agent and go all the way down, uh, the, the recursive rabbit hole, um, which I think

[14:36](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=876s) is really cool and very interesting. Just to showcase that this, like, REPL could be anything, there's a, an example from Dan at OpenProse who made the Unix RLM. This is pure Bash, and the environment is just the Linux file system.

[14:52](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=892s) So that's a whole nother angle of thinking about, uh, what's possible with RLM. And then lastly, and we'll talk more about OpenProse, um, but, uh, OpenProse as a language, uh, actually enables you to convert any coding agent into an RLM, and I'll talk a little bit more about how to do that towards the end of the talk.

[15:12](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=912s) Uh, and then the OpenProse repo also contains a harness that executes. It's a coding agent harness that, uh, will let you use Codex SDK or Claude Code underneath and do an RLM-style execution of these prose programs.

[15:28](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=928s) So is Claude Code an RLM? This is like the, the question that keeps getting asked, and the original answer on the day, uh, release day of the blog post was, "No, no, no, it's not."

[15:41](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=941s) Uh, but it was literally the first question that was asked or, like, asked on the very same day, uh, to the launch tweet. Um, and it's basically saying, "Hey, this is Claude Code subagents," right?

[15:51](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=951s) Uh, go back to my rubric if you wanna like, dig into some of the, the nitty ditt- nitty-gritty details. Um, but arguably now it is. So, uh, o- over here on the right, we see Omar saying, "Hey, congratulations, Anthropic.

[16:06](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=966s) Uh, Claude Code is finally an RLM now that you have dynamic workflows." So, so what changed? And I, I think this is an interesting way of explaining, um, what's powerful about recursive coding agents and what RLMs even are, um, by using this example.

[16:21](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=981s) So dynamic workflows were released just a few weeks ago,

[16:26](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=986s) um, and they make Claude Code recursive or capable of doing these recursive, uh, workflows. Uh, I would highly encourage you to read this blog post called "A Harness for Every Task."

[16:37](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=997s) It shows six different workflow patterns that are very powerful. Obviously, there's many more that you can achieve. And just to, to show it, I, I wrote two, uh, workflows for Claude Code.

[16:50](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1010s) Uh, one that is explicitly not an RLM, so this is like a hard-coded MapReduce workflow, and one that I'm arguing is that is, uh, you could kind of think of it as like deep research over a file system.

[17:03](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1023s) So, you know, pick, pick a handle, um, assign that to an agent, have it go do some analysis, bring back what it finds, et cetera. Uh, again, these are in the companion repo.

[17:16](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1036s) Uh, and then now to OpenProse. So, so dynamic workflows are cool. They're only in Claude Code. They're also not the only way to do this. So what if you don't like Claude Code?

[17:26](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1046s) Or what if you do like Claude Code, but you don't want to use dynamic workflows? You want something else. So this is what OpenProse is all about. So OpenProse is technically a programming language, but it is not compiled by your computer.

[17:39](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1059s) It's compiled by your coding agent. Um, it's a markdown spec. It's logical English. You don't need to learn any kind of crazy syntax. And there's actually a command prose write that will get Claude Code or Codex or your favorite or Pi or your favorite o- coding agent to write a .prose.md file for you.

[18:01](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1081s) Um, so in that way, it's similar to the, the, um, Claude Code, um, UltraCode command, where it, like decide and write the workflows for you.

[18:13](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1093s) And the, the Prose has the ability to turn any agent that's got a file system and subagents into an RLM. So this is an open source repo, you can check it out.

[18:26](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1106s) Um, and I've also written, uh, a little bit more in depth about this for Turing Post in this article. And the key thing that I want to bring up with regards to the RLMs is that OpenProse can explicitly declare the subagent work.

[18:42](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1122s) So again, I've made two kind of demo .prose.md files that are in this companion repo, if you wanna dig into the code, I'm not gonna do that here in the slides, uh, where you can break a problem up into smaller pieces that are assigned to subagents, verify the work of those subagents, um, in the, in the parent

[19:02](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1142s) agent session. Uh, and what's even cooler is you can actually, in OpenProse, two of the features that I added to the language are that you can add skills and tools as explicit dependencies.

[19:14](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1154s) So you can imagine a workflow where a certain subagent needs a very specific skill to do its role in the workflow, or, uh, must have access to a certain CLI tool, for example, or it can't run and do its job.

[19:31](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1171s) And so there's a way in Prose to actually wire those in as dependencies to ensure that, um, not only that the way the work is done, um, is what you want, but actually that the subagents are specifically configured with the tools and skills that they need to successfully do the work that you are declaring in the Prose

[19:54](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1194s) contract. Okay. Super cool. What can you actually do? So I've got two examples from Claude Dynamic Workflows, two examples from OpenProse, uh, repo scale migrations. This was kind of the launch post, uh, example refactor, like a huge thing, uh, all with a big swarm in parallel, and then merge the whole thing together.

[20:15](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1215s) That's super cool. Um, this idea of, like, go after a directory and then deep research or deep analyze, uh, or deep process in some way recursively, uh, inside that is, is another example, uh, I have here.

[20:30](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1230s) You can do audits, uh, bug sweeps. You can do adversarial things, such as having a skeptical agent or, um, you know, a red team, uh, set of agents, uh, that are going to, uh, try to, uh, improve the system adversarially or in parallel.

[20:51](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1251s) And then, uh, one really cool thing that you can do with OpenProse that I just added recently is kind of goes back to my very first slide, right? So like one day I get this amazing result, the next day they trade away all my, all my, uh, cryptocurrency, which is very small, thankfully.

[21:10](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1270s) Um, but like how do we get these things to be more reliable? And how do we get them, you know, we, we have like a golden session, and we have a great day, and now we wanna capture that and reuse it over and over again.

[21:23](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1283s) So I built a system where you can take a golden session for Claude Code, Codex, Pi, whatever you want, and it's a Prose program that will actually have the agent deconstruct that session and turn it into a reusable Prose workflow, um, that again can involve this idea of recursive coding agents, um, to get you to a reliable,

[21:45](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1305s) uh, way of getting to that golden state of performance over and over and over again.

[21:50](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1310s) Recursing, [chuckles] recursive coding agents for the win. Uh, I really think this is very powerful. RLMs just kind of blew my mind when they first came out. And again, uh, as you can probably see through this talk, I've been absolutely obsessed with applying the ideas of RLMs to coding agents.

[22:08](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1328s) The three things that I hope you'll take away from this is one, like trust is reliability. Like how can we, how can we trust something that isn't reliable? And again, my argument and this idea of the mismanaged genius is, uh, that the next step is not, um, more raw intelligence.

[22:26](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1346s) It's actually, uh, behavioral. It's actually orchestration. I personally believe that, um, RLMs represent this new paradigm of test-time compute, inference-time compute, uh, where tool calling and reasoning are unified, and we reason through tool calling, and we can, uh, recursively iterate, and one of those tools is to call another

[22:51](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1371s) agent to go do it on some other specific task or subset of the problem. Uh, and then also, I hope we settle a little bit of this drama around like, wait, like are RLMs, um, actually new?

[23:06](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1386s) Aren't they just coding agents? Yes, coding agents can be RLMs. They aren't automatically RLMs. Um, and so I've showed a couple of different Claude Code Dynamic Workflows that can turn Claude Code into an RLM, uh, as well as some ways of doing this with OpenProse that you can use with any coding agent.

[23:25](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1405s) So I see this as an incredibly powerful way of working with coding agents. I hope you will dig in more to recursivecodingagents.com. But with great power comes great responsibility.

[23:40](https://www.youtube.com/watch?v=3hXJI2q0Jz8&t=1420s) So until next time, please recurse responsibly. Thank you very much.
