Self-Evolving Coding Agents via Harness-Policy Optimization

Zhepei Wei, Wenlin Yao, Baolin Peng, Danqing Wang, Qianhui Wu +3 more
10/16/2026
cs.CLcs.AI
rl

No confident code implementation found for this paper.

Abstract

Large language model (LLM) agents have shown promising potential in coding tasks, and their performance is jointly determined by the policy model and the harness that mediates their interaction with the environment. Indeed, harness and policy are mutually reinforcing and evolving only one component is suboptimal---a harness tuned for one checkpoint may not target the failure modes of an updated policy, while policy learning remains limited to the trajectories elicited by a fixed harness.

Show full abstract

In light of this, we propose Self-HPO, a recursive self-improving framework for coding agents that alternates harness and policy optimization, using the evolving policy as its own harness proposer. Specifically, in each round, the current policy first analyzes its own failures and proposes new harness candidates (H-step). The policy is then updated through reinforcement learning (RL) under the selected harness (P-step), and hard tasks identified during training form the next harness search set, keeping harness optimization targeted to the policy's evolving failure modes. Across three coding benchmarks, Self-HPO consistently outperforms harness-only and policy-only baselines, improving Qwen3.5-35B-A3B's average resolve rate from 57.8% to 64.8%, with gains generalizing to out-of-distribution settings. Further analysis shows that both optimized components retain gains even when paired with their base counterparts, while their joint gain exceeds the sum of their individual gains. Self-HPO also improves reliability (Pass@1) and expands the capability frontier (Pass@k) over the base agent. Additionally, we show that with a stronger external model (e.g., Opus 4.8) as the harness proposer, the same framework yields a further performance boost.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{wei2026selfevolving,
  title  = {Self-Evolving Coding Agents via Harness-Policy Optimization},
  author = {Zhepei Wei and Wenlin Yao and Baolin Peng and Danqing Wang and Qianhui Wu and Hao Cheng and Yu Meng and Jianfeng Gao},
  year   = {2026},
  eprint = {2610.22791},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.22791v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2610.22791.svg)](https://codeofpaper.com/paper/2610.22791)

Discussion