HarnessDev: Can LLMs Create and Evolve Their Own Agent Harness?
Summary (Overview)
-
New evaluation paradigm: HarnessDev shifts the unit of evaluation from task outputs to runnable infrastructure, measuring whether LLMs can build (Creation) and iteratively improve (Evolution) persistent agent harnesses—the execution systems that manage tool use, context, and verification.
-
Two-stage benchmark: Creation starts from a deliberately weak but runnable seed harness and evaluates whether a creator LLM can build a complete execution system; Evolution starts from the creator's own harness and measures improvement via downstream execution feedback.
-
Key finding on Creation: Model-built harnesses match or exceed human-engineered references on writing (EQ-Bench3) and machine-learning experimentation (MLE-bench), but remain substantially behind on code (SWE-Pro, Terminal-Bench) and search/research (BrowseComp), with large variation in execution cost.
-
Key finding on Evolution: Models can produce local improvements from feedback (e.g., Opus 4.8 gains +4.44 points on held-out tasks), but gains are unstable, shrink on held-out tasks, and transfer only partially across runtime models—visible feedback and held-out scores move in the same direction only 53.1% of the time.
-
Executor dependence: Switching the runtime model (Self-Eval vs. Unified-Eval with fixed Gemini) substantially changes both starting performance and whether evolutionary revisions help, indicating limited transfer of harness improvements across models.
Introduction and Theoretical Foundation
Motivation
The paper addresses a critical gap in agent evaluation: most benchmarks report downstream task performance under a chosen harness, treating the harness as part of the experimental configuration rather than as an artifact to be developed. Yet the harness's impact is substantial—with identical weights, GPT-5 solves 35.2% of Terminal-Bench 2.1 inside Terminus 2 but 49.6% inside Codex CLI.
The authors draw an analogy to the forward-deployed engineer (FDE) role popularized by Palantir: an engineer who turns a general-purpose model into something that runs against a customer's specific data formats, workflows, and compliance constraints. FDE work supplies three structural pieces that benchmark designers normally presuppose:
- Vague targets: informal business intent must be translated into concrete objectives and success criteria
- Absent feedback signals: tests, judges, and traces must be constructed before improvement can be measured
- Non-existent execution systems: tools, context management, state, and verification interfaces must be built and maintained
Theoretical Foundation
Harness engineering differs fundamentally from ordinary code editing. When a model modifies its own harness, it edits the execution substrate through which it acts—the change alters how the model observes, plans, and recovers in all future tasks. Effective harness improvement requires the model to:
- Recognize its own behavioral limitations from execution traces
- Diagnose structural bottlenecks in the system it runs inside
- Commit targeted changes that accumulate into lasting capability gains rather than one-off fixes
The formal pipeline is:
where is the creator LLM working in development environment to produce harness ; executor LLM then runs inside on downstream task ; and evaluator scores output .
Methodology
Benchmark Design
HarnessDev evaluates two stages of harness development:
| Setting | Starts from | Development signal | Output |
|---|---|---|---|
| Creation | Weak seed | Specification and 1–3 development cases | Final harness |
| Evolution | Creator's RQ1 | Results from a designated feedback set | Frozen paired candidates and a creator-declared final harness |
The Weak Seed Harness
Every creator receives the same : a runnable compatibility layer, not a task-solving agent. It parses task/model configuration, exposes passive low-level tools, and writes required results/trajectories/logs. Crucially, it has:
- No agent loop, task decomposition, tool policy, context management, or persistent state
- No verifier, retry/recovery logic, or stopping rule
- Unmodified, it scores zero on every downstream benchmark
This design avoids two extremes: an empty repository (which would mix harness design with setup) and a mature agent (which would give away the planning structure being tested).
Domains and Benchmarks
| Domain | Benchmark | Tasks | Primary metric |
|---|---|---|---|
| Code | SWE-bench Pro (public split) | 731 | Task success |
| Code | Terminal-Bench 2.1 | 89 | Task success |
| Data analysis | MLE-bench | 75 | Medal score |
| Writing | EQ-Bench3 | 46 | Rubric score |
| Research | BrowseComp | 1,266 | Accuracy |
Evolution uses a 100-task SWE-Pro feedback set, all 89 Terminal-Bench tasks as feedback, and a disjoint 630-instance SWE-Pro held-out split for generalization testing.
Evaluation Protocol
- Self-Eval: (creator also executes), measuring the complete creator–harness system
- Unified-Eval: every harness runs with the same fixed (Gemini 3.1 Pro), making harnesses directly comparable
- Constraint compliance: harnesses cannot hardcode solutions, consult hidden tests/answers, or replace the runtime interface; every run retains auditable trajectory artifacts
Creators and Setup
Six creator LLMs were evaluated: Opus 4.8, GPT-5.5, Gemini 3.1 Pro, DeepSeek V4 Pro, Qwen 3.7 Max, and Seed 2.0 Pro. Claude Code 2.1.177 served as the development environment (Codex 0.144.3 for GPT-5.5). Three independent harnesses per creator–benchmark pair were created (avg@3).
Empirical Validation / Results
Harness Creation (RQ1)
Overall performance under Self-Eval (avg@3, native metrics):
| Creator | SWE-Pro | Term.-2.1 | MLE-bench | EQ-Bench3 | BrowseComp | Avg. |
|---|---|---|---|---|---|---|
| Seed harness | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
| Opus 4.8 | 69.3 | 64.8 | 32.9 | 84.6 | 52.4 | 67.8 |
| GPT-5.5 | 32.8 | 52.1 | 19.1 | 83.0 | 52.6 | 55.1 |
| Gemini 3.1 Pro | 43.6 | 68.8 | 32.4 | 74.8 | 35.2 | 55.6 |
| DeepSeek V4 Pro | 28.9 | 35.6 | 19.6 | 75.4 | 40.9 | 45.2 |
| Qwen 3.7 Max | 33.5 | 41.3 | 3.1 | 68.7 | 32.3 | 44.0 |
| Seed 2.0 Pro | 10.8 | 6.0 | 5.3 | 71.1 | 3.2 | 22.8 |
| Human reference | 80.0 | 88.8 | 24.0 | 83.7 | 92.2 | 86.2 |
Token costs in millions; MLE-bench covers 33 physical cells and 2,475 results.
Key findings:
- Opus 4.8 achieves the highest overall score (67.8) but remains below the human reference (86.2)
- Writing harnesses approach the reference (84.6 vs. 83.7 for Opus); Search shows the largest gap (52.4 vs. 92.2)
- 77.8% of failed Data tasks are attributed to harness defects, not executor capability
- MLE-bench token use varies ~19-fold across creators, yet higher cost does not reliably produce higher scores
Executor dependence: Under fixed Gemini executor, rankings change substantially—Qwen gains 17.6 points on BrowseComp and 12.9 on MLE-bench, while Opus's SWE-Pro score collapses from 69.3 to 33.0, and its duplicate-query rate in Search rises from 10.1% to 88.2%.
Implementation behavior: 18 Code artifacts add 17,111 net lines total, but edit size does not predict performance. Gemini adds the fewest lines (1,006) yet achieves the best Terminal-Bench score (68.8). State/memory is the clearest gap: only 1/18 artifacts exposes a state-saving interface; no checkpoint event appears in 26,679 recorded trajectories.
Harness Evolution (RQ2)
Feedback vs. held-out generalization (pair score ):
| Setting | Creator | Feedback | Held-out-630 | Held-out final gap |
|---|---|---|---|---|
| Self | Gemini 3.1 Pro | 59.9→68.7 (+8.8) | 48.89→51.59 (+2.70) | 0.00 |
| Self | Opus 4.8 | 71.1→74.1 (+3.0) | 63.02→67.46 (+4.44) | 1.59 |
| Self | Qwen 3.7 Max | 41.8→55.7 (+13.9) | 42.22→43.65 (+1.43) | 3.17 |
| Self | DeepSeek V4 Pro | 47.2→60.6 (+13.4) | 47.30→50.48 (+3.17) | 1.75 |
| Self | GPT-5.5 | 59.2→65.1 (+5.9) | 48.25→52.06 (+3.81) | 0.00 |
| Fixed Gemini | Opus 4.8 | 58.8→68.6 (+9.7) | 48.10→50.79 (+2.70) | 2.54 |
| Fixed Gemini | Qwen 3.7 Max | 62.1→63.2 (+1.1) | 49.52→48.41 (−1.11) | 1.11 |
| Fixed Gemini | DeepSeek V4 Pro | 47.3→53.8 (+6.5) | 43.02→40.63 (−2.38) | 3.02 |
| Fixed Gemini | GPT-5.5 | 56.6→59.1 (+2.4) | 42.22→31.90 (−10.32) | 16.51 |
Key findings:
- All self-runtime creators improve on visible feedback, but gains shrink on held-out tasks (Opus largest at +4.44)
- Under fixed Gemini, only Opus improves on held-out; other three lineages regress
- Evolution is not monotonic: of 64 official switches, 8 regress on both benchmarks, 16 show single-benchmark regression
- Visible feedback and held-out scores move in the same direction only 34/64 times (53.1%)
- Only 2/9 declared versions are held-out optimal
- 113 of 169 new functions are reachable; 31 reachable only through dead code; 25 have no caller
Positive example: Opus finds that 99/100 runs report success while only 48 pass, traces the gap to premature completion, and adds a completion check—a targeted, verified fix.
Theoretical and Practical Implications
Theoretical Contributions
-
Separation of harness quality from model capability: HarnessDev demonstrates that the persistent execution system and the model running inside it are separable axes of evaluation. Changing only the runtime binding can substantially move and alter which harness changes are useful.
-
Creator–executor co-adaptation: Harnesses can become specialized to their creator model (e.g., Opus's 120-step limit hard-coded around the original executor), such that capability transfers only when prompts, tool protocols, budgets, and stopping rules remain compatible.
-
Feedback overfitting: Repeatedly optimizing a noisy feedback score can favor lucky runs and amplify overfitting—visible feedback is useful for local search but unreliable for final selection.
Practical Implications
-
For benchmark design: HarnessDev's protocol—freezing runnable artifacts, recording development trajectories, measuring execution cost, and evaluating transfer across runtime models—provides a template for evaluating infrastructure development rather than task outputs.
-
For agent deployment: The finding that 77.8% of Data failures stem from harness defects (not executor capability) suggests that improving harness quality may be more cost-effective than upgrading models.
-
For automated development: Models can make useful local improvements (Opus's completion gate), but robust evolution across unseen tasks and runtime models remains an open challenge—human oversight of the development loop is still needed.
Conclusion
HarnessDev moves agent evaluation from whether a model can solve tasks inside a fixed system to whether it can create and maintain the systems that solve future tasks. The benchmark makes agent-built execution harnesses a measurable object through:
- A four-domain human baseline corpus
- From-scratch creation tasks from a weak seed
- Feedback-driven evolution with separated visible and held-out evaluation
- Self- and Unified-Eval views that separate harness quality from executor capability
- Execution-token cost measurement
Main takeaways: Current models can construct runnable harnesses and make useful local improvements, but reliable evolution remains difficult. Gains are unstable, transfer only partially across models, and state/memory management is a consistent weakness. The authors conclude: "If model weights are one place intelligence accumulates, the harness is another: explicit, inspectable, testable, reusable, and continually improvable through failure, feedback, and real engineering pressure."
Future directions: The authors note that whether an evolved harness can itself serve as the development environment for further evolution is left to future work, as is matched-search evaluation and population-level comparisons with multiple trajectories per cell.
Related papers
- BAITBENCH: Measuring Agent Reward Hacking with Optional Shortcuts Planted in ML Tasks
BAITBENCH shows 57.1% of frontier LLM agent runs exhibit reward hacking, with validity-aware prompting reducing it by only 6.2 percentage points.
- Belief-Calibrated Optimization: An Explicit World Model for Agentic Optimization
Belief-Calibrated Optimization, which persists an explicit falsifiable world model of environment responses, consistently outperforms vanilla agentic optimization across five benchmarks by up to +0.152 held-out passrate.
- Beneath the Diff: Diagnosing and Mitigating Algorithmic Mode Collapse in Code-Level Autonomous Research Loops
Autonomous research loops can silently collapse into self-confirming echo chambers, a failure mode the paper identifies and characterizes in code-level agents.