The same model solves about the same share of coding tasks in two different agent harnesses, yet one bill is double the other: $1.33 a task against $0.67. Slide the task count and see the tax.
Learn what a coding agent’s harness is, how Arena’s team tested 21 model and harness pairs fairly, and why the harness moves the cost far more than the score.
Pick a pair, then drag Tasks you run from 10 to 1,000. Watch the yellow bill split apart while the green score stays almost level. Then we build, piece by piece, how the test was made, what the numbers mean, and what they leave out.
You need a rough idea of what an AI coding agent does (it reads code, runs commands and edits files until a task is done). We build the rest from zero.
Based on “HarnessTax: How Much Does the Harness Matter for Coding Agents?”, an Arena research post (16 September 2026) by M. Z. Pan, S. Yang, N. Arabzadeh, W.-L. Chiang, I. Stoica and M. Zaharia; project page. This is a reading for MIT MAS.S62 AI4AI, Lecture 4: Harness Evolution. Every idea is re-taught here in our own words and devices.
The success rates and average costs per task are the post’s: Fable 5 on SWE-bench Lite (Claude Code 97.8% at $1.33, Pi 96.7% at $0.67) and GPT-5.6 Sol on Terminal-Bench 2.0 (Pi 83.3% at $0.42, Codex 78.9% at $0.76), each averaged over 30 tasks with three tries per task. The totals are our own arithmetic: the average cost times the number of tasks you choose, and solved tasks are the success rate times that number.
Chapter 0
See what a coding agent is made of, and why the part around the model can double your bill
Two engineers get the same job: fix a failing test in a code repository. Both use the same AI model. Ana runs it through one coding tool. Ben runs it through another. Both fixes pass. At the end of the month, Ana’s bill is twice as big as Ben’s.
Nothing about the model differs. So where did the money go? This lesson teaches a research post from Arena that asks exactly that question and measures the answer. The authors call the gap a harness tax: extra spend you pay when you accept a tool’s default setup without checking the alternatives.
A coding agent is a program that gets a task in plain words, such as “make this test pass”, and then works on a code repository by itself. It reads files, runs commands, edits code and checks the result. Millions of people now use these tools.
Think of a taxi. The model is the driver: a large neural network, trained once, that decides what to do next. The harness is everything else about the car and the dispatch office. It decides which controls the driver gets, what the driver is told at the start of each trip, and when the trip must end. The post defines a harness as a software system that manages a model’s tools, context and task execution.
Those three words each name a job. Tools are the actions the model may ask for, such as reading a file or running a command. Context is all the text the model reads before it answers. Task execution is the loop that sends text to the model, runs the tool the model asks for, and repeats until the job is done.
The model is the same file of numbers whichever harness calls it. The harness is ordinary software that anyone can change. That is why a harness is cheap to swap and why the question matters: you choose both halves, even when you only think about the model.
Many people say a better harness lets the same model do more. The post turns that claim into a test. Could another harness help the same model solve more tasks, or cut its cost? To find out, the team ran 21 model and harness pairs: seven models in three harnesses, Claude Code, Codex CLI and Pi. They used two public test sets, SWE-bench Lite (small real bug-fix tasks taken from open-source projects) and Terminal-Bench 2.0 (harder tasks done in a command-line terminal).
They report four findings, and this lesson takes them in order. First, the harness has little effect on how often the task is solved, but a large effect on cost: the same model can reach similar success at up to five times the cost. Second, a simple harness can compete. Third, a model can do as well, or better, in a harness its own provider did not build. Fourth, these results come from two benchmarks only, so they carry limits that we will name.
Before we measure anything, we need to be sure which parts belong to which half. Sort the seven items below. Some belong to neither half: they are part of the test itself.
Read the card, then choose where it belongs: the model, the harness, or neither (a rule of the test or of the market). The read-out explains each answer.
The cards are our own examples built from the post’s definition (tools, context and task execution) and its setup (a 100-turn cap, official evaluators, a fixed price list). No numbers on this device come from the post.
Notice the pattern. Everything the model is sits in its weights. Everything the model is told, offered and allowed to do sits in the harness. The grader and the price list sit outside both, which is why the study holds them fixed.
A provider charges by the token, a small piece of text, about three quarters of a word. You pay for every token you send in and every token the model writes back. The harness chooses how many tokens go in, because it builds the text. A harness that sends a long preamble on every turn pays for that preamble again and again.
Correctness works differently. The model decides whether the bug is fixed. If both harnesses give it the files it needs and the commands it needs, it can reach the same fix by either route. So the same answer can sit behind two very different bills. Chapter 1 shows the mechanics, and Chapter 5 shows where the post says the gap begins.
Chapter 1
Follow one request and one reply, and see which parts of the bill the harness controls
Ana types her task: “the test test_parse_date fails; fix it.” Nothing happens for a second. Then the screen shows a line: reading parser.py. A moment later: running pytest. A third line: editing parser.py. Each line is one turn, one round trip between the harness and the model. To see where the money goes, follow one turn from the inside.
A language model has no memory between calls. Every call must carry everything the model needs to know. So on each turn the harness builds one big block of text, called the request, from three parts.
The first part is the system prompt: standing instructions, such as how to behave and how to format answers. The second is the tool schemas: for each tool, a name, a short description and the shape of its inputs, written as structured data so the model can ask for the tool by name. The third is the history: the task, plus every earlier model reply and every tool result so far. Together these are the context.
Here is a request in the plain shape most model APIs use. The numbers in the comments are our illustration.
pythonrequest = { "system": "You are a coding agent. Work in /repo. Prefer small edits.", # ~1,000 tokens in a real harness "tools": [ # the tool schemas, ~1,500 tokens {"name": "read", "description": "Read a file", "input_schema": {"type": "object", "properties": {"path": {"type": "string"}}}}, # ... one entry per tool ... ], "messages": [ # the history, grows every turn {"role": "user", "content": "test_parse_date fails; fix it."}, {"role": "assistant", "content": [{"type": "tool_use", "name": "read", "input": {"path": "parser.py"}}]}, {"role": "user", "content": [{"type": "tool_result", "content": "def parse_date(s): ..."}]}, ], }
The reply is small by comparison. It is either a final answer or a tool call, a structured request such as {"name": "bash", "input": {"command": "pytest"}}. The harness runs that tool itself, in its own process, never in the model. It then appends the call and the result to the history and builds the next request. That is the loop the post calls task execution.
A provider counts input tokens (everything in the request) and output tokens (everything in the reply), and it charges a price per million of each. Output tokens cost more each, but a reply is short, and the request is long.
The request is long because the history is resent whole on every turn. Turn 1 sends the task. Turn 2 sends the task, the first call and the first result. Turn 3 sends all of that again plus more. The part that never changes, the system prompt and the tool schemas, is sent again on every single turn. We will call that fixed part the preamble.
Read the first equation as a staircase. Each turn starts from the same floor, C0, and stands on one more step of history. The floor is paid on every turn. Push the slider and watch the floor stay level while the steps pile up.
Each column is one request. The warm and pink blocks are the preamble, sent again every turn. The purple block is the history. Drag the number of turns.
Illustrative: a 1,000-token system prompt, 1,500 tokens of tool schemas, a 300-token task, then 900 tokens added per turn (a 100-token call and an 800-token result). Prices of $3 per million input tokens and $15 per million output tokens, with 100 output tokens a turn, are also illustrative, not the post’s.
Take the six turns of the device. Turn 1 sends 1,000 + 1,500 + 300 = 2,800 tokens. Turn 2 sends 2,800 + 900 = 3,700. Turn 3 sends 4,600, turn 4 sends 5,500, turn 5 sends 6,400, and turn 6 sends 7,300.
Add them: 2,800 + 3,700 + 4,600 + 5,500 + 6,400 + 7,300 = 30,300 input tokens. At $3 per million, that is $0.0909. The model wrote 100 tokens a turn, so 600 in all; at $15 per million, that is $0.009. The total is about $0.10 for one small task.
Now ask how much of the input bill is the preamble alone. It is 2,500 tokens times six turns, 15,000 tokens, or about half. The same task with a preamble ten times smaller would send 2,800 − 2,250 = 550 tokens first and cost far less, though the model did the same work. This is the arithmetic behind a harness tax. Chapter 5 tests it against the post’s numbers.
Symptom: two harnesses take the same number of turns on the same task, yet one bill is double. Measurement: log the token count of the first request for each, and the total input tokens over the run. If the first request is much larger, the floor is higher. Fix: shorten the system prompt, send fewer or smaller tool schemas, or ask the provider to cache the repeated prefix. Caching lets the provider charge less for text it has just seen, which lowers the floor but does not remove it.
Chapter 2
Count the runs, then see why each control in the setup keeps one harness from winning by accident
Imagine a race between three runners. One wears a shoe the sponsor built for the track. One runs downhill. One has a friend who hands over a drink at every corner. If the first one wins, what did you learn? Almost nothing. A fair race changes one thing and holds the rest fixed.
Comparing harnesses has the same problem. A harness can change the tools, the prompt, the turn limit, the web access and even the way cost is counted. If all of those move together, a cost gap tells you nothing about why. So the first job of the study is to build a fair track.
A benchmark is a fixed set of tasks with an automatic grader. The post uses two. SWE-bench Lite is a small set of real bug reports from open-source Python projects. The agent gets the repository and the report, and must change the code so that the project’s hidden tests pass. Terminal-Bench 2.0 sets harder jobs that the agent does by typing commands in a terminal.
Each task runs in its own container, a sealed box with a copy of the files and tools. When an attempt ends, the benchmark’s official evaluator checks the result and says pass or fail. The study never grades by hand and never changes the grader. An attempt that passes is a success; the success rate is the share of attempts that pass.
Seven models and three harnesses make 3 × 7 = 21 pairs. The harnesses are Claude Code (made by Anthropic), Codex CLI (made by OpenAI) and Pi (a minimal open-source harness). The seven models include Claude Fable 5, Claude Sonnet 4.6, an Opus model, GPT-5.6 Sol, GPT-5.6 Luna and the open-weight Kimi K3. Kimi K3 is reached through Fireworks AI in its single native thinking mode, the same in all three harnesses.
The team uses the same 30 tasks, sampled at random, from each benchmark for every pair. Models write text by drawing random words, so one run is a single draw. To see the spread, each pair runs each task three times. Multiply it out.
The total is our own multiplication from the post’s setup, which states each factor. Step through it below.
Each small square is one agent attempt. Choose a stage to add one factor and watch the grid grow. New squares light up in teal.
Counts follow the post’s setup (21 pairs, two benchmarks, 30 tasks each, three attempts per task per pair). We assume every pair ran every task on both benchmarks, as the setup describes; the product is our arithmetic, not a figure the post prints.
Counting runs is half of fairness. The other half is what each run is allowed to do. The post holds these settings fixed, and each one blocks a specific unfair advantage.
| Control | What the study does | What it prevents |
|---|---|---|
| Same tasks | 30 random tasks per benchmark, shared by all pairs | One harness meeting an easier draw of tasks |
| Repeats | Three attempts per task, averaged | Reading luck as skill |
| Native, high effort | Each harness in its own default setup, at its high effort setting | Handicapping a harness with a setup its authors never meant |
| Turn cap | At most 100 agent turns per attempt | A runaway attempt that burns money |
| Official grader | Each benchmark’s own evaluator | A grader that favours one harness’s habits |
| One price list | A fixed direct-API list dated 1 September 2026, the same prices for a model in every harness | Prices, discounts or plans masking the token counts |
| No outside lookups | On SWE-bench Lite: no network in task containers, default web tools off in Claude Code and Codex, hosted tool declarations rejected at the API | An agent searching the web for the real fix |
Two details show how careful the setup is. The turn counts and effort settings follow each harness’s own definitions, so a “turn” may not mean the same thing across harnesses. And for Pi, the team added two packages, one to configure subscription keys and one to control agent turns. We return to both in Chapter 8.
Symptom: one harness posts a higher success rate on a bug-fix benchmark. Measurement: read its logs and find it searched the web and copied the public fix. Fix: block the network and the web tools for every harness, so every agent has only the repository, the same way. The post does exactly this, and it also takes care that its price list never changes between runs.
Chapter 3
Turn thousands of runs into one number per pair, with an honest band of doubt around it
A teacher gives a class thirty quiz questions, and your friend scores 28 of 30. Is your friend better than someone who scored 27? Probably you cannot say. One different question could swap them. Any score from a small test comes with a band of doubt, and a careful report shows the band.
The post faces the same issue. It has 3,780 attempts, but each pair has only 30 tasks per benchmark. This chapter shows how the authors turn raw runs into one number per pair, and how they put a band around it.
Take one pair on one benchmark. Each attempt has two outcomes: a pass or fail, and a cost in dollars. The cost comes from the log of tokens, priced with the fixed list: tokens in times the input price, plus tokens out times the output price, summed over the turns (the equation in Chapter 1).
The post then averages in two steps. First, average the three attempts of each task. Then average those 30 task values. Written out, the success rate and the mean cost are:
Why average attempts first? Every task then counts once. If a task needed three tries on one harness and one on another, the first would not get triple weight. A worked case: one task passes on two of three attempts, so its value is 2/3 ≈ 0.67. Another passes all three, value 1. A third fails all, value 0. The mean of 0.67, 1 and 0 is 0.56, so the pair’s success rate on that tiny set is 56%.
With 30 tasks, a different 30 would give a different mean. We cannot draw new tasks, but we can imitate it. The bootstrap treats the 30 task values as the whole world and redraws from them. Each redraw picks 30 values with replacement: after a value is picked it goes back in, so it may appear twice or never. Take the mean of each redraw.
The post does this 10,000 times for a 95% confidence interval. Sort the 10,000 means and read the middle 95%: from the 2.5th to the 97.5th percentile. (That reading is the standard one; the post states the redraw recipe.) The band is the range of means you would see, if the 30 tasks were a fair sample of a bigger pool. A wide band says “do not trust small gaps.” Try it on invented task costs.
Pick how many tasks you have. Press Resample to redraw the tasks with replacement and add each new average to the histogram. The teal band holds the middle 95% of averages.
Illustrative: the task costs are made up (seeded, so identical on every visit) from a skewed spread with a few expensive tasks, as real agent costs tend to be. They are not the post’s data. The post redraws 30 task averages 10,000 times; the button here uses 1,000 to stay quick.
Look at the three sizes. With 10 tasks the band is wide, because a few expensive tasks swing the mean. With 120 tasks it is much narrower. The band shrinks roughly with the square root of the number of tasks, so four times the tasks halves it.
The post also compares harnesses by cost ratio: how many times more one harness costs than another, for the same model. Each model that two harnesses share gives one ratio. How do you average them? The plain mean misleads. If Claude Code costs 2× Pi on one model and half of Pi on another, the plain mean is (2 + 0.5)/2 = 1.25, which says Claude Code is pricier overall. But the two cancel exactly: swap the labels and you get the same 1.25 for Pi.
The geometric mean multiplies the ratios and takes the n-th root. For 2 and 0.5: (2 × 0.5)1/2 = 1.0, a fair tie. Equivalently, average the logarithms and undo them. A second example: ratios 2.0, 2.5 and 1.6 multiply to 8, and 81/3 = 2.0. That is the kind of statement the post makes: “Claude Code costs about 2.0× as much as Pi on SWE-bench Lite”, as a geometric mean over shared models.
pythonimport numpy as np def pair_mean(y): # y has shape [T tasks, K attempts] return y.mean(axis=1).mean() # mean the attempts first, then the tasks def bootstrap_ci(task_vals, B=10_000, rng=np.random.default_rng(0)): T = len(task_vals) idx = rng.integers(0, T, size=(B, T)) # B redraws of T task indices, with replacement means = task_vals[idx].mean(axis=1) # shape [B] return np.percentile(means, [2.5, 97.5]) def geo_mean_ratio(cost_a, cost_b): # one cost per shared model, same order r = np.array(cost_a) / np.array(cost_b) return np.exp(np.log(r).mean())
Symptom: a table says harness A is 1.1 points better, and a reader cheers. Measurement: the bootstrap bands of A and B overlap heavily. Fix: say “no clear difference in success” and look at the cost, whose gap may be far bigger than its band. That is how the post words its first finding.
Chapter 4
Compare cost and success for the same model, and find the price at which the pricier harness pays off
You are buying a cup of coffee. Two shops sell it. Both coffees taste the same to you. One costs $1.33 and the other $0.67. You would not wonder long. You would buy the cheaper one, unless the dearer shop gave you something you could name.
The post’s first finding has that shape: harness choice has little effect on task success rate, but can significantly affect the cost. The same model can reach similar success at up to 5× the cost. Let us read the numbers behind that sentence.
Claude Fable 5 reaches the highest success rate on SWE-bench Lite. It solves 97.8% of attempts in Claude Code, 96.7% in Codex and 96.7% in Pi. The gap between best and worst is 1.1 points. Its average cost per task is about $1.33 in Claude Code and $0.67 in Pi. The gap in cost is a factor of two.
One pair could be luck, so the post pools all shared models with the geometric mean from Chapter 3. Claude Code costs about 2.0× as much as Pi and 1.6× as much as Codex on SWE-bench Lite, and about 1.5× as much as Pi on Terminal-Bench 2.0. Over the same comparisons, the average effect of the harness on success stays within ±2% on SWE-bench Lite and about ±5% on Terminal-Bench 2.0.
Compare the sizes. A cost gap of 50% to 100% sits beside a success gap of a few points. Recall that a 30-task test has a band of several points (Chapter 3). So the success gaps are inside the noise, and the cost gaps are not. That is the whole finding.
First, cost per solved task. If an attempt costs c̄ on average and succeeds with probability s̄, you pay c̄ for every attempt but only s̄ of them give you a fix. So each fix costs c̄/s̄.
Work it for Fable 5. Claude Code: 1.33 / 0.978 = $1.36 per solved task. Pi: 0.67 / 0.967 = $0.69. Now the break-even. Δc = 1.33 − 0.67 = $0.66. Δs = 0.978 − 0.967 = 0.011. So V* = 0.66 / 0.011 = $60. Claude Code’s extra 1.1 points are worth buying only if one more solved task is worth over $60 to you. (V* is our own arithmetic from the post’s figures.)
The second case is stronger. GPT-5.6 Sol on Terminal-Bench 2.0 succeeds on 83.3% of attempts in Pi at $0.42, against 78.9% in Codex at $0.76. Pi is cheaper and better. No value of V makes Codex the right pick here.
Put cost on one axis and success on the other. A pair is dominated if another pair is at least as cheap and at least as successful, and strictly better on one. A pair that nothing dominates sits on the Pareto frontier: you could not improve one measure without giving up the other. The post says Pi reaches the frontier on both benchmarks. Between two harnesses for Fable 5, neither beats the other on both measures: Claude Code buys 1.1 points for $0.66. (Which exact pairs sit on the full frontier is in the post’s charts, not its text.) In the Sol case Pi beats Codex on both, so that Codex pair is dominated.
Each dot is one harness: cost to the right, success upward. The dashed line starts at Pi and rises at the rate your value of a solved task allows. A dot above the line is worth its price. Drag the value.
Success rates and average costs per task are the post’s (Fable 5 on SWE-bench Lite: Claude Code 97.8% at $1.33, Pi 96.7% at $0.67; GPT-5.6 Sol on Terminal-Bench 2.0: Codex 78.9% at $0.76, Pi 83.3% at $0.42). Net value per task = value × success rate − cost is our own simple model, and the value you pick is yours.
Drag the value of a solved task. For Fable 5 the winner flips from Pi to Claude Code at $60. For Sol it never flips. This is what the post means when it says model evaluations should compare the same model’s cost and success across common harnesses, not only its success.
Symptom: the team’s coding-agent spend doubles after a switch of default tool, and the pull requests look the same. Measurement: compute cost per solved task for each harness on a sample of your own tasks, with the same model. Fix: keep the cheaper harness unless the extra success is worth more than V*. The post calls the unneeded extra a harness tax, and a tax is paid without noticing when you look only at success.
Chapter 5
Trace the bill back to the text the harness sends before the model has read a single line of your code
Two people take a taxi across town. Both trips take 15 minutes. One fare is double. You ask the driver why, and he says: “The meter started at a higher number.” Same route, same time, different starting charge. The ride itself was not the problem.
The post finds the same pattern in the bills. This chapter shows the data, then builds a small model of the meter so you can see how a high starting charge turns into a high fare.
Start with turns. For Fable 5 on SWE-bench Lite, Pi averages 15.4 turns per attempt and Claude Code averages 15.3. Yet Claude Code costs about twice as much, for a 1.1% higher success rate. The agents walk the same number of steps. Each step costs more in one harness.
The post is careful here. It says this means higher spending per recorded turn, and adds that turn definitions vary across harnesses. One harness might count a tool call and its reply as one turn, another as two. So the comparison is suggestive, and the next measurement is firmer.
That measurement is the initial context: the size of the very first request, before any work has happened. Across all seven models, Claude Code’s mean initial context is over 10× Pi’s. The post names two reasons: longer instructions and larger tool schemas. Its words: “A harness tax can begin with the first model call.”
Chapter 1 gave us the meter. Turn t sends It = C0 + (the history so far) tokens. Sum over n turns and the starting charge appears n times.
Now put numbers in, all illustrative. Let each turn add a = 900 tokens, let the attempt take n = 15 turns, and charge $3 per million input tokens. The history term is 900 × 15 × 14 / 2 = 94,500 tokens for both harnesses.
A lean harness with C0 = 1,500 sends 15 × 1,500 + 94,500 = 117,000 input tokens, or $0.351. A heavy one with ten times that, C0 = 15,000, sends 15 × 15,000 + 94,500 = 319,500, or $0.959. Add the same 15 × 100 = 1,500 output tokens at $15 per million, $0.023, to each. Totals: $0.37 and $0.98. The heavy one costs 2.6 times as much, and every dollar of the gap came from the starting charge.
Providers often offer prompt caching: text that starts a request exactly as a recent request did can be read back at a lower price. The preamble is the same on every turn, so it is the best candidate. The post says total spending depends on caching, generated tokens and later calls, which is why a 10× larger start gives about a 2× larger bill and not 10×.
Put a cache into the model. Say the first turn pays full price for the preamble, and later turns pay 10% of it for the share that hits the cache. At an 80% hit rate on the 14 later turns, the heavy preamble costs 15,000 × (1 + 14 × (0.2 + 0.8 × 0.1)) = 15,000 × 4.92 = 73,800 token-equivalents, not 225,000. Try it.
Two harnesses take the same number of turns. The heavy one starts with a bigger context. Bars show the cost of one attempt, split into preamble, history and output. Drag the size of the start and the cache hit rate.
Illustrative throughout, not the post’s numbers: 15 turns, 900 tokens of history added per turn, a lean start of 1,500 tokens, 100 output tokens per turn, $3 and $15 per million input and output tokens, cached tokens at 10% of the input price, and a cache that applies to the repeated preamble from turn 2 on. The post reports only that Claude Code’s initial context is over 10× Pi’s and that its attempts cost about 2× as much for Fable 5.
At 0% caching the ratio is 2.6×. Push the hit rate up and the ratio falls to 1.6× at 80% and 1.3× at 100%, because the repeated preamble stops costing full price. The tax does not vanish: the first turn still pays in full, and the history is still resent.
Symptom: the bill per task is high, the turn count is normal. Measurement: log the token count of the first request and the cached share of input tokens; compare harnesses on the same task. Fix: trim the system prompt, keep only the tools a task needs in the request, and make sure the preamble is stable so the cache can match it. These fixes are our suggestion, drawn from the arithmetic. The post measures the starting size, and it does not test them.
Chapter 6
Build a harness with read, write, edit and bash, and watch it fix a bug in a handful of turns
A carpenter shows up with a small bag: a hammer, a saw, a tape and a pencil. Another carpenter brings a van with two hundred tools. Both build the same shelf. The first carpenter carries less, loads the truck faster, and rarely loses a tool. The second can do odd jobs the first cannot. Which one do you hire for a shelf?
The post’s second finding is about the small bag. Pi, a minimal open-source harness, reaches the Pareto frontier of cost and success on both benchmarks. It does this with just four tools: read, write, edit and bash. The post’s conclusion is that a simple harness can be competitive.
read takes a file path and returns the file’s text. write creates a file, or replaces one, with the text you give it. edit changes part of a file: it takes the old text and the new text, and swaps them. bash runs any shell command and returns what it printed. That last one is the big one. With a shell the agent can search (grep), list files (ls), run tests (pytest), use version control (git), and start a program.
So the four tools cover nearly everything a bug fix needs. The first three could be done from a shell too, but dedicated tools make file work safer and cheaper in tokens: the model sends a small edit and not a whole file.
Here is a complete harness with those four tools. It is our sketch of the idea, not Pi’s source. call_model stands for any model API that takes the request from Chapter 1 and returns a reply.
pythonimport subprocess, pathlib def read(path): return pathlib.Path(path).read_text() def write(path, text): pathlib.Path(path).write_text(text); return "ok" def edit(path, old, new): s = pathlib.Path(path).read_text() if s.count(old) != 1: # the old text must match exactly once return f"error: found {s.count(old)} matches" # the error goes back to the model as the tool result pathlib.Path(path).write_text(s.replace(old, new)); return "ok" def bash(command): r = subprocess.run(command, shell=True, capture_output=True, text=True, timeout=120) return (r.stdout + r.stderr)[-4000:] # keep only the tail: tool results cost tokens TOOLS = {"read": read, "write": write, "edit": edit, "bash": bash} def run_agent(task, call_model, system, schemas, max_turns=100): messages = [{"role": "user", "content": task}] for turn in range(max_turns): # the post's cap: 100 turns reply = call_model(system, schemas, messages) # one request, one reply (Chapter 1) messages.append(reply) calls = [b for b in reply["content"] if b["type"] == "tool_use"] if not calls: # no tool requested: the model is done return reply results = [{"type": "tool_result", "content": TOOLS[b["name"]](**b["input"])} for b in calls] messages.append({"role": "user", "content": results})
About twenty lines of logic. A real harness adds a sandbox so that bash cannot harm your machine, a way to resume, and a nicer screen. The shape stays the same: the loop, the tools, the history. The post’s point is that you may not need much more.
Every tool you offer needs a schema, and every schema is part of the preamble. Say a schema takes about 150 tokens. Four tools add 600 tokens to every request. Twenty tools add 3,000. Over a 15-turn attempt that is 9,000 against 45,000 resent tokens, before caching. That is the mechanism of Chapter 5 at work. The numbers here are our illustration, and the post reports no per-tool size.
Fewer tools has a second effect on correctness that the post does not measure: with fewer choices the model has fewer ways to pick the wrong tool. Treat that as a hypothesis, not a finding.
Step through a made-up fix. The agent greps, reads the file, runs the test, edits the code and runs the test again. Then change how many tools the harness offers and read what happens to the resent schema.
Press Next turn to run one turn. The grid marks which tool each turn used. The box shows the call and the result. Then drag Tools offered.
The trace is invented to show the loop; it is not from the post’s runs. The 150 tokens per tool schema is illustrative. What is from the post: Pi offers four tools (read, write, edit, bash) and reaches the Pareto frontier on both benchmarks.
The model is never trained on your harness in particular. It reads each tool’s name and description in the schema, just as you would read a menu, and then writes a tool call in the structured form the API expects. That is why the same model can work in all three harnesses. It also shows why a schema must be short and clear: the model reads it, and you pay for it, on every turn.
The shell makes up for the small menu. If the agent needs a search, it writes grep -rn "parse_date" .. If it needs the test results, it writes pytest. A harness with only four tools gives up named search and test tools, and the model asks the shell to do those jobs instead. Each such job costs the model a few more words in its reply. A named tool costs a schema in every request. The post does not measure this trade, so weigh it on your own tasks.
The post does not say richer harnesses are useless. It says: “Richer harness features may still benefit other models, workloads, or interaction settings. Harness complexity should therefore be treated as an empirical trade-off.” It also draws a use for the result. Because Pi and Codex compete, researchers can study state-of-the-art coding harnesses with existing models, with no need for a proprietary harness or for training the model together with it.
Symptom: an edit tool returns “ok” but the file did not change as intended, and the agent loops on the same edit until the turn cap. Measurement: count repeated identical tool calls and check how many attempts hit the 100-turn cap. Fix: make the tool strict, as in the sketch: if the old text matches zero or many times, return a clear error the model can act on.
Chapter 7
Test whether a provider’s own harness is the best home for its model, and how much noise hides in “nine of twelve”
A football team has a home ground. The grass, the crowd and the routine all favour it. Everyone expects the home side to play best at home. But suppose you collect twelve results and the team does better away in nine of them. Would you say the team hates its own ground? Or would you ask how much luck sits inside twelve results?
The post’s third finding asks the same about models and harnesses. A provider builds a model and also a harness for it. Does the model work best in that home harness?
Providers say they tune their models for their own coding tools. OpenAI, for instance, describes GPT-5-Codex as optimized for agentic software engineering in Codex. So one might guess that Claude models do best in Claude Code and GPT models in Codex CLI. The post checks. There are six Anthropic and OpenAI models and two benchmarks, which makes 12 comparisons. In each, one asks which of the three harnesses gave the highest observed success rate. In nine of the twelve, an alternative harness, one that is not the model’s home, came out on top.
Two examples. Claude Sonnet 4.6 solves 68.9% of attempts in Codex against 66.7% in Claude Code on SWE-bench Lite, at a similar cost. GPT-5.6 Sol on Terminal-Bench 2.0 reaches 83.3% in Pi against 78.9% in Codex, at $0.42 against $0.76, about half the cost.
The authors draw a gentle conclusion: a model’s capabilities are compatible, general and can carry over to other harnesses. A shared provider does not guarantee the best pairing. The practical question is which harness gives the best balance of cost and success for your model and workload. The post jokes that your Claude models may not need Claude Code. It does not say they never do.
Here is a check the post does not run, offered as our reading. Suppose all three harnesses were truly equal for a model. Success rates measured on 30 tasks would still differ by luck, and one harness would top the list. Which one is random. The home harness would top it about one time in three, and an alternative about two times in three. Across 12 comparisons that is 8 alternative wins on average. The post saw 9.
So nine of twelve is about what pure luck gives when the harness makes no difference. Read it as “we see no sign of a home-ground edge”, and not as “other harnesses are better”. This is the careful way to hear the post’s result, and it also fits its claim that a shared provider does not guarantee the best pairing.
Now test it. The device simulates twelve comparisons many times. Each simulated harness solves tasks with a true success rate you choose, and the home harness gets an edge you choose. Count how often an alternative wins, and see where 9 falls.
Each bar counts simulated sets of 12 comparisons by how many an alternative harness won. The teal line marks the post’s 9. Set a home edge, then run the simulation.
A toy: each harness gets 90 independent attempts (30 tasks times 3 tries) and the highest observed rate wins, ties broken at random. Real runs share tasks across harnesses, which cancels some noise, so this toy overstates the luck. The 12 comparisons and the 9 alternative wins are the post’s; the rest is our simulation.
With no home edge the average sits near 8, and 9 or more happens in roughly four sets out of ten. Give the home harness an edge of five points and the average drops well below 8, and 9 becomes rare. So the post’s count is plausible when the edge is near zero, and it would be surprising if home tuning gave a large edge. That is what “no guarantee” means in practice.
Treat the harness as a setting to test, like a learning rate. Run your own tasks with your own model through two or three harnesses. Look at cost per solved task (Chapter 4), and keep the bands from Chapter 3 in view.
Symptom: a team assumes its model must run in the vendor’s own tool and pays that tool’s price. Measurement: run the same model in the other harnesses on 30 or more of your tasks, three tries each, and compute success, cost and a band. Fix: choose by the cost and success balance. If the home harness wins by more than the noise, keep it.
Chapter 8
Separate what the post shows from what it does not, and decide what to test on your own work
A friend tells you: “A study proved that the cheap tool is as good as the expensive one.” You ask which tool, which tasks, which model. Your friend shrugs. A good reader asks these questions of every result, and a good report answers them itself. The post does, in its closing notes. Here are the limits, in order of how much they matter.
Two benchmarks only. The authors write that the findings “can be limited to the two open-source benchmarks we test, which the models may have encountered during training.” If a model saw a benchmark’s tasks while it trained, scores may be too high, and the harness may matter more or less on fresh work. Results may differ on other benchmarks and workloads.
Small task samples. Thirty tasks per benchmark is enough for a 2× cost gap and not enough for a one-point success gap (Chapter 3). That is why the post speaks of success being “similar” and not “equal.”
Turns are not the same everywhere. The turn counts and effort settings follow each harness’s own definitions. So the comparison of turns (15.4 against 15.3) is a rough guide, and the post says so.
Cost is computed, not billed. The study applies one direct-API price list, dated 1 September 2026, to the token counts. Real users may pay by subscription, with discounts or different caching. The ratios are most trustworthy; the dollar figures are best read as relative.
No ablation. An ablation removes one part and measures what changes. The post compares whole harnesses, each in its native setup. It cannot say whether the prompt, the tools, the effort setting or the loop explains a gap. The 10× larger initial context in Claude Code is a measured difference that fits the cost gap, and it is not an isolated cause. Cost, the post itself says, also depends on caching, generated tokens and later calls.
A harness is a bundle. Claude Code, Codex and Pi differ in many ways at once. A finding about Pi is a finding about Pi’s whole bundle on these tasks.
Short, self-contained tasks. A benchmark task starts fresh and ends when tests pass. Real work runs for sessions, collects feedback and changes its goals. The authors call these out as the natural next step: evaluating harnesses in real development workflows where requirements evolve, developers give feedback and tasks span sessions.
The post is not a case against features. It argues that as models improve, coding agents may need less of today’s scaffolding, so general-purpose agents should favour cost efficiency and reliability. For harder problems at the edge of a model’s ability, such as scientific discovery, a harness that gives structured guidance for exploring ideas, judging candidates and learning from feedback may still help. That is the territory of the other readings in Lecture 4.
The authors end with a wish: users should not have to make these configuration decisions. They picture a redesigned harness that adapts as tasks unfold while remaining general. They also say they will publicly release their profiling traces, so others can check the token counts.
Here is a small audit you can run on your own work. Each step uses a tool from an earlier chapter.
Now check your own reading of the post. Sort each claim below by what the post supports.
Read the claim. Choose whether the post supports it, does not show it, or says the opposite.
The claims are our paraphrases and tests of the post’s statements; the numbers they cite (5×, ±2%, ±5%, two benchmarks, 30 tasks, a fixed price list) are the post’s.
Symptom: a design document says “the harness does not matter, since a study showed equal success.” Measurement: check the claim against the study’s scope: two benchmarks, 30 tasks each, success within about ±2% to ±5% on average, and cost 1.5× to 2× apart. Fix: restate it as “on these benchmarks, cost differed far more than success” and plan your own test.
Chapter 9
Keep the numbers, the terms, a checklist and the core code on one page, then go further
You can now explain the HarnessTax post from memory: what a harness is, how the test was made fair, how the numbers were reduced to one per pair, and what they say and do not say. This page keeps it all in one place.
A coding agent is a model plus a harness, the software that manages tools, context and task execution. Arena’s team ran 21 model and harness pairs (seven models, three harnesses: Claude Code, Codex CLI and Pi) on 30 sampled tasks from SWE-bench Lite and Terminal-Bench 2.0, three tries each, with a fixed price list. They found that harness choice moves cost far more than success: the same model can reach similar success at up to 5× the cost. A minimal harness with four tools is competitive, and a model does not always do best in its provider’s own harness. The scope is two benchmarks, and the study compares whole harnesses without removing parts one by one.
| What | Number | Why it matters |
|---|---|---|
| The test | 21 pairs; 30 tasks per benchmark; 3 tries; 100-turn cap | 3,780 attempts by our count |
| Fable 5, SWE-bench Lite, success | Claude Code 97.8%; Codex 96.7%; Pi 96.7% | Success is nearly level |
| Fable 5, SWE-bench Lite, cost | Claude Code $1.33; Pi $0.67 | Cost differs by 2× |
| Geometric-mean cost ratios | Claude Code vs Pi 2.0× and vs Codex 1.6× (SWE-bench Lite); vs Pi 1.5× (Terminal-Bench 2.0) | The gap holds across shared models |
| Average harness effect on success | within ±2% (SWE-bench Lite); about ±5% (Terminal-Bench 2.0) | Small next to the cost gap |
| Turns, Fable 5, SWE-bench Lite | Pi 15.4; Claude Code 15.3 | Same steps, higher cost per step |
| Initial context | Claude Code over 10× Pi | The tax can begin at the first call |
| Pi | 4 tools: read, write, edit, bash | Small harness on the Pareto frontier |
| Sonnet 4.6, SWE-bench Lite | Codex 68.9% vs Claude Code 66.7% | Away from home, similar cost |
| GPT-5.6 Sol, Terminal-Bench 2.0 | Pi 83.3% at $0.42; Codex 78.9% at $0.76 | Better and half the cost |
| Home harness vs alternative | Alternative best in 9 of 12 comparisons | Near the 8 that luck gives (our reading) |
| Break-even value, Fable 5 | V* = $0.66 / 0.011 = $60 per solved task | Our arithmetic from the post’s figures |
| Term | Meaning | Where |
|---|---|---|
| Harness | Software that manages a model’s tools, context and task execution | Chapter 0 |
| Turn, preamble, initial context | One request and reply; the system prompt plus tool schemas sent every turn; the size of the first request | Chapters 1 and 5 |
| Bootstrap, geometric mean | Redraw tasks with replacement to get a band; average ratios by logarithms | Chapter 3 |
| Pareto frontier, V* | Pairs no other pair beats on both cost and success; the value at which the pricier harness breaks even | Chapter 4 |
| Harness tax | Extra cost paid for similar success when you accept a default harness unchecked | Chapter 4 |
This sketch turns attempt logs into the numbers of this page. The log format is our own invention: one row per attempt with the harness, task, success, and token counts. Prices are placeholders; use your provider’s list.
pythonimport numpy as np, pandas as pd PRICE = {"in": 3.0, "cached": 0.3, "out": 15.0} # dollars per million tokens: one fixed list def attempt_cost(r): return (r.tok_in * PRICE["in"] + r.tok_cached * PRICE["cached"] + r.tok_out * PRICE["out"]) / 1e6 def audit(log): # log: harness, task, ok (0/1), tok_in, tok_cached, tok_out log["cost"] = log.apply(attempt_cost, axis=1) per_task = log.groupby(["harness", "task"])[["ok", "cost"]].mean() # mean the tries first out = {} for h, d in per_task.groupby("harness"): rng = np.random.default_rng(0) idx = rng.integers(0, len(d), size=(10_000, len(d))) # bootstrap: [10000, T] ci = lambda col: np.percentile(d[col].values[idx].mean(axis=1), [2.5, 97.5]) out[h] = {"success": d.ok.mean(), "cost": d.cost.mean(), "per_solved": d.cost.mean() / d.ok.mean(), "ci_ok": ci("ok"), "ci_cost": ci("cost")} return out def break_even(cheap, pricey): # the value of a solved task at which the pricier one pays off ds = pricey["success"] - cheap["success"] return (pricey["cost"] - cheap["cost"]) / ds if ds > 0 else None # None: it never pays off
This is a reading for Lecture 4, Harness Evolution, of MIT MAS.S62 AI4AI (Fall 2026). This post asks a basic question for that topic: how much does the harness matter at all, and what does it cost? The answer, on two benchmarks, is that cost moves a great deal and success little. Any claim about a better harness then needs measurement, with bands, on cost as well as success.
“HarnessTax: How Much Does the Harness Matter for Coding Agents?” is by M. Z. Pan, S. Yang, N. Arabzadeh, W.-L. Chiang, I. Stoica and M. Zaharia, published by Arena on 16 September 2026 (updated 18 September): the post and the project page. All benchmark names, models and numbers are theirs. The break-even value, the simulations and the sketches of code are ours, and are labelled where they appear.
Now press Present or Teach and explain the harness tax out loud: what a harness is, why the first request sets the floor of the bill, how the test was made fair, and what the study cannot say. Then go back to the hero and set the tasks to 1,000.