Envelope
Envelope researches how predictable the cost of agentic work becomes when a model can invoke programmatic capabilities that advance a task outside its context window.
Envelope’s unit of study is cost to accepted completion: the total cost required to satisfy a fixed task acceptance rule, failed attempts included.
Envelope’s goals:
- Telemetry that attributes cost and discerns distinct model failure modes.
- Lower, more predictable cost to accepted completion than standard agent harnesses.
- Reusable, versioned RLM environments qualified by evidence for each task class.
- Runtime policy enforced through environment construction, independent of model training.
- Machine-checked proof that no permitted capability composition can violate declared alignment definitions.
- An operating envelope any existing RLM host can run inside, not another agent product.
Why is Envelope relevant?
The costs and risks that firms and users are willing to accept with AI are inseparable from the reproducibility of model performance they experience and the assurance on model alignment that can be provided.
Envelope extends existing RLM harness designs with the telemetry needed to observe which tasks repeatedly reach accepted completion through high token spend rather than known-cost programmatic capabilities.
Such tasks can represent:
- Possible reward hacking or misaligned behavior by the model.
- Tasks that programmatic capabilities do not yet effectively advance for the model.
These are two distinct failure modes for models.
Reducing reward hacking and misaligned behavior is an exploit prevention endeavor; designing effective programmatic capabilities is a system design endeavor.
Envelope’s research bet is that cost to accepted completion will be lower and more predictable inside its runtime design because it has:
- Telemetry to identify, discern, and resolve these failure modes.
- Alignment enforced by the environment, not the model.
- An RLM core through which the model improves its own use of available capabilities.
RLM Harnesses
Envelope uses a Recursive Language Model (RLM) harness design.
Standard agent harnesses capture the task as a prompt that is injected into the model’s context window. Everything that occurs in subsequent turns is added to that same context window.
This means cost to accepted completion can be an order of magnitude different from one run to the next for the same task because token spend is an unbounded variable.
Cost per token does not predict cost to accepted completion per task.
An RLM harness (Zhang, Kraska, and Khattab, 2026) instead captures the task as a variable inside a Read-Eval-Print-Loop (REPL) program, and injects static instructions for interacting with the REPL program into the model’s context window.
Code is how the model examines the REPL program and takes action to advance the task. Code can bring parts of the task into the model’s context window, execute arbitrary actions, and invoke programmatic capabilities available to the model (such as tools and sub-RLMs).
The REPL program runs the model’s code and returns the requested data into the model’s context window. This loop repeats until accepted completion.
RLM References
- Zhang, A., Kraska, T., and Khattab, O. (2026). Recursive Language Models. https://arxiv.org/abs/2512.24601
-
Zhang, A., and Khattab, O. (2026).
Recursive Language Models (blog). https://alexzhang13.github.io/blog/2026/harness/ — post source pinned at
b076105 -
alexzhang13/rlm, read at commit72d6940142ddfb84ee6be573dc999a37e633e671. https://github.com/alexzhang13/rlm - Prime Intellect (2026). Prime Agent. https://www.primeintellect.ai/blog/prime-agent
-
PrimeIntellect-ai/prime-agent, read at commitc98941a.