Papers
arxiv:2610.22791

Self-Evolving Coding Agents via Harness-Policy Optimization

Published on Oct 16
Β· Submitted by
Zhepei Wei
on Oct 20
Authors:
,
,
,
,
,
,
,

Abstract

Self-HPO is a recursive framework that alternates harness and policy optimization for coding agents, improving performance by targeting evolving failure modes through reinforcement learning.

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. 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.

Community

Paper submitter

🀩 Introducing Self-HPO: let the coding agent improve its own harness, then train a stronger policy model with the optimized harness, and repeat the process for recursive improvement!

πŸ’ͺ Self-evolving: no external model required
🎯 Harness search targets the policy's evolving failure modes
πŸ“ˆ Avg over SWE-Bench Verified/Multilingual/Pro: 57.8% β†’ 64.8%

=== Resources ===
πŸ“„ Paper: https://arxiv.org/abs/2610.22791
πŸ’» Code: https://github.com/MSR-Orchard/Self-HPO
πŸ€— Models & data: https://huggingface.co/self-hpo
πŸ“ Blog: https://weizhepei.com/blog/self-hpo/
🧡 X thread: https://x.com/weizhepei/status/2112260175000461453

Really nice to see the Self-HPO weights released under Apache-2.0 alongside the paper. For me the most convincing result is the cross-evaluation in Table 3: H2 alone on the base policy gives +3.5, P2 alone under the seed harness +3.4, and together +8.5 on SWE-Verified, so the two components compound rather than overlap. The optimized harness in Figure 5 is also refreshingly concrete (budget-rescue prompt, empty-patch guard, an API check before the first submit, git-diff fallback). Have you looked at how much of H2's gain on the base policy comes from each of those four interventions individually, and whether the 2.2-point pass@1 drop on the already-Resolved group is linked to one of them, e.g. the delayed first submission?

This is an automated message from the ResearchStudio team.

We created an interactive ResearchStudio Reel for this paper. It includes a visual poster, a video, and a blog, all available for download in editable formats.

Visual poster for this paper

Open the ResearchStudio Reel β†’

Download all files from Hugging Face

Please give this comment a thumbs up if you find the Reel helpful!

Want to explore or create Reels for more papers? Visit the ResearchStudio demo.

Sign up or log in to comment

Get this paper in your agent:

hf papers read 2610.22791
Don't have the latest CLI?
curl -LsSf https://hf.co/cli/install.sh | bash

Models citing this paper 2

Datasets citing this paper 1

Spaces citing this paper 1

Collections including this paper 0

No Collection including this paper

Add this paper to a collection to link it from this page.