Self-Evolving Agent Harness

Chuyang Wei, Haoxiang Guan, Minghang Zhu, Kexin Zhou, Jiyan He, Xiren Zhou, Huanhuan Chen, Yifei Shen

Harness self-evolution improves agent performance by iteratively revising software scaffolding while keeping model weights fixed.

How can we improve agent performance by iteratively updating the software scaffolding (prompts, memory, workflows) around a fixed model, rather than retraining the model itself?

Agents often struggle to adapt to changing tasks after deployment, but retraining model weights is computationally expensive and difficult to audit. Harness self-evolution addresses this by iteratively revising the agent's "harness"—the prompts, memory, workflows, and tools governing execution—while keeping the underlying model weights frozen. On the SpreadsheetBench task, this approach using HarnessOpt improves accuracy by up to 11.39 percentage points over baseline skill-optimization methods.

Paper Primer

The core mechanism hinges on a feedback-driven lifecycle: the system uses execution rollouts to diagnose failures, propose revisions to the harness, and admit candidates based on validation performance. This process is like a software patch-management system: it treats the agent's operational logic as a modular, updatable codebase that persists across runs, allowing the agent to "learn" reusable procedures without modifying its core intelligence.

Harness self-evolution provides significant performance gains over static or non-persistent skill-editing methods.

In SpreadsheetBench evaluations, HarnessOpt with skill-editing outperformed SkillOpt-Lite by 5.69–11.39 percentage points across four different model sizes.

Persistent harness revisions can reduce long-term operational costs in repetitive tasks.

In a simulated office workload, an "Everything Is a Plugin" (EIP) architecture reduced token usage by 110,351 and wall time by 22.97 seconds after five tasks compared to the baseline. Significant cumulative resource savings over repeated task execution.

Why focus on the "harness" rather than just retraining the model weights?

Revising the harness allows for direct inspection, version tracking, and lower maintenance costs, as it avoids the need for expensive retraining or weight checkpoints while preserving task-specific lessons.

What is the primary risk of allowing an agent to evolve its own harness?

Persistent revisions can propagate faulty procedures or "specification gaming" across tasks, potentially leading to correlated errors or harmful behaviors that are difficult to reverse once they become part of the agent's standing rules.

Introduction to Harness Self-Evolution

We frame the challenge of adapting agents via harness self‑evolution while keeping model weights fixed.

Current large‑model training is compute‑heavy and static, so adapting to new tasks requires costly retraining. By contrast, the paper proposes to evolve only the agent’s software harness—prompts, memory, workflows, and executable components—while keeping the model weights immutable. This reframes adaptation as a feedback‑driven revision process that can persist across runs.

Instead of changing the neural network itself, we treat the surrounding software (prompts, memory, workflows, and tools) as a mutable component that can be updated from execution feedback while the model stays fixed.

**Figure 1.** From reusable instructions and procedures to revisable executable components.

The shift from model‑centric to harness‑centric optimization enables continual adaptation without costly retraining.

Defining the Agent Harness

Defines the harness, its decomposition with the model, and the self‑evolution update loop.

The harness is the software layer that orchestrates how a fixed model $M$ runs inside a task environment $E$ — it decides which prompts, tools, memory policies, and scheduling rules to apply.

Is the harness the same thing as the model?

No. The model $M$ contains only the learned parameters; the harness $H$ contains all the surrounding code, prompts, and policies that direct how $M$ is used. Updating $H$ changes behavior without any weight change.

We view the system as two orthogonal pieces: the immutable model $M$ (its weights) and the mutable harness $H$ (all software, prompts, and policies that steer $M$).

Why separate the harness from the model?

Separating $H$ from $M$ lets us improve task performance by editing lightweight software rather than retraining billions of parameters. The cost of changing $H$ is orders of magnitude lower than fine‑tuning $M$.

**Table 1.** Runtime functions of a harness. An implementation may combine these functions rather than assign each to a separate module.

Rollout 1: $H_0$ receives the question “Is the sky blue?” → answers “yes”. $J$ scores the answer 1 (correct).

Rollout 2: $H_0$ receives the question “Is water dry?” → answers “yes”. $J$ scores the answer 0 (incorrect).

The Update operator sees one correct and one incorrect outcome; it proposes to prepend a verification sub‑agent that checks factuality before answering.

Because the verification sub‑agent improves the score (new $J$ would be 1 for both rollouts), the proposal is admitted, producing $H_1$ with an added verification step.

In the next round, $H_1$ runs the same two questions; both are answered correctly, yielding $J$ scores of 1 each.

