An AI harness is all the software infrastructure around a language model — connected tools, execution rules, persistent memory, quality gates, and observability — that turns an LLM into an agent capable of doing real work reliably. The formula that defined the category was coined by Mitchell Hashimoto, creator of Terraform, in February 2026: Agent = Model + Harness. The model is the brain; the harness is everything else — and in production, the harness is what determines performance.
You used to be the harness
Before agentic tools, the harness was you: copy the error from the terminal, paste it into the chat, copy the answer, paste it into the editor, run it again. That manual loop — feeding context, executing actions, verifying results — is exactly what a harness automates. When Claude Code reads your repository, edits files, runs tests and iterates on its own, what changed wasn't the model: it was the harness around it. That's why the same question, asked in a browser chat and in a harnessed agent, produces such different results.
The equation that defines the category
Hashimoto formalized it (Feb 2026): Agent = Model + Harness. Martin Fowler and Birgitta Böckeler of Thoughtworks expanded it with the guides and sensors taxonomy — guides are the rules that direct the agent (what to do, what not to do); sensors are the mechanisms that detect when something goes off the rails (Apr 2026, martinfowler.com). Every robust harness combines both: direction without detection is faith; detection without direction is noise.
What a harness is made of
| Component | What it does | Concrete example |
|---|---|---|
| Connected tools | The agent acts on the world (files, browser, APIs) instead of just answering | MCP (Model Context Protocol, an open standard under the Linux Foundation) |
| Persistent memory | Context survives the end of the session | Working memory + project state in versioned files |
| Guides (rules) | Direct behavior before the action | Operating rules, approval protocols, mandatory specs |
| Sensors (gates) | Detect deviation after the action | Numeric quality gates: minimum coverage, zero new warnings |
| Orchestration | Sequences work into phases and delegates to subagents | A state machine with blocking phases |
| Observability | Makes behavior auditable | Per-phase artifacts: spec, plan, quality report |
Why the harness matters more than the model
Three public pieces of evidence. (1) LangChain showed on Terminal Bench 2.0 that the same model scores materially differently depending on the harness — and reports going from top 30 to top 5 on the benchmark by changing only the harness, not the model (Mar 2026). (2) Deloitte reports 88% of companies use AI but only 29% get real ROI — the gap isn't access to models, it's the system around them. (3) The labs themselves confirm the thesis: agents like Claude Code and Codex are post-trained WITH their harnesses in the loop — model and harness co-evolve.
Development harness vs. operational harness
Two scopes of the same pattern. A development harness disciplines agents that write code: spec before code, plan before implementation, gates before merge — the problem capivaOS solves for Claude Code (open-source, MIT, 2-command plugin). An operational harness is the system that runs an entire business on agents — knowledge, memory, automation, governance — described in detail in AI Harness in Practice, the account of how Capiva runs its own operation on this pattern every day.
How to start
For software development, the entry point is free: install capivaOS in your repository (/plugin marketplace add iB2/capivaOS → /capiva:init) and your first task enters a pipeline with phases and gates. For the operational harness — the one that runs a company's processes and knowledge — the path is in the practice article and Capiva's strategic diagnosis.
Frequently asked questions
What is an AI harness?▼
It's the software infrastructure around a language model that turns it into an agent: connected tools (MCP), persistent memory, execution rules (guides), verification mechanisms (sensors), orchestration and observability. The term was popularized by Mitchell Hashimoto's formula (Feb 2026): Agent = Model + Harness. In production, the harness — not the model — is what determines reliability and performance.
What's the difference between a harness and an agent framework?▼
A framework is a library for BUILDING agents (you write the loop's code); a harness is the complete execution environment around the agent — it includes runtime, rules, gates and memory, whether bought (Claude Code, Codex) or assembled on top of an existing runtime. In practice: Claude Code is a ready-made harness; capivaOS is a development harness installed on top of it; LangChain/LlamaIndex are frameworks for building your own.
Is a harness the same as RAG or context engineering?▼
No: those are subcomponents. RAG and context engineering solve WHAT the model sees (context retrieval and curation); the harness includes that AND what the model can do (tools), what it is forced to comply with (gates) and what persists across sessions (memory). Context engineering is a discipline inside the harness, not a synonym.
Why does the harness matter more than the model?▼
Because the same model produces materially different results in different harnesses: LangChain documented on Terminal Bench 2.0 that changing only the harness took it from top 30 to top 5 on the benchmark (Mar 2026). Models are an increasing commodity; the harness is where the operational advantage lives — and that's why the labs post-train their agents with the harness in the loop.
What is harness engineering?▼
The discipline of designing this infrastructure: defined by Fowler/Böckeler (Thoughtworks, Apr 2026) through the guides and sensors taxonomy, and by Hashimoto through the equation Agent = Model + Harness. It involves designing rules that direct the agent, gates that detect deviations, memory that preserves context, and feedback loops that convert every error into a permanent rule.
What are examples of AI harnesses?▼
Complete runtimes: Claude Code, Codex — each is a ready-made harness around a model. Development harness: capivaOS (open-source, MIT), which enforces a spec → plan → implement → verify pipeline on Claude Code with mechanical gates. Operational harness: systems like the one described in "AI Harness in Practice" — agents, knowledge and automation running a business.
How do I build a harness for my company?▼
Start with the pattern, not the tool: (1) connect tools via an open standard (MCP); (2) structure knowledge in versioned documents any agent can read; (3) write guides (operating rules) and sensors (verifiable gates); (4) add memory across sessions; (5) convert every error into a rule. For the development layer there's a free shortcut (capivaOS); the operational layer is designed on YOUR stack — open patterns, interchangeable tools.
You rent the model. You build the harness — and it stays.