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.
Fudan University(复旦大学);Shanghai Key Laboratory of Data Science(上海市数据科学重点实验室);College of Computer Science and Artificial Intelligence, Fudan University(复旦大学计算机科学与人工智能学院)
Harness Updating Is Not Harness Benefit: Disentangling Evolution Capabilities in Self-Evolving LLM Agents
The Pennsylvania State University(宾夕法尼亚州立大学);UC Santa Cruz(加州大学圣克鲁兹分校);Amazon(亚马逊);Emory University(埃默里大学);UIUC(伊利诺伊大学香槟分校);Northeastern University(东北大学)
Doc2Harness: Benchmarking LLMs on Long-Horizon Harness Engineering of Coding Agents
Institute of Computing Technology, Chinese Academy of Sciences(中国科学院计算技术研究所);Tsinghua University(清华大学);Peking University(北京大学);Southeast University(东南大学)
SafeCoEvo: Co-Evolving Safety Harnesses and Guards for LLM Agents at Test-Time
East China Normal University(华东师范大学);Shanghai Innovation Institute(上海创新研究院);Xiamen University(厦门大学);Harbin Institute of Technology(哈尔滨工业大学);University College London(伦敦大学学院);Huawei Noah’s Ark Lab, UK(华为诺亚方舟实验室(英国));MemoraX AI
RSIFlow: Adaptive Self-Improvement Workflows with an Evolving Meta-Agent
Beijing Advanced Innovation Center for Future Blockchain and Privacy Computing(未来区块链与隐私计算北京高精尖创新中心);School of Artificial Intelligence(人工智能学院);Beihang University(北京航空航天大学);Tsinghua University(清华大学);Beijing Academy of Artificial Intelligence (BAAI)(北京人工智能研究院)
EvoCodeBench: A Human-Performance Benchmark for Self-Evolving LLM-Driven Coding Systems
Nanyang Technological University(南洋理工大学);East China University of Science and Technology(东华大学);Guangdong Ocean University(广东海洋大学);City University of Hong Kong(香港城市大学);Stanford University(斯坦福大学)
SEAGym: An Evaluation Environment for Self-Evolving LLM Agents
Department of Automation, Tsinghua University(清华大学自动化系);Beijing National Research Center for Information Science and Technology (BNRist), Tsinghua University(北京信息科学与技术国家研究中心(BNRist),清华大学)
HarnessForge: Joint Harness and Policy Evolution for Adaptive Agent Systems
Beijing Advanced Innovation Center for Future Blockchain and Privacy Computing, School of Artificial Intelligence, Beihang University(北京未来区块链与隐私计算先进创新中心,人工智能学院,北京航空航天大学);Tsinghua University(清华大学)