---
title: 'The harness is the cost'
description: 'Cost discourse in agentic coding fixates on model choice. The dominant cost term sits one layer down, it is roughly quality-neutral, and you cannot see it until you log the API boundary.'
canonical_url: 'https://darkfactory.dev/blog/the-harness-is-the-cost'
markdown_url: 'https://darkfactory.dev/blog/the-harness-is-the-cost.md'
collection: blog
---

# The harness is the cost

Every conversation I have about agent costs is a conversation about models. Which model, routed how, downgraded when. The assumption underneath is that the model is the expensive part, so the model is the lever.

I no longer think that is where most of the money goes, and the evidence that changed my mind is embarrassingly simple: run the same task, on the same model, through two different harnesses, and log what actually crosses the API boundary.

The bills are not close.

## Nobody is paying for what they think they are paying for

When you send a prompt through an agent harness, your prompt is a small fraction of what gets billed. Ahead of it goes a system prompt, tool schemas for every tool the harness exposes, injected files, whatever context management the harness decided you needed, and formatting scaffolding. Then the loop runs, and much of that payload is resent on every turn.

The measurement that made this concrete for me was [Systima's July comparison](https://systima.ai/blog/claude-code-vs-opencode-token-overhead) of Claude Code and OpenCode, pinned to the same model snapshot on the same task set. Claude Code sent roughly thirty-three thousand tokens before the user's prompt appeared. OpenCode sent about seven thousand. Across full runs that ended in a passing result, average metered input differed by about 3.7 times.

Same model. Same task. Comparable outcome. The difference was entirely structural.

I want to be careful here, because a single measurement is not a law, and the same study yields different multiples depending on what you count. The first-turn floor ratio is closer to five times. The full-run average is the 3.7. Cache-write volume is its own, larger story. Treat any one number as an order of magnitude rather than a constant. The finding I am confident about is the shape: the harness sets a floor on what any task costs, that floor varies by several times between reasonable tools, and it is set before you make a single decision about models or prompts.

## Why it is invisible

If this is so large, why is nobody talking about it?

Because the number is not in your dashboard. Provider billing shows you tokens by model and by day. It does not attribute them to system prompt versus tool schemas versus your actual request, because from the provider's side those are the same field. Your harness reports what it did, not what it sent.

So the cost shows up as an undifferentiated total, and when the total is uncomfortable, the only lever the dashboard suggests is the model. You switch to a cheaper one, the total drops somewhat, and you conclude the model was the problem. You have just optimized the smaller term while the larger one continues untouched.

The other reason it stays invisible is drift. A harness adds a tool, a default gets more verbose, an update injects more context. Nobody announces this and nobody is measuring, so the floor rises quietly. The common experience of costs having roughly doubled over a few months with no change in usage is, I suspect, mostly this.

## Measuring your own

This is not hard and takes an afternoon.

Put a proxy between your harness and the model provider. Log every request: total input tokens, output tokens, and the request body. You do not need anything sophisticated. You need the bytes.

Then run one representative task and answer three questions.

**What is the floor?** Take the first request of the session. Subtract the length of what you actually typed. Everything remaining is what this harness costs you before it has done anything. That is the number nobody knows.

**What is the resend rate?** Across the session, how many times was the same preamble transmitted? Multiply. This is usually where the surprise is, because a moderate floor resent forty times is not moderate.

**What is the tool tax?** Tool schemas are sent whether or not the tool is used. Count the tokens spent describing tools that were never called. In my case this was the single largest recoverable line item, and the fix was deleting tools I had added speculatively and never used.

Do this once and you will have a number for your setup that almost nobody else running agents can quote for theirs.

## What the number is actually for

Two things, and the second one matters more.

The obvious use is reduction. Prune unused tools, trim the system prompt, understand your harness's caching behavior, choose defaults deliberately. Real savings, mostly one-time.

The more important use is that it makes cost comparable to something. Right now, most people cannot answer whether a task was worth what it cost, because they have no per-task cost, only a monthly total. Once you can attribute spend to a task, you can start asking whether that task was worth it. That is a different and better question, and it is the one that eventually matters, because reducing spend is only good if the thing you cut was not worth buying.

I do not think the industry is close to answering the second question. I think measuring the boundary is the prerequisite, which is why I would do it even if it saved nothing.

## Where this argument is weak

The most serious objection is that I have been treating cost as quality-neutral, and it is not entirely. A harness sending thirty thousand tokens of preamble may be buying something with them. Better tool descriptions may produce fewer failed attempts. A cheaper harness that needs three runs to succeed is not cheaper. My measurement above compares runs that passed, which controls for this somewhat, but only somewhat, and on harder tasks the expensive harness might well win on total cost to a correct result.

So the honest claim is narrower than the headline. The harness sets a large cost floor that most people have never measured. Whether that floor is worth paying is a separate question I cannot answer for your workload, and I would be suspicious of anyone who says the cheap harness always wins.

Second, prompt caching complicates the resend arithmetic considerably, and the details differ by provider and change without much notice. My resend multiplier is an upper bound. Someone with a caching-aware measurement would have a better number than mine.

Third, this is a snapshot. Harness token efficiency is not a stable property of a tool; it is a property of a version. A measurement from July tells you about July.

## What this changes in my factory

I log the API boundary permanently, not as an experiment. The proxy is part of the setup now, and its output is one of the few dashboards I actually look at.

Tools get deleted aggressively. A tool I have not called in a month is costing me on every request to preserve the option of calling it. This was the cheapest win available and I had never considered it a cost at all.

I re-measure the floor after any harness update, because the floor moves silently and I would rather find out on purpose.

Cost is attributed per task, not per month. It is coarse and I do not fully trust the attribution, and it is still the number that changed how I make decisions.

And I stopped reasoning about model pricing as though it were the main lever. It is a lever. It is not the one with the most travel in it.

## What to measure this week

- How many tokens does your harness send before your prompt appears? Do you know within a factor of two?
- How many times is that payload resent in a typical session?
- How many tool schemas are you paying to transmit for tools you did not call this month?
- Has your floor changed since your last harness update? Would you know?
- Can you state the cost of one specific task you ran yesterday? If not, what would it take?

The model is the part with the price list, so it is the part everyone argues about. The harness has no price list, which is not the same as being free.
