Insights

Harness engineering vs. prompt engineering vs. context engineering: what is the difference

Published

By Ithaca

Prompt engineering is writing and organizing the instruction given to an AI model. Context engineering is choosing everything the model has in front of it at each step: the instruction, the documents, the available tools and the history of the work. Harness engineering is the work of building the environment an AI agent operates in: the context it receives, the tools it may use, the rules that apply and the point where its autonomy stops. In practice, the prompt is part of the context, and the context is one of the parts of the harness.

The three terms gained ground in that order: prompt engineering when the typical use of a model was one request and one answer; context engineering in 2025, with agents working over several steps; and harness engineering from February 2026, with coding agents working for hours inside repositories.

Prompt engineering: how to ask

Anthropic defines prompt engineering as the methods for writing and organizing the instructions given to a language model to get the best result. In practice, that means making the role and the goal clear, giving examples of what is expected, separating the instruction from the supporting material and saying what format the answer should take.

It works very well when the task fits in one request: classifying a ticket, summarizing a contract, suggesting a test. The limit shows up when the model starts working on its own over many steps, and the initial instruction becomes a small part of what it has in front of it.

Context engineering: what the model sees

In June 2025, Tobi Lütke, CEO and co-founder of Shopify, wrote on X that he preferred the term context engineering to prompt engineering, because it better describes the core skill: the art of providing all the context for the task to be plausibly solvable by the model. Andrej Karpathy backed the switch a few days later and described context engineering as the delicate art and science of filling the context window (the limited span of text the model can consider at once) with the right information for the next step.

In September 2025, Anthropic described context engineering as the natural progression of prompt engineering: the strategies for choosing and maintaining the best information in front of the model, including everything that comes in beyond the prompt. It also explained why this matters: the more text is put in front of the model, the lower its ability to recall accurately what is there. The work, then, is finding the smallest set of relevant information that raises the chance of the desired result.

In a coding agent, context engineering is deciding which files, documents, tool results and pieces of history go into each step, and what stays out.

Harness engineering: the agent's environment

In February 2026, OpenAI published an account of five months building an internal product without a single line of hand-written code, under the title Harness engineering. The post says the team's main work became designing environments, specifying intent and building feedback loops so that the agents could do reliable work. Two details help explain the term. A single large instructions file did not work and was replaced by a file of about 100 lines that serves as a map to the documentation. And several rules moved out of the text into custom linters (programs that check rules in the code automatically), whose error message already tells the agent how to fix the problem.

On Martin Fowler's site, Birgitta Böckeler, Distinguished Engineer at Thoughtworks, records the formula that has settled in as a shorthand for the term: agent = model + harness, meaning the harness is everything in an agent other than the model. She then narrows the idea for someone using a coding agent: that user's harness combines guides, which act before the agent writes (conventions in a file such as AGENTS.md, for example), and sensors, which act afterwards (tests, type checking, linters, an AI-run review).

What sets the harness apart from the two earlier terms is that it lasts, because it applies to every session and is versioned in the repository, and much of it is enforced by code. A rule checked by a linter does not depend on the agent remembering it. The term has no relation to the company Harness.io. An example of each part, from the instructions file to the tests, is in harness examples by part.

The three side by side

Prompt engineeringContext engineeringHarness engineering
Core questionHow to ask?What does the model need in front of it at this step?What environment does the agent work in, and how far can it go on its own?
What gets tunedThe instruction text and the examplesThe instruction plus documents, files, tool results and historyThe context plus permitted tools, rules checked by code, tests and autonomy limits
How long it lastsOne requestOne session, revised at each stepEvery session, versioned in the repository
How it is appliedThrough wordsThrough the choice of what goes inLargely through code: linters, tests, permissions
Example in a coding agent"Write a unit test for this function, following the project's pattern"Choosing which files and documents the agent reads before touching a moduleA short instructions file as a map, a linter that blocks a forbidden dependency, human approval before a database migration
How to tell it workedThe answer came out as expectedThe agent got it right without getting lost in irrelevant materialThe agent makes fewer mistakes, the mistake that happens is caught by a check, and what slips through reaches a person
Typical failureAn ambiguous instructionToo much context, or too littleA rule that exists only as text, or a limit nobody defined

Where the boundaries blur

Not everyone draws the line in the same place. Böckeler describes the harness of someone using a coding agent as a specific form of context engineering: context engineering provides the means to put guides and sensors in front of the agent, and the harness is what the team builds with them for its own code. Anthropic, for its part, includes tools and history in the context. In our reading, for a company, two questions matter more than the name: what is guaranteed by code, beyond being asked for in writing, and what still applies in the next session.

When each one matters

  • Prompt engineering is enough when the task fits in one request and whoever asked checks the answer.
  • Context engineering comes in when the model works over several steps, retrieves documents or calls tools, and the problem becomes what it sees at each step.
  • Harness engineering comes in when coding agents work in the company's repository, over many sessions, with several people and close to production. A good signal is the same mistake showing up twice. Böckeler recommends that, whenever a problem recurs, the guides and sensors be improved to make it less likely.

None of the three removes the need for a person to read what goes to production, or for a record of each session. The harness prepares and limits the execution; observability records what happened, with request, steps, model, cost, result and authorship. One layer does not replace the other.

Where this fits at Ithaca

The agentic development platform operates at level 4 of the autonomy scale proposed by Dan Shapiro, with a rule of its own: coding agents execute, people on the team read what goes to production, and every session is recorded. Harness engineering is a discipline inside that platform: approved context comes in through the Knowledge base, rules and limits apply during execution, and human reading sits before production. The full definition, with the parts of the harness and who decides each one, is in Harness engineering: what an AI harness is, with examples; the scale, in Levels of coding agent autonomy.

Frequently asked questions

What is the difference between prompt engineering and context engineering?

Prompt engineering is writing and organizing the instruction given to the model. Context engineering is choosing everything the model has in front of it at each step, including the instruction, documents, tools and history. Anthropic describes the second as the natural progression of the first, which gained weight once models started working over several steps.

Is harness engineering the same as context engineering?

Not exactly. Context is one of the parts of the harness. The harness adds what is enforced by code, such as tests, linters and permissions, and the point where the agent's autonomy stops, and it applies to every session. Birgitta Böckeler describes the harness of someone using a coding agent as a specific form of context engineering.

Is prompt engineering still worth learning?

Yes. Every interaction with a model starts with an instruction, and a clear instruction still makes a difference. What changed is that, for agents working over many steps, the instruction is only one part of what decides the result.

Does a good harness remove the need for human review?

On the Ithaca platform, no. The harness catches what can be checked automatically and sends the rest to a person; people on the team read what goes to production, and every session is recorded. Böckeler writes that a good harness should not necessarily aim to remove human input entirely, but to direct it to where it matters most.

Request a free assessment

If your team wants to work this way, the first step is a free assessment of your system. If the project does not exist yet, see new projects with coding agents.

Request a free assessment

Sources

Start with what weighs most on your backlog.

Tell us what is stuck. After the NDA and access to the code, the agents read the system with your team and show where to start.

Phone is optional. How we use your data, including to measure our ads: Privacy policy.