Harness-R1: Learning to Edit Executable Runtime Harnesses from Agent Failure Trajectories
Harness-R1 introduces a novel method that uses online reinforcement learning to train a dedicated "harness engineer" to automatically generate executable runtime patches from agent failure trajectories, significantly improving task success rates across multiple benchmarks without requiring updates to the target agent's model weights.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you have a brilliant, super-smart robot assistant. You give it a job, like "find the perfect red shirt under $20," and it starts working. But sometimes, the robot gets confused. Maybe it clicks the wrong button, forgets what it was looking for, or gets stuck in a loop trying to buy the same item over and over. In the world of artificial intelligence, this robot is called an "agent," and the messy trail of its thoughts, actions, and mistakes is called a "trajectory."
Usually, when a robot makes a mistake, the only way to fix it is to go back to the drawing board and retrain its entire brain. That takes a lot of time and energy. But there's another way: instead of changing the robot's brain, you could change the "harness" it wears. Think of the harness as the robot's safety gear, its checklist, and its communication guide all rolled into one. It's the code that tells the robot how to talk to the world, how to check its work, and how to recover when it trips up. The big question researchers are asking is: Can we teach a robot to fix its own harness based on its past failures, without needing to retrain its brain every single time?
This is exactly what the paper "Harness-R1" explores. The researchers built a system where a special "Engineer" AI learns to rewrite the robot's harness by studying its past mistakes. Here's how it works: First, they let a standard robot (the "Target") try to solve tasks and fail. Then, the Engineer AI looks at those failure stories and writes a new set of instructions—a patch—to fix the harness. Crucially, they don't just guess if the patch is good; they actually put the patch on the robot and let it try the tasks again. If the robot succeeds more often, the Engineer gets a reward and learns to write better patches. If the patch makes things worse, the Engineer learns not to do that again.
The results are pretty cool. When they tested this on three different challenging games (shopping online, navigating a text-based house, and managing a database), the standard robot only succeeded about 44.3% of the time. After the Harness-R1 Engineer learned to fix its harness, the success rate jumped to 53.6%. That's a 9.3 percentage point improvement just by tweaking the harness, not the brain. Even better, they tried this on a robot that had already been trained to be smarter, and the Engineer still managed to boost its performance by another 5.0 points.
The paper also shows that this isn't just a fluke for one specific robot. The Engineer they trained could look at a brand new, different robot it had never seen before, study its failures, and write a custom fix that helped that new robot succeed too. This suggests that learning to edit the "harness" is a skill that can be taught to an AI, allowing it to co-evolve with the robots it helps, making them smarter and more reliable over time without ever needing to retrain their core brains.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.