The example shows how a purely software change (adding a verification sub‑agent) can raise performance without touching the model weights, illustrating the core advantage of harness self‑evolution.

How does harness self‑evolution differ from fine‑tuning the model?

Fine‑tuning changes the parameters of $M$, requiring gradient computation and often many hours of GPU time. Harness self‑evolution only rewrites $H$, which is a lightweight software edit that can be applied instantly and rolled back if needed.

Two operational requirements underpin the loop: (1) the system must be able to collect feedback from its own executions and feed it back into the Update algorithm; (2) accepted revisions must be persisted and loaded for subsequent runs, ensuring continuity across interactions.

Taxonomy of Evolutionary Search

We map the evolutionary search methods that modify agent harnesses.

We categorize the evolutionary search methods that drive harness self‑evolution.

Algorithms that iteratively propose, evaluate, and select modifications to an agent’s harness based on feedback, while keeping the underlying model fixed.

3.1 Tools and Code Patches focuses on component‑level revision, where only callable procedures or modules are mutated while entry points and I/O contracts stay unchanged. Candidate patches replace implementations or extend interfaces, and archives preserve alternatives for later search.

3.2 Repository and Runtime Logic exposes the orchestration loop, execution hooks, and termination logic to revision. Whole‑agent synthesis searches complete control programs, and repository evolution retains lineages for later selection and deployment.

3.3 Everything Is a Plugin (EIP) treats every mutable object—components, bindings, or services—as a plugin that can be generated, validated, and mounted during operation. Interfaces enforce compatibility, but validation is required before adoption.

**Figure.** A taxonomy of evolutionary search methods used in agentic systems, organized into eight categories: Elitist (1+1) search, Elitist (1+$\lambda$) search, Archive-based search, Recombination, Quality-diversity, Cooperative coevolution, Pareto selection, and Bandit-guided evolution. Each category includes a brief description of its mechanism and a list of representative methods with their corresponding citations.

Each iteration keeps a single incumbent and generates one offspring; the better of the two survives.

One parent produces $\lambda$ offspring per generation; the best offspring replaces the parent.

Maintains an archive of diverse solutions; new candidates are added if they improve novelty or quality.

Combines parts of two or more parent solutions to create offspring, leveraging complementary strengths.

Optimizes for both performance and behavioral diversity, populating a map of elites across a descriptor space.

Decomposes a problem into subcomponents that evolve jointly, each subpopulation optimizing its part while cooperating with others.

Maintains a set of non‑dominated solutions across multiple objectives, selecting offspring that improve the Pareto front.

Uses multi‑armed bandit algorithms to allocate evaluation budget among candidate generators, favoring those that historically yield better improvements.

Table 2 reports SpreadsheetBench accuracy: HarnessOpt (HO) alone reaches 76.51 % on GPT‑5.4‑nano, and HO + skill improves to 77.58 %, surpassing SkillOpt‑Lite by up to 11.39 % points across models.

Table 3 shows the cost impact of DSH Everything (EIP): the first task requires 13 tool calls, 41 119 tokens, and 15.49 s wall time; cumulative savings appear after the fourth task, with a net reduction of 22.97 s by the fifth task.

Table 4 lists LiveBrowseComp scores: XYZ + dsh‑everything attains 51.39, beating XYZ‑Aquila‑mini (48.7) and ranking first among sub‑40B models, illustrating the potential reuse benefit of plugin‑driven harnesses.

Mechanisms and Empirical Results

Key theoretical guarantees for harness self‑evolution with execution‑guided proposals.

Execution‑Guided Proposals with harness optimization reach 85.77% accuracy on SpreadsheetBench under the HO + skill condition.

Table 2 shows the HO + skill column attaining the highest accuracy for every model, with GPT‑5.5 achieving 85.77%.

Instead of differentiating through code edits, the system proposes concrete edits, runs them, and keeps only those that improve a validation metric.

A benchmark suite that evaluates a harness by measuring how accurately it can execute spreadsheet‑style tasks under varying skill and harness‑optimization conditions.

Candidate acceptance loop for execution‑guided proposals.

**Table 2.** SpreadsheetBench accuracy (%), converted from proportions in Table 3 of Shen et al. (2026a). HO: HarnessOpt; + skill: with-skill condition.

**Table 3.** EIP spreadsheet costs (Pan, 2026).

**Figure 3.** Latency adapted from Shen et al. (2023); client–edge in green

Applications and Societal Impacts

We quantify how persistent harness revisions affect knowledge sharing, reliability, and accountability across five domains.

Harness self‑evolution improves outcomes across five application domains.

