Agent Harness Architecture: The 70% of Performance That Lives Outside the Model
How agent harness architecture shapes performance across five dimensions, from context and tools to safety and loop control, often more than a model upgrade.
Table of Contents
Two teams run the same model on the same coding benchmark, Terminal-Bench 2.0. Measured by the share of tasks each agent completes, one scores 63%, the other 76%. The only thing that differs is the software wrapped around the model: how it manages context, which tools it exposes, and how its loop decides when to stop.
That wrapper is the agent harness, and its design often moves the score more than a model upgrade would. Agent harness architecture is the design of that wrapper across five dimensions: subagent orchestration, context management, tool design, safety and permissions, and loop orchestration.
TL;DR
- On the coding benchmarks covered here, harness changes with the model held constant move scores by roughly 5 to 22 points.
- On the Terminal-Bench 2.0 leaderboard, Claude Opus 4.6 scores from 58.0% to 76.4% across ten harnesses.
- Context management and tool design are cheaper to change than the model, and one harness study traced its gains to tools, middleware, and memory, not the system prompt.
Does Architecture Really Beat the Model?
Often, yes. In controlled coding-benchmark tests that hold the model fixed and change only the harness, scores swing by roughly 5 to 22 points. That makes the harness a performance variable in its own right, one you can change without retraining or swapping the model.
The title says 70%. Treat that as a memorable shorthand for most of it, not a measured statistic. No published study reports a clean 70% split between model and harness, and this article will not pretend one exists. What the research does show is a set of large, repeatable swings driven by the harness with the model held constant.
On the Terminal-Bench 2.0 leaderboard, Claude Opus 4.6 scores anywhere from 58.0 to 76.4% depending only on which harness runs it. Endor Labs’ Agent Security League shows GPT-5.5 at 62.6% functional correctness under Codex and 84.9% under Cursor. These gaps trace to agent harness design rather than to new model weights.
Before you reach for a bigger, more expensive model, look hard at the agent harness architecture you already have, since a harness change usually ships faster and reverses more easily than a model migration. You can test a harness change against the same tasks before it reaches users.
What Is Agent Harness Architecture?
Agent harness architecture is the design of everything that wraps a model to make it act: how work is split across agents, how context is managed, how tools are shaped, how permissions are enforced, and how the control loop decides when to act or stop. The model generates tokens; the architecture turns those tokens into completed work.
A useful map comes from a 2026 survey, Architectural Design Decisions in AI Agent Harnesses (arXiv 2604.18071), which studied 70 public agent-system projects. It found that harness design keeps returning to the same five dimensions, whatever the framework or language. Because the sample spans many independent projects, the pattern is not an artifact of one team’s stack.
Calling it architecture is deliberate. Each dimension is a design decision with trade-offs, and the decisions interact: a memory strategy changes what your tools return, and a permission model changes how the loop retries. Good agent harness architecture treats these as one system, the way a building’s plumbing and wiring are planned together.
The survey also found a telling gap. File-persistent, hybrid and hierarchical context strategies are common, while high-assurance audit is rare. Teams invest in the visible parts of the harness and skip the boring ones. The next section lays out all five dimensions so you can see what a complete architecture covers.
The Five Dimensions of Harness Architecture
Harness architecture breaks into five dimensions: subagent orchestration, context management, tool design, safety and permissions, and loop orchestration. Each controls a different part of how the agent behaves, and most production harnesses combine all five. The 70-project survey found all five recurring, which makes them a practical checklist for reviewing a harness.

