NTH

Training the Whole Agent, Not Just the Model

AuthorsLingxiao Tang, Wei Tao, Yiwen Guo, Lingfeng Bao

Affiliations[

October 26, 2026 2 min read
Watch on YouTube
The one-line take

HarnessAdapt-RL improves coding agents by evolving their tools and interaction setup alongside the model during training.

Key results

9B
Base model size

Qwen3.5-9B used for policy training.

9.8
SWE-bench Verified improvement

Pass@1 percentage-point gain over GRPO.

12.6
SWE-bench Multilingual improvement

Pass@1 percentage-point gain over GRPO.

6.4
SWE-bench Pro improvement

Pass@1 percentage-point gain over GRPO.

46.5%
Mixed rollout groups with mechanism-level skills

Share of groups with both successful and failed attempts, versus 39.0% with near-answer hints.

7.7
Pass@1 loss without evolved harness

Maximum percentage-point drop when evolved tools and hooks are removed at deployment.

What the paper found

HarnessAdapt-RL trains a coding agent and adapts its runtime harness together, rather than optimizing the model against fixed tools. During reinforcement learning with GRPO, one teacher derives task-specific mechanism-level skills from repair trajectories, while another evolves tools and runtime hooks to address recurring interaction failures. A proposed change is retained only if it raises the observed pass rate or trainable rate without lowering either. Experiments used the 9B Qwen3.5-9B model, GLM-5.3-Flash for skill generation, and OpenAI’s GPT-5.6 Sol through Codex for harness changes. Mechanism-level skills yielded mixed success-and-failure rollout groups 46.5% of the time, compared with 39.0% for near-answer hints, providing more reward contrast for policy learning; importantly, skill-related gains remained after skills were removed at evaluation. Against GRPO, pass@1 improved by 9.8 percentage points on SWE-bench Verified, 12.6 on SWE-bench Multilingual, and 6.4 on SWE-bench Pro, and the method also outperformed GRPO using the human-designed OpenHands harness. The results support treating the deployed agent as a model–harness pair: removing the evolved tools and hooks reduced pass@1 by as much as 7.7 percentage points, even with policy weights unchanged.

Original abstract

Training coding agents typically updates the policy while keeping the harness fixed. During training, trajectories reveal flawed repair strategies and interaction problems that vary across tasks and change as the policy learns. We introduce HarnessAdapt-RL, which trains the policy and adapts its harness during reinforcement learning. For flawed repair strategies, a frozen teacher generates task-specific mechanism-level skills. For interaction problems recurring across tasks, a separate teacher model evolves tools and hooks, keeping each change only if it improves the observed pass rate or the observed trainable rate without lowering either. The policy trains with the adapted harness, and its new trajectories guide further adaptation. With a 9B base model, HarnessAdapt-RL improves pass@1 over GRPO by 9.8, 12.6, and 6.4 percentage points on SWE-bench Verified, Multilingual, and Pro, and outperforms GRPO with the human-designed OpenHands harness. Gains from mechanism-level skills persist after their removal at evaluation. Re-evolving tools and hooks as the policy changes outperforms freezing early versions. Removing them at deployment, in contrast, costs up to 7.7 percentage points. Training therefore produces a model-harness pair: the trained policy and the evolved tools and hooks, with skills removed at deployment.

Read the original paper

More in Code Generation

Browse all 46 papers →
01Code Generation

Self-Evolving Coding Agents via Harness-Policy Optimization

Zhepei Wei, Wenlin Yao, Baolin Peng, Danqing Wang, Qianhui Wu, Hao Cheng, Yu Meng, Jianfeng Gao

Self-HPO helps coding agents improve both their problem-solving policy and the tools and workflows that guide it.

Read analysis