We observe benefits in personal workspaces, enterprise automation, scientific discovery, robotics, and public services.

Compared with static harnesses, revisable harnesses enable persistent knowledge sharing while introducing new challenges for tracking changes and preventing the spread of faulty procedures.

Future Directions

We outline research avenues for model–harness co-design, distributed execution, plugin lifecycle, continual validation, and safety.

The executable‑revision cases in Section 3 illustrate how a system can modify its runtime behavior while keeping the model fixed. We call this process runtime revision: updating prompts, memory structures, or workflow logic without touching the model weights, which opens a range of research questions.

The model–harness crossover highlighted in Section 3.2 raises the question of how to split adaptation effort between the fixed model and its mutable harness. Future work should run budget‑matched studies that compare model selection, skill optimization, runtime revision, and weight updates, measuring both adaptation cost and downstream execution cost. Experiments that test frozen, transferred, and re‑evolved harnesses across checkpoints will reveal which gains transfer and which require further harness evolution, while joint adaptation studies should explore update orders that preserve earlier capabilities.

Runtime revision can also shift where computation happens, prompting studies of distributed execution on edge infrastructure. A fixed‑deployment benchmark comparing a Jetson Nano client, an RTX 4090 edge server, and a cloud Azure instance shows trade‑offs in communication cost and latency for mixed workloads. Future experiments must incorporate harness synthesis, validation, and distribution costs, evaluating deployment choices under varying network conditions, update frequencies, and privacy constraints.

Plugins—modular harness components such as specialized prompts or tool wrappers— incur creation overhead but can amortize costs through reuse. Upcoming studies should quantify how many related tasks are needed to recover generation and validation costs at equal quality, while varying task similarity, reuse frequency, and interface changes. Admission tests must assess how a locally valid plugin influences shared state and the behavior of other system components.

Continual validation tracks whether a harness remains effective as tasks drift over time, requiring fresh independent tasks for admission and separate statistical controls for adaptive reuse. Future work should separate calibration of the evaluation metric $\eta$ (Equation 9) from evaluator changes to avoid bias, and allocate budgets among calibration, admission, and regression checks. Protecting the objective J does not prevent specification gaming, so defenses must be evaluated on attack success, isolation time, and legitimate‑work overhead.

Self‑modifying systems that can revise their own harness raise safety concerns, calling for external safeguards that complement model alignment. Recommended measures include least‑privilege, time‑limited grants, isolation, and roll‑back mechanisms that only affect actions within a defined recovery model. Open challenges involve validating composed behavior, revoking grants as dependencies evolve, and measuring defenses by attack success, isolation time, and legitimate‑work overhead.

Conclusion and Technical Appendix

Appendix wraps up the framework and lists the cited works.

Our framework defines harness self‑evolution as a feedback‑driven process that continuously revises the agent’s software scaffolding while keeping the underlying model weights fixed. It isolates where mutations occur, separates search capability from persistence, and distinguishes between expected generalization, budget‑constrained retention, and high‑probability acceptance under fresh validation.

Persistent revisions preserve acquired knowledge but can also propagate errors irreversibly; therefore, deployment demands continual validation against distribution shift and evaluator drift, with independent controls over learning, runtime privileges, and consequential actions.

Lakshya A Agrawal, Shangyin Tan, Dilara Soylu, Noah Ziems, Rishi Khare, Krista Opsahl‑Ong, Arnav Singhvi, Herumb Shandilya, Michael J Ryan, Meng Jiang, Christopher Potts, Koushik Sen, Alexandros G Dimakis, Ion Stoica, Dan Klein, Matei Zaharia, and Omar Khattab. GEPA: Reflective prompt evolution can outperform reinforcement learning. ICLR 2026.

Anthropic. Equipping agents for the real world with agent skills, 2025.

Anthropic. How Claude remembers your project. 2026.

Yuntao Bai, Saurav Kadavath, Sandipan Kundu, Amanda Askell, Jackson Kernion, Andy Jones, et al. Constitutional AI: Harmlessness from AI feedback, 2022.

Bowen Baker, Joost Huizinga, Leo Gao, Zehao Dou, Melody Y Guan, Aleksander Madry, Wojciech Zaremba, Jakub Pachocki, and David Farhi. Monitoring reasoning models for misbehavior and the risks of promoting obfuscation, 2025.

Avrim Blum and Moritz Hardt. The ladder: A reliable leaderboard for machine learning competitions. ICML 2015.

Rishi Bommasani, Kathleen A Creel, Ananya Kumar, Dan Jurafsky, and Percy Liang. Picking on the same person: Does algorithmic monoculture lead to outcome homogenization? NeurIPS 2022.

