---
title: "Harness engineering vs context and prompt engineering"
description: "Harness engineering designs guides, checks and feedback around an AI agent. For coding-agent users, it is a specific form of context engineering."
image: "https://bombos.ai/assets/og-en-v2.png"
---

# What is harness engineering, and how does it differ from prompt and context engineering?

Short answer

Harness engineering is designing the environment, feedback loops and controls that keep an AI agent on track, not just what it reads. The term took off in February 2026 with an OpenAI post on building a product with Codex without hand-written code. Prompt engineering words the instruction, context engineering decides everything the model sees, and harness engineering adds the checks and constraints that catch and correct what the agent does.

*Piet Baudoin · published November 17, 2026 · November 17, 2026*

## How the three terms relate

Prompt engineering shapes instructions; context engineering curates what the model sees. Böckeler describes engineering a coding agent’s user harness as a specific form of context engineering, using guides and sensors:

|  | Prompt engineering | Context engineering | Harness engineering |
| --- | --- | --- | --- |
| Question | How do I word the instruction? | What should the model see at each step? | What should the system steer, check and correct? |
| Works on | The prompt | Instructions, tools, retrieved data, history, memory | Context plus tests, linters, hooks, architecture rules, cleanup agents |
| When it acts | Before the call | Before each call | Before and after each action |
| Typical artifact | A prompt template | AGENTS.md or CLAUDE.md, retrieval, compaction | Structural tests, CI checks, review skills, feedback loops |

