TransHarness From Benchmark Overfitting to Transferable Harness Evolution

Tianze Xia1,†, Zimo Wang1,†, Heng Tong1,†, Zhaoxiang Liu2, Shiguo Lian2, Fan Huang3, Wenyu Liu1, Yunchao Wei4, Xinggang Wang1,*

1 Huazhong University of Science and Technology2 Unicom Data Intelligence, China Unicom3 Xiamen University4 Beijing Jiaotong University

† Equal contribution   ·   * Corresponding author

Meta-Harness improves on evolution tasks but loses performance on DeepSWE. An evolved simple harness still trails a mature harness. Regressions can outweigh recovered failures.
Gains on evolution tasks can reverse on a new benchmark. Even when a change recovers failures, regressions can erase its benefit.

Abstract

Harness evolution offers a path to improving coding agents without updating model weights. However, existing methods can overfit their evolution benchmarks, producing gains that fail to carry over to new tasks. To address this challenge, we introduce Transferable Harness Evolution (TransHarness), which evolves harness intervention policies from same-task success–failure contrasts. These policies couple execution-context triggers with diagnostic guidance, enabling task-dependent checks and corrections beyond the source executions. Cross-task replay and independent semantic selection retain policies that intervene selectively and ground corrections in current-task evidence rather than source-specific solutions. We further curate an independent evolution set for cross-distribution transfer and conduct a cross-benchmark evaluation covering multiple strong models and a range of lightweight and mature harnesses. Experiments show that, with only 300 source trajectories from outside the test distribution, TransHarness further improves strong agents across distinct target benchmarks, demonstrating transferable harness evolution beyond benchmark overfitting. Specifically, TransHarness achieves state-of-the-art scores of 76.4% on DeepSWE v1.1 and 95.5% on Terminal-Bench 2.1, surpassing the strongest baseline model, GPT-6 Astra, by 2.4 and 5.6 percentage points, respectively.

Method

TransHarness evolves when a harness intervenes and how it guides the agent. Contrasting successful and failed executions of the same task reveals where the agent overlooked relevant evidence. Each candidate policy pairs an execution trigger with diagnostic guidance. Replay checks when the trigger fires across archived executions, and independent semantic review checks whether the guidance can apply to new tasks.

TransHarness contrasts successful and failed executions, refines and selects interventions, then applies them in context.
During execution, a selected policy reads the current event and history. When its trigger fires, it supplies guidance grounded in the requirements and evidence of the task at hand.

Results

TransHarness reaches 76.4% on DeepSWE v1.1 and 95.5% on Terminal-Bench 2.1, improving the corresponding DeepSeek harnesses by 3.2 and 5.6 percentage points.

Table 1. Success rates on DeepSWE v1.1 and Terminal-Bench 2.1 for public references, base harnesses, and TransHarness.
Success rates for base and evolved harnesses. TransHarness improves DeepSeek, Qwen, and GLM across both benchmarks.

Transfer under distribution shift

We selected 100 SWE-bench Pro tasks, favoring tasks with low historical resolution rates while retaining coverage across all 11 repositories in the source pool. The resulting set shares no repositories with DeepSWE v1.1 and differs from both target benchmarks in task type and application domain.

Task types and application domains across the independent evolution set and both target benchmarks, with total variation distances for independent and within-benchmark evolution sets.
For the same target subsets, an independent evolution set differs more in task type and application domain than a set drawn from the target benchmark.

Performance on unseen requirement combinations

We measure transfer on target tasks whose exact combination of requirements is absent from the evolution set. All four DeepSeek configurations show positive mean gains on this subset. The comparison below shows how those gains relate to performance on the full benchmarks.

Mini-SWE DeepSWE v1.1 +14.6[6.2, 25.0]
DeepSeek Harness DeepSWE v1.1 +25.0[0.0, 50.0]
Terminus 2 Terminal-Bench 2.1 +4.1[0.0, 10.2]
DeepSeek Harness Terminal-Bench 2.1 +2.0[−6.1, 10.2]
Points show the gain over the base harness. Lines show 95% task-bootstrap confidence intervals. The unseen subset contains 16 of 113 DeepSWE tasks and 49 of 89 Terminal-Bench tasks.

Case study in predicate-cache repair

A DeepSWE task asks the agent to extend query behavior in Koota, a TypeScript library for entity-component state management. After the existing tests pass, an evolved policy prompts the agent to check whether they cover the new requirements. A test for negated updates exposes a cache-key collision, and the agent updates the cache key to distinguish different query modifiers.

A policy prompts a requirement audit after passing checks. The agent adds a NOT-update test, finds a cache-key collision, and fixes it. Base, Self-Harness, and TransHarness pass 41, 42, and 43 task-specific tests respectively.
The resulting patch passes all 43 task-specific tests, compared with 41 for the base harness and 42 for Self-Harness. All three executions pass the same 172 regression tests.

Evolution cost

Starting from the same Mini-SWE harness, TransHarness achieves the highest DeepSWE v1.1 success rate among the compared methods while using the fewest evolution tokens. Replay and review use the existing trajectory archive, so candidate screening requires no new scored source executions in this comparison.

DeepSWE success versus evolution tokens. TransHarness scores 76.4 percent at 132.7 million evolution tokens.
Evolution cost counts candidate construction and source validation. Archive collection and target evaluation are outside this budget.

Code and data

The code supports trajectory collection, harness evolution, and evaluation. The independent evolution set contains 100 tasks with executable environments and verifiers.

BibTeX

@misc{xia2026transharness,
  title         = {TransHarness: From Benchmark Overfitting to Transferable Harness Evolution},
  author        = {Xia, Tianze and Wang, Zimo and Tong, Heng and Liu, Zhaoxiang
                   and Lian, Shiguo and Huang, Fan and Liu, Wenyu and Wei, Yunchao
                   and Wang, Xinggang},
  year          = {2026},
  eprint        = {2611.33757},
  archivePrefix = {arXiv},
  primaryClass  = {cs.AI},
  url           = {https://arxiv.org/abs/2611.33757}
}