Qianshu Cai, Yonggang Zhang, Xianzhang Jia, Huajiang Zheng, Wei Xue, Jun Song, Xinmei Tian, and Yike Guo. Moss: Self‑evolution through source‑level rewriting in autonomous agent systems, 2026a.

Qianshu Cai, Yonggang Zhang, Jun Nie, Maohao Ran, Huajiang Zheng, Jun Song, Xinmei Tian, Yike Guo, and Wei Xue. A theory of reliable self‑evolution for agent harnesses, 2026b.

Jun Shern Chan, Neil Chowdhury, Oliver Jaffe, James Aung, Dane Sherburn, Evan Mays, Giulio Starace, Kevin Liu, Leon Maksin, Tejal Patwardhan, Lilian Weng, and Aleksander Madry. MLE‑bench: Evaluating machine learning agents on machine learning engineering, ICLR 2025.

Jixuan Chen, Jiaxin Zhang, Qinyuan Ye, Yada Pruksachatkun, Haoxiang Zhang, Jingming Zhuo, Yifan Zhang, Yutong Dai, Juntao Tan, Xiangyu Peng, Silvio Savarese, Zeyuan Chen, Lianhui Qin, and Chien‑Sheng Wu. CoTrace: Data recipes for training terminal agents with harness‑model co‑evolution, 2026a.

Tingyang Chen, Shuo Lu, Kang Zhao, Weicheng Meng, Hanlin Teng, Tianhao Li, Chao Li, Xule Liu, Jian Liang, Zhizhong Zhang, Yuan Xie, Heng Qu, Kun Shao, and Jian Luan. Harnessx: A composable, adaptive, and evolvable agent harness foundry, 2026b.

Xi Chen, Christos Papadimitriou, and Binghui Peng. Memory bounds for continual learning. FOCS 2022.

Yongrui Chen, Yangyang Ma, Xiaoying Huang, Shenyu Zhang, Huajun Chen, Haofen Wang, and Guilin Qi. StressEval: Failure‑driven dynamic benchmarking for knowledge‑intensive reasoning in large language models, 2026c.

Danielle Keats Citron. Technological due process. Washington University Law Review 2008.

DeepSeek‑AI. DeepSeek harness, 2026.

Aarya Doshi, Yining Hong, Congying Xu, Eunsuk Kang, Alexandros Kapravelos, and Christian Kästner. Towards verifiably safe tool use for LLM agents, 2026.

Cynthia Dwork, Vitaly Feldman, Moritz Hardt, Toniann Pitassi, Omer Reingold, and Aaron Roth. Generalization in adaptive data analysis and holdout reuse. arXiv 2015a.

Cynthia Dwork, Vitaly Feldman, Moritz Hardt, Toniann Pitassi, Omer Reingold, and Aaron Roth. The reusable holdout: Preserving validity in adaptive data analysis. Science 2015b.

Yanlin Fei, Nazhou Liu, Xinmiao Yu, Shaolong Chen, Lei Li, Rahul Thapa, et al. How do agents fail on AutoResearch: End‑to‑end diagnostic evaluation on 100 real‑world frontier research tasks, 2026.

Chrisantha Fernando, Dylan Sunil Banarse, Henryk Michalewski, Simon Osindero, and Tim Rock‑In‑Promptbreeder: Self‑referential self‑improvement via prompt evolution, ICML 2024.

Soham Gadgil, David Alexander, Sai Sunku, and Franziska Roesner. Bad memory: Evaluating prompt injection risks from memory in agentic systems, 2026.

Zeyu Gan, Zixuan Gong, and Yong Liu. Harness evolution as learning: Approximation, generalization, and optimization limits of self‑improving personal agents, 2026.

GitHub. About GitHub Copilot Memory, 2026.

Jingzhi Gong, Ruizhen Gu, Zhiwei Fei, Yazhuo Cao, Lukas Twist, Alina Geiger, Shuo Han, Dominik Sobania, Federica Sarro, and Jie M Zhang. SkillMOO: Multi‑objective optimization of agent skills for software engineering, 2026.

Irving John Good. Speculations concerning the first ultraintelligent machine, 1965.

Wassily Hoeffding. Probability inequalities for sums of bounded random variables, 1963.

Shengran Hu, Cong Lu, and Jeff Clune. Automated design of agentic systems, ICLR 2025.

Naman Jain, King Han, Alex Gu, Wen‑Ding Li, Fanjia Yan, Tianjun Zhang, Sida Wang, Armando Solar‑Lezama, Koushik Sen, and Ion Stoica. Livecodebench: Holistic and contamination‑free evaluation of large language models for code, 2024.

