Agents & Tool Use · 2025

Recursive Language Models

Alex L. Zhang, Tim Kraska, Omar Khattab

Proposed treating long prompts as external environment that LLMs programmatically examine and recursively call themselves over, enabling processing of inputs orders of magnitude beyond context window limits.

Editorial record

Plain-language summary

Recursive Language Models treat the user prompt as a variable in a REPL environment rather than feeding it directly into the neural network. The LLM writes code to peek into and decompose the prompt, and iteratively invokes itself recursively over programmatic snippets. This paradigm processes inputs more than 10x beyond context limits while dramatically outperforming vanilla frontier LLMs and common long-context scaffolds, maintaining strong performance even at 10M+ token scale with comparable cost.

Source record

Provenance

Record ID
P-665
Record created
2026-08-12
Last reviewed
2026-08-12
Record version
1

Citation caveat: Citation metadata is approximate and marked unverified in the source dataset.