Harness engineering is the discipline of designing everything around the model (rules, tools, memory, and verification) so an agent works reliably in production. Mitchell Hashimoto, creator of Terraform, named the practice in February 2026. The formula that sums it up, Agent = Model + Harness, comes from LangChain.
The term that showed up in 2026
Harness engineering is the engineering work on the harness: the layer of code, configuration, and rules that sits around the model. Mitchell Hashimoto named the practice in "My AI Adoption Journey" (February 5, 2026), writing that he didn't see an industry-accepted term yet and had grown to calling it harness engineering. His definition is operational: every time the agent gets something wrong, you engineer a permanent fix so that error never repeats. It isn't tweaking a prompt in the moment. It's turning each failure into a rule.
Not a rebrand: the proof
The obvious question is whether harness engineering is just a new name for prompt engineering. The answer came as a number. LangChain ran the same model (gpt-5.2-codex) on Terminal Bench 2.0 and, by changing only the harness, went from top 30 to top 5: from 52.8 to 66.5, a gain of 13.7 points (February 17, 2026). Same model, different harness, materially different result. That isn't renaming prompts. It's one benchmark, but the signal is clear: the lever isn't only in the model.
What it's made of: guides and sensors
| Component | What it does | Example |
|---|---|---|
| Guides (feedforward) | Anticipate and direct the agent before it acts | Operating rules, CLAUDE.md, allowed tools |
| Sensors (feedback) | Observe after the action and help the agent self-correct | Tests, linters, and typecheck as agent-readable signals |
| Memory | Turns each error into a permanent fix that survives the session | Versioned rules, error-to-rule loop |
| Quality gates | Block output that fails the criterion | Minimum coverage, zero new warnings |
| Observability | Makes the agent's behavior auditable | Per-phase artifacts: spec, plan, report |
Harness engineering isn't a framework, a prompt, or RAG
Worth separating. An agent framework (LangChain, LlamaIndex) is a library for building the loop; harness engineering is the discipline of designing the whole environment around it. Prompt and context engineering handle what the model sees; harness engineering includes that plus what the model can do, what it's forced to comply with, and what persists across sessions. RAG is a subcomponent, not a synonym. And there's an honest counter-argument: Nicolas Bustamante (Model-Harness-Fit, May 2026) shows model and harness are becoming inseparable, "you cannot just swap a model." He's right, and that's exactly why the harness is where the engineering happens: swapping the model forces you to re-engineer the harness around it.
The coding harness is the visible part
Almost everyone talking about harness engineering today means the coding harness: Claude Code, Cursor, agents that read a repository, edit files, and run tests. That's the visible part. The bigger part, and the one where almost no one is engineering with discipline, is the operational harness: the same pattern applied to running an entire business, AI beyond code, knowledge, memory, and governance. That's where Capiva works. We solve the coding layer with capivaOS, the open-source harness on top of Claude Code. The operational layer we build in production, and the account is in AI Harness in Practice.
Frequently asked questions
What is harness engineering?▼
It's the discipline of designing everything around the model (rules, tools, memory, verification, and orchestration) so an agent works reliably in production. It was named by Mitchell Hashimoto in February 2026. The core idea: every agent error becomes a permanent fix in the harness, not a one-off patch.
Who coined the term harness engineering?▼
Mitchell Hashimoto, co-founder of HashiCorp and creator of Terraform, in "My AI Adoption Journey" (February 5, 2026). He named the discipline. The formula Agent = Model + Harness is separate: it came from LangChain (Vivek Trivedy, March 2026). Don't conflate the two attributions.
What's the difference between harness engineering and an agent framework?▼
A framework is a library for building the agent (you write the loop). Harness engineering is the discipline of designing the execution environment around it: rules, gates, memory, and tools. LangChain is a framework; designing the harness that runs on top of Claude Code is harness engineering.
What are guides and sensors?▼
It's Birgitta Böckeler's taxonomy (Thoughtworks), published on Martin Fowler's site on April 2, 2026. Guides are feedforward: they anticipate and direct the agent before it acts (rules, CLAUDE.md, allowed tools). Sensors are feedback: they observe after the action and help it self-correct (tests, linters, typecheck read by the agent).
Is harness engineering the same as context engineering?▼
No. Context engineering handles what the model sees (context retrieval and curation). Harness engineering includes that plus what the model can do, what it's forced to comply with, and what persists across sessions. Context engineering is one part of the harness, not a synonym.
How do I start with harness engineering?▼
Start with the correction loop: every time the agent errs, write a permanent rule instead of fixing it by hand. Then add guides (rules and allowed tools) and sensors (tests and linters the agent reads). For the coding layer, capivaOS gives you a ready harness on top of Claude Code; the operational layer is designed on your own stack.
You swap the model. You engineer the harness, and it's the harness that decides whether the agent works.