Skip to content
Preprint

Harness-R1: Learning to Edit Executable Runtime Harnesses from Agent Failure Trajectories

Aug 2026 · 10 citations · ⚡ 2 influential · 44 references
Computer Science

TL;DR

This work introduces Harness-R1, the first method, to the authors' knowledge, that makes failure-conditioned, lifecycle-wide editing of an existing executable runtime a learned capability, and post-trains a dedicated harness engineer with online reinforcement learning so that its edits are optimized for the realized task success they produce.

Abstract

Agents built around large language models continually accumulate interaction trajectories during deployment, yet their behavior typically remains fixed. Beyond updating model weights, these trajectories can improve the agent harness that constructs context, mediates tools, validates actions, and recovers execution. We introduce Harness-R1, the first method, to our knowledge, that makes failure-conditioned, lifecycle-wide editing of an existing executable runtime a learned capability. It post-trains a dedicated harness engineer with online reinforcement learning so that its edits are optimized for the realized task success they produce, rather than proposed by a fixed editor. A separate 9B engineer converts batches of target-agent failures into validated executable patches; fresh same-batch reruns of the frozen target provide outcome rewards, so training updates only the engineer. Cold-start supervised fine-tuning initializes this editing policy, which is then trained online with group-relative policy optimization. Across WebShop, ALFWorld, and DBBench, Harness-R1 raises vanilla Qwen3.5-9B success from 44.3% to 53.6% (+9.3 percentage points). After direct target-agent fine-tuning, a target-specific engineer raises the average further from 59.2% to 64.2% (+5.0 points); because these gains hold both before and after fine-tuning the target, Harness-R1 points toward co-evolving the harness engineer and the target agent.

View source

Similar papers

#machine learning Preprint Jul 2026

Learning to Control LLM Agent Harnesses with Offline Reinforcement Learning

Large language model (LLM) agents are usually improved by changing prompts, models, or hand-written workflows, while the execution harness around the model is treated as fixed infrastructure. We argue that this harness is itself a learnable control layer. We formalize harness operation as a finite-horizon Harness MDP,...

Haiwen Yi, Xinyuan Song · 1 citation
#machine learning Preprint Aug 2026

EvoHarness-RL: Learning Self-Evolving Runtime Harness for Long-Horizon LLM Agents

EvoHarness-RL is introduced, which exposes Belief, Progress, and Experience (BPE) as policy-facing harness state and reveals two key dynamics: harness annealing, where training internalizes recurring harness-use patterns into the model policy and shifts the agent from frequent harness calls toward selective external-st...

Xuying Ning, Dongqi Fu, Tianxin Wei et al. · 0 citations
Preprint Aug 2026

AutoSaddler: Automatic Harness Optimization with Durable Updates from Agent Execution Traces

The proposed AutoSaddler, an automatic harness optimization framework that formulates harness improvement as an offline learning problem and iteratively updates the harness using failure signals from mini-batches, suggests that automatic harness optimization is a promising path toward more performant and reliable agent...

Sungho Park, Wonjoong Kim, Rongyuan Tan et al. · 15 citations · ⚡1
Jul 2026

Recursive Harness Self-Improvement

Recursive Harness Self-Improvement is introduced, which represents the harness as a prompt-level specification of the agent loop and iteratively refines it using pairwise feedback over its own revision history, suggesting RHI as a practical algorithm for continual learning within the paradigm of model--harness co-evolu...

Hyunin Lee, Jinglue Xu, Jeffrey Seely et al. · 10 citations
Preprint Aug 2026

LEGO-RL: Harness-Native Reinforcement Learning for Coding Agents

Reinforcement learning for coding agents increasingly relies on long-running agent harnesses to manage tool integration, repository contexts, and execution feedback. However, the native execution environments of these harnesses are inherently misaligned with policy-gradient training: environmental crashes and reward ha...

Yi-Ming Du, Yu-Xin Jiang, Tao Yuan et al. · 3 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.