MIT study finds trained agent harnesses generalize to longer tasks

A new paper argues the software wrapped around a model is a training target in its own right, reporting that a recursive harness learned on short tasks and handled versions up to 64 times longer.

Illustration of a large robot at a desk passing pages from tall stacks of documents to a row of smaller robots, each working at its own spot. Image: AgenticFeed illustration

The harness, the software layer that sits between a language model and its environment, can do more than prop up a weak model, according to a paper released November 20 by MIT PhD student Alex L. Zhang with co-authors Souradip Chakraborty and Omar Khattab, his adviser. In "Language Model Harnesses Can Be Compositional Generalizers," they report that models trained with reinforcement learning inside a recursive harness learned on short tasks and then handled versions 2 to 64 times longer.

The work pushes back on a common prediction about AI agents. Announcing the paper on X, Zhang wrote that "a common idea floating around is that LLMs will absorb harnesses and make them obsolete," adding: "We disagree." On Saturday it was listed as the top trending paper on alphaXiv, where it was published.

The problem with one growing prompt

Most agent harnesses append every step of a task to a single growing prompt, an approach Zhang called "trajectory-as-a-prompt." The paper's abstract says this design accumulates context "that the neural network is forced to generalize to," which makes training for long tasks "expensive and time-consuming."

The authors study an alternative they describe as neurosymbolic harnesses, which keep context outside the model and manage it with code. Their main example is the Recursive Language Model, or RLM. In an RLM, the full input lives as a variable in an interactive code environment, and the root model writes code to inspect it and hands smaller pieces to sub-model calls, according to the paper.

The researchers argue this keeps each model call "locally in-distribution," meaning every piece the model sees resembles work it can already do, even when the overall task is new. Zhang compared the idea to MapReduce in his thread, noting that most real tasks break down into constituent parts.

Length and domain transfer

In the length experiments, the team trained Qwen3-30B-A3B-Instruct-2507 on short versions of six tasks and evaluated it on longer ones. On the OOLONG benchmark, for example, training used a 32,000-token split and evaluation a 256,000-token split, the paper says.

The abstract says the RLM harness learned these decompositions "readily" under reinforcement learning while "the base neural LM improves less." It also reports that training on one domain transferred to new domains sharing a similar underlying structure. Results varied by task, and the paper notes that other harnesses matched or beat RLM in some individual settings.

Training on fake tools

For long tasks where real rollouts are too costly, the authors propose what they call surrogate harness training. A model is trained in synthetic environments with cheap tools and fake sub-calls, then run with the real ones. Zhang wrote that Anthropic's Claude Opus 5.5 generated the synthetic tasks.

Using that method, the team fine-tuned a model called RLM-27B. Across eight held-out long-context benchmarks such as CTC-Bench, it averaged 58.5 against 46.1 for Qwen3.8-27B running in the same harness, a 26.9% relative gain, the paper reports. The abstract says the trained model also used roughly half as many tokens at inference time.

The paper also tested chaining. When RLM-27B had to solve four tasks in sequence, each handled by a fresh sub-harness, it completed the full chain 55.2% of the time, rising to 77.5% after fine-tuning on recursion-specific synthetic data, according to the paper.

The authors released their code and data alongside the paper. Zhang credited the Laude Institute's Slingshot program for compute and said most of the training infrastructure ran on Prime Intellect's prime-rl library.

In his thread, Zhang argued that the definition of a harness is broader than tools such as Claude Code or SWE-Agent. Even "a language model that can simply invoke swarms of language models is a harness," he wrote, adding that he is curious whether "weirder harness designs emerge" once models are trained around them.

Source: alphaXiv, Alex L. Zhang, Souradip Chakraborty, Omar Khattab, “Language Model Harnesses Can Be Compositional Generalizers”

Additional sources: Alex Zhang on X, Alex L. Zhang, “Paper announcement thread”

Get the AgenticFeed newsletter

A free, regular roundup of the agent stories that matter. No spam, and you can unsubscribe at any time.

Want to reach readers following AI agents? Advertise with AgenticFeed

Next event · 30 Nov, 2026

AWS re:Invent 2026 in Las Vegas

AWS’s annual conference runs Nov. 30 to Dec. 4. Matt Garman’s CEO keynote is on Dec. 1, and the catalog lists more than 2,200 sessions.

The AgenticFeed newsletter

A free, regular roundup of the agent stories that matter. No spam.