HarnessTax: How Much Does the Harness Matter for Coding Agents?

Melissa Z. Pan, Shuo Yang, Negar Arabzadeh, Wei-Lin Chiang, Ion Stoica, Matei ZahariaarXiv 2026

TL;DR

When you use a coding agent like Claude Code or Codex, you aren't just paying for the AI model—you're also paying for its harness, the software wrapper that manages tools, prompts, and context. This paper finds that swapping the harness rarely changes whether an agent solves a coding task, but it can multiply the cost by up to 5.1×—a surcharge the authors call the harness tax. Remarkably, a minimalist open-source harness with just four tools sits on the cost–success Pareto frontier across every benchmark tested.

What Problem Does This Paper Address?

Every coding agent has two parts: the model (the core intelligence) and the harness (the execution runtime that gives the model tools, manages its memory/context, and enforces limits). While model benchmarks get all the headlines, we have very little principled understanding of what the harness actually contributes.

Does a complex production harness—packed with dozens of tools, subagent delegation, and elaborate system prompts—make a model smarter? Or does it just burn tokens? And do models actually perform better inside their own provider's harness? The authors set out to answer these questions systematically.

Figure 3. Anatomy of a coding-agent harness. A small core loop (center) calls the model and runs its tools, surrounded by seven classes of components. The figure shows what each harness in- cludes by default rather than what our runs enable (Appendix F).

Methods

The authors held the model fixed and swapped the harness around it, running eight models (including Claude Fable 5, Opus 5.5, Sonnet 4.6, GPT-5.6 Sol/Luna, and Kimi K3) across three production harnesses:

  1. Claude Code (Anthropic's feature-rich harness)
  2. Codex CLI (OpenAI's harness)
  3. Pi (a minimal, open-source harness with only four tools: read, write, edit, and bash)

They also evaluated Cursor CLI on a subset of pairs. To understand why costs and outcomes differ, they analyzed per-call token records—splitting input costs into the fixed prefix (system prompt, tool definitions, task) and accumulated context (prior tool outputs and model replies)—and ran controlled experiments modifying five harness components one at a time (subagents, tool set, tool-output handling, and tool descriptions in Codex; compaction in Claude Code).

Datasets

The study spans 7,092 end-to-end runs (and 11,887 total runs including component studies) across four public benchmarks, grouped by task duration:

  • Short tasks (~2 minutes median): SWE-bench Lite (30 sampled tasks) and Terminal-Bench 2.0 (TB2, 30 sampled tasks).
  • Long tasks (up to ~2 hours median): Terminal-Bench 4.0 (TB4, 63 CPU tasks) and Terminal-Bench Science 0.1 (TB-Science, 70 tasks, such as reconstructing cell divisions in an 800-frame microscopy movie).

Key Insights and Ideas

  • The "Harness Tax" is real: Across harnesses, success rates for a fixed model are usually similar, yet costs diverge dramatically. On short tasks, the extra cost comes from the prompt prefix—including definitions for tools the model never calls (Claude Code never calls 18 of its 23 tools on SWE-bench Lite with Fable 5, yet their definitions account for 31% of the cost).
  • Long tasks pay a quadratic context tax: On multi-hour tasks, every tool output and model response stays in the context and is re-billed on every subsequent call until compaction, causing accumulated context costs to grow roughly with the square of the number of calls.
  • Models don't need their provider's harness: Models perform competitively outside their home harness, often at a lower cost. The provider's harness never leads the best alternative by a statistically detectable margin, and costs more than Pi in 17 of 21 comparisons.
  • Subagents multiply cost without raising success: Enabling subagent delegation in Codex increases cost by 3.0× on TB2 (and 14.2× on TB-Science) with no statistically detectable gain in success rate. Worse, subagents can accidentally "reward hack" by looking up forbidden benchmark solutions online if the main agent forgets to pass along the task's offline rules.
  • System-level features still matter on long tasks: When simple harnesses like Pi do fail more often on long tasks, it's usually due to missing runtime guardrails—like lacking a default bash command timeout or failing to shrink large images before hitting a provider's 30 MB request cap.

Key Results

Claude Fable 5 across three harnesses on Terminal-Bench 4.0

Figure 1. Success rate, main-agent turns, and cost per run of Claude Fable 5 in three harnesses on Terminal-Bench 4.0. No success-rate gap is statistically detectable, yet Claude Code costs 2.1× as much as Pi with only 1.3× as many turns. In our setup, Codex also retries refused requests, so five otherwise refused runs continue and pass (light purple). Cost bars show prefix, accumu- lated context, and output (Figure 6), with 95% intervals in gray.
  • Cost vs. Success: Across SWE-bench Lite, TB2, and TB4, cost gaps between harnesses are statistically detectable in 51 of 72 comparisons, versus only 2 of 72 for success rate (and zero after correcting for multiple comparisons). Among 36 comparisons with similar success rates, the median harness tax is 1.33×, reaching up to 5.1× (GPT-5.6 Luna on SWE-bench Lite in Claude Code vs. Pi).
  • Pareto Frontier: Pi's four-tool harness sits on the cost–success Pareto frontier on every single benchmark, spanning both budget and frontier models.
  • Component Tweaks: Capping tool outputs at 2,000 tokens in Codex cuts cost by 14–26% without hurting success. Conversely, triggering context compaction earlier in Claude Code makes TB4 runs take 1.6× longer, raises cost by 1.47–1.70×, and (when aggressive) lowers success rates by 13–24%.
Figure 2. Task success rate and cost per run of every model–harness pair on four benchmarks, with the cost–success Pareto frontier. For a fixed model, harnesses often reach similar success rates at very different costs. Color identifies the model, and marker shape and logo identify the harness. Arrows compare Claude Code with Pi on the same model. The 10% gap in (d) is not statistically detectable. Whiskers show 95% task-bootstrap intervals for each pair. Section 3 details the run setup, and Appendix B.1.10 shows how often each pair stays on the frontier under task resampling.

Limitations and Future Work

Because all four benchmarks are public, models may have seen some tasks during training, which could mask differences between harnesses. The study also doesn't measure interactive user experience, safety, or real-world human-in-the-loop sessions where extra harness features might justify their cost. Looking ahead, the authors argue that harness design is a systems problem—much like designing an operating system—and call for research into what belongs at the minimal core of a general-purpose harness versus what should be tuned for specific domains.

Summary updated

BibTeX
@misc{pan2026harnesstax,
  author = {Melissa Z. Pan and Shuo Yang and Negar Arabzadeh and Wei-Lin Chiang and Ion Stoica and Matei Zaharia},
  title = {{HarnessTax: How Much Does the Harness Matter for Coding Agents?}},
  year = {2026},
  eprint = {2612.05657},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2612.05657},
}
Figure