Training the Whole Agent, Not Just the Model
AuthorsLingxiao Tang, Wei Tao, Yiwen Guo, Lingfeng Bao
Affiliations[
HarnessAdapt-RL improves coding agents by evolving their tools and interaction setup alongside the model during training.
Key results
Qwen3.5-9B used for policy training.
Pass@1 percentage-point gain over GRPO.
Pass@1 percentage-point gain over GRPO.
Pass@1 percentage-point gain over GRPO.
Share of groups with both successful and failed attempts, versus 39.0% with near-answer hints.
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 paperMore in Code Generation
Browse all 46 papers →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.
WebCoder: Scaling General Frontend Development with Artifact-Grounded Agentic Reinforcement Learning
Zijun Dou, Zhen Yang, Xijun Liu, Dongzhuoran Zhou, Aohan Zeng, Jie Tang
WebCoder trains an AI agent to build and improve full frontend projects by learning from how its code changes perform in a live application.
Compact Documentation for Coding Agents: A Benchmark, an Optimizer, and Why It Does Not Transfer
Md Shohel Arman, Igor Molybog
Better code documentation can faithfully reconstruct software, but surprisingly does not necessarily help AI coding agents fix real issues when the source code is already available.