Back to Blog
AI HarnessSelf-Improving AgentsAgentic CodingSoutheast Asia

The Harness That Rewrites Itself

May 16, 2026 by Inference Loops

For a year we’ve made one argument over and over: the harness is the product. The model is the thin sliver that thinks; the scaffolding around it — the prompts, tools, verification, recovery — is where reliability actually lives. Addy Osmani puts the same idea in a sentence: a harness is “the scaffolding that tightens every time the agent slips.”

Sit with that phrase — tightens every time the agent slips — because until recently the thing doing the tightening was always a human. An engineer watched the agent fail, diagnosed the failure, and adjusted the scaffolding. In mid-2026, a new class of research asked the obvious next question: what if the agent tightened its own harness? No human in the loop, no smarter model to copy from — just the agent, studying its own failures and rewriting the scaffolding around itself. That’s self-harness, and it’s the most on-brand idea we’ve covered all year: the loop, turned inward.

What self-harness actually is

The clearest demonstration is a June 2026 arXiv paper, Self-Harness: Harnesses That Improve Themselves. The method is a three-stage loop, and the elegance is in how mundane each stage sounds:

  • Weakness Mining — the agent reads its own execution traces and finds the recurring failure patterns specific to how it behaves. Not “this one task failed,” but “I keep forgetting to verify a file write succeeded before moving on.”
  • Harness Proposal — it generates a handful of concrete, executable fixes aimed at those weaknesses: a tweaked system prompt, a tool wrapper that adds a safety check, an injected validation step, a better planning template.
  • Proposal Validation — it tests each proposal against held-out tasks and keeps only the changes that improve performance without breaking what already worked.

Notice what’s being rewritten here. Not the model’s weights — the harness. The system prompt, the tool wrappers, the validation steps, the planning scaffolds. Exactly the layers Osmani means when he says “every component in a harness encodes an assumption about what the model can’t do on its own.” Self-harness lets the model discover those assumptions for itself and write them down as code.

The paper’s framing is almost a manifesto: “A model should be able to identify and fix its own systematic weaknesses, not rely on a smarter model to tell it what’s wrong.”

The numbers are not subtle

This could be a cute idea that moves nothing. It isn’t. On Terminal-Bench 2.0 — 89 real-world tasks across ML, systems, security, and biology — the same three models, with no change to their weights, improved dramatically once each was allowed to rewrite its own scaffolding:

  • MiniMax M2.5: 40.5% → 61.9%
  • Qwen3.5-35B-A3B: 23.8% → 38.1%
  • GLM-5: 42.9% → 57.1%

A 33–60% relative lift, from nothing but better scaffolding the model wrote for itself. A parallel line of work makes the same point from the leaderboard side: AutoAgent, an open-source meta-agent that autonomously tunes a task agent’s prompts, tools, and orchestration, reached #1 on SpreadsheetBench (96.5%) and topped TerminalBench — beating every hand-engineered entry — after roughly 24 hours of self-optimization. The harness humans spent months tuning, an agent matched and passed overnight.

This is the strongest evidence yet for the thesis we keep returning to. If a model can gain 50% on a hard benchmark without a single weight changing, then the value was never only in the weights. It was in the harness — and now even the building of the harness is automatable.

Two levers, and why the human still holds one

It’s worth being precise about what’s improving, because a second 2026 paper — SIA: Self-Improving AI — draws the distinction cleanly. There are two levers you can pull on an agent. You can update the harness (the tools, prompts, retry logic — how the model searches and acts) or you can update the weights (the model’s domain intuition). SIA’s line is the cleanest summary in the literature: “Harness updates make the model agentic, shaping how it searches and acts, while weight updates build the domain intuition that no prompt or scaffold can instil.”

Self-harness automates the first lever — and that’s the one that doesn’t need a GPU cluster, because it’s software, not training. But here’s the part that matters for anyone worried this writes humans out of the story: a self-improving harness optimizes toward a target it is given. It mines weaknesses against a benchmark someone chose. It validates proposals against held-out tasks someone defined. It accepts changes that improve a metric someone decided was the right metric.

In other words, the self-improving loop still runs inside a frame a human builds: the goal, the evals, the definition of “done,” the guardrails on what the agent may change. We’ve written before that a bad loop just ships bad code faster — and a self-improving harness optimizing against a bad eval improves faster in the wrong direction. The human moves up a level, from tuning the scaffolding to specifying what good scaffolding even means. That job doesn’t shrink. To borrow Osmani again: harnesses “don’t shrink, they move.” So does the engineer’s work.

Why this is good news for Southeast Asia

Every time the frontier moves, the same anxious question follows: does this close the door on developers outside the big labs? Self-harness does the opposite.

The thing being automated is the manual tuning of scaffolding — the repetitive, model-specific grind of watching traces and patching prompts. What is not automated, and can’t be, is choosing the objective, designing the evals, encoding the domain knowledge, and setting the guardrails. That is meta-engineering, and it is still engineering: careful, structured systems thinking, the kind that needs good developers and deep problem understanding rather than a hundred-million-dollar training run.

This lands exactly where we keep landing. A self-improving harness can tune itself to pass your benchmark — but only if someone built a benchmark that captures what correct means for a Khmer-language document, a Cambodian compliance rule, an agricultural co-op’s records. The frontier lab can hand you a model that rewrites its own scaffolding. It cannot hand you the definition of “done” for a problem it has never seen. That definition is local knowledge, and local knowledge is a position the labs cannot build from California.

What to take from this

If you’re building with agents, start designing for harnesses that improve themselves — but invest your own effort one level up: in the evals that define correctness, the guardrails that bound what may change, and the domain knowledge no self-improver can invent. Let the agent tighten the scaffolding. You decide what it’s tightening toward.

The harness was always the craft. Now the harness can rewrite itself — and the craft moves to deciding what a good harness is. The model brings the capability. The self-harness brings the tuning. You bring the judgment about what’s worth tuning for.