You're Optimizing the Part of Your Agent You Don't Own
DEV Community

You're Optimizing the Part of Your Agent You Don't Own

Disclosure

Disclosure up front: I build agentproto, one of the tools in this market. Every fact below is dated and sourced; the tool-by-tool review lives in 9 coding-agent orchestrators, compared where competitors' strengths are named. Corrections welcome - file an issue.

The Wrong Fight

Open any dev feed this week and count how many arguments are about the model. Which one codes best. Which one dropped. Which benchmark moved two points. It's the wrong fight.

Here's the receipt that should end it: LangChain took a coding agent from rank 30 to the top 5 on Terminal-Bench without changing the model - the wins came from the scaffolding around it, not a better brain. Same weights, thirty places, harness only. Sit with that.

The single biggest jump they got came from the part you can actually edit - and most people spend their attention on the part they can't.

You Rent the Model. You Own the Harness.

You did not train the model. You can't change its weights, you can't see its training data, and next quarter the vendor swaps it for a new one and your carefully-tuned prompts quietly stop meaning what they meant. The model is a rental. It's a good rental - but it's not yours, and it moves under you.

The harness is everything you wrap around that rental to turn a raw token-predictor into something that ships work: the system prompt, the tools, the memory, the loop, the checks, the sandbox it runs in. Anthropic's own harness team defines it exactly this way - the harness is "everything wrapped around a model that turns raw capability into completed work."

The one idea, if you remember nothing else: You rent the model. You own the harness. Stop optimizing the rental.

And it turns out the harness is the bigger lever anyway. LangChain's own writeup is one data point; the broader pattern is that harness-only changes repeatedly beat model swaps. The field even has a name for the discipline now - "harness engineering" - with a whole awesome-list of tools for it. The model got commoditized while you weren't looking. The scaffolding is where the craft moved.

Which Era Are You Working In?

There's a clean way to place yourself, and it's basically the history of this job in three steps. Anthropic's context-engineering post lays out the first two; the long-running-agent writeups add the third. Find the one that sounds like your week.

Era 1 - Prompt Engineering

You get better results by wording the ask better. Few-shot examples, "think step by step," role-play framing. This still matters, but it's table stakes now, and it's the most fragile layer - a model upgrade can silently rewrite what your clever phrasing does.

Era 2 - Context Engineering

You realized the bottleneck isn't the wording, it's what's in the window. Anthropic's framing: treat context as a finite attention budget, because recall degrades as the window fills - "context rot," where attention spreads thinner across every added token. You curate what the model sees, load facts just-in-time, and keep state on disk instead of in the transcript.

Era 3 - Harness Engineering

You stopped tuning any single call and started designing the system the model runs inside: the loop, the tools, the roles, the gates, the sandbox. The model became one swappable component in a machine you built.

Where are you? If your honest answer is "I write really good prompts," you're in Era 1 - doing real work on the most rented, most fragile layer. Every rung past here is about moving leverage into the part you keep. Most teams are stuck somewhere in Era 1, blaming the model for failures the harness was supposed to catch.

So Let's Climb

Rung 1: A Loop Grounded in Truth, and Nothing More

The minimal harness is almost embarrassingly small. Anthropic's "Building effective agents" reduces it to one line: an agent is a tool-using model in a loop, grounded in feedback from the real environment. Not a framework. A loop that checks reality. Start there and resist the urge to add.

The same post is blunt about it: begin with the simplest thing and add complexity only when it measurably helps, because frameworks bury the actual prompts and responses under abstraction and make failures harder to debug.

Most "my agent is dumb" bugs are a harness that grew faster than it earned.

The tell. If you can't name what each piece of your scaffolding is for - which specific model weakness it patches - that piece is probably cargo. The loop grounded in ground truth is the only part you always need.

Rung 2: Get the Right Things Into the Window, Keep the Rest Out

Once the loop works, the next failure is the model drowning in its own history. This is the Era-2 move made structural. The long-running-agent playbooks compress it to three verbs - Reduce, Offload, Isolate:

  • Reduce - compact old tool calls into summaries once history crosses a threshold, so the window stays high-signal.
  • Offload - write the plan, the progress, and the rules to a file on disk (a NOTES.md, a task list), not the transcript. State outside the context window survives a reset; state inside it evaporates.
  • Isolate - push exploration into sub-agents with clean windows that burn ten thousand tokens and hand back a five-line summary. The dirty context never touches the main thread.

The knowledge you feed it is part of this budget too - and whose knowledge decides how much of the internet's average you're stuck with, which is its own piece.

The rule underneath all of it: the best context is the smallest set of high-signal tokens that lets the model take its next step - even when the window could hold a thousand times more.

Rung 3: Stop Letting the Worker Grade Its Own Work

Here's the harness component people skip, and it's the one that fails silently. An agent asked "are you done?" says yes too early - models grade their own output too leniently, seeing a button render and calling the feature shipped.

Anthropic's harness team found the fix isn't a smarter prompt; it's a structural split - a generator-and-evaluator loop where the two roles are separate and the evaluator is tuned to be skeptical. The mature version splits three ways - planner, generator, evaluator - because each targets a different failure: the planner fixes under-scoping, the generator does the work, the evaluator catches the lie.

