A powerful model is no longer enough to define a powerful AI product. As AI systems move from generating responses toward executing long-running workflows, the model increasingly becomes one component inside a much larger runtime responsible for deciding what the model can see, what it can do, where it can act, how its state persists, and what happens when something goes wrong.
That surrounding runtime is increasingly described as an agent harness.
The term itself is not yet governed by a single industry-wide definition. Cursor uses a relatively compact description built around the model, instructions, and tools, while Anthropic separates the harness from the durable session and execution sandbox. OpenAI uses the term more broadly when discussing the agent loop, memory, tool orchestration, filesystem access, sandbox execution, approvals, and other primitives around its models. The boundaries vary, but the architectural direction is remarkably consistent: the behavior users experience as an "agent" emerges from the interaction between a model and the system wrapped around it, not from the model alone.
This leads to a useful way of thinking about modern AI architecture.
The model provides intelligence. The harness turns that intelligence into a system.
A Model Is Not an Agent
Language models fundamentally produce outputs from inputs. Even when a model is trained to call tools, the model itself does not usually execute those tools. It proposes an action, and something outside the model interprets that proposal, performs the operation, returns the result, and gives the model another opportunity to reason.
OpenAI describes this distinction directly in its work on equipping the Responses API with a computer environment. The model can propose shell commands or other actions, but the surrounding platform is responsible for actually running them. Once that execution loop is introduced, additional problems immediately appear: intermediate files need somewhere to live, long outputs must be handled without flooding the context window, network access requires policy, processes can fail, tasks may need retries, and long-running work must survive beyond one interaction.
An agent therefore requires more than reasoning capability. It needs an execution loop that continually connects observation, model inference, action, and new observation. It also needs infrastructure around that loop to determine which actions are legal, how outputs are represented, what state survives, and when human intervention is required.
A simplified architecture begins to look less like a chatbot request and more like a runtime:
- User Intent
- Harness
- Model
- Tool or Environment
- Observation
- Harness
- Model
The harness occupies the critical position in that cycle because it mediates almost everything outside raw inference.
What Actually Lives Inside a Harness?
There is no universal specification for what an agent harness must contain, which is important because the word can otherwise become too vague to be useful. Looking at production systems from several major AI engineering teams provides a clearer picture of the responsibilities that are accumulating around this layer.
OpenAI's Codex architecture is particularly illustrative. In Unlocking the Codex Harness, OpenAI explains that the same underlying Codex harness powers multiple product surfaces, including the CLI, IDE integrations, web experiences, and the Codex application. The core agent loop is only one part of that system. The broader harness also handles thread lifecycle and persistence, configuration and authentication, sandboxed shell and file execution, extensions such as MCP servers and skills, approval flows, and the event infrastructure required for clients to observe an agent while it works.
OpenAI expanded the same idea in its Agents SDK update, describing a "model-native harness" that combines configurable memory, sandbox-aware orchestration, filesystem tools, MCP integrations, skills, custom instructions through AGENTS.md, shell execution, and file editing. The objective is not merely to expose more features. The harness is designed to align execution with the operating patterns of frontier models while providing developers with standardized infrastructure around them.
Anthropic draws the boundaries slightly differently. Its architecture for Managed Agents separates an agent into three primary abstractions: a session containing the durable event history, a harness that calls Claude and routes tool calls to infrastructure, and a sandbox where computation and file manipulation occur. This separation allows each component to evolve or fail independently while preserving the overall agent workflow.
The exact component diagram matters less than the recurring responsibilities. Context management, tools, permissions, state, execution, recovery, orchestration, and observation are becoming first-class parts of the agent runtime.
That is why the harness increasingly resembles an application layer rather than a thin wrapper around an API call.
The Same Model Can Produce a Different Agent
Traditional model comparisons often imply that selecting a better model should automatically produce a better application. For straightforward generation tasks, that relationship can be relatively direct. Agentic systems introduce substantially more variables.
Two applications using the same underlying model can expose different tools, construct different contexts, apply different system instructions, handle failures differently, impose different permissions, summarize history differently, and provide completely different execution environments. The resulting agents may therefore behave very differently despite sharing the same model checkpoint.
Cursor provides direct evidence of this effect in Continually Improving Our Agent Harness. Cursor explains that new models are not simply plugged into an identical orchestration layer. Its team adapts prompts, tools, context behavior, and other harness characteristics to the strengths and quirks of individual models. The same underlying model can therefore perform differently depending on how well the surrounding harness is aligned with it.
This also means that model upgrades are not always simple drop-in replacements. Different models may respond better to different tool shapes, prompt structures, context strategies, and execution patterns. Switching models in the middle of an existing trajectory can also introduce mismatches because the incoming model inherits state created under a different behavioral configuration.
The implication is significant.
Model quality and agent quality are related, but they are not identical variables.
Once an application becomes agentic, harness design becomes part of the product's effective intelligence.
The Harness Is Becoming the Control Plane
A useful application-layer analogy emerges when we look at the decisions the harness is beginning to own. It can determine which model receives a task, which tools become available, what context enters the next inference call, whether an operation requires approval, which environment should execute code, what happens after failure, and how resulting state should be persisted.
These are control-plane responsibilities.
The model can make local decisions about how to solve a problem, but the harness defines the system within which those decisions have meaning. A model may request a shell command, for example, but the surrounding runtime determines whether shell access exists, which filesystem is visible, whether outbound networking is allowed, which credentials are available, and what happens to the workspace afterward.
OpenAI's current Agents SDK makes this distinction visible through its sandbox and workspace abstractions. Agents can operate inside controlled environments containing files, dependencies, tools, and persistent artifacts while application infrastructure determines how those environments are constructed and governed.
The application is therefore no longer defined only by frontend code, backend services, and a call to an LLM endpoint. For agentic software, part of the application's behavior is encoded in the environment surrounding the model.
The harness determines the world the model is allowed to operate inside.
Execution Environments Are Becoming Part of Application Architecture
Giving an agent the ability to act changes the engineering problem dramatically. A text-generation system can fail by producing a bad answer. An agent with access to code execution, files, browsers, databases, or external APIs can create side effects.
This makes the execution environment part of the product architecture rather than an implementation detail.
OpenAI's computer environment architecture for the Responses API combines model orchestration with shell execution, filesystem state, structured storage, network controls, reusable skills, and context-management mechanisms. Instead of placing every intermediate artifact directly into model context, the agent can manipulate files or other external state and retrieve only the information it needs during subsequent reasoning steps.
That approach creates a useful distinction between model context and environment state. A large dataset does not necessarily need to consume thousands of context tokens if it can remain as a file or database inside the agent's workspace. Generated artifacts can persist outside the conversation, and intermediate computation can happen through deterministic software tools instead of being represented entirely through natural language.
This expands what an agent can accomplish while reducing the need to encode its entire working world inside a prompt.
It also places the harness between two different computational domains: probabilistic model reasoning and deterministic software execution.
Durability Changes What an Agent Can Be
A short-lived agent can keep much of its state inside one process or conversation. Long-horizon agents cannot rely on that assumption. Containers terminate, networks disconnect, context windows fill, processes crash, and users close their clients.
If losing the runtime also means losing the task, the system is not truly durable.
Both OpenAI and Anthropic have moved toward separating durable agent state from disposable execution infrastructure. OpenAI's Agents SDK supports snapshotting and rehydration patterns so an agent can recover state inside a fresh environment rather than treating a specific sandbox instance as permanent infrastructure.
Anthropic encountered a related problem while designing Managed Agents. Its earlier architecture colocated the session, harness, and sandbox, which made the execution container effectively irreplaceable because losing it could also mean losing important session state. Anthropic later externalized the durable session log and separated the harness from the execution environment so failed components could be replaced independently.
Anthropic reports that this decoupling also improved infrastructure performance. By avoiding unnecessary sandbox provisioning before inference could begin, the architecture reduced median time-to-first-token by roughly 60 percent and p95 time-to-first-token by more than 90 percent in that system.
Durability therefore becomes another harness responsibility. The model reasons about the task, while the surrounding system ensures that the task continues to exist.
Security Belongs Outside the Model
As agents gain more capabilities, security cannot depend entirely on asking the model to behave safely. A model may follow instructions reliably in ordinary circumstances and still encounter malicious content, prompt injection, unexpected tool output, compromised external resources, or software vulnerabilities.
The infrastructure has to assume that some model-generated actions will eventually be wrong.
OpenAI's agent architecture increasingly reflects this assumption. Its Agents SDK separates the harness from the compute environment partly so sensitive credentials can remain outside the sandbox where model-generated code executes. If an agent does not require direct access to a secret, that secret does not need to exist inside an environment the model can inspect.
Anthropic reached a similar structural conclusion in its Managed Agents design. Credentials for external integrations can remain in secure infrastructure and be accessed through controlled proxies rather than being copied directly into the execution sandbox. Anthropic describes this separation using a useful metaphor: the harness acts as the "brain" coordinating work while the sandbox functions as the "hands" performing computation.
The principle is straightforward: instructions are not a substitute for isolation.
Asking a model not to read a credential is a behavioral control. Structuring the system so the credential is never available to the model is an architectural control.
The second guarantee is stronger.
Long-Running Work Exposes the Limits of Naive Agent Loops
The simplest agent architecture is often described as a loop: give the model a task, allow it to call tools, feed the results back, and repeat until completion. That pattern can work surprisingly well for short tasks, but extended autonomous work exposes additional failure modes.
Agents can lose track of progress, repeat completed work, accumulate irrelevant context, stop prematurely, fail to verify outputs, or continue making locally reasonable changes without converging on the actual objective. Better models reduce some of these problems, but harness structure can also compensate for specific weaknesses.
Anthropic explored this problem in Effective Harnesses for Long-Running Agents. One experimental design used an initializer agent to prepare an environment and a coding agent that made incremental progress while leaving structured artifacts for subsequent sessions. Git history and progress files served as durable state that helped fresh contexts reconstruct what earlier sessions had already accomplished.
Later work in Harness Design for Long-Running Application Development experimented with planner, generator, and evaluator roles. The evaluator interacted with generated applications, tested behavior, inspected APIs and state, and returned structured feedback to the generator. In that architecture, the harness was no longer merely repeating model calls. It was defining decomposition, verification, state transfer, and termination behavior.
Anthropic also found that some harness mechanisms can become unnecessary as models improve. Scaffolding that compensates for a weakness in one model generation may become redundant when a later model handles the underlying problem more reliably.
The best harness is therefore not necessarily the most complicated one.
The Harness Must Evolve With the Model
Traditional application infrastructure often aims for stability. Once a database layer, HTTP server, or queue architecture works reliably, teams generally prefer not to redesign it whenever an upstream dependency improves.
Agent harnesses behave differently because they sit directly against a rapidly moving model capability boundary.
Cursor's experience illustrates this clearly. Earlier versions of its coding agent provided substantially more static context and explicit scaffolding because models were less capable of navigating repositories and determining what information they needed independently. As models improved, Cursor removed some of that static context and moved toward dynamic context discovery, where agents retrieve files, conversation state, tools, and other resources when they become relevant.
Anthropic describes a similar dynamic. Harness components often encode assumptions about what a model cannot reliably do. When those assumptions stop being true, an old workaround can become unnecessary overhead.
This produces an unusual relationship between model and infrastructure. The harness is not simply supporting the model. It is continuously renegotiating responsibility with it.
When models become better at planning, less planning scaffolding may be required. When they become better at discovering information, static retrieval can be reduced. When they become better at coordinating tools, rigid orchestration may become a limitation rather than an advantage.
Good harness engineering therefore requires restraint as much as invention.
Repositories and Software Environments Are Becoming Agent Interfaces
The harness itself is only part of the surrounding architecture. As agents become more autonomous, the software environments they operate inside also need to become understandable to machines.
OpenAI documented an extreme example in Harness Engineering: Leveraging Codex in an Agent-First World. The team described building an internal product in which Codex generated application logic, tests, CI configuration, documentation, observability infrastructure, and internal tooling. The important lesson was not simply that an agent generated a large amount of code. The repository and development environment had to be structured so agents could reliably understand and manipulate them.
Instead of placing every instruction inside one enormous AGENTS.md file, the system used a relatively small entry point that directed agents toward structured documentation, architecture records, product specifications, execution plans, and other versioned sources of truth. Logs, metrics, tests, browser interactions, and architectural rules were also exposed in forms the agent could inspect or execute directly.
Many constraints were enforced mechanically through CI, linters, and structural tests rather than communicated only through prose.
This suggests that the application layer around an agent extends beyond the runtime process itself. Repositories, documentation, observability systems, test suites, permissions, and development environments increasingly function as interfaces through which agents understand the software they are operating on.
Making software agent-readable may become analogous to making software developer-friendly.
Agents benefit particularly from information that is explicit, structured, discoverable, and mechanically verifiable.
Multi-Agent Systems Make the Harness Even More Important
A single-agent harness determines how one model interacts with tools, context, and state. Multi-agent systems add another layer of complexity because something must decide when work should be delegated, which model or agent should receive each task, what context it should receive, how agents communicate, and how their outputs should be reconciled.
Cursor frames much of this coordination as a harness problem. Specialized agents may perform individual pieces of work, but the logic that chooses those agents, frames tasks, isolates their context, and combines their results belongs outside any individual model.
OpenAI's orchestration work points in a similar direction. Symphony explores a system where project-management state can function as a control plane from which coding-agent work is dispatched and coordinated.
As the number of agents increases, orchestration begins to resemble distributed systems engineering. Tasks require scheduling, workers need isolated state, failures require recovery, concurrent work needs coordination, and results need verification.
The model remains the reasoning engine inside each worker.
The harness becomes the system that makes those workers cooperate.
Why Calling It an Application Layer Is Useful
Describing the harness as the new application layer is an architectural interpretation, not an official industry standard. The phrase is useful because it captures where an increasing amount of product-specific behavior is moving.
In conventional AI applications, much of the differentiation could exist in a prompt wrapped around a model API. In agentic applications, differentiation increasingly lives in how the application manages context, selects and exposes tools, constructs environments, persists state, verifies work, handles permissions, recovers from failures, delegates subtasks, and decides when execution is complete.
Those decisions are application logic.
The model does not inherently know which production database it should access, which operations require approval, how a crashed container should be restored, how historical context should be compacted, how credentials should be isolated, or whether a task should be delegated to another agent.
The harness defines those semantics.
That is why two applications built on the same frontier model can become fundamentally different systems.
The Model Provides Intelligence. The Harness Provides Agency.
The rapid improvement of frontier models will continue to matter. Better reasoning, stronger tool use, longer context, improved multimodality, and more reliable planning expand the range of problems an agent can solve.
But increasingly capable models do not eliminate the need for system design. They change what the surrounding system needs to do.
The important architectural shift is therefore the movement from model-centric applications toward agent runtimes. In these systems, intelligence comes from the model, but useful autonomy emerges from the interaction between that model and a carefully engineered environment containing tools, context, memory, execution, state, security boundaries, recovery mechanisms, and feedback loops.
As that environment becomes more sophisticated, the harness stops looking like glue code around an API.
It starts looking like the software architecture of the product itself.
The model provides intelligence. The harness turns intelligence into agency.
And that is why the agent harness is becoming the new application layer.
References
-
OpenAI, Unlocking the Codex Harness: How We Built the App Server
-
OpenAI, From Model to Agent: Equipping the Responses API with a Computer Environment
-
Anthropic, Scaling Managed Agents: Decoupling the Brain from the Hands
-
Anthropic, Harness Design for Long-Running Application Development
-
OpenAI, Harness Engineering: Leveraging Codex in an Agent-First World
-
OpenAI, An Open-Source Spec for Codex Orchestration: Symphony