8 min read

U1
Playbook · Coding & Computer-Use Agents

Coding Agent Architecture

The localize–edit–verify loop is settled and commodity. What separates coding agents now is the harness — and its advantage does not transfer.

A 100-line agent scores within a few points of the elaborate ones, and the same model swings about 18 points across harnesses on the same benchmark — a spread as wide as a model generation. That is the whole architecture decision in two numbers, and the trap is the obvious inference from them: harness rankings reorder when you change the model, and a December 2026 audit found that no top-20 entry on either major coding-agent leaderboard has the runs needed to tell whether its harness advantage is real or just a good pairing. You cannot buy this decision off a leaderboard. You have to run four cells on your own repository.

Step 1The loop is not the differentiator any more. Start by admitting that.

What distinguishes a coding agent from a completion model is still the loop: it reads a repository, localizes a change, edits files, runs the suite, reads the failure and corrects itself until a checkable condition holds. The unit of work is a verifiable diff, not a token stream, and that reframing is still the first thing to get right. But it is no longer where the engineering differences live, because everyone has it.

# the loop, stripped to its skeleton — every harness has this
loc   = agent.localize(issue, repo)        # where does the change go?
patch = agent.edit(loc)                   # structured edit, not raw write
obs   = sandbox.run_tests(patch)          # external oracle
while not obs.passed():
    patch = agent.revise(patch, obs.failures)  # read output, self-correct
    obs   = sandbox.run_tests(patch)

The clearest evidence that this is commodity is mini-swe-agent, whose maintainers describe the agent class as about 100 lines of Python with no large configuration and no monorepo, and report scores above 74% on SWE-bench Verified. Independent papers that re-run it land in the same neighbourhood: around 64.9% on Claude Sonnet 4, 70.6% on Claude 4.5 Sonnet, 76.8% on a Claude Opus 4-class model, 74.2% on Gemini 3 Pro. Set that against SWE-bench Verified's top reported results, which now sit in the mid-90s depending on which leaderboard you read, and the shape of the field is clear: a weekend's worth of scaffolding gets you most of the way, the benchmark itself is close to saturated, and the remaining distance is not bought with more loop.

Treat SWE-bench Verified as a floor check, not a ranking. When top scores cluster in the mid-90s, the differences between leaders are inside the noise that re-runs of the same system produce, and a benchmark that cannot separate its leaders cannot tell you which harness to adopt. Use it to catch a broken integration; look elsewhere for a decision.

Step 2The harness-induced spread is as large as a model generation.

If the loop is commodity, the natural conclusion is that the harness barely matters. The measurements say the opposite, and loudly. One 2026 survey of agent and harness design reports a single model — a Claude Opus 4.6-class system — scoring from 58.0% under one widely-shipped coding harness to 76.4% under an automatically optimized one on Terminal-Bench 2.0. That is 18.4 points of movement with the weights held constant.

The cross-paper picture is worse. One paper warns outright that published SWE-bench numbers are not comparable between papers because the same backbone spans roughly 25% to 62% as the surrounding scaffold and context budget change. Most of the time, when you read that model A beat model B, you are reading a fact about two configurations.

The most useful single data point is a scaffold paper that reports its own harness on a weaker model reaching 74.6%, against mini-swe-agent on the stronger model in the same family at 70.6%. Better orchestration beat a better model. If you are choosing where to spend the next engineering month, that comparison is the argument for spending it on the harness — and STEP 3 is the reason you cannot simply adopt whichever harness is currently on top.

Step 3A harness advantage is a property of the pair, and nobody is measuring it that way.

Here is the finding that should change how you read any coding-agent comparison. Harness rankings are not stable across models. In the survey table above, on a Claude Sonnet 4-class model the ordering runs mini-swe-agent 64.9 < OpenHands 70.4 < SWE-agent-with-tools 72.4. Move to the Opus-class model and it reorders: SWE-agent-with-tools 73.2 < mini-swe-agent 76.8 < OpenHands 77.6. The harness that was best on one model is worst on the other.

So "which harness is better" is not a well-formed question; "better for which model" is. Answering it requires a difference of differences — two models, each run under two harnesses, with comparable runs in all four cells.

# the 2x2 you actually need (the "square")
#               harness A        harness B
#   model 1       a1               b1
#   model 2       a2               b2
#
# harness advantage, model-specific?   (b1 - a1) != (b2 - a2)
# three cells tell you nothing: you cannot subtract what you did not run

A December 2026 audit of the Terminal-Bench and SWE-bench leaderboards asked whether their public records can certify that comparison, and concluded they cannot for any top-20 entry. On Terminal-Bench 2.0, 9 of 17 single-model top-20 entries form a complete square — and only 5 of 17 if you treat displayed harness versions as distinct harnesses, which they are. On SWE-bench Verified it is 8 of 13. Many entries are not even single-model: 3 Terminal-Bench and 7 SWE-bench top-20 entries list more than one model. The authors estimate that a clean square for every entry would need 28 fresh Terminal-Bench runs and 20 on SWE-bench.

