writingmaclulich.com

OpenCode vs Claude Code on DeepSeek Flash: how to compare harnesses fairly

Five checks before you trust a comparison of coding agent harnesses

  1. Log every unit and price it at one model’s ratesRepriced at DeepSeek Flash rates, a delivered unit cost $0.12 against at least $0.21 before
  2. Count the units that never landed, not just the billA 150-call cap fixed the bill, but in OpenCode’s last week 22 of 37 units never landed
  3. Fix the comparison window before you see resultsOpenCode’s worst week made Claude Code look twice as fast. My first two days said 29 minutes a unit against 54, but over 57 units the median was 56
  4. Repeat the change on a second projectOn mine, a delivered unit cost $0.06 against at least $0.27, and first-pass review rose from 63% to 70%
  5. Keep a control that didn’t changeFirst-pass review fell on my unchanged Codex agent too, from 66% to 47%, as it did from 65% to 43% on the one I changed
From my cheapest coding agent on two projects, OpenCode in October against its first days on Claude Code, with every cost at DeepSeek Flash rates.

Same model, new harness: cheaper, not faster

If you’re deciding whether to swap the harness, the loop and tools around your coding agent’s model, or comparing two, this is what I learned moving my cheapest agent from OpenCode to Claude Code and keeping its model.

For most of October that agent ran DeepSeek’s Flash model inside OpenCode. On 25 October I moved it to Claude Code, still calling the same DeepSeek model, and kept everything else the same. A second project followed on 27 October.

Same DeepSeek model, new harness: cheaper, but not faster or more reliable

$0.12
per delivered unit, down from at least $0.21
56 min
median per delivered unit, against 54 before
82%
of units delivered, against 78% before
43%
passed their first review, against 65% before
First project: Claude Code on DeepSeek Flash, 26–28 October (57 units), against OpenCode on the same model for October (125 units). Costs at DeepSeek Flash rates.

On both projects a delivered unit now costs less: at least 40% less on the first, and about a fifth as much on the second. It isn’t delivering more often, and it isn’t faster.

Getting to those numbers took two corrections. My first comparison picked the wrong baseline, and my first two days of data showed a speed gain that more data took away.

I run several coding agents in parallel, and a reviewer checks every unit

  1. Head planssplits the work into units
  2. Lane buildsdoes a unit in its own checkout
  3. Lane reviewsanother lane checks it before it merges
  4. Head mergestakes what comes back

One lane is the cheap one. It ran DeepSeek Flash, at 15 cents per million input tokens, inside OpenCode, an open-source agent harness.

The harness is everything around the model: the loop that calls it, the tools it may run and how it manages its context. Changing only the harness kept the model, the work, the reviewers and the measuring where they were.

Log every unit, priced at one model’s rates

Every unit the head sends is a row in a ledger, and I reprice every one at DeepSeek Flash rates.

The only thing that differs then is how each harness used the model.

One row per unit, repriced at DeepSeek Flash rates

  1. SentWhen the unit went out
  2. DeliveredWhether it landed
  3. MinutesHow long it took
  4. Calls and tokensThe model calls and tokens it used
  5. Review roundsHow many it needed

Do the same for any two tools you compare: one row per unit and one price list, so only the tool differs.

Count units that never landed, not just the bill

The week before the switch cost about $20 a day in DeepSeek credit across two projects.

Most of it went on turns that ran for hundreds of model calls, which I wrote about in five changes that keep coding agents’ context small.

A cap of 150 model calls per turn fixed the bill. It didn’t fix the work, and in OpenCode’s last week most units never landed.

In OpenCode’s last week, 22 of 37 units never landed

Delivered15
Cancelled, no reason recorded11
Cancelled, I moved or split the work6
Cancelled, looped with no change3
Cancelled, didn’t start after a wake2
Units sent to the cheap lane, 17–24 October, by the reason written when each was cancelled. Half the cancellations have no reason on record.

Of the cancellations with a reason, five were the lane itself. It went round the same steps twice without changing a file, or never started a unit even after it was woken.

Flash is cheap enough that price was never the problem. The failures were in the loop around the model, so the loop was the thing to change.

If your cheap agent’s bill is under control but its units still don’t land, count the cancellations by reason before you change anything.

Fix the comparison window before you see results

So I swapped in Claude Code, the loop my head agent already runs, with the same hooks and 150-call cap, pointed at DeepSeek. The settings are at the end.

My first comparison used OpenCode’s last week, because that was the week that made me switch. Against it, Claude Code delivered twice as often, twice as fast, at a fifth of the cost.

OpenCode’s worst week makes Claude Code look far better than its whole month does