The five dimensions of agent harness architecture, after the 2026 survey Architectural Design Decisions in AI Agent Harnesses (arXiv 2604.18071).
Subagent orchestration divides the work, and context management sets what the model sees each turn. Tool design shapes the action surface, while safety and permissions bound what the agent may do. Loop orchestration decides when the agent acts, retries, or stops. Each dimension gets a dedicated section below; the table summarizes all five first.
| Dimension | What it controls | Example design decision |
|---|---|---|
| Subagent orchestration | How work is split across agents | One planner plus several workers, or a single loop |
| Context management | What the model sees each turn | Compaction, retrieval, and memory windows |
| Tool design | The action surface | Tool granularity, schemas, and error feedback |
| Safety and permissions | What the agent may do | Approval gates, validators, and sandboxing |
| Loop orchestration | When to act, retry, or stop | Stopping rules, retry policy, and planning |
The Seven Subsystems an Agent Harness Architecture Diagram Shows
A July 2026 source-code study (arXiv 2609.00006) maps a harness as seven subsystems plus an interface layer, such as a terminal UI, IDE integration, SDK or server, that people and programs drive it through. It read eleven production coding harnesses, including Claude Code, Codex CLI, Gemini CLI, OpenHands, Aider, OpenCode and OpenClaw.
| Subsystem | What it does |
|---|---|
| Agent loop | Alternates inference with action; owns stop conditions and recovery |
| LLM integration | Speaks provider protocols, assembles the prompt |
| Tools and actions | Defines and executes what the agent can do, file editing above all |
| Memory and context | Rations the context window; persists knowledge across sessions |
| Safety and permissions | Decides what runs, asks, or is forbidden; isolates execution |
| Orchestration | Spawns and coordinates sub-agents; connects to other agents |
| Extensibility | Adds capability through config, hooks, skills, plugins and MCP |
Two of its findings matter for design. Across roughly four million lines of code, no harness runtime imports a general-purpose agent framework, and none retrieves code with vector embeddings, so the field runs on hand-rolled loops and deterministic retrieval. SKILL.md skills also lead MCP in adoption, 9 of 11 systems against 8 of 11.
The Evidence That the Harness Outweighs the Model
Multiple 2026 studies hold the model constant and vary only the harness, and all of them find large swings. The cleanest example is a public leaderboard where one model posts ten different scores under ten different harnesses. Before comparing any two numbers, check whether the leaderboard held the harness fixed; the coding agent harness benchmark guide shows how to read one honestly.
On the Terminal-Bench 2.0 leaderboard, Claude Opus 4.6 ranges from 58.0% under Claude Code and 62.9% under the Terminus 2 framework, both verified runs, to 76.4% under Stanford’s Meta-Harness, an unverified submission. That is an 18-point gap from harness choice alone. Meta-Harness earns part of that lead by snapshotting the sandbox and injecting it into the first prompt, which saves several early exploration turns.
Terminal-Bench 2.0 is no longer current: tbench.ai shipped 2.1 on May 6, 2026, 3.0 on July 30 and 4.0 on August 28. As of October 23, 2026, the 3.0 and 4.0 leaderboards list each model under one harness, so 2.0 is still where one model can be compared across many.
A separate study, Agentic Harness Engineering (arXiv 2604.25850), evolved a coding agent harness over ten iterations and lifted Terminal-Bench 2 pass@1 from 69.7 to 77.0%, beating the human-designed Codex-CLI harness at 71.9%. The same evolved design carried gains of 5 to 10 points across three other model families, so the improvement travels with the architecture.
Endor Labs pushed the swing further. On its live Agent Security League leaderboard, GPT-5.5 scores 62.6% on functional correctness under its native Codex harness and 84.9% under Cursor, a 22-point jump. And Harness-Bench (arXiv 2605.27922), revised in October 2026 to 300 tasks across seven harnesses and ten model backends, found that no harness performs best on every backend.
| Setup (model held constant) | Reported swing | Source |
|---|---|---|
| Claude Opus 4.6, 10 harnesses | 58.0% to 76.4% (~18 pts) | Terminal-Bench 2.0 leaderboard |
| Seed vs evolved harness, 10 iterations | 69.7% to 77.0% pass@1 (~7 pts) | Agentic Harness Engineering (arXiv 2604.25850) |
| GPT-5.5, Codex vs Cursor harness | 62.6% to 84.9% (~22 pts) | Endor Labs Agent Security League |
| GLM-5.3, 7 harnesses, general tasks | 13.5 pts in full-credit rate | Harness-Bench (arXiv 2605.27922) |
Subagent Orchestration Splits Work Across Agents
Subagent orchestration decides whether one agent handles a task end to end or a planner delegates to specialized workers. A single loop keeps coordination simple and cheap. Splitting the work lets each agent hold a smaller, cleaner context and keeps a failure in one subtask from corrupting the rest. The trade-off is coordination overhead, since more agents mean more prompts, more tokens, and more handoffs that can go wrong.
The higher-value pattern is agents that check each other. Anthropic’s long-running-apps harness borrows a structure from generative adversarial networks: a planner writes a spec, a generator implements it, and a separate evaluator judges the result. The important detail is separation. An agent grading its own work tends to go easy on itself, especially on subjective tasks, so an independent evaluator catches problems the generator misses.
That separation makes orchestration an architecture decision. A planner, worker, and independent evaluator split turns extra agents into extra checks, raising the odds an unattended run finishes correctly rather than confidently wrong. Anthropic adds one caveat: with Opus 4.6, the evaluator became unnecessary overhead on tasks the generator already handled well and kept adding lift only at the edge of its ability.
Context Management Decides Long Tasks
Context management is usually the dimension that decides a long task, because model quality drops as the input grows. How the harness compacts, retrieves, and resets context often matters more than the model choice does. It is what turns a large context window from a liability back into an asset.
Research from Chroma, known as context rot, tested 18 LLMs in July 2025, including GPT-4.1, Claude 4, Gemini 2.5 and Qwen3, and found every one gets less reliable as input length rises, even on simple tasks. The decline sets in while plenty of window remains, so a bigger context budget cannot rescue a task the model has stopped attending to.
Anthropic’s engineering team hit the same wall building long-running agents. In its write-up on harness design for long-running apps, it describes context anxiety, where a model starts wrapping up work early as it nears what it believes is its context limit.
With Claude Sonnet 4.5, compaction alone was not enough, so the team used full context resets with a structured handoff, at a cost in orchestration complexity, tokens and latency. Opus 4.5 largely removed the behavior, and the later harness dropped resets for the Claude Agent SDK’s automatic compaction.
This is why a coding agent harness that manages context well can beat a stronger model paired with a naive one. The dimension stays invisible in a demo and turns decisive on a real, multi-hour task. The Anthropic case also shows the opposite risk: a context fix one model needs can become dead weight for the next.
Tool Design Shapes the Action Surface
Tool design is the set of actions you expose to the model and how you describe them. Granularity, clear schemas, and useful error messages decide whether the agent recovers from a mistake or repeats it. It is the dimension teams underrate most after context.
Every tool is a contract. A vague schema invites malformed calls, and a tool that fails silently gives the loop nothing to correct against. A tool that returns a specific error, like a missing argument or the name of a failing test, lets the agent fix its next call without a human.
Granularity is a trade-off. A few broad tools keep the prompt small but force the model to pack complex arguments into one call. Many narrow tools are easier to call correctly, yet they crowd the context and slow tool selection. The right split depends on the task, which makes it a design decision rather than a default.
Efficiency follows from tool design too. In the Agentic Harness Engineering study, an evolved harness reached top success on SWE-bench Verified while using 12% fewer tokens than its seed harness. The paper’s ablations trace its gains to tools, middleware, and long-term memory rather than the system prompt. Cleaner tool use compounds into real cost and speed savings across a long run.
Safety and Permissions Are the Dimension Teams Skip
Permission gates, validators, and sandboxes get treated as afterthoughts, yet they shape how reliably an agent finishes. The survey of 70 systems found that intermediate isolation is common while high-assurance audit is rare, so this is where most harnesses are weakest.
Safety and permissions decide what the agent can touch. Real design decisions here include approval gates before a destructive action like a force-push to a shared branch, validators that check a tool’s output before it is trusted, and sandboxes that contain a bad step. These controls rarely show up in benchmark scores, which is why teams skip them, yet they matter most when an agent runs unattended.
Skipping this dimension also caps reliability, because an agent that cannot verify its own actions has to redo work or hand it back to a person. Reliability and safety turn out to be the same investment, which is why strong harnesses treat them as core architecture rather than a final gate.
Loop Orchestration Decides When the Agent Acts, Retries, or Stops
Loop orchestration is the control logic that decides when the agent takes another action, retries a failed one, or stops. A July 2026 source-code study of eleven coding harnesses gives the agent loop ownership of stop conditions and failure recovery. It governs how a run actually ends, which is easy to overlook until an agent either quits a solvable task or never stops at all.
Both failure modes are expensive. A loop that stops too early hands back work a few more turns would have finished. A loop with no real stopping rule spins in place, burning tokens and sometimes undoing correct work while it thrashes. Good stopping criteria end a run when progress stalls, not at a fixed turn count.
Retry policy is where the loop leans on the rest of the harness. A retry only helps if the agent gets a concrete signal about what failed, which is why loop design and tool feedback are tied together. That coupling is why loop orchestration is tuned alongside the other dimensions rather than bolted on at the end.
How the Five Dimensions Interact (and Where Teams Over-Invest)
The five dimensions compound rather than add. A better tool schema makes retries cheaper, which makes the loop safe to run longer, which lets context management pay off. Over-investing in model choice while the harness stays thin leaves the biggest gains on the table.
Because the dimensions interact, tuning one in isolation underdelivers. A retrieval upgrade that hands the model cleaner context is wasted if the loop stops too early to use it. A careful permission model only slows the agent down unless the tools give clear feedback the loop can act on. Strong agent harness architecture tunes them together and measures the whole system.
The common mistake is spending the entire budget on the model. A model upgrade is a single, expensive lever, and the evidence above shows the harness can match or beat its swing. Context management and tool design are cheaper to change and often move the number more, yet they get less attention because they feel like plumbing.
How to Measure a Harness Change
Measuring the whole system means changing one dimension, re-running the same tasks, and comparing the traces. Future AGI’s traceAI records every LLM call, retrieval step, tool call and agent decision as OpenTelemetry spans, and continuous eval tasks score new spans as they arrive, filtered to agent spans if you choose.
Tool Call Accuracy and Trajectory Match then show whether a change made the agent call the right tools with the right arguments, in the expected order. agent-learning-kit (pip install agent-learning-kit), the local-first SDK and CLI for testing agents, can gate the change in CI. The tool-calling agent eval guide covers the full set of checks.
Closing the Gap Between the Two Teams
Return to the two teams from the opening. They ran the same model on the same benchmark, yet one finished 63% of tasks and the other 76%. The model was identical, so the gap came from the harness, the software layer that fed the model context, handed it tools, gated its actions, and decided when its loop should stop.
That layer is five compounding dimensions: orchestration, context, tools, safety and the loop. Context management keeps the model attending to what matters as input grows. Tool design decides whether the agent recovers from a mistake or repeats it. The measured swings, roughly 5 to 22 points with the model held constant, come from these choices rather than from new weights.
Audit the harness before paying for a bigger model, then spend first where the weight sits, on context management and tool design, before tightening safety and loop control. Get the architecture right, and the next model upgrade lands on a foundation ready to use it instead of masking a harness that left most of the performance unclaimed.
Auditing your own harness? Start free on Future AGI and trace and score your agent’s runs before the next model upgrade.
Frequently Asked Questions
What is a harness in agentic systems?
What is the difference between an agent harness and the model?
What kind of architecture supports agentic AI?
What are examples of agentic harnesses?
What does an agent harness architecture diagram show?
An agent harness is the runtime layer around an LLM that manages tools, context, state, execution, and safety. Learn how it shapes reliability.
Agent harness vs framework: a framework supplies reusable abstractions, while a harness runs and controls the agent loop. Learn when you need each.
Harness engineering is the discipline of building execution environments that make AI agents reliable: five principles, the ratchet rule, and what to measure.