# How to Build Recursive Decision Models

> Published 2026-11-18T16:10:36.559Z on https://youblog.app/p/how-to-build-recursive-decision-models/
> Source video: https://www.youtube.com/watch?v=hFNbPmzzcEs

Recursive decision models invert the usual agent stack. Instead of a language model orchestrating tools, a classifier sits at the root and decides what to inspect next. Raymond Weitekamp of OpenProse argues in a November 2026 AI Engineer talk that reasoning may be many small decisions, not one large generative pass.

## What are recursive decision models?

Recursive decision models are decision trees whose root and internal nodes are fast classifiers, not language models. Each node picks among options the programmer has already listed, and any node can hand the choice to another classifier down to a fixed depth, where a single call returns the answer. Raymond Weitekamp of OpenProse proposed the pattern in a November 2026 AI Engineer session, and he describes it as [Your Agent Doesn't Need an LLM for Every Decision](https://ai.engineer/talks/hFNbPmzzcEs-your-agent-doesnt-need-llm-every-decision#1).

The building block is the decision model: a model that picks among options it is given rather than generating free text. Type Safe shipped a product called Jev to fill that role. Weitekamp notes that engineers already disagree on the label, with some calling them system one models, some decision models, and a holdout camp calling them zero-shot classifiers. The name comes from the fast, intuitive mode Daniel Kahneman described in *Thinking, Fast and Slow*, as opposed to slower deliberate reasoning. The naming does not change the mechanism: the model judges, and the surrounding code makes the decision.

One detail the talk uses to make the distinction concrete: Type Safe gated API keys behind a quiz asking whether Jev can generate text. The correct answer is no. If you answer yes, you do not get a key.

Read broadly, the argument is that a lot of behavior we assume needs deliberate reasoning can be assembled from many small, fast judgments. Weitekamp keeps returning to the question: what if reasoning was actually many small decisions?

## The three rules Weitekamp sets for RDMs

Weitekamp defines recursive decision models with three rules, and the first two copy the structure of recursive language models. Context lives outside the model, so code can slice it into the view each decision needs. Doom's full game state, for instance, never enters the two decision harnesses; the first-person harness sees one subset and the bird's-eye exploration harness sees another. A decision can call another decision up to a set depth. And the whole system has to work with no generative model at all while still composing with agents and language models.

The third rule carries the weight. If the pattern only works when a language model is available as a fallback, it proves nothing new about what classifiers can do alone. Weitekamp also treats it as a correctness test: the architecture should run decisions all the way down and still slot into a larger agent when a generative step is unavoidable.

The parallel to recursive language models is deliberate. In the [recursive language model](https://alexzhang13.github.io/blog/2024/rlm/) setup described by Alex Zhang, a root model can call sub-models down to a leaf, and Weitekamp maps that tree directly onto classifiers, with the leaf being a single judgment call. He draws the same picture for coding agents, where a root agent spawns sub-agents, and points readers to his earlier AI Engineer World's Fair talk, "Recursive Coding Agents", for the full argument.

The talk's simplest mental picture is a Galton board in which the pins can decide. A ball in an ordinary Galton board takes a 50/50 bounce at each pin and lands in a bell curve. Give the pins a judgment and they can split numbers higher or lower like a binary search, or sort on several axes at once, by color on one and number on another. Weitekamp is explicit that a single classifier call could do the same sorting; the board is there to make the shape of the recursion visible.

## Worked examples: category search, images, and games

The clearest published example is Type Safe's hierarchical category search over a Shopify product catalogue of 12,000 categories. Loading all 12,000 into one context would overload the window, so the system takes the parent category and asks a classifier which child to explore next from a query like "laptop backpack". The search is a walk down a tree of judgments rather than a brute-force scan, and the recursion unit is a classifier instead of a comparison.

Weitekamp describes this as beam search without the beam. The programmer chooses in code whether to follow the top result, keep the top three by probability, or something in between. It is binary search in theme, with a judgment as the compositional unit.

Image search follows the same shape, after Jev became multimodal about a month after launch. One variation zooms into a box wherever the classifier reports a hit and asks again on the smaller crop. Another recursively halves the image into blocks before classifying what each block contains, closer to a golden-spiral subdivision than a scan. Weitekamp is careful to note that a capable vision model might answer these questions in one pass, and that recursion mainly gives the program control over the area each judgment covers.

A third visual example, which he calls outline walk, drops through levels of a document: title, H1 heading, subsection heading, paragraph, sentence, word. Each layer can call another, and the paths are largely predefined. The same logic carries into browsers: his slide deck is a website with about three interactive elements in the DOM, and a handful of available actions on any given screen, which is small enough to enumerate and walk with classifiers rather than reasoning. He extends the point to computer use, ordinarily treated as a benchmark only frontier reasoning models can pass. If the available actions can be listed, a fast tree might navigate them.

The game demonstrations are the most arresting. Weitekamp walks through a Factorio agent that finds a production line with a problem, identifies the inserter at fault, and sends the character to replace it, with no language model in the loop. In the talk he acknowledges the pathfinding was imperfect, running the long way around to the next fault, and that the example is close to a toy, because the state is effectively a uniform matrix of entities. He still compares the result to the level of a model playing Pokémon: a task people assume needs reasoning, finished with pure decision calls.

He also revisits the Jev Plays Doom demo from the launch, calling it widely seen and underdeveloped. Two coupled decision harnesses do the work: one handles first-person play (hold, carry, walk, dodge), the other decides where to explore on a map view. Composed, they play the level. Weitekamp says he has seen almost no follow-up work on that composition of two distinct but coupled decision agents.

During the question period of the wider session, Weitekamp also framed the build as an open-source agent framework for event-driven, multi-agent workflows, and [OpenProse describes itself](https://openprose.ai/events/aie-nyc-2026/) as helping teams encode institutional knowledge with requirements for auditing and guardrails.

## The map: how decisions and language models share state

The bridge between a classifier and a language model is what Weitekamp calls the map: a set of pointers to named actions, each with a short description and either a simple function or a more involved routine underneath. A classifier can only point at an entry, and plain code carries out the action it names. To take his example, the decision model says lights on, and the lambda underneath switches the light on.

A raw language model has no structure to its output, so the map gives it a structured interface. It can add, edit, or modify entries, so when a user says "movie time" the model can learn that this means turning on the TV and dimming the lights, while the classifier later decides when to act on it. Weitekamp describes map entries as potentially multi-dimensional, so the map can represent embeddings. Kieran Clausen of Every explored using a decision model to produce low-dimensional but semantically meaningful embeddings for exactly that reason.

The division of labor matters for reliability. A classifier cannot generate text, so it never invents an action that is not on the map. A language model can generate, but its output has to be written to the map before the decision layer can use it. Weitekamp's smart home demo, an expanded version of a Type Safe cookbook with many more rooms and appliances, shows the handoff: "we're off to bed" resolves through fast decision substeps to door locked and lights out, and a vaguer request like "let's watch a film" grows more organic call trees because a generative step fills gaps the decisions cannot cover.

## Why the arbiter exists

Decision models are cheap and fast enough that many can run at once, so Weitekamp adds a fourth primitive called the arbiter to decide which parallel decisions are allowed to change the state of the system. These models run on a phone, a ten-year-old laptop, or a new MacBook Pro, and they cost little in compute or dollars. That makes speculative parallel runs practical when the system is uncertain. Without a gate, several classifiers can compute different actions from slightly different views of a state that is changing underneath them, and the results collide.

The analogy he uses is the read-write lock in a CPU: many readers can proceed concurrently, but a write needs exclusive access. He also credits Alex Zhang, among the authors of the recursive language model work, with ideas about speculative programmatic tool calling that informed the arbiter, and the speaker points to [speculative execution research from the MIT group](https://arxiv.org/abs/2412.09548) without claiming the arbiter is the same thing.

Audio makes the need concrete. While a person speaks, several channels may already be proposing what to do before the sentence finishes, and each lane may vote for a different action. The arbiter weighs confidence across channels and decides which action, if any, crosses into the system. The failure it prevents is easy to picture: two models reach the same kind of decision, one runs slightly faster and changes the state, and the second then acts on a state that no longer exists.

Weitekamp's first implementation was a DSPy module, partly because the DSPy team at Compound AI added System One API support quickly, and partly because DSPy's structured, opinionated style was a useful playground for keeping RDM modules behaving correctly. He also released RDM as a standalone Rust package for fast, portable recursive decision models in other systems.

## Operating System One and the Oso preview

Weitekamp closes with a project called Oso, short for Operating System One, which he describes as a computer-use agent built on recursive decision models and still unreleased at the time of the talk. The name works both ways: it is an operating system for system one models, and it is about learning to operate system one models. A waitlist was OpenAI the time of recording (oso.computer), and no public availability date was given.

The motivation is physical. Weitekamp describes neck and shoulder strain, repetitive stress from graduate school deadlines, and a collection of vertical mice, trackballs and ergonomic keyboards. His goal is to work on a computer without touching it, starting with voice, and later without needing to see it.

An earlier prototype called Earshot cycles through workspaces on spoken number words, using a recursive decision model layered over a small real-time audio classifier that learns on the fly. The small model runs in Chuck (ChucK) through its successor Chai, and gets only 40, 80 or 100 millisecond slices of audio, mapping coarse frequency bins to the right workspace. It is supervised, so it knows nothing at first and cannot be trusted. One layer holds a teacher model training the small classifier; a second layer decides when the system trusts the small model enough to follow it. In the demo, set to Philip Glass's Knee Play 1 from *Einstein on the Beach*, early numbers lag badly, the ones heard more often learn faster, and by the end the lag between a spoken word and the action dropped to roughly 45 milliseconds. That number comes from a single live run and should be read as a demonstration rather than a benchmark. Oso is meant to carry this further: farming work out to normal coding agents when needed, but decision-first, recursively learning a user's preferences, and handing decisions to the fastest trustworthy model as trust builds.

The roots go back about 18 years to the Princeton Laptop Orchestra, which celebrated its 20th anniversary in spring, and to experiments in radical human-computer interfacing. In those pieces the laptop was the instrument: hitting four spots on the chassis triggered a drum kit through the accelerometers spinning hard drives carried, tilting the machine controlled effects, and networked laptops synced on low-latency Wi-Fi clocks. He learned to program and to do machine learning there, using Rebecca Fiebrink's Wekinator for real-time classification with k-nearest neighbors and single-layer neural nets, models closer to principal component analysis than to transformers.

He also shouts out an unrelated project called Hunch by Matt Mastracci, which runs an embedding model derived from Gemma 2 in the browser via WebGPU for a Pictionary-style doodle classifier at around 150 milliseconds. Both examples point at the same trend: small encoder and classifier models are becoming practical inside real interfaces.

## When should you use recursive decision models?

Recursive decision models fit problems where the available actions can be listed in code: navigating a browser DOM, choosing among product categories, controlling devices in a smart home, or steering a game. For those cases, a tree of classifier calls can replace a costly reasoning pass, and the state stays inspectable because it lives outside the model.

The pattern is less suited to open-ended generation. If the output is free text, a sentence, or a plan that does not exist until the model writes it, a generative step is required, and the recursive tree only helps around the edges. Weitekamp's own examples lean on pre-enumerated or programmatically defined trees, which is the honest limit of decisions all the way down: something has to have listed the allowed decisions, whether a script, another agent or the application itself.

A short checklist for deciding which side of the split a task falls on:

1. List every action or option the system may choose. If you cannot finish the list, the task needs generation.
2. Check whether the state can live outside the model and be sliced per decision. If not, the recursion has nothing stable to read.
3. Estimate how many decisions a task takes. Many cheap calls favor a classifier tree; a handful of complex calls may not repay the setup.
4. Decide whether parallel decisions will run. If they will, budget for an arbiter before any of them write state.
5. Keep a language model on the map for the residual cases, and route only what it cannot resolve.

Weitekamp describes the split as contrary forces that balance each other: language models diverge, and decision models converge. Infinite tokens give you infinite divergence, and someone still has to decide what reaches production. The composition is the interesting part, not either half alone. He frames the practice of prompting as contract creation, where you declare the end state and let the agent choose the method.

| Task type | Best fit | Why |
| --- | --- | --- |
| Product category routing | Classifier tree | 12,000 categories exceed one context; a walk stays cheap |
| Browser or computer use | Classifier tree | Actions on screen can be enumerated |
| Smart home commands | Both, via the map | Known phrases resolve by decision; vague requests need generation |
| Open-ended writing | Language model | Output does not exist until it is generated |
| Parallel audio intent | Classifier tree plus arbiter | Several channels propose actions at once |

## What the launch-day numbers and adoption claims do not show

Several figures circulate around this topic, and most of them are first-party vendor material. The 12,000-category Shopify catalogue, the Doom and Factorio demonstrations, and the smart home example all come from Type Safe, its cookbooks, or Weitekamp's own builds, so they show what the pattern can do in a controlled setting, not how it performs across a production fleet.

Weitekamp also points to figures from a financial workflow demonstration, where he says large banks rewrite documentation for roughly 4,000 quantitative models each year, work valued at $10 million to $50 million annually. That number arrived through secondhand reporting and describes a market estimate rather than a measured saving from running the pattern.

Nothing in the talk establishes that recursive decision models have replaced reasoning agents, that most teams use them, or that classifier trees are faster end to end in general. The evidence supports a narrower statement: for tasks with enumerable actions, a classifier-led tree can reach answers with fewer generative calls, and the pattern is demonstrated on several such tasks.

## FAQ

### What are recursive decision models in plain terms?

A recursive decision model is a tree of fast classifier calls where each node picks among pre-enumerated options and can trigger another classifier down to a fixed depth. Raymond Weitekamp of OpenProse proposed the pattern in November 2026, and it uses a language model only when a task cannot be handled by pointing at something that already exists.

### Do recursive decision models need a language model at all?

No. Weitekamp's third rule requires the pattern to work with no generative model in the loop, and he demonstrates category search and a game agent built entirely from classifier calls. A language model can still be added through the shared map when a generative step is unavoidable.

### How is this different from a recursive language model?

A recursive language model lets a root model call sub-models and ultimately language models at the leaves. Recursive decision models keep the same external-context and recursion structure but replace the leaves with classifier judgments, which converge on an option instead of generating text.

### What is the map in this architecture?

The map is a shared set of pointers to named actions, each with a short description and a function beneath it. Classifiers point at a name, code executes it, and a language model can add or edit entries so new behavior learned in conversation becomes available to the decision layer.

### What problem does the arbiter solve?

The arbiter gates which parallel decisions may change the state of the system. Running many cheap classifiers at once can produce colliding actions from different views of a changing state, so the arbiter applies something like a read-write lock and admits only decisions it trusts.

### Is the Oso computer-use agent available now?

As of the November 2026 talk, Oso was not ready and a waitlist was OpenAI oso.computer. Weitekamp described it as a computer-use agent built on recursive decision models, starting with voice input, with no public release date stated in the session.

### Does recursive decision models mean agents no longer need reasoning models?

Not broadly. The pattern shows that some tasks assumed to need reasoning can be handled by many small decisions when the available actions can be enumerated in code. Open-ended writing, planning, and tasks without a finite action set still require generation.

### Where can you read the original talk?

The session is published by AI Engineer as a conference talk, and the linked session page carries the description, speaker attribution, and demo resources. The [YouTube URL](https://www.youtube.com/watch?v=hFNbPmzzcEs) holds the full recording, and the OpenProse site lists the companion workshop material.

### How does this relate to building tools in TypeScript?

The patterns are language-agnostic, but teams that want to prototype an agent loop with structured contracts can start from a TypeScript stack. The [Crazystack Typescript](https://crazystack.com.br) program covers agent-oriented TypeScript foundations, and Gustavo Dev Doido runs the Bootcamp do Dev Doido for readers who prefer guided instruction over isolated tutorials.

## Turning the pattern into a shipping decision

A practical test for a new agent feature is whether its available actions can be written down in advance. If they can, a classifier-led tree with external state and an arbiter for parallel writes is worth prototyping, because each node is cheap and the state stays inspectable. If the output has to be written from scratch, keep a language model in the loop and use decisions only for routing.

Start small. Pick one routing choice your agent currently makes with a language model, replace it with a classifier over a short list of options, and measure the result against the old path on the same task set. That gives a real number instead of a borrowed demo.

The talk itself is a source of ideas rather than proof of a standard. Treat the demos as invitations to test the pattern on your own workflow, and keep vendor figures, speaker demonstrations, and independent measurements separate when you report what you find.

## From a recorded talk to a written explainer

The talk behind this article spent most of an hour on diagrams, live demos, and one speaker's reasoning about how decisions and generation fit together. Turning that into prose required keeping the three rules, the map, and the arbiter distinct, and marking clearly which numbers came from a live demonstration rather than a benchmark.

If you have a conference recording, a technical interview, or a long walkthrough with that same density of ideas, YouBlog can transcribe the video and produce a structured article draft you then edit. Paste the YouTube URL, review the transcription, and shape the result into something people can read and cite.

If your own videos hold knowledge worth reading, the same path works: send the video to [YouBlog](https://youblog.app/), transcribe it, and turn the transcript into an article that keeps the specifics instead of flattening them.

[Source video](https://www.youtube.com/watch?v=hFNbPmzzcEs)
