HarnessPro cuts AI coding agent costs 26% without retraining

black flat screen computer monitor

The most actionable AI optimization right now isn’t a better model. It’s a better harness.

Researchers at Tsinghua University published HarnessPro, an open-source framework that uses a four-agent loop to iteratively rewrite the software wrapper around an AI coding agent. The result: a 26.1% average cost reduction across three benchmarks and a 2.0 percentage-point pass-rate gain, both simultaneously, without touching the underlying model weights.

What the harness layer actually is

An AI agent harness is the runtime that defines which tools an agent can call, how it assembles context, what reasoning budget limits apply, and what verification logic runs before a task counts as done. The same model produces very different cost and accuracy results depending on how the harness is configured. Most teams set it once and move on.

HarnessPro treats it as an artifact worth continuously evolving. Its four-agent loop works like this:

  • Trajectory Analyzer: reads bundles of past execution traces (three runs per task) and diagnoses failure patterns and cost hot spots.
  • Evolution Planner: proposes three improvement directions per cycle, one cost-focused, one balanced, one performance-focused.
  • Harness Editor: implements each plan as a complete, executable harness in an isolated Git workspace.
  • Test Synthesizer: evaluates candidates against auto-generated tests derived from task specifications, catching 83.3% of real failures versus 41.7% for direct LLM judgment.

Candidates beaten on both cost and accuracy by a rival are eliminated. Survivors form a Pareto set: a Lite, Medium, and Heavy configuration that deployment teams can choose based on their own cost-accuracy constraints.

The benchmark numbers

Results were measured on two model pairings: GPT-5.5 with Codex, and GLM-5.2 with Claude Code. Compared to the prior state-of-the-art harness (RHO), HarnessPro’s Heavy configuration delivered:

  • SWE-Bench Pro: 80.7% pass rate vs. 80.0%, at $1.97 per task vs. $2.68 (26.5% cost reduction). Task time dropped from 520 seconds to 412 seconds.
  • Terminal-Bench 2: 80.8% vs. 76.3%, at $0.72 per task vs. $1.09 (33.9% cost reduction).
  • ProgramBench: 69.6% vs. 68.8%, at $2.95 per task vs. $3.59 (17.8% cost reduction).

On a cost-per-successful-task basis, the Lite configuration achieves $1.11 on SWE-Bench Pro versus $3.35 for RHO. The code and evolved harness artifacts are open-sourced on GitHub.

robot and human hands reaching toward ai text

️ Factory Droid 1.0 ships the same insight commercially

Factory’s Droid 1.0 arrived the same week with a technique the company calls Script mode. Instead of issuing tool calls one at a time and appending every raw result to context, the model writes a small JavaScript program that batches tool calls, filters output in code, and returns only the relevant data. Factory’s self-reported internal benchmarks show up to 51x token reduction in some workflows and a three-to-seven percentage point accuracy improvement over conventional harnesses.

The two approaches are complements, not competitors. HarnessPro automates what harness components should do. Script mode rethinks how data moves between model and tools. Both target the same underexplored layer.

⚠️ What to watch before deploying

SWE-Bench Pro is the more rigorous variant of a benchmark family with documented reliability issues. A 2024 robustness analysis of the original SWE-Bench found roughly 33% of solutions marked correct had the fix already visible in the issue text, and roughly 31% passed only because the test suite was too weak to detect an incorrect patch. Removing both categories cut a GPT-4 agent’s score from 12.47% to 3.97%. SWE-Bench Pro addresses some but not all of these concerns, and OpenAI stopped citing SWE-Bench Verified scores in February 2026 over contamination concerns.

On the model selection side: one of the two backbone pairings tested in HarnessPro uses GLM-5.2, developed by Z.AI (Zhipu AI), a Beijing-based company co-founded by lead senior author Jie Tang of Tsinghua. Z.AI operates under China’s National Intelligence Law (2017), which requires organizations and citizens to support state intelligence work when asked, as well as China’s Data Security Law (2021) and Cybersecurity Law (2017). HarnessPro is model-agnostic. Teams with data-sensitivity concerns can run it with GPT-5.5, Codex, Claude Code, or open-weight alternatives without those obligations applying.

The paper is on arXiv with a v1 submission date of October 19, 2026.

Stay on top of AI & Automation with BizStack Newsletter
BizStack  —  Entrepreneur’s Business Stack
Logo