OpenCode, last weekOpenCode, OctoberClaude Code
Units3712557
Delivered41%78%82%
Median minutes1065456
Cost≥ $0.60≥ $0.21$0.12
Passed first review79%65%43%
Same lane, same DeepSeek Flash model. Minutes and cost are per delivered unit, at Flash rates. OpenCode’s costs are a floor, because some of its sessions were deleted before they were counted.

That week was OpenCode at its worst, not its average. Over the whole month it delivered nearly as often as Claude Code, and just as fast.

What changed is cost: a delivered unit costs at least 40% less.

The first two days said half the time, and 57 units said no faster

29 min
median in the first two days on Claude Code
56 min
median over 57 units
First project, median minutes per delivered unit. OpenCode’s October median was 54.

So the speed gain came from the first few units, not the harness. My first 23 units said half the time, and 57 units said no faster.

The week that makes you angry enough to switch is usually the worst one, and measuring against it will flatter whatever you switch to. The first days after a switch flatter it too, so I now pick the baseline before I look at a result.

Repeat the change on a second project

My second project moved its cheap lane to Claude Code on 27 October. Its 62 units point the same way on cost, with one difference.

On the second project, cost fell to a fifth and first-pass review rose

OpenCode, OctoberClaude Code
Units16462
Delivered93%92%
Median minutes4742
Cost≥ $0.27$0.06
Passed first review63%70%
Same lane, same DeepSeek Flash model: OpenCode for October (164 units) against Claude Code on 27–28 October (62 units). Minutes and cost are per delivered unit, at Flash rates. OpenCode’s cost is a floor.

Delivery and speed barely moved, and first-pass review rose from 63% to 70%. The big difference is the money: about a fifth as much per delivered unit.

A second project that made the same change is how I check a result isn’t just one project’s. On review, the first project pointed the other way.

Keep a control that didn’t change

On the first project, only 13 of the new lane’s 30 reviewed units passed first time. On its own, that would be a reason to switch back.

My other lane there runs OpenAI’s Codex and didn’t change at all, and its first-pass review fell as well.

First-pass review also fell on the lane that kept its harness

Codex lane, the week before66%
Codex lane, while the cheap lane ran Claude Code47%36 units
Codex lane, reviewed by the head afterwards44%25 units
Cheap lane on OpenCode, October65%
Cheap lane on Claude Code43%30 units
First project: share of reviewed units that passed their first review.

That lane isn’t a clean control on its own, because the cheap lane reviewed its work. From 29 October my head agent, on Claude Opus, reviewed it instead, and its first-pass rate stayed at 44%.

The second project helps too. Its cheap lane changed harness, and its first-pass rate rose to 70%. That points at the first project’s work, or how it is reviewed, not at the harness.

So when a number falls after a change, I look at a lane that didn’t change before I blame the change.

How far to trust it

OpenCode is out of my setup. On the same model, Claude Code did the same work for less money on both projects, and no slower.

The runs are short and the comparison has gaps

  1. Short runsI stopped the cheap lane on both projects on 29 October, so these numbers are its whole run on Claude Code, not the full week I planned
  2. OpenCode’s costs are a floorSome of its sessions were deleted before they were counted, so its real cost per unit is at least what the tables show
  3. Half the cancellations have no reasonIn OpenCode’s last week, 11 of the 22 units that never landed were cancelled with no reason recorded
  4. The control isn’t cleanThe Codex lane’s work was reviewed by the cheap lane until 29 October, then by my head agent on Claude Opus
  5. First-pass review fell on one projectIt fell to 43% on the first and rose to 70% on the second, which points at the work or how it is reviewed, not at the harness

Point Claude Code at DeepSeek with these settings

DeepSeek serves an Anthropic-compatible API, so Claude Code can call it directly. My head agent already runs Claude Code, and the cheap lane got the same harness, hooks and 150-call cap.

The cheap lane’s environment (simplified)

export ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic
export ANTHROPIC_AUTH_TOKEN="$DEEPSEEK_API_KEY"
export ANTHROPIC_MODEL=deepseek-flash
export ANTHROPIC_DEFAULT_OPUS_MODEL=deepseek-flash
export ANTHROPIC_DEFAULT_SONNET_MODEL=deepseek-flash
export ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-flash
export CLAUDE_CODE_SUBAGENT_MODEL=deepseek-flash
claude --model deepseek-flash

Setting every default model matters, because Claude Code asks for different models for different jobs.

The launcher also refuses to start without a DeepSeek key, so the lane can’t quietly fall back to my Anthropic login.

How I ran the comparison

Pick the baseline before you see the result

  1. Change one thingsame model, same work, same reviewers, new harness
  2. Compare ratesdelivered per unit sent, minutes and dollars per delivered unit
  3. Keep a controla lane that didn’t change shows what the week did to everyone
  4. Repeat ita second project that made the same change

Run those four steps before you switch, and write down the baseline before you see the result.