Recursive Coding Agents and Inference-Time Compute
AI Engineergo watch the original →
the gist
Recursive Language Models (RLMs) improve agent reliability by treating the context as an object of computation, allowing agents to decompose tasks into recursive sub-agent calls.
The RLM Paradigm
Recursive Language Models (RLMs) shift the focus from raw model intelligence to orchestration and inference-time compute. By treating the context window as a variable that can be manipulated symbolically, RLMs allow agents to decompose complex tasks into sub-agent calls. This approach effectively unifies reasoning and tool calling, enabling models to process information far exceeding their native context window limits.
Implementing Recursive Coding Agents
To transform standard coding agents into recursive systems, developers should focus on externalizing the prompt and enabling symbolic state manipulation. Key implementation strategies include:
- Recursive Harnessing: Utilize frameworks like
dspy.rlmorAenticato allow agents to call instances of themselves, effectively creating a tree of sub-tasks. - Dynamic Workflows: Use Claude Code Dynamic Workflows to define recursive patterns, such as deep research over a file system or parallelized refactoring tasks.
- Declarative Workflows: Use OpenProse to write markdown-based specifications that define sub-agent dependencies, required skills, and specific CLI tool access, ensuring agents are configured correctly before execution.
- Session Capture: Deconstruct successful "golden sessions" into reusable OpenProse workflows to ensure consistent performance across future tasks.
Performance and Reliability
RLM-based agents demonstrate superior performance on long-reasoning benchmarks compared to standard LLMs. For instance, smaller models like Qwen 3.5-7B, when configured as an RLM, can outperform frontier models on tasks requiring long chains of thought. The primary benefit of this architecture is increased reliability; by forcing agents to verify work through sub-agent recursion and symbolic execution, developers can reduce the likelihood of catastrophic errors in complex coding tasks.