HarnessTax: Coding Agent Harness Cost vs Success Benchmarks

HarnessTax (arXiv:2612.05657, UC Berkeley) evaluates eight models across Claude Code, Codex, Pi, and Cursor CLI on SWE-bench Lite, Terminal-Bench 2.0/4.0, and TB-Science 0.1. Holding the model fixed, harnesses barely change success rates (1.8 percentage-point SD vs 15.9 across models) while inflating cost by 1.33x median and up to 5.1x.
HarnessTax: Coding Agent Harness Cost vs Success Benchmarks: HarnessTax (arXiv:2612.05657, UC Berkeley) evaluates eight models across Claude Code, Codex, Pi, and Cursor CLI on SWE-bench Lite, Terminal-Bench 2.0/4.0, and TB-Science 0.1. Holding the model fixed, harnesses barely change success rates (1.8 percentage-point SD vs 15.9 across models) while inflating cost by 1.33x median and up to 5.1x. Designed as a zero-dependency, open-source TypeScript architecture under the MIT License with native Model Context Protocol (MCP) support and deterministic phase state machines.
- 1.33x Median (Up to 5.1x) Harness Tax: Across 36 comparable runs, heavy harnesses cost 1.33x more (up to 5.1x for GPT-5.6 Luna in Claude Code vs Pi on SWE-bench Lite) without statistically significant win-rate gains.
- Minimal 4-Tool Pareto Frontier: Pi—using just four core tools—sits on the cost-success Pareto frontier across every evaluated benchmark.
- Model Choice Dominates Capability (9x Spread): Success-rate standard deviation is 15.9 percentage points across models vs only 1.8 points across harnesses.
- Subagent & Tool-Schema Bloat Exposed: Enabling subagent delegation in Codex multiplied Terminal-Bench 2.0 cost by 3.0x with zero accuracy improvement.
import { createAgent } from '@smoke-monkey/harness';// Eliminate the HarnessTax: constrain tool definitions to 4 core primitivesconst agent = createAgent({agentId: 'pareto-minimal-coding-agent',provider: 'anthropic',model: 'claude-sonnet-4-5',workspacePath: process.cwd(),maxTurns: 25,compaction: {enabled: true,thresholdTokens: 64800,},permissions: {read_file: 'allow',write_file: 'allow',run_command: 'ask',},});async function main() {const result = await agent.run('Fix the failing parser edge case, verify with npm test, and report exact token usage.');console.log('Pareto Run Summary:', result.summary);}main().catch(console.error);
Watch: Related Video Guides
Practical AI Coding Agent Evaluation with SWE-bench, TeamCity, and Juni | Ernst Haagsman
Senior SWE-Bench: Evaluating Coding Agents | Snorkel AI Reading Group
What Is HarnessTax and Where Does the 1.33x-5.1x Agent Cost Come From?
HarnessTax (arXiv:2612.05657) is UC Berkeley's controlled empirical study measuring how production coding harnesses—Claude Code, Codex, Pi, and Cursor CLI—affect task success and dollar spend across SWE-bench Lite, Terminal-Bench 2.0, Terminal-Bench 4.0, and Terminal-Bench Science 0.1. Across 72 comparisons, cost differences are statistically detectable in 51 pairs while zero success-rate gaps survive Holm correction.
The cost premium stems from prefix tokens re-sent on every single model turn: sprawling system prompts, verbose schemas for tools the model never calls, unpruned tool outputs, and eager subagent spawning. Models also perform competitively outside their vendor's proprietary harness—often cheaper.
| Benchmark & Model | Harness Comparison | Cost Ratio | Success Gap (%) |
|---|---|---|---|
| SWE-bench Lite (GPT-5.6 Luna) | Claude Code vs Pi | 5.1x costlier | +2.2% (not significant) |
| SWE-bench Lite (Claude Fable 5) | Claude Code vs Pi | 2.0x costlier | +1.1% (not significant) |
| Terminal-Bench 2.0 (Claude Opus 4.8) | Codex vs Pi | 1.8x costlier | 0.0% |
| Terminal-Bench 2.0 (GPT-5.6 Sol) | Codex vs Pi | 1.8x costlier | -4.4% |
| Terminal-Bench 4.0 (Claude Fable 5) | Claude Code vs Pi | 2.1x costlier | Parity (1.3x turns) |
Five Harness Levers: Tool Sets, Output Truncation, Subagents, and Compaction
Controlled single-component ablations in HarnessTax reveal four engineering rules for building cost-optimal coding harnesses like Smoke Monkey:
- Prune Unused Tool Definitions: Every unused JSON tool schema is billed across dozens of prefix-cache and context turns. A 4-tool core (read, edit, list/search, bash) matches 20-tool suites on SWE-bench Lite.
- Gate Subagent Spawning Strictly: Turning on subagent delegation in Codex increased Terminal-Bench 2.0 spend by 3.0x without lifting pass rates.
- Handle Image & Size Caps Explicitly: The few measurable harness failures often came from system-level glitches such as exceeding request-size limits on large image inputs or hung command timeouts.
# Audit per-turn prefix overhead of your local harness prompt + MCP tool schemas
node -e '
const fs = require("fs");
const promptChars = 12400; // measure your system prompt + tool JSON
const avgTurns = 22;
const estTokensPerTurn = Math.ceil(promptChars / 4);
console.log("Static prefix tokens/turn:", estTokensPerTurn);
console.log("Cumulative prefix tokens over 22 turns:", estTokensPerTurn * avgTurns);
'Put Model Budget Before Harness Complexity
Because model choice drives 9x more capability variance (15.9-point SD) than harness choice (1.8-point SD), spend your token budget upgrading the core model inside a lean 4-tool harness rather than layering heavy multi-agent wrappers onto a weaker model.
Frequently Asked Questions
Q:What is the median cost difference across coding agent harnesses in HarnessTax?
Across 36 same-model comparisons with equivalent success rates, the median harness tax is 1.33x (remaining 1.30x under native API formats) and reaches up to 5.1x.
Q:Do models perform worse outside their own provider harness?
No. HarnessTax shows that models perform competitively outside their native provider harnesses (such as running Claude or GPT models inside Pi) and often cost substantially less.
Q:Why did Pi sit on the Pareto frontier across all four benchmarks?
Pi uses a minimal four-tool design with compact system prompts, avoiding the per-turn prefix token inflation caused by unused tool definitions and excessive scaffolding.
Q:When does enabling subagent delegation hurt efficiency?
On Terminal-Bench 2.0, enabling subagent delegation in Codex multiplied cost by 3.0x without improving task success rates.
Related Alternatives & Comparisons
Related Architecture Guides
View all guidesBest Open Source Coding Agents in 2026: Free, Local & Fully Hackable Harnesses
MCP Server Security Best Practices: Hardening Model Context Protocol Agents in 2026
Open Source Coding Agent Harness: Build a Forkable, Local AI Engineering Runtime
Build with Smoke Monkey Harness
Zero dependencies. 24 built-in tools. Human-in-the-loop safety. 100% open source under the MIT License.