Context engineering asks what the agent should know. Harness engineering also asks what the agent should be prevented from doing, how its work is measured, and how errors flow back so it fixes them. Böckeler puts it plainly: engineering a harness is “a specific form of context engineering”, because guides and sensors reach the agent through its context. For the earlier step, see [What is the difference between context engineering and prompt engineering?](https://bombos.ai/en/questions/context-engineering/context-engineering-vs-prompt-engineering/)

## Where the term came from

In February 2026 OpenAI published “Harness engineering: leveraging Codex in an agent-first world”. A small team spent five months building an internal beta product of roughly a million lines of code without manually written source code, as InfoQ reported. The engineers’ work shifted from writing code to building the environment the agents work in: structured documentation in the repository as the source of truth, architecture layers enforced by linters and structural tests, and agents with access to logs and metrics so they can reproduce bugs. The post, as quoted by Böckeler, puts it this way: “Our most difficult challenges now center on designing environments, feedback loops, and control systems.”

Böckeler noticed the OpenAI post uses the word harness only once, and supplied the framework most people now use. She grouped OpenAI’s practices into three: context engineering (a continuously enhanced knowledge base in the codebase plus access to dynamic context), architectural constraints, and “garbage collection”, agents that look for drift such as documentation inconsistencies and rule violations.

## Guides and sensors

Böckeler’s April 2026 article sorts harness controls along two axes:

1.  **Guides (feedforward)** steer the agent before it acts, so the first attempt is more likely right. Examples: AGENTS.md, skills with coding conventions, code-mod tools.
2.  **Sensors (feedback)** observe after the agent acts so it can correct itself. Examples: tests, linters, structural tests in a hook, AI review instructions. Sensors are most useful when their output is written for an LLM, like a linter message that says how to fix the problem.

Each control is either **computational** (deterministic and cheap: tests, type checkers, linters) or **inferential** (an LLM as judge or AI review: slower, costlier, less deterministic, but able to judge meaning). Her point: feedback alone leaves the agent repeating mistakes, and feedforward alone never checks whether the rules worked.

## The common misunderstanding

Harness engineering is often presented as the replacement for context engineering, the next buzzword in line. Böckeler describes a coding agent’s user harness as a specific form of context engineering, because its guides and sensors reach the agent through context. It also has open limits. Böckeler calls the behaviour harness, checking that the software actually does what is needed, the least solved part, notes that AI-generated tests are not good enough yet to rely on, and points out that legacy codebases, which need a harness most, are hardest to harness.

## What this means for a team

A harness is shared by nature: rules in AGENTS.md, a linter, a structural test and a CI check apply to every agent and every developer working in the repository. The weak spot is the feedforward side outside the repository. Lessons a team learns, such as why a pattern was rejected in review, often live in someone’s chat history or personal memory and never become a guide. Turning those corrections into rules every agent sees is the team half of the harness. See [What did Manus learn about context engineering?](https://bombos.ai/en/questions/context-engineering/what-did-manus-learn-about-context-engineering/) and [What is the context engineering skill?](https://bombos.ai/en/questions/context-engineering/what-is-the-context-engineering-skill/), which ships a harness-engineering skill.

## Where Bombos fits

Bombos covers the guides that do not fit in a linter: it is a plugin that gives every AI tool your team uses, Claude Code, Codex, Cursor, Copilot, ChatGPT or your own agents, one shared memory with team knowledge and rules learned from corrections, which an agent can draw on before it acts. You can see which knowledge each answer rested on. Your tests and checks stay where they are; one person can try Bombos first for their own agents.

## Related questions

Where does the term harness engineering come from?

It spread after OpenAI's February 2026 post "Harness engineering: leveraging Codex in an agent-first world". Birgitta Böckeler of Thoughtworks then analyzed it on martinfowler.com and noted the OpenAI post itself uses the word harness only once.

What is an agent harness?

In broad use, the harness is everything in an agent except the model: the loop, tools, prompts, memory and checks. Böckeler narrows it to the layer a user adds on top of a coding agent's built-in harness, such as rules, hooks and tests for their own codebase.

Is harness engineering only for coding agents?

The term grew up around coding agents, because code has cheap deterministic checks like tests, linters and type checkers. The idea, steering before and checking after, applies to any agent, but sensors are harder to build where there is no compiler.

Does a good harness guarantee correct output?

No. Böckeler calls checking whether the application actually does what is needed the least solved part, and notes that no sensor can catch a requirement the human never specified.

## Sources

1.  [Harness engineering for coding agent users (Birgitta Böckeler, martinfowler.com, April 2, 2026)](https://martinfowler.com/articles/harness-engineering.html)
2.  [Harness Engineering, first thoughts (Birgitta Böckeler, martinfowler.com, February 17, 2026)](https://www.martinfowler.com/articles/exploring-gen-ai/harness-engineering-memo.html)
3.  [OpenAI Introduces Harness Engineering (InfoQ, February 21, 2026)](https://www.infoq.com/news/2026/02/openai-harness-engineering-codex)

## What does your AI forget?

1.  01You tell us which AI you use and where it keeps starting over.
2.  02We show what a shared memory changes there, on your own examples.
3.  03You keep the plan, with or without Bombos.

![Piet Baudoin](https://bombos.ai/assets/team/piet-klein.jpg)

**Piet Baudoin**You talk to Piet, from the Bombos teamDutch team from Utrecht and Nijmegen · data in Europe

## More questions about Context engineering

-   [What is the difference between context engineering and prompt engineering?](https://bombos.ai/en/questions/context-engineering/context-engineering-vs-prompt-engineering/)
-   [What is Context Engineering 2.0?](https://bombos.ai/en/questions/context-engineering/what-is-context-engineering-2-0/)
-   [How does LangChain approach context engineering?](https://bombos.ai/en/questions/context-engineering/how-does-langchain-approach-context-engineering/)
-   [What is agentic context engineering (ACE)?](https://bombos.ai/en/questions/context-engineering/what-is-agentic-context-engineering/)
-   [What is advanced context engineering for coding agents?](https://bombos.ai/en/questions/context-engineering/advanced-context-engineering-for-coding-agents/)
-   [What is the context engineering skill for Claude, and how do you install it?](https://bombos.ai/en/questions/context-engineering/what-is-the-context-engineering-skill/)
-   [How do you do context engineering for multi-agent systems?](https://bombos.ai/en/questions/context-engineering/context-engineering-for-multi-agent-systems/)
-   [How do you set up context engineering for a team using AI tools?](https://bombos.ai/en/questions/context-engineering/how-to-set-up-context-engineering-for-a-team/)

[All questions about Context engineering →](https://bombos.ai/en/questions/context-engineering/)


---

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://bombos.ai/#organization","name":"Bombos","url":"https://bombos.ai/","logo":"https://bombos.ai/assets/bombos-bee.png","description":"Bombos is the memory layer under every AI your team uses. One shared memory for Claude, ChatGPT, Copilot, Cursor and your own agents, that learns how you work.","sameAs":["https://www.linkedin.com/company/bombos-ai","https://www.youtube.com/@truebombos","https://www.instagram.com/truebombos/","https://bsky.app/profile/bombostrue.bsky.social","https://www.threads.com/@truebombos","https://mastodon.social/@Bombos","https://www.tiktok.com/@truebombos","https://t.me/truebombos","https://www.pinterest.com/truebombos/","https://github.com/bombos-ai","https://linktr.ee/bombos.ai","https://bombosai.substack.com","https://hashnode.com/@bombosai","https://hackernoon.com/u/bombos","https://dev.to/bombos"],"email":"info@bombos.ai","areaServed":["NL","Europe"],"knowsLanguage":["nl","en"],"contactPoint":{"@type":"ContactPoint","email":"info@bombos.ai","contactType":"sales","url":"https://bombos.ai/en/contact/","availableLanguage":["nl","en"]}},{"@type":"WebSite","@id":"https://bombos.ai/#website","name":"Bombos","url":"https://bombos.ai/","inLanguage":["nl-NL","en"],"publisher":{"@id":"https://bombos.ai/#organization"}}]}

{"@context":"https://schema.org","@type":"Article","headline":"What is harness engineering, and how does it differ from prompt and context engineering?","description":"Harness engineering designs guides, checks and feedback around an AI agent. For coding-agent users, it is a specific form of context engineering.","abstract":"Harness engineering is designing the environment, feedback loops and controls that keep an AI agent on track, not just what it reads. The term took off in February 2026 with an OpenAI post on building a product with Codex without hand-written code. Prompt engineering words the instruction, context engineering decides everything the model sees, and harness engineering adds the checks and constraints that catch and correct what the agent does.","datePublished":"2026-11-17T00:00:00.000Z","dateModified":"2026-11-17T00:00:00.000Z","author":{"@type":"Person","name":"Piet Baudoin"},"publisher":{"@type":"Organization","@id":"https://bombos.ai/#organization","name":"Bombos","logo":{"@type":"ImageObject","url":"https://bombos.ai/assets/bombos-bee.png"}},"image":"https://bombos.ai/assets/og-en-v2.png","mainEntityOfPage":"https://bombos.ai/en/questions/context-engineering/what-is-harness-engineering/","inLanguage":"en-US","isPartOf":{"@type":"CollectionPage","name":"Context engineering","url":"https://bombos.ai/en/questions/context-engineering/"},"citation":[{"@type":"CreativeWork","name":"Harness engineering for coding agent users (Birgitta Böckeler, martinfowler.com, April 2, 2026)","url":"https://martinfowler.com/articles/harness-engineering.html"},{"@type":"CreativeWork","name":"Harness Engineering, first thoughts (Birgitta Böckeler, martinfowler.com, February 17, 2026)","url":"https://www.martinfowler.com/articles/exploring-gen-ai/harness-engineering-memo.html"},{"@type":"CreativeWork","name":"OpenAI Introduces Harness Engineering (InfoQ, February 21, 2026)","url":"https://www.infoq.com/news/2026/02/openai-harness-engineering-codex"}]}

{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Bombos","item":"https://bombos.ai/en/"},{"@type":"ListItem","position":2,"name":"Questions","item":"https://bombos.ai/en/questions/"},{"@type":"ListItem","position":3,"name":"Context engineering","item":"https://bombos.ai/en/questions/context-engineering/"},{"@type":"ListItem","position":4,"name":"What is harness engineering, and how does it differ from prompt and context engineering?","item":"https://bombos.ai/en/questions/context-engineering/what-is-harness-engineering/"}]}

{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"Where does the term harness engineering come from?","acceptedAnswer":{"@type":"Answer","text":"It spread after OpenAI's February 2026 post \"Harness engineering: leveraging Codex in an agent-first world\". Birgitta Böckeler of Thoughtworks then analyzed it on martinfowler.com and noted the OpenAI post itself uses the word harness only once."}},{"@type":"Question","name":"What is an agent harness?","acceptedAnswer":{"@type":"Answer","text":"In broad use, the harness is everything in an agent except the model: the loop, tools, prompts, memory and checks. Böckeler narrows it to the layer a user adds on top of a coding agent's built-in harness, such as rules, hooks and tests for their own codebase."}},{"@type":"Question","name":"Is harness engineering only for coding agents?","acceptedAnswer":{"@type":"Answer","text":"The term grew up around coding agents, because code has cheap deterministic checks like tests, linters and type checkers. The idea, steering before and checking after, applies to any agent, but sensors are harder to build where there is no compiler."}},{"@type":"Question","name":"Does a good harness guarantee correct output?","acceptedAnswer":{"@type":"Answer","text":"No. Böckeler calls checking whether the application actually does what is needed the least solved part, and notes that no sensor can catch a requirement the human never specified."}}]}
```