The practical consequence is narrow and firm. A leaderboard tells you that a pairing scored well. It does not tell you that the harness contributed the score, and it cannot tell you whether the contribution survives your model choice. This is the benchmark-reading problem in its sharpest form, and it is why the rest of this playbook is about what to build rather than what to buy.

Step 4What the harness is actually doing: designing the observation, not the action.

SWE-agent's original finding was that a model's effectiveness is dominated by the interface it acts through rather than raw capability, and every number above is a restatement of it. The lesson is specific, though, and it is easy to take the wrong half: the leverage is in the return value of each tool, not the catalogue of tools.

  • Design observations, not just actions. A shell with raw sed and 2,000-line file dumps burns context and produces malformed edits. A search that returns ranked locations, an open with a windowed viewport, an edit that re-lints and echoes the post-edit window — the same model becomes a far stronger agent. An edit tool that silently succeeds teaches the agent nothing; one that shows a lint delta teaches it everything. The general treatment is shaping tool results.
  • Spend the step budget on localization, because it decides the outcome. Across SWE-agent and OpenHands ablations the dominant failure is not bad code, it is editing the wrong place — and a test failure that points away from the real defect cannot be revised into a fix. Reproduce the bug, read the call site, confirm the hypothesis before the first edit. That makes repo navigation the load-bearing subsystem.
  • Treat the context budget as a first-class harness parameter. It is one of the two variables the cross-paper spread above is attributed to, which means a harness comparison run at different budgets is not a harness comparison. Pin it when you measure, and see context budgeting.
  • Give the loop a budget, a stop condition and a memory. A step and cost ceiling per task; an explicit stop ("tests green", "submit best attempt", "ask the human"); and a working memory that survives compaction so the agent does not re-derive the repo layout every turn. The stop condition is the hard one: an agent that cannot tell done from stuck will quit on a flaky test or grind forever on an unsolvable one.

Step 5The oracle is the other half of the harness, and it is the half that gets gamed.

Everything above assumes the verify step is trustworthy. It is the assumption most worth attacking, because the agent is running a search whose fitness function is your test suite, and a search optimizes whatever you actually gave it.

  • Suite mutation is a first-class failure mode. An agent optimizing against the suite will delete the failing test, weaken an assertion or special-case the fixture. Green tests are necessary, not sufficient. Make the oracle tamper-resistant: run the agent's patch against tests it cannot write to, and diff the test files separately from the source.
  • Benchmarks have the same problem, which is why trial counts matter. Official Terminal-Bench submissions are reported to average five trials per task, with leaderboard rules that penalise reward-hacking trajectories. If your internal evaluation is single-trial, your harness comparison is measuring variance. See eval variance.
  • Cheap signal beats complete signal. The loop's power is proportional to the quality of the signal it can get per iteration, and a 40-minute suite converts a self-correcting agent into an expensive one-shot generator. A fast targeted subset plus a slow full run at the end usually beats either alone.
  • No oracle, no agent. On a repo with no tests, slow non-deterministic tests, or a change whose correctness is not mechanically checkable — a refactor's "is this cleaner?", a UX judgement — the verify step is blind and the agent degenerates into expensive guessing. Reach for a reviewed pipeline edit instead. That boundary is honest, not a universal verdict against agents.

Step 6Run the square on your own repository.

The audit in STEP 3 estimates that adding a handful of runs — five on Terminal-Bench, three on SWE-bench Verified — would give every single-model top-20 entry a complete square. That is a small enough number to be worth noticing: the measurement that would answer the question is cheap, and nobody runs it because leaderboards reward a single headline figure. You are not under that constraint.

  • Two harnesses, two models, four cells, your tasks. Build a set of 20–50 real tasks from your own history with reliable oracles. Hold the context budget, step limit and trial count fixed across all four cells. Report the two differences, not the four numbers — the question is whether the harness gap changes with the model.
  • Include the 100-line baseline. It is the control that tells you what your elaborate harness is buying. If a minimal scaffold is within noise of it on your tasks, you have found the cheapest finding available: the complexity is not earning anything on your workload.
  • Measure cost per resolved task, not score. A harness that wins on score while spending three times the tokens is a different purchase, and unit economics is where that shows up.
  • Re-run the square when you change the model. This is the direct corollary of the ordering flip. A harness decision made against last quarter's model is an untested assumption about this quarter's, and the cost of re-testing is the same four cells.

If you do one thing from this page: before adopting a harness, run the minimal 100-line baseline against it on your own tasks, with the context budget pinned and at least three trials per task. Most teams discover one of two things, and both are worth money — either the sophisticated harness is buying nothing on their workload, or it is buying something specific that they can now name, measure and keep when the model changes underneath them.