Yixing Jiang, Kameron C Black, Gloria Geng, Danny Park, James Zou, Andrew Y Ng, and Jonathan H Chen. MedAgentBench: A realistic virtual EHR environment to benchmark medical LLM agents, 2025.

Tomoyuki Kagaya, Subramanian Lakshmi, Yuxuan Lou, Thong Jing Yuan, Jayashree Karlekar, Sugiri Pranata, Natsuki Murakami, Akira Kinose, and Yang You. Memory transfer planning: LLM‑driven context‑aware code adaptation for robot manipulation, 2025.

Sayash Kapoor, Benedikt Stroebl, Peter Kirgis, Nitya Nadgir, Zachary S Siegel, Boyi Wei, Tianci Xue, Ziru Chen, Felix Chen, Saiteja Utpala, Franck Ndzomga, Dheeraj Oru‑gancy, Sophie Luskin, Kangheng Liu, Botao Yu, Amit Arora, Dongyoon Hahm, Harsh Trivedi, Huan Sun, Juyong Lee, Tengjun Jin, Yifan Mai, Yifei Zhou, Yuxuan Zhu, Rishi Bommasani, Daniel Kang, Dawn Song, Peter Henderson, Yu Su, Percy Liang, and Arvind Narayanan. Holistic agent leaderboard: The missing infrastructure for AI agent evaluation, ICLR 2026.

Jon Kleinberg and Manish Raghavan. Algorithmic monoculture and social welfare, PNAS 2021.

Hyun Jung Lee, Jungtaek Kim, Jongwon Jeong, Tae‑Eui Kam, Donghyun Kim, and Yong Jae Lee. EMHO: Embodied agent harness optimization via experience traces, 2026a.

Yoonho Lee, Roshen S Nair, Qizheng Zhang, Kangwook Lee, Omar Khattab, and Chelsea Finn. Meta‑harness: End‑to‑end optimization of model harnesses, COLM 2026, 2026b.

Douglas B Lenat. Eurisko: A program that learns new heuristics and domain concepts, AI 1983.

Boxiu Li, Zimo Wen, Yijia Fan, Chuan Wen, Fan Yang, Hangxi Guo, Jiaao Wu, Jiachen Zhang, Junxiang Lei, Mukai Li, Ruize Tang, Runjing Gu, Shibo Hu, Sihan Chen, Sufeng Guo, Wanbo Zhang, Xian Zhang, Xiaoyu Chen, Xuanhe Zhou, Xuyao Huang, Yifei Gao, Yifei Shen, Yilin Chen, Yuheng Wu, Yuzhe Zhang, Zelong Zhao, and Zhijie Deng. Argus: A general‑purpose agentic reasoning runtime for long‑horizon tasks, 2026a.

Yixuan Li, Yiyun Zhou, Yao Long Teng, Fuchao Yang, Yanchen Deng, Zhiyi Lyu, Xuyu Dong, Feng Chen, and Bo An. Finding the right fit: Model‑harness interactions across agent tasks, 2026b.

Jiahang Lin, Shichun Liu, Chengjun Pan, Lizhi Lin, Shihan Dou, Zhiheng Xi, Xuanjing Huang, Hang Yan, Zhenhua Han, Tao Gui, and Yu‑Gang Jiang. Agentic harness engineering: Observability‑driven automatic evolution of coding‑agent harnesses, arXiv 2026.

Xingyan Liu, Xiyue Luo, Linyu Li, Ganghong Huang, Jianfeng Liu, and Honglin Qiao. Skillforge: Forging domain‑specific, self‑evolving agent skills in cloud technical support, SIGIR 2026.

Xing Han Lù, Amirhossein Kazemnejad, Nicholas Meade, Arkil Patel, Dongchan Shin, Alejandro Zambrano, Karolina Stańczyk, Peter Shaw, Christopher J Pal, and Siva Reddy. Agent‑rewardbench: Evaluating automatic evaluations of web agent trajectories, COLM 2025.

Xiaotian Luo, Dizhan Xue, Fengxingyu Wang, Chuanrui Hu, and Yafeng Deng. Harnessbank: Semantic gene‑bank search with gated verification for agent‑harness self‑evolution, 2026.

Ziyu Ma, Shidong Yang, Yuxiang Ji, Xucong Wang, Yong Wang, Yiming Hu, Tongwen Huang, and Xiang

Read the original paper

Open the simplified reader on Paperglide

Browse all simplified papers