HarnessDev: Can LLMs Create and Evolve Their Own Agent Harness?

Yuhao Wu, Jingyuan Zhang, Jiajun Shi, Xinping Lei, Qingshui Gu, Yuxuan Zhang, Zexuan Wang, Chen He, Chen Huang, Maojia Song, Zhiyuan Zeng, Shaowen Wang, Jinkai Liu, Yunfeng Shi, Jiaheng Liu, Shen Yan, Wenhao Huang, Ge Zhang, Wenxuan ZhangarXiv 2026

TL;DR

While Large Language Models (LLMs) are frequently celebrated for their ability to solve standalone tasks, can they actually build and maintain the software infrastructure that runs them? This paper introduces HarnessDev, a novel benchmark that evaluates LLMs on their ability to create and iteratively evolve their own "agent harnesses"—the external scaffolding managing execution loops, tool use, and context. The findings reveal that while frontier LLMs can successfully build infrastructure for straightforward writing and machine learning tasks, engineering robust, adaptable scaffolding for complex coding and research environments remains a significant challenge.

What Problem Does This Paper Address?

In the world of AI agents, an LLM rarely acts alone. It operates inside an agent harness: an external software layer responsible for managing the execution loop, handling tool interactions, tracking state, and recovering from failures. Crucially, changing this harness while keeping the underlying LLM weights exactly the same can drastically alter performance.

Despite its importance, current agent evaluations treat the harness as a fixed experimental control rather than an artifact to be engineered. This leaves a critical question unanswered: Can LLMs act as system builders—similar to human software engineers—to autonomously construct and continually optimize their own execution infrastructure? HarnessDev addresses this gap by shifting the unit of evaluation from one-off task outputs to durable, reusable, and runnable infrastructure.

Methods

The HarnessDev benchmark splits harness development into two distinct phases:

  1. Creation (RQ1): The creator LLM starts with a task specification, a handful of development cases, and a deliberately minimal, policy-free "weak seed" harness ($H_{seed}$). The model must build a complete, fully functional execution system from scratch.
  2. Evolution (RQ2): Starting from its newly created harness ($H_0$), the LLM must iteratively refine the codebase using downstream execution feedback (logs, error traces, and scores) to maximize benchmark performance.
Overview of the HarnessDev benchmark, illustrating the Creation and Evolution stages of autonomous infrastructure development.

To evaluate the generated harnesses, the framework measures both Capability (success rate on held-out tasks) and Efficiency (the number of tokens consumed by the executor model). The authors also separate the model roles by evaluating harnesses under two settings: Self-Eval (where the creator model executes its own harness) and Unified-Eval (where all generated harnesses are executed by a single, fixed model like Gemini 3.1 Pro) to isolate the true quality of the software asset from the strengths of the underlying model.

As shown below, a successful harness must implement six core control modules:

The six core control modules (Execution loop, Tools, Context, State, Lifecycle, Verification) that a creator LLM must implement to generate a scorable harness.

Datasets

HarnessDev evaluates performance across four diverse domains using five established downstream benchmarks, totaling 2,207 unique instances:

  • Code: SWE-bench Pro (731 tasks evaluating real-world GitHub issue resolution) and Terminal-Bench 2.1 (89 tasks in terminal environments).
  • Data Analysis: MLE-bench (75 machine learning engineering tasks).
  • Writing: EQ-Bench3 (46 emotional intelligence and creative writing scenarios).
  • Research/Search: BrowseComp (1,266 long-horizon web browsing and information-seeking tasks).

Key Insights and Ideas

  • Harness Engineering is Distinctly Challenging: Unlike editing standalone code where requirements are externally verified, modifying a harness alters the very substrate through which the agent observes and acts. A change can inadvertently disrupt how the model plans or recovers in all future tasks.
  • The "Dead Code" Phenomenon: LLMs frequently write complex architectural boilerplate (such as sophisticated state-saving or memory classes) that look correct on paper but are completely bypassed or never triggered during actual runtime execution.
  • Brittle Co-Adaptation: Harnesses often overfit to the specific LLM that created them. For instance, an infrastructure built by Claude Opus might hardcode specific step limits or prompt structures that cause it to completely collapse when executed by a Gemini model.
  • Non-Monotonic Evolution: Feedback-driven optimization is highly unstable. LLMs frequently overfit to the immediate feedback set, making modifications that boost local scores but cause severe regressions on unseen, held-out tasks.

Key Results

  • Creation Success Varies by Domain: In the Creation stage, frontier models like Claude Opus 4.8 and GPT-5.5 matched or exceeded human-engineered references on short-form writing and machine learning experimentation. However, they lagged significantly behind mature human baselines in complex coding and long-horizon research tasks.
  • Massive Efficiency Discrepancies: There is an immense variance in execution costs. On MLE-bench, GPT-5.5 achieved a competitive medal rate using only 29.3 million tokens, whereas DeepSeek V4 consumed a staggering 208.4 million tokens for a nearly identical score. Higher token expenditure did not reliably translate to better capability.
  • Diminishing Returns in Evolution: While all models successfully leveraged execution feedback to improve their scores on the visible training sets (+3.0 to +13.9 percentage points), these gains sharply contracted or entirely vanished when evaluated on held-out tasks.

Limitations and Future Work

The authors note several limitations in the current iteration of HarnessDev:

  • Decoupling Constraints: While Unified-Eval helps isolate harness quality, it cannot completely eliminate the intricate, non-linear interactions between a specific model's prompting style and the harness structure.
  • Evaluation Scope: The post-freeze held-out evaluation for the Evolution phase is currently restricted to the SWE-Pro dataset.
  • Trajectory Sample Size: The benchmark currently tracks one trajectory per creator-runtime cell, limiting statistical uncertainty analysis.

Future work will focus on exploring whether an evolved harness can successfully serve as its own development environment to bootstrap further autonomous optimization.

Summary updated

BibTeX
@misc{wu2026harnessdev,
  author = {Yuhao Wu and Jingyuan Zhang and Jiajun Shi and Xinping Lei and Qingshui Gu and Yuxuan Zhang and Zexuan Wang and Chen He and Chen Huang and Maojia Song and Zhiyuan Zeng and Shaowen Wang and Jinkai Liu and Yunfeng Shi and Jiaheng Liu and Shen Yan and Wenhao Huang and Ge Zhang and Wenxuan Zhang},
  title = {{HarnessDev: Can LLMs Create and Evolve Their Own Agent Harness?}},
  year = {2026},
  eprint = {2609.01437},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.01437},
}
Figure