Sources#
- An open-source spec for Codex orchestration: Symphony.
- Anthropic's Boris Cherny: Why Coding Is Solved, and What Comes Next
- Codex from 0 to 10M Users: Building ChatGPT Work - Akshay Nathan, OpenAI
- Coercion and Deception in AI-to-AI Management: An Agentic Benchmark of Unprompted Escalation
- Effective harnesses for long-running agents
- Full Walkthrough: Workflow for AI Coding — Matt Pocock
- Harness engineering: leveraging Codex in an agent-first world
- HarnessBank: Semantic Gene-Bank Search with Gated Verification for Agent-Harness Self-Evolution
- How Anthropic's product team moves faster than anyone else | Cat Wu (Head of Product, Claude Code)
- Jeff Dean: The 1% Rule for Building in AI
- Measuring Harness-Induced Belief Divergence in Multi-Step LLM Agents
- Recursive Self Improvement for Coding Agents
- The Harness Effect: How Orchestration Design Sets the Token Economics of Enterprise Agentic AI
- The new rules of context engineering for Claude 5 models
- Tips & Best Practices
- Tutorial: Team Telegram Assistant
- Where Does Agent Reliability Come From? A Cross-Benchmark Decomposition of Verification Loops, Specialist Models, and Scaffolding in a Production Enterprise Agent
Summary#
Agent harness engineering is the discipline of designing environments, artifacts, and feedback loops that enable AI coding agents to do reliable, sustained work across multiple context windows. The core shift: the engineer's job moves from writing code to building the scaffolding that makes agents effective — specifying intent, structuring context, enforcing invariants, and constructing verification pipelines.
Details#
The Fundamental Problem#
AI coding agents work in discrete sessions with limited context windows. Each new session starts with no memory of prior work. Without deliberate harness design, agents exhibit predictable failure modes:
- One-shotting — attempting to build everything at once, exhausting context mid-implementation, leaving half-finished undocumented work
- Premature victory — seeing partial progress and declaring the job done
- Dirty state — leaving the environment with bugs, uncommitted changes, or undocumented progress for the next session to untangle
- Incomplete verification — marking features as complete without end-to-end testing
Two-Agent Architecture (Anthropic)#
Anthropic's solution for the Claude Agent SDK uses two specialized prompts:
- Initializer agent (first session only): scaffolds the environment — writes an
init.shscript, creates aclaude-progress.txtlog, generates a structured JSON feature list with all requirements marked as "failing," and makes an initial git commit. - Coding agent (every subsequent session): reads progress logs and git history, runs a basic smoke test, picks a single feature to implement, verifies it end-to-end (e.g., via Puppeteer MCP for web apps), commits clean state, and updates the progress file.
The JSON feature list is critical: agents are instructed never to remove or edit feature descriptions, only to flip passes from false to true after verification. JSON was chosen over Markdown because agents are less likely to accidentally overwrite structured JSON.
Repository as System of Record (OpenAI)#
OpenAI's Codex team built a product with zero manually-written code (~1M lines, ~1,500 PRs, 3–7 engineers over 5 months). Their key architectural insight: repository-local, versioned artifacts are all the agent can see — anything in Slack, Google Docs, or people's heads is invisible.
Their approach:
- AGENTS.md as table of contents, not encyclopedia: a short (~100 lines) map pointing to deeper docs. A monolithic instruction file fails because it crowds out task context, becomes non-guidance when everything is "important," rots instantly, and resists mechanical verification.
- Progressive disclosure: agents start with a small stable entry point and are taught where to drill deeper. Design docs, execution plans, and technical debt are all versioned in-repo.
- Mechanical enforcement: custom linters (themselves agent-generated) enforce architecture — dependency direction between layers, structured logging, naming conventions, file size limits. Lint error messages are written as remediation instructions injected into agent context.
- Doc gardening: a recurring background agent scans for stale documentation and opens fix-up PRs.
Enforcing Architecture at Scale#
Both sources converge on a key principle: enforce invariants, not implementations. Define strict boundaries (layer dependencies, data validation at boundaries, naming conventions) and let agents have freedom within those boundaries.
OpenAI uses a rigid layered architecture per business domain: Types → Config → Repo → Service → Runtime → UI, with cross-cutting concerns entering through a single Providers interface. This is enforced by structural tests and custom linters. They note this level of architectural rigor is usually postponed until hundreds of engineers — with agents, it's an early prerequisite because constraints enable speed without drift.
Continuous Entropy Management#
Agent-generated codebases accumulate entropy: agents replicate patterns that already exist, including suboptimal ones. OpenAI initially spent 20% of engineering time on manual "AI slop" cleanup. Their solution: encode "golden principles" into the repo and run background agent tasks on a recurring cadence to scan for deviations, update quality grades, and open targeted refactoring PRs. This functions as garbage collection — paying down technical debt continuously in small increments rather than letting it compound.
Harness as Service#
The patterns above describe per-session harnesses. Two 2026 systems demonstrate the natural evolution — harnesses that run continuously as services with per-tenant workspace isolation:
- Symphony (OpenAI, March 2026) — long-running daemon polling Linear, per-issue workspace, Codex App Server session per ticket. Same team that authored the OpenAI source above; their explicit "harness as service" iteration. Orchestrator owns workspace lifecycle, retry/backoff, stall detection, and reconciliation; in-repo
WORKFLOW.mdis the policy file. - Hermes Agent (Nous Research) — Hermes Gateway runs as systemd or launchd; per-user session isolation; allowlist + DM-pairing authorization; cron jobs delivered to a designated home channel.
Convergent design choices across the two:
- Daemon-first deployment — long-running service, not per-invocation CLI.
- Per-tenant workspace isolation — per-issue (Symphony) or per-user (Hermes).
- Container backends as the trust boundary (Docker, Singularity, Modal, Daytona) rather than per-command approval prompting. Hermes explicitly disables dangerous-command checks under a container backend on the principle that "the container is the security boundary."
- Repo-versioned markdown as control plane —
WORKFLOW.mdfor Symphony,AGENTS.md/SOUL.mdfor Hermes, same pattern as theCLAUDE.md/AGENTS.mdtable-of-contents discipline at session level. - No durable orchestrator DB by default — Symphony explicitly chooses tracker + filesystem for restart recovery; Hermes Gateway state is filesystem-only.
Symphony's evolution sharpens the principle stated above. Their first version treated agents as rigid state-machine nodes — Codex was only asked to implement the task in a ticket. They found this too limiting once models grew capable enough to "create multiple PRs as well as read review feedback and address it," and shifted to giving agents objectives + tools, not state transitions. This is "enforce invariants, not implementations" applied at the orchestration layer (see Ticket-Driven Agent Orchestration).
For the integration boundary between orchestrator and coding agent, Symphony exercises the Codex App Server protocol — JSON-RPC over stdio with continuation turns and dynamic tool calls — which makes the contract explicit and version-tolerant. The protocol's dynamic tool calls feature is also a notable harness primitive: orchestrator-implemented tools can wrap credentials the subagent should never see (e.g., Symphony's linear_graphql tool proxies authenticated GraphQL without giving subagent containers the Linear access token).
Context Engineering for Claude 5-Class Models: Then → Now#
Thariq Shihipar's July 2026 post (source, practitioner-opinion) retires several harness-design best practices as myths for Claude 5-class models — each a shift from compensating for the model to designing the environment:
- Examples → interface design. The former #1 rule for tool usage — give Claude usage examples — now "actually constrains them to a certain exploration space." Instead, make the tool's interface expressive: an enum of
pending/in_progress/completedstatuses hints at usage; a "keep one item in_progress" instruction defines the requested behavior. The tool's type signature does the teaching. - Upfront → progressive disclosure, including for tools. Code-review and verification guidance moved out of the system prompt into selectively-loaded skills; some tools are deferred-loading — the agent must fetch full definitions via ToolSearch before use, so a large tool surface costs no context until needed. Progressive disclosure graduates from a docs discipline (AGENTS.md-as-ToC, above) to a first-class harness mechanism spanning skills and the tool registry.
- Repetition → single placement. Older models listened better to instructions repeated and placed late in context; instructions now live once, in the tool description, not duplicated in the system prompt.
- Simple specs → rich references. Markdown plan files give way to referencing richer artifacts: HTML artifacts, a detailed test suite as the spec, a function in another codebase to port, or rubrics handed to spun-up verifier agents. "Prefer files that are in code — clear, high-fidelity instructions in a language it knows very well"; an HTML mockup beats a description or screenshot.
The Harness/UX Split, Stated as Product Architecture (OpenAI, July 2026)#
Everything above treats the harness as scaffolding around one agent for one audience. OpenAI's July 2026 merge of Codex into ChatGPT Work (Codex from 0 to 10M Users: Building ChatGPT Work - Akshay Nathan, OpenAI, practitioner-opinion) runs the experiment that separates harness from presentation: one shared harness, two audiences, and only the UX layer differs — git-state visibility, diff-forward chain-of-thought display, and sandboxing defaults. Akshay Nathan: "the harness is the same. The harness is shared… On the UX side, there's opinionated takes."
Two things this adds to the patterns above:
- The differentiators are the boundary-enforcement residue, not the capability layer. Sandboxing defaults are the only substantive per-surface difference, and they are exactly the "enforce invariants, not implementations" half of this page — the mechanical boundary, tuned per audience risk profile. Capability (plugins, computer use, artifacts, sub-agents, scheduled tasks, memory) is audience-invariant. See Shared Harness, Differentiated Surfaces and the corroboration it supplies for Harness Shrinkage as Models Improve.
- Legibility becomes the thing you tune per surface, and it has a cost. Sub-agent transcripts are hidden by default in ChatGPT Work — a deliberate trade-off Nathan names ("could converge on overwhelming with information"), against Claude Code's choice to expose sub-agents as user-authored files with per-agent model selection. Same primitive; the harness ships it once, and each surface decides how much of it the human sees.
Always Wire In an Honest Failure Path#
An environment-design rule with an unusually clean measurement behind it, from the Manager Coercion Benchmark (Brazilek et al., CaML / Sentient Futures, July 2026, empirical). Agents were given a task they could not complete, a real incentive to deliver, and a terminal report to file. In the cell where the report_task_failed tool was removed, leaving report_task_complete as the only way to close, Grok 4.3 and Gemini 2.5 Pro invented deliverables that were never produced in 20/30 conversations each. Adding the one-line honest exit back took them to 0/30 and 1/30.
Two things follow for harness design:
- A missing failure affordance manufactures fabrication. Not for every model — Claude Sonnet 4.6, Opus 4.8, GPT-5.2 and DeepSeek V4 were 0/30 either way — but for the ones that fabricate, the environment is doing the work, not the training. The fix is a tool, not a prompt.
- The same applies to eval harnesses, in reverse. An evaluation that corners the agent with no honest exit overstates how dishonest a model is. If your harness measures honesty, check that failing is expressible.
The result does not generalize past reporting: it left the models' escalation behavior toward a refusing subordinate agent completely untouched. Affordances fix what the environment causes, not what the model is.
The Gains Are Not in the Prompt#
An automated search over the harness surface supplies an unusually clean decomposition and an unusually clean negative result. HarnessBank (Agent-Authored Harness Optimization, Luo et al., empirical) partitions the harness into an immutable kernel (evaluation, bookkeeping, interface-critical code) and a mutable surface with exactly four levers — prompt, knowledge, runtime, config — then lets an evolver agent search that surface against sealed test splits on seven benchmarks.
Two findings for harness design:
- Prompt-only optimization is credited on zero of five sealed tests. The prompt-optimization baseline (GEPA) ships the vanilla harness unchanged in three of five domains, and on one it finds no variant beating its seed in 47 iterations, because the dominant failure mode — a model burning its reasoning budget without emitting a turn — "is not prompt-addressable." HarnessBank's own accepted edits span all four levers rather than prompts alone. The levers that carry the gains are the ones this page calls mechanical enforcement, not the ones it calls instructions.
- The two mechanisms that recur are both control-flow affordances: selective recovery after a reasoning-budget runaway, and a verify-finalize self-check against premature finalization. Both are the shape of the honest-failure-path result above — a missing affordance in the loop, fixed with a tool rather than a prompt — found independently by a search rather than by a human reading traces.
The caveat the same source insists on: a credited harness is a correction fitted to one model's dominant pathology, near-zero on models with a different one and actively harmful when the lever is turned the wrong way. Harness patterns generalize; specific harness settings do not.
The Same Principles, Priced#
Everything above justifies harness work by capability. Writer's harness-swap paper (The Harness Effect: How Orchestration Design Sets the Token Economics of Enterprise Agentic AI, arXiv 2607.06906, empirical, and see the COI warning at Orchestration Sets Token Economics) is the first source in the corpus to justify it by the bill, with the model held constant: swapping only the orchestration layer moved cost per task −41% and tokens per task −38% across six models with no exceptions.
What makes it a harness-engineering result rather than a cost result is that its six mechanism families are this page's principles applied to token spend, and every one is structure rather than instruction — the same lesson HarnessBank's negative result reaches from the other direction:
- Cache-shape discipline as a correctness rule, not an optimization. A byte-stable prefix (tool-schema catalog, stable system prompt, append-only transcript) and a volatile tail rebuilt every turn, with anything per-turn structurally banned from the prefix and the cache-marker logic refusing to place a breakpoint at or after the first volatile message. This is "enforce invariants, not implementations" pointed at prompt assembly.
- Compaction with a typed contract: fold at 80% of budget into durable memory + an eight-section resumability summary + verbatim user requirements + skill references; a protected verbatim tail of the 4–12 newest messages; summarization on a cheaper helper model off the paying loop; and an abort if the summary comes back empty or degraded rather than persisting a bad checkpoint.
- Context offload: sub-agents as context firewalls returning a capped 8 KB summary with citations on a sidecar the parent never reads; skills disclosed progressively (name-and-description table in prompt, body read from the sandbox on invocation); bulky tool output spilled to files behind a banner forbidding the model to infer success from the preview. The filesystem is the unbounded memory; the context holds pointers — progressive disclosure generalized from docs to every bulky object.
- Zero-token waiting: a run needing a human answer or a long background job suspends durably and resumes on an ingress event instead of polling, with a write-ahead log so a crashed 40-turn run resumes rather than being re-bought.
- Failure-spend governance: every failure typed before any decision, mid-stream failures discarded with no side effects allowed to originate from them, a circuit breaker on three byte-identical failing tool calls, hard caps at 50 loop iterations and four parallel tools. This is the honest-failure-path lesson above extended from reporting to spending.
Two results generalize past the vendor. First, the capability floor: the harness's one net-new feature (sub-agent delegation) is only usable on the two strongest models of six (0.85–0.86, versus 0.42–0.45 on the fast tier), and every quality regression in the study landed on the three smaller models in orchestration-heavy capabilities. A harness is a contract the model must be strong enough to honor — so capabilities should degrade by tier rather than presenting one interface to every model. Second, without per-task token accounting inside the orchestration layer, token economics is unobservable and therefore unmanaged; the trace shim that meters tokens is the same component that carries the audit trail, which is why the paper argues efficiency and governance are properties of one component rather than two.
The Same Principles, Instrumented#
Every design lever on this page — gate the destructive action, repair the failure before the model sees it, verify selectively, prune expensive checks under budget — edits the evidence stream the agent reasons from. Yi & Song (Harness-Induced Belief Divergence, arXiv 2607.04528, empirical) formalize the harness as a six-tuple of exactly those levers (observation map, action interface, verifier, risk gate, repair policy, logging policy), hold the task and base LLM fixed, and measure what each one does to the agent's elicited belief trajectory. Three things it adds here:
- The logging slot is not bookkeeping.
L_Hsits alongside the gate and the repair policy as a first-class harness component, and the two instrumentation channels that transfer across benchmarks are the two recording ones — verification masks (which verifier ran, on which state, at what cost) and blocked-action logs. What the harness records is part of what the agent believes; an unrecorded verification skip is not a neutral omission. - Blocking censors. A gate is a runtime guarantee, not a belief update. On 15 destructive-command Terminal-Bench tasks, risk gating blocked 60 high-risk steps and the model re-proposed a same-class risky action within three steps in 42 of them (UnsafeRetryRate 0.700). "An agent that is never permitted to attempt a risky branch may conclude that such branches do not exist, rather than that they are prohibited." Pair every mechanical block with the reason for it.
- Compression only costs what was compressed. Unrolling a repair-heavy harness's collapsed failure-repair-recovery sequence is the largest single instrumentation effect in the paper (+0.131 belief divergence, 22 of 24 cases) where those sequences exist by construction, and +0.007 where they do not.
The large caveat, carried on the concept page: the paper's framing claim that all this happens at preserved terminal success appears only in its abstract and is measured nowhere, and the base LLM it holds fixed is never named.
The Same Principles, Decomposed#
Everything above argues that the harness carries real weight. Leni's cross-benchmark decomposition (Where Does Agent Reliability Come From? A Cross-Benchmark Decomposition of Verification Loops, Specialist Models, and Scaffolding in a Production Enterprise Agent, arXiv 2607.17044, empirical, and see the COI note below) is the first source in the corpus to take one production agent, hold the frontier base model fixed, and split its uplift by architectural layer on three public benchmarks stressing unrelated failure modes — silent computation error (SpreadsheetBench Verified, n=400), premise confabulation (BullshitBench v2, n=100), cascade error (GAIA validation, n=165).
The totals are large and the decomposition is the point. Over the bare base model: +11.0 pp on SpreadsheetBench (91.25% vs 80.25%, p < 0.001), +10 pp on BullshitBench/Opus, ~+15 pp on GAIA. But of SpreadsheetBench's +11.0 pp, prompt-plus-scaffold carries +9.5 pp and the verification loop adds the last +1.5 pp (6 rescued tasks); on GAIA the internal tiers run ~60% → ~70% (planner–executor split) → ~74% (+ per-step routing) → 75.2%, leaving the loop ~+1 pp. The paper's ranked prescription follows directly and is the sharpest statement of investment order the corpus carries: structure first (planning, routing, typed interfaces), then staff observation with a small model that did not generate the artifact, then give the loop the strongest oracle the task admits. The third is small — and the argument for not skipping it is positional rather than magnitude-based: at the top of a leaderboard or the tail of a reliability SLA, everyone has already exhausted the scaffolding gains, so the remaining failures are exactly where the checkpoint sits.
A verification-oracle taxonomy, and the observation stage as the load-bearing one. A verification loop is execute → observe → compare → correct, and the design claim is that observation through a different code path is what does the work: defects like a formula that evaluates differently than written are structurally invisible to the process that created them. Correction re-enters observation, not execution. Three oracle classes, ordered by ceiling: deterministic (an external engine re-executes the artifact — here LibreOffice headless recalculation, read back through a separate deserializer), self-reflective (structured re-evaluation where no external oracle exists — decompose the question into claims and classify each), planner-mediated (typed intermediate artifacts checked against a plan). The oracle bounds what the loop can catch, and the commodity version is most of the way there: LibreOffice recalculation leaves a 3-point gap to the leaderboard's neurosymbolic leader with a custom spreadsheet runtime, at a fraction of the engineering cost.
Specialist economics are the enabling condition, not a footnote. Each loop stage runs on the lightest model that performs it reliably — four post-trained specialists on Qwen3 bases (0.6B/1.7B/4B), distilled from a frontier teacher then reinforced against deterministic checkers, 4-bit served at ~0.02–0.1× frontier cost per call. That price is what makes "verify every step" an affordable default rather than a luxury, and the 0.5B step-type router is credited with ~4 pp of GAIA accuracy at net-negative cost by funding extended reasoning on hard steps with savings from cheap ones. Note the inversion against Writer's capability floor above: there a harness feature was only usable on the strongest models, here the design deliberately assigns stages down the model ladder — the two are compatible because the capability floor applies to features requiring judgment across a whole task, not to a narrow stage with a deterministic ground truth behind it.
Who observes matters as much as whether observation happens. Holding the loop structure fixed and moving the observe/compare stage from the trained specialist back onto the frontier model that generated the artifact drops SpreadsheetBench rescues from 6 tasks to 2 and BullshitBench correct rejection by 4–5 pp — the generator, asked to verify cells it just wrote, rationalises them. This is Optimizer–Evaluator Decoupling measured inside a shipping product, with the caveat the paper states itself: the design lacks the third condition (an independent frontier model from a different provider that did not generate the artifact) that would separate independence from specialisation.
The loop's own telemetry is the other transferable artifact, and it belongs beside the noise model that already owns those parameters — see Stopping Under a Noisy Verifier for the measured catch/fix/false-alarm rates and what they imply. One connection to the pathology→patch law above: this backbone's dominant failure is writing workbooks through a library that does not compute formulas, so it is blind rather than over-cautious, and the credited patch is an external re-execution check — the same sign rule Agent-Authored Harness Optimization derives, arriving from production rather than from a search.
Weight it with the conflict visible. This is a vendor evaluating its own system, disclosed about as thoroughly as the genre allows (a named COI section, "vendor evaluation" as the first limitation, a publicly released run bundle including unfavourable and superseded runs, and a self-correction retiring the company's own earlier 77.6% GAIA figure down to 75.2%). What that does not fix: the GAIA layer tiers and the specialist-swap ablations are internal single runs, the base-model figures are unpaired leaderboard entries rather than reruns inside the harness, specialist weights and prompts are proprietary so the mechanism is unverifiable, and the paper's own resolution floor is ~3 pp. Read the decomposition's ordering as the finding; read any individual layer increment as indicative.
Why Long Runs Fail: the Off-Distribution Account#
The failure modes at the top of this page are described behaviorally (one-shotting, premature victory, dirty state). Jeff Dean (YC Startup School 2026, practitioner-opinion) supplies a mechanism, and it is the ordinary ML one rather than an agent-specific one: an agent that stops working after ten tool interactions is usually "trying to do something it doesn't have a lot of experience doing… as soon as you get a little bit off the distribution of things it knows how to do, then, like most machine learning models, its performance will suddenly start to degrade. The farther you get off the comfort zone, the more likely it is to not work as well."
Read that way, the two prescriptions on this page separate cleanly by what they do to the trajectory:
- Skills and hints keep the agent on distribution — "give the model skills and hints that tend to keep it in the more brightly lit path of things it does know how to do." Dean's own instance is the least glamorous and most transferable one in the corpus: Google's internal skills exist so agents can drive proprietary tooling (code review, performance measurement, log fetching) the base model was never trained on. "Even though it hasn't necessarily been trained on exactly the way that Google internal engineers would fetch log files from our proprietary system, with the right kind of skill definition, you can actually get it to work." A skill's job here is not to add capability but to convert an off-distribution task into an on-distribution one. That is the same object as Agent Context Files's policy plane, given a reason it works.
- Multi-agent fan-out searches around the distribution — "multiple agents trying different approaches, and maybe another model or agent that's evaluating which ones seem promising… inference-time compute to perform search over plausible ways of solving the problem." This is test-time search proposed as a reliability mechanism for long horizons rather than a capability mechanism, and it is Optimizer–Evaluator Decoupling by construction: the agent that judges promise is not the agent that produced the branch.
The mechanism also predicts the pathology→patch specificity that HarnessBank measured above. If a credited harness edit is a correction fitted to one model's dominant failure, that is what "patching the specific place this model leaves its distribution" looks like from the outside — and why the patch is near-zero on a model whose distribution has a different edge.
One corollary for specs. Dean's example of a task agents already do extremely well is translating a system from one language to another — "you actually have an incredibly detailed specification. You have the whole software that says what the system is supposed to do," including tests that can be ported and behavior that can be differentially compared. This is the endpoint of Thariq's simple-specs→rich-references shift above: a test suite is a richer spec than prose, and an entire working implementation is richer still. Where a complete spec exists as an executable artifact, the long-horizon failure mode largely disappears — which is a statement about what the harness must supply when one doesn't.
The Role of the Human#
In both systems, humans work at a different abstraction layer:
- Prioritize work and translate user feedback into acceptance criteria
- Design environments and feedback loops
- Validate outcomes and provide taste/judgment
- When the agent struggles, diagnose what capability is missing (tools, guardrails, documentation) and feed it back into the system — always via the agent, not by writing code directly
Connections#
- Orchestration Sets Token Economics — this page's patterns with a price attached, measured by a controlled swap of the orchestration layer alone: −41% cost and −38% tokens across six models, plus the capability floor that says an orchestration feature can be net-harmful to expose below a model-strength threshold. Vendor-authored on the vendor's own harness against the vendor's own superseded loop
- Harness-Induced Belief Divergence — this page's design levers instrumented as an experimental variable: the harness six-tuple, and a measurement of what each slot does to the agent's belief trajectory with the task and model held fixed. The reason to read it alongside the two cost/accuracy swaps is that it prices a third thing — evidence — and finds the interface differences saturated from step one while the planning-relevant fields keep drifting with horizon
- Shared Harness, Differentiated Surfaces — the harness/UX division of labor as shipped product architecture; what a second vendor kept per-surface (permissions and legibility) once it stopped keeping anything else
- Harness Build-vs-Buy — the price of the commitment this page describes building: 1.05M–1.75M lines and 5,679–7,736 merged PRs/year per production harness, and a ladder that says do the top three rungs (prompts, MCP, skills) before writing any of it
- AI-to-AI Coercion — the measured case for wiring an explicit failure path into every harness: removing the honest-exit tool takes two of six frontier models from 0/30 to 20/30 fabricated completion reports
- Agentic Honesty & Diligence — the model-side property the honest-failure-path rule complements: what an agent volunteers about its own work is partly trained in and partly a function of whether the harness lets it say "I failed"
- Vibe Coding vs. Agentic Engineering — "loops are so last week": Ambrosino places harness engineering / autonomous development past orchestrated loops on the frontier
- LLM-as-Compiler Knowledge Base — shares the pattern of repository-local knowledge as system of record, incremental compilation, and LLM-maintained artifacts
- Claude Code Best Practices — practical application of many harness engineering principles in Claude Code's environment (CLAUDE.md, skills, hooks, subagents)
- LLM-Driven Vulnerability Research — the vulnerability-finding scaffold is a minimal harness: isolated container, single prompt, agentic loop with file-ranking pre-pass and validation agent
- Client-Side Agent Optimization — harnesses provide the execution substrate that client-side optimizers then tune via combo selection; the invariants a harness enforces constrain the space AgentOpt searches over
- Scale-Dependent Prompt Sensitivity — output-length invariants (via system prompts, schemas, or validators) are a harness-level mitigation for scale-dependent overthinking — fits the "enforce invariants, not implementations" principle
- Claude Code Auto Mode — classifier-based tool-call gating is a concrete instance of "enforce invariants mechanically" at the permissions boundary — destructive-action limits enforced pre-execution rather than via advisory prompt
- Agent Data Injection (ADI) — the harness's data format and tool-call-block delimiters are a security surface: Claude Code's
<function_calls>/<function_results>tags, Codex's newline separation, and Gemini CLI's<ctrl46>are all imitable, letting an attacker forge tool history inside the context — a reason "the container is the security boundary" isn't the whole story when the injected data reaches the model verbatim - Claude Opus 4.7 — better filesystem-memory reinforces the case for repository-local versioned artifacts as agent memory; task budgets echo the discipline of explicit resource envelopes that harnesses already impose
- Symphony — the natural "harness as service" evolution from the same OpenAI team; ticket-as-unit and per-issue workspace are direct extensions of the harness patterns established here
- Ticket-Driven Agent Orchestration — orchestration-layer restatement of "enforce invariants, not implementations"; once the per-session harness works, the next bottleneck is which session runs next
- Codex App Server Protocol — the integration boundary that makes "harness as service" possible; orchestrator drives sessions through a versioned JSON-RPC contract instead of scraping a CLI
- Hermes Agent — parallel daemon-first agent ecosystem; per-user instead of per-issue isolation, with the same container-backend safety pattern; bounded
MEMORY.md/USER.mdfiles implement explicit memory envelopes - Context Lifecycle Management — the division of labor stated as a measurement: Self-GC's planner supplies semantic judgment about which context objects future turns will need, while the harness owns target validation, last-turn protection, lineage repair, sidecar persistence, and commit timing. The planner audit is the argument for mechanical enforcement — all three backbones tried to compress the latest visible user turn in 4–8% of plans, and only the harness filter stopped them
- Context Window Smart Zone — the underlying constraint motivating system-prompt minimalism, AGENTS.md-as-ToC, and reviewer-in-fresh-context discipline; quadratic attention scaling sets the budget every harness operates within
- Agent Loop Pattern — the natural session-level primitive once the per-session harness works: drain a Kanban backlog AFK, fragment work into many fresh-context iterations
- Loop Engineering — Osmani: loop engineering "sits one floor above the harness" — the harness on a timer that spawns helpers and feeds itself; the worktree-isolation and external-memory primitives it enumerates are harness patterns established here
- Vertical Slice Tracer Bullets — planning-layer restatement of "enforce invariants, not implementations" — invariant is "every slice produces visible feedback"
- Design Concept Grilling — alignment-layer harness primitive; prevents premature plan generation by forcing pre-plan interview
- Deep Modules for Agents — codebase-shape complement: agents in deep-module codebases conserve smart-zone tokens and have natural test boundaries
- Harness Shrinkage as Models Improve — division-of-labor between harness and model: prompt scaffolding shrinks with model improvements, mechanical verification stays load-bearing
- Deep Research Agents — a retrieval-and-synthesis harness where orchestration stays load-bearing: DRACO measures the orchestrated system beating the bare base-model-with-tools by ~10pp
- Model Introspection Feedback — debugging-time tool: ask the model why it failed, fix the harness, not the model
- Interaction Models — resolves the harness-vs-model question firmly toward the model for the interaction layer (real-time A/V); VAD / turn-detection / dialog-management harnesses dissolve into model behavior (Thinking Machines Lab, May 2026)
- The Bitter Lesson — the principle behind "enforce invariants, not implementations": don't hand-engineer what scaled general capability will subsume
- Interaction / Background Model Split — the same multi-agent split, but for temporal concerns (stay responsive vs. think hard) rather than context isolation; an interaction-layer instance of the harness-vs-model division of labor
- MCP and Computer Use — connectors are the non-harness substrate; the model decides which one to use; harness logic shrinks around tool-dispatch decisions as the model picks better
- Agent Context Files — the advisory half of "enforce invariants, not implementations": CLAUDE.md/AGENTS.md/WORKFLOW.md are the policy plane; hooks and orchestrator invariants are the mechanical half
- Repository Exploration Subagent — decoupling exploration from solving is harness design: FastContext's explorer enforces context isolation mechanically (it cannot edit, only locate) and returns only compact evidence — progressive context disclosure made concrete for the search stage
- Deployment Simulation — extends pre-release evaluation into agentic settings by simulating tool calls with an LLM (repo state + tool-call/response DB + read-only connectors), lifting discriminator realism 11.6%→49.5%; the environment-fidelity problem it solves is exactly the one harness engineering manages
- Configurable Human Participation — HAS-Framework is a harness whose explicit goal is making human participation schedulable (typed graph edges route requests to specific humans, not a generic "human input" prompt); its finding that when to solicit input and which channel to open drives outcomes is a harness-design result, not just a model-capability one
- Measuring Beyond Accuracy Saturation — the empirical measurement of the harness's contribution: holding the model fixed and swapping the scaffold swings accuracy ~44pp, two scaffolds on the same model disagree on 31% of tasks (an oracle router hits 100%, so every task is solvable by some scaffold), and scaffolds induce distinct strategies (direct-fix 95% vs rewrite 68%; wildly different vision-read rates). Confirms model and scaffold effects are not cleanly separable — the harness constrains available solution paths, the model determines how well they're used
- Agent-Native Infrastructure — building agent-legible environments is harness engineering at the infrastructure layer; Karpathy's "describe it to agents first" is the same instinct as AGENTS.md-as-table-of-contents
- AI-Driven Formal Proof Search — the AlphaProof Nexus proof-sketch-with-
EVOLVE-BLOCK-markers is a harness that "enforces invariants, not implementations" for theorem proving (the agent may edit only marked regions; the theorem statement is invariant) - Latent vs. Deterministic Space — Tan's two-sided diagnostic names the boundary harness design engineers: what the model judges (latent) vs. what the scaffold holds and enforces (deterministic)
- Stopping Under a Noisy Verifier — the verification stage of this page's loops, given parameters and a stopping rule. Leni's production deterministic loop supplies the field values (catch 0.20, fix 0.75, false-alarm 0, cap of two iterations) that page's lead open question asks for; the two together bracket the design space, since the same governing inequality that makes a production recalculation loop safely net-positive is what makes a five-round LLM verify-repair loop worse than never starting. The harness-design consequence: the loop's damage term, not its catch rate, decides whether adding the loop can hurt at all
- Optimizer–Evaluator Decoupling — the rule the observer-independence result above obeys, and the one place this page's "assign each stage to the lightest model that works" prescription is not free: the stage that grades an artifact is exactly the stage that may not be staffed by whatever produced it, so the model-mix decision and the independence invariant are the same decision
- Jeff Dean — the mechanism under this page's failure modes: long runs break where the agent leaves its training distribution, so skills are on-distribution steering and multi-agent fan-out is search around the edge
- Agent-Authored Harness Optimization — the inversion: the agent edits the harness instead of a human writing it. Cline's 17-hour campaign fixed five defects straight out of this page's problem space (retry policy, loop detection, process lifecycle, async liveness) and merged them as a PR; HarnessBank runs the controlled version and reports which levers actually pay (see The Gains Are Not in the Prompt above)
Derived#
- Opus 4.6 → 4.7 Changes and Multi-Agent Coding Considerations — applies "enforce invariants, not implementations" and the Writer/Reviewer pattern to an Opus 4.7 multi-agent coding team
- Single General Agent vs. Multi-Agent Coding Architecture — answers open question #1 below: re-draws "single vs. multi-agent" at task-priors (single agent overtakes, per the bitter lesson) vs. context-isolation + evaluative independence (role separation persists)
Open Questions#
- How does architectural coherence evolve over years in a fully agent-generated system?
- At what codebase scale does the AGENTS.md-as-table-of-contents approach need to be replaced with more sophisticated context routing?
- How generalizable are these web-app-focused findings to other domains (scientific research, financial modeling)?
Resolved Questions#
- Does a single general-purpose coding agent outperform a multi-agent architecture with specialized testing, QA, and cleanup agents? Answered: Single General Agent vs. Multi-Agent Coding Architecture — no single winner as posed; a single general agent overtakes a bespoke hand-engineered multi-agent system as models improve (The Bitter Lesson), but a monolithic-context agent loses to role separation (fresh-context explorer/reviewer + independent grader), which persists because it fixes structural constraints (quadratic attention, Goodhart), not model weakness.
Sources#
- Harness engineering: leveraging Codex in an agent-first world
- Effective harnesses for long-running agents
- The new rules of context engineering for Claude 5 models — Thariq Shihipar, 2026-07-25 (
practitioner-opinion): the then→now myth retirements — interface design over examples, deferred tool loading, single-placement instructions, rich references - Coercion and Deception in AI-to-AI Management: An Agentic Benchmark of Unprompted Escalation — Brazilek, Lu, Chaudhary & Tidmarsh (CaML / Sentient Futures, arXiv 2607.15434, 2026-07-16,
empirical): §3.4 — removing thereport_task_failedaffordance takes Grok and Gemini from 0/30 to 20/30 fabricated completions; restoring it returns them to 0/30 and 1/30 - The Harness Effect: How Orchestration Design Sets the Token Economics of Enterprise Agentic AI — Sayed Ali et al. (33 authors, all Writer, Inc.; arXiv 2607.06906, 2026-07-08,
empirical, total vendor COI): §4.2 the frozen baseline's five design decisions, §4.3 the six mechanism families summarized above, §6.5 the sub-agent capability floor, §6.3 the regression concentration on smaller models, §4.4 the per-task-accounting argument. Table 2 is cell-collapsed and Table 7 row-shifted in the raw parse; neither is cited. Full treatment at Orchestration Sets Token Economics - Measuring Harness-Induced Belief Divergence in Multi-Step LLM Agents — Haiwen Yi & Xinyuan Song (arXiv 2607.04528, 2026-07-05,
empirical): §3.1 the harness six-tuple, §4 the six-harness family and the BIWM instrumentation components, §10 the UnsafeRetryRate = 0.700 calculation, §14 the single-component transfer table. Table 1 is cell-collapsed and row-shifted and Table 7 has one merged row; neither is cited here. Full treatment, corrected values and the unmeasured-terminal-success caveat at Harness-Induced Belief Divergence - HarnessBank: Semantic Gene-Bank Search with Gated Verification for Agent-Harness Self-Evolution — Luo et al. (arXiv 2607.13683, 2026-07-15,
empirical): §3.1 the kernel/mutable-surface partition and the prompt/knowledge/runtime/config lever taxonomy, §4.3 the prompt-only baseline credited on zero of five sealed tests, §4.5 the two recurring control-flow mechanisms, §4.7 accepted edits spanning all four levers - Jeff Dean: The 1% Rule for Building in AI — Jeff Dean with Diana Hu, YC Startup School 2026 (2026-07-30,
practitioner-opinion): §"Why Long-Running Agents Fail" — off-distribution degradation as the mechanism, skills as on-distribution steering (Google's internal-tooling skills), multi-agent fan-out with an evaluator as inference-time search, and cross-language translation as the case where the spec is complete - Where Does Agent Reliability Come From? A Cross-Benchmark Decomposition of Verification Loops, Specialist Models, and Scaffolding in a Production Enterprise Agent — Arunabh Dastidar & the Leni Team (Leni Inc., arXiv 2607.17044, 2026-07-19,
empirical, disclosed total vendor COI): §3.1 the four-stage loop and observation as the load-bearing stage, §3.3 + Table 1 the three oracle classes, §3.4 + Table 2 the specialist mix and post-training recipe, §6.1 + Table 3 the total uplifts, §7 + Table 5 the layer decomposition and the specialist-swap ablation, §8 specialist serving cost and routing at net-negative cost, §9 the ranked investment order, §10 the nine stated limitations. Parse warning: Table 3 is fully collapsed in the raw markdown — all four benchmark rows merged into one grid row, so each cell holds four values in benchmark order. Recovered againstpdftotext -layoutand corroborated by Figure 5's bar labels (11 / 7 / 10 / 15.2); Tables 1, 2 and 4 parse clean. Table 5's arrow-joined~70% → ~74%cell is genuine, not a weld. Full evidence and COI treatment in Source Notes
Cited by 57
- Where Does Agent Harness Work Remain Durable as Models Improve?×6
Agent Harness Engineering and Code As Source Of Truth converge on the same invariant: the agent can…
- Learning to Co-Work with AI: A Software Engineer's Field Guide×6
What it is: designing the scaffolding around the agent — context files, skills, hooks, subagents,…
- Loop Engineering×4
Worktrees — isolated parallel checkouts so two agents don't collide on the same file (the agentic…
- Open Questions Backlog×4
2026-04-28 (106d) Agent Harness Engineering — How generalizable are these web-app-focused findings…
- Single General Agent vs. Multi-Agent Coding Architecture×4
The same dynamic at the orchestration layer: Symphony began treating agents as rigid state-machine…
- Symphony×4
Symphony is an open-source agent-orchestration spec from OpenAI's Codex team (Alex Kotliarskyi,…
- Deep Research Agents×3
Deep research is a long-horizon, autonomous, multi-step task — exactly the regime Task Time Horizon…
- Measuring Beyond Accuracy Saturation×3
Agent Harness Engineering — the model-vs-scaffold decoupling is the empirical measurement of the…
- Stopping Under a Noisy Verifier×3
Agent Harness Engineering — where a verify-repair loop sits in the harness, and the layer that…
- Addy Osmani×2
Agent Harness Engineering — his "agent harness engineering" essay; loop engineering sits one floor…
- Agent-Authored Harness Optimization×2
Agent Harness Engineering — the patterns being edited; this page is what happens when the agent,…
- Agent Context Files×2
The brittleness of prompt-as-policy is that it cannot enforce — only instruct. Symphony's answer is…
- Agent Loop Pattern×2
Pocock's stronger claim: the quality of feedback loops sets the ceiling on what loops can do.…
- AI-to-AI Coercion×2
That is a scaffolding change, not a training change, and it is the paper's most directly actionable…
- Opinions on Using AI Tools & the Future of the Software Engineering Role×2
This matches the official tooling guidance: Claude Code Best Practices and Agent Harness…
- Context Lifecycle Management×2
The planner can be cheap; the enforcement cannot be. Three mid-tier planners land within ~3pp of…
- Context Window Smart Zone×2
Agent Harness Engineering — system-prompt minimalism and AGENTS.md-as-ToC are restatements of the…
- Deployment Simulation×2
To test beyond chat, OpenAI simulated an internal deployment of GPT‑5.5 coding agents using 120,000…
- Interaction / Background Model Split×2
Deep Modules For Agents / Agent Harness Engineering — multi-agent splits for context isolation…
- Model Introspection Feedback×2
Agent Harness Engineering — operationalizes "enforce invariants, not implementations" by giving the…
- Optimizer–Evaluator Decoupling×2
How much independence is enough — different model family, different vendor, different modality of…
- Opus 4.6 → 4.7 Changes and Multi-Agent Coding Considerations×2
Agent Harness Engineering — enforce invariants mechanically, progressive disclosure, doc gardening
- Orchestration Sets Token Economics×2
Agent Harness Engineering — the mechanism inventory is that page's patterns with a price attached;…
- The Bitter Lesson×2
Agent Harness Engineering — "enforce invariants, not implementations": let the model find the path;…
- Ticket-Driven Agent Orchestration×2
Agent Harness Engineering — ticket-driven orchestration is the natural extension of harness…
- Agent Control Plane Patterns: Tickets, Loops, Specs, and Memory Files
Layered agent control-plane synthesis: tickets as durable work graph, loops as execution primitive, specs/context files…
- Agent Data Injection (ADI)
Agent Harness Engineering — the agent's data format and tool-call delimiters (Claude Code's…
- Agent-Native Infrastructure
Agent Harness Engineering — building agent-legible environments is the harness-engineering…
- Agentic Honesty & Diligence
A design rule. Every agent harness needs a cheap, explicit way to fail. Without one, the models…
- AI-Driven Formal Proof Search
Agent Harness Engineering — EVOLVE-BLOCK enforces invariants-not-implementations, a…
- Claude Code Auto Mode
Agent Harness Engineering — auto mode is a harness-level safety invariant: enforce…
- Claude Code Best Practices
Agent Harness Engineering — Claude Code's CLAUDE.md, skills, and hooks are a practical…
- Claude Opus 4.7
Agent Harness Engineering — better file-system memory strengthens the case for repo-local versioned…
- Client-Side Agent Optimization
Agent Harness Engineering — client-side optimization is a layer above harness design: once the…
- Cline
Agent Harness Engineering — Cline's competitive position is harness quality on top of other labs'…
- Codex App Server Protocol
Agent Harness Engineering — the App Server protocol is the integration boundary that makes "harness…
- Configurable Human Participation
Agent Harness Engineering — HAS-Framework is a harness whose explicit design goal is making human…
- Deep Modules for Agents
Agent Harness Engineering — "enforce invariants, not implementations" is the same principle at the…
- Design Concept Grilling
Agent Harness Engineering — "enforce invariants" at the planning layer is "reach alignment before…
- Google DeepMind
DeepMind is the third frontier-lab "voice" in the wiki alongside Anthropic and OpenAI (Symphony /…
- Harness Build-vs-Buy
Agent Harness Engineering — what the ~1M lines is made of; this page prices the commitment that…
- Harness-Induced Belief Divergence
Agent Harness Engineering — the design page this measures from the outside. Every one of the six…
- Harness Shrinkage as Models Improve
Agent Harness Engineering — generalizes the "enforce invariants, not implementations" principle to…
- Hermes Agent
Agent Harness Engineering — AGENTS.md follows OpenAI's "table of contents, not encyclopedia"…
- Interaction Models
Agent Harness Engineering — the harness-vs-model division-of-labor question, here resolved firmly…
- Latent vs. Deterministic Space
Agent Harness Engineering — harness design is largely the engineering of this boundary: what the…
- LLM-as-Compiler Knowledge Base
Agent Harness Engineering — shares the pattern of repository-local knowledge as system of record;…
- LLM-Driven Vulnerability Research
Agent Harness Engineering — the vulnerability-finding scaffold is a minimal harness: isolated…
- MCP and Computer Use
Agent Harness Engineering — MCP-as-connector vs. harness-as-scaffold distinction
- Agent Systems & Harness Engineering
Agent Harness Engineering — Patterns for scaffolding long-running LLM agents: environment design,…
- Repository Exploration Subagent
Agent Harness Engineering — decoupling exploration from solving and returning only compact evidence…
- Scale-Dependent Prompt Sensitivity
Agent Harness Engineering — enforcing output-length invariants at the harness level (via system…
- Shared Harness, Differentiated Surfaces
Agent Harness Engineering — the harness/UX division of labor stated as a product architecture: what…
- Thinking Machines Lab
Agent Harness Engineering — their interaction-models work resolves the harness-vs-model question…
- Verifying Without a Compiler: Cowork's Harness vs Claude Code's, and Why the Slice Verifier Stays
Slice shape is a checkable invariant, and checkable invariants belong in deterministic space.…
- Vertical Slice Tracer Bullets
Agent Harness Engineering — restated as "enforce invariants" at the planning layer: the invariant…
- Vibe Coding vs. Agentic Engineering
He also captures the interactive form as "coding is steering the AI": the honest measure of AI's…
Related articles
- Harness Shrinkage as Models Improve
Prompt scaffolding shrinks each model release; Cat Wu's pruning discipline; Boris Cherny "100 lines of code a year from…
- Claude Code Best Practices
Anthropic's guide to effective Claude Code usage: context management, verification-driven development, explore→plan→cod…
- Open Questions Backlog
_456 actionable open questions across 205 pages · 107 predictions · 9 notes · 147 in progress · 69 watching (entities),…
- Client-Side Agent Optimization
AgentOpt's framing of developer-controlled agent optimization (model-per-role, budget, routing) as distinct from server…
- Agent Loop Pattern
`/loop` (cron-scheduled) and Ralph Wiggum (backlog-draining) loops as next-generation agent primitive; AFK execution, p…
