Richland Technology
Richland Technology
← Back to Blog
Harnessllmagentsresearch

STITCH picks agent harness parts per task — and its winning move is usually to add nothing

Per-task harness selection beat every fixed harness including Codex CLI — while leaving the seed harness unchanged on about half of tasks.

Richland AI Desk·29 November 2026·5 min read
STITCH picks agent harness parts per task — and its winning move is usually to add nothing

A new UIUC paper argues that the biggest win in agent harness design is often to do nothing. Its STITCH framework — which picks harness parts per task from a library of pre-validated primitives — beat every fixed harness it was tested against, including human-designed Codex CLI, and left the seed harness unchanged on roughly half of all tasks.

What shipped

STITCH — "Composing Task-specific Agent Harnesses at Test Time with Reusable Primitives," arXiv 2609.38912 — comes from the UIUC DREAM Lab and University of Michigan. It treats the agent harness — the program around a model that builds context, runs tools, checks results, and decides when to stop — as a per-task decision rather than a fixed scaffold.

With GPT-5.6-Luna fixed, per-task selection raised Pass@1 from 60.0% to 72.2% on 45 Terminal-Bench 2 tasks and from 73.0% to 80.5% on 100 SWE-bench Verified tasks, against the fixed Mini-SWE-agent 2.4.6 seed harness. It also edged out Codex CLI (79.0% SWE-bench, 56.7% Terminal-Bench 2) and two learned-harness baselines, MetaHarness and MemoHarness.

The mechanism separates two jobs that naive "have the model write a harness per task" approaches conflate:

  • Before test time, a development agent runs the seed harness on development tasks, reads the failures, and implements a reusable Harness Primitive for each recurring gap. A primitive is kept only if its own tests pass and it improves success in matched runs with and without it. Each primitive carries an application scope (when it should help) and a composition contract (its inputs, outputs, setup, dependencies).
  • At test time, an LLM composer reads the task and each primitive's scope and names the parts to use. A deterministic, model-free compiler supplies dependencies, wires them together, and validates the result; if validation fails, the composer gets a bounded number of corrections and otherwise falls back to the seed harness.

Diagram of STITCH: failed seed-harness runs are grouped into recurring gaps, each gap becomes an implemented and tested Harness Primitive, and a library of primitives is selected per task at test time.

The split buys reliability and cuts cost. If each generated mechanism can fail on its own, the chance the whole harness runs falls exponentially with the number of mechanisms, and generating and debugging burns tokens. STITCH builds the library once and, per task, only chooses — the wiring is deterministic.

Why it matters

The headline result is less "compose more machinery" and more "the correct harness decision is often no change." STITCH left the seed harness untouched on 51 of 100 SWE-bench tasks and 23 of 45 Terminal-Bench 2 tasks, added exactly one primitive on most of the rest, and only 10 of 145 tasks received more than one part — all of them in SWE-bench Verified.

Counts of tasks by number of primitives selected: on SWE-bench Verified, none on 51 tasks, one on 39, two on 7, three on 1, four on 2; on Terminal-Bench 2, none on 23, one on 22.

That sparsity is the load-bearing finding: the same parts that help when placed selectively add little — or hurt — when applied everywhere. Leaving one primitive on for every task was not reliably better. On SWE-bench Verified, three of the six parts scored below the plain harness (71.5% to 72.5% against 73.0%), and a composer that picked parts at random scored 73.3%, essentially the seed's 73.0%. The best single primitive left always-on reached 76.0% on SWE-bench and 66.7% on Terminal-Bench 2 — better than the seed but well short of STITCH's 80.5% and 72.2%.

Two dot plots of Pass@1 with GPT-5.6-Luna: on SWE-bench Verified the seed scores 73.0 and always-on primitives range roughly 71.5 to 76.0; on Terminal-Bench 2 the seed scores 60.0 and always-on primitives range roughly 60 to 66.7.

The intuition: a check that replays tests before finishing is useful when there is a test to replay, and pure overhead when there is not. A fixed harness has to decide once, for all tasks, whether to carry that check — and loses either way. The paper formalizes this with a model in which each mechanism helps inside its scope and costs something outside it. It shows the best fixed harness is always strictly worse than an ideal per-task choice, and that a selector need not be perfect to beat it — its mistakes just have to cost less than the mismatch.

Two transfer results matter for builders. Parts carried over to models that never built them: averaged over GPT-5.6-Terra, DeepSeek-V4-Flash, and Claude-4.5-Haiku on SWE-bench Verified, the seed scored 75.2%, Codex CLI 78.5%, and STITCH 84.0%. A library built only on SWE-bench tasks also transferred to Terminal-Bench 2, raising it from 60.0% to 71.1%, close to the 72.2% of a library built for it.

Selection is cheap: choosing parts cost 2.7% of one agent attempt on Terminal-Bench 2 and 4.3% on SWE-bench Verified — 638 and 543 times cheaper, the authors estimate, than a lower bound for writing the full harness code from scratch.

Caveats

This is an unreviewed preprint with small samples and no confidence intervals; every headline number is author-reported. The 12.2-point Terminal-Bench 2 gain is 11 attempts out of 90; the 1.5-point lead over Codex CLI on SWE-bench Verified is 3 attempts out of 200 — too few to separate the two. No code link appears on the arXiv listing as of publication time, so independent reproduction is not yet possible.

STITCH does not lead everywhere. Codex CLI scored higher on the SWE-bench repositories other than Django and SymPy (85.3% against 83.8%) and with GPT-5.6-Terra (88.0% against 86.5%). On the hard Terminal-Bench 2 tasks, the always-on Execution Supervisor matched STITCH at 46.2% Pass@1 and solved more tasks in at least one of two attempts.

The 638x/543x efficiency figure compares selection against an estimated lower bound for writing a complete harness, not against a generation system that was actually run, and it omits the one-time cost of building the library. The theory assumes additive primitive effects, ignores interactions between parts, and assumes compiled harnesses run; the paper does not show that composition beats code generation with repair. Both benchmarks are coding and terminal work, so other agent domains remain untested. The authors also cite "Rethinking the Evaluation of Harness Evolution for Agents," which found evolved harnesses did not beat simple test-time scaling at a matched budget — and STITCH includes no baseline that spends the same budget on extra attempts.

Sources

Start a Conversation

Ready to build something like this?

Tell us about your project and we'll respond with a clear plan within one business day.

Tell Us About Your Project

Takes 3 minutes. We read every submission personally.