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?
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:
- 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.
- 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? and 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.