This is the whole spine of the supervision ladder; the point here is narrower - the evaluator is a harness component you install, not a mood the model gets into. Bolt it outside the working agent's loop, or it grades itself and passes.

Receipt. This is also why "just loop until done" isn't reliability. A loop gives the agent persistence, not correctness - the completion check has to live outside the loop or it rubber-stamps a wrong turn fifty times. That argument has its own piece.

Rung 4: Make the Parts Swappable

The resilient harness treats the model as a component, not the center of gravity. Addy Osmani's long-running-agent writeup names the split cleanly - decouple the Brain, the Hands, and the Session:

  • Brain - the model plus its loop. Replaceable: swap Claude for a cheap open model on a task that doesn't need frontier reasoning.
  • Hands - the ephemeral sandbox where code runs and gets thrown away.
  • Session - the durable state and history, which outlives any single run.

Decoupled, each part upgrades on its own clock. Your rented Brain changes every quarter; your Hands and Session don't have to. This is also what makes cost routing possible at all - plan on an expensive Brain, execute on a cheap one, and the routing math only works because the harness let you swap the engine without rebuilding the car.

There's an interop tax hiding here, though: today every tool speaks its own dialect of "agent behavior as files" - CLAUDE.md, AGENTS.md, SKILL.md, all mutually invisible - so a capability you built for one Brain doesn't travel to the next. Fixing that with contracts instead of yet another framework is a companion piece.

Rung 5: The Best Harness Engineers Delete Scaffolding

Now the counterintuitive top of the ladder, and the part almost nobody says out loud. Every piece of your harness encodes an assumption that the model is bad at something. When the model gets good at it, that piece becomes dead weight.

Multiple harness writers land on the same warning independently - it's the Bitter Lesson arriving at the application layer. The context resets, the sprint decomposition, the elaborate verification dance: each one exists to patch a weakness in this model generation. LangChain's own history shows it - the same scaffolding that lifted an agent to the top 5 becomes drag once a stronger model ships and no longer needs it.

The move most teams miss. On every model upgrade, don't just enjoy the bump - re-audit your harness and rip out the scaffolding the new model made pointless. The harness that wins in 2026 is lighter than the one that won in 2025. Growing your harness forever is how you end up slower than someone running a plain loop on a better model.

That's the discipline in one sentence: build the scaffolding the model needs today, and be ruthless about deleting it the day it doesn't.

The Vendors Will Sell You a Harness. It Just Won't Be Yours.

Here's the fair part, because the whole argument depends on it. The model vendors are shipping harnesses too, and they're good. Claude Code is a harness. Managed Agents is Anthropic's hosted meta-harness - session, sandbox, and loop virtualized behind a stable interface, April 2026. If you want the harness to be someone else's problem, that is a genuine, less-work answer, and I won't pretend otherwise.

Two things you're trading away, though, and they're exactly the two the whole piece has been about. A hosted harness is their harness, wrapped around their model, on their plan - so you can't prune it (Rung 5 isn't yours to do), and you can't swap the Brain for a cheaper or open one (Rung 4 is off the table). You've rented the model and the harness. The one part that was supposed to be yours went back to being a rental.

The alternative is to own the harness as portable infrastructure - the checks, the contracts, the roles living in your repo and running on your machine, around any model. That's the whole design of what I build: agentproto is a local daemon with adapters for Claude Code, Codex, and open models via OpenRouter or Hermes, so the harness you tune travels when you swap the engine, and no vendor holds the keys.

Concede the hosted route is less setup. Just know what you gave up to skip it.

Tune the Car, Not the Rental

So the feed has it backwards. The model you're all arguing about is the one thing in the whole system you can't change and won't keep. The harness - the loop, the context budget, the evaluator, the swappable parts, the scaffolding you're brave enough to delete - is the part that's yours, the part that moved a coding agent thirty places without a new model, and the part your competitors are ignoring while they refresh the benchmark leaderboard.

Two questions turn this into Monday's work:

  • When your agent fails, do you reach for a better prompt, or do you ask which harness component was supposed to catch it?
  • And when the next model drops, do you just feel faster - or do you open your harness and delete what it made obsolete?

Rent the best engine you can. Then go build a car worth putting it in.

If your harness beats this framing - or you've found a scaffold worth keeping that I'd have told you to cut - tell me where. I'll fix the piece.

The Series - Orchestration, Honestly

Ten pieces, one argument. Start anywhere; each one cross-links the rest.

Piece Title
1 You can't parallelize the trust - Amdahl's Law: why your fifth agent slows you down
2 Harness engineering (you're here) - you rent the model; the harness is the part you own
3 The supervision ladder - five rungs of trusting an agent you don't watch
4 The approval plane - auto-approve reads, gate writes - wire the line between
5 Kill the loop - why "keep going until done" compounds a wrong turn
6 Route by cost - plan expensive, execute cheap, verify independently
7 Files with contracts - the interop layer every agent system reinvents
8 Knowledge is power - give your agent your knowledge, not the internet's average
9 Paseo, hands-on - a full real-session review of the daemon
10 9 orchestrators, compared - the tool-by-tool teardown + a decision table

Written by the maintainer of agentproto (Apache-2.0, source). Same contract as our /compare page - dated facts, named strengths, corrections by issue. Got something wrong? File an issue.

Comments

No comments yet. Start the discussion.