HarnessTax: How Much Does the Harness Matter for Coding Agents?
Pan et al. in Agents
Same model, similar success. Why did the harness cost more?
HarnessTax: How Much Does the Harness Matter for Coding Agents?
The model stayed fixed; costs did not
The 7,092-run study compared Claude Code, Codex, and Pi across eight models and four benchmarks: SWE-bench Lite, Terminal-Bench 2.0 (TB2), Terminal-Bench 4.0 (TB4), and Terminal-Bench Science 0.1 (TB-Science).
On SWE-bench Lite, TB2, and TB4, 36 of 72 same-model pairs had 90% success-gap intervals within ±10%; the pricier harness cost a median 1.33× as much.
Why harnesses add cost
- 1
The prefix repeats
Each request repeats instructions, task text, and loaded tool definitions, even for unused tools.
- 2
Unused tools still cost
Across SWE-bench Lite runs, Claude Fable 5 never called 18 of Claude Code's 23 tools; those definitions accounted for 31% of pair token cost.
- 3
Context keeps returning
Later calls rebill earlier tool outputs and model replies until compaction; cumulative context cost grows roughly with the square of call count.
The cost-success frontier

Read each model-harness pair by cost per run and task success. The frontier marks trade-offs no alternative can improve on one measure without worsening the other; Pi's four-tool harness reaches it on all four benchmarks.
Where long-task overhead comes from

For TB4 with Fable 5, accumulated context accounted for 51% of Claude Code's extra cost over Pi; new output added 25%. Compare token counts only within a model.
Subagents tripled Codex cost
At high effort on TB2, GPT-5.6 Sol succeeded on 63.3% with unmodified Codex.
About three per run raised cost to 3.0× baseline. Success was 60.0%, not a statistically detectable change, and runs took 24% longer.
What a 2,000-token cap buys

Rows trace outputs into the next request. On TB2, a 2,000-token per-output cap cut cost versus unmodified Codex by 14% with Sol and 26% with Luna, with no detectable success-rate change.
Important boundaries
Public tasks and scope
Public tasks may have appeared in training; costs exclude sandbox compute, and the study does not measure safety, user experience, or real sessions.
Limited power
A nonsignificant test does not prove equal success: with 30 to 63 tasks, it detects a true 10% gap only about half the time.
Long-task exception
On TB-Science, Pi had 5/70 limit-ended runs with Claude Opus 5.5, versus none for Claude Code; request caps explain at most 4.3 points of that gap.
Why it matters
- Success-only benchmarks can hide large differences in harness token cost.
- Across 21 comparisons on three benchmarks, provider harnesses never led their best alternative detectably on success; compare cost before choosing.
- The open question is which components belong in a general-purpose harness's core and which should be tailored to each workload.
2 upvotes on Hugging Face 9 slides, 2 min
1 day ago