Architecture
~8 min readUpdated: December 2026

HarnessTax: Coding Agent Harness Cost vs Success Benchmarks

HarnessTax coding agent harness cost vs success Pareto frontier in Smoke Monkey

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.

Technical Review: Smoke Monkey Core Architecture Team
Tested on Node.js 18+ & BunTypeScript 5.x
Quick Answer & Executive Definition

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.

Key Architectural Takeaways
Quick Implementation Exampleminimal-4tool-harness.ts
minimal-4tool-harness.tstypescript
import { createAgent } from '@smoke-monkey/harness';
// Eliminate the HarnessTax: constrain tool definitions to 4 core primitives
const 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);
Video Guides

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 & ModelHarness ComparisonCost RatioSuccess Gap (%)
SWE-bench Lite (GPT-5.6 Luna)Claude Code vs Pi5.1x costlier+2.2% (not significant)
SWE-bench Lite (Claude Fable 5)Claude Code vs Pi2.0x costlier+1.1% (not significant)
Terminal-Bench 2.0 (Claude Opus 4.8)Codex vs Pi1.8x costlier0.0%
Terminal-Bench 2.0 (GPT-5.6 Sol)Codex vs Pi1.8x costlier-4.4%
Terminal-Bench 4.0 (Claude Fable 5)Claude Code vs Pi2.1x costlierParity (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:

  1. 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.
  2. Gate Subagent Spawning Strictly: Turning on subagent delegation in Codex increased Terminal-Bench 2.0 spend by 3.0x without lifting pass rates.
  3. 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.
bash
# 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.

Google Search Questions & Answers

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 guides

Build with Smoke Monkey Harness

Zero dependencies. 24 built-in tools. Human-in-the-loop safety. 100% open source under the MIT License.

npm install smoke-monkey-harness