All video posts

AI engineering · AI agents

Harness Engineering: The Most Important AI Engineering Skill

First it was prompt engineering, then context engineering, then RAG, tools, MCP, sub-agents and evals. Now everyone is talking about the agent harness. Here is the explanation I wish someone had given me when I first heard the term, and why I think it matters more than any of the others.

Deric YeeDeric Yee 16 November 2026 9 min read 12 min video

Prefer to read? The full article is below. Watch on YouTube.

The short version

  1. 1The model is the employee's brain, the prompt is the instruction, the context is what you hand them, and the harness is the system they work inside.
  2. 2Today's models are smart enough. When long-running agents fail, the problem is usually the system around the model.
  3. 3Most of a good harness is ordinary software: a database for progress, loops, permissions, approval buttons and tests.
  4. 4The harness helps the agent do the work. Evals tell you whether the work was done correctly.
  5. 5Learn the principles, not a specific harness framework: break goals down, design tools, store state outside the model, and know when to escalate to a human.

Think of the smartest employee in the world

When you ask people what a harness is, you usually hear something like "it is the environment around the agent". Technically correct, and not much help. So here is the simplest way I can put it.

Imagine you have the smartest employee in the world. The AI model is that employee's brain. The prompt is you telling them what to do. The context is everything you give them so they can do the job properly: documents, customer information, past conversations, your codebase. And the harness is the system they work inside. Their tools, SOPs, checklists, permissions and how their work gets reviewed.

It also answers the practical questions. What happens when they make a mistake? Where do they save progress? When do they need your approval, and when do they not? How do they know the job is actually finished? Once you see it that way, harness engineering becomes much easier to understand, and it becomes obvious why it matters so much today.

From prompts to context

A few years ago, using AI meant going to ChatGPT, giving it one instruction, getting a response and going back and forth. So everyone became obsessed with prompts. People sold huge prompt libraries: "act as the world's best software engineer", "think step by step", "critique your own answer". Some of it genuinely helped, but there is an obvious limit.

If I walk into Sigmaschool tomorrow, grab one of my team and say "build me a complete student system", that instruction alone is not enough, however brilliant they are. They need to understand how Sigmaschool works, see the existing codebase, know how students move through the programme, access the database and the design system, and probably talk to people.

So AI systems moved beyond prompting. We gave models tools to search files, query databases, call APIs, retrieve documents and take actions. That is where context engineering came in: instead of dumping everything into the model, you decide what it should see. Fixing a login page? It gets the authentication code. Needs customer data? It queries the CRM. Needs another system? It calls an MCP server. I explain this layer in more detail in my guide to context engineering.

Where long-running agents fall apart

With tools and context, I could finally give agents bigger jobs. Not "fix this bug" but "build this feature", then "build this whole app, here is the backlog, work on it for a few hours". That exposed the next set of problems.

The agent starts well. It builds authentication, creates the database and gets half the dashboard working. A few hours later you come back to buttons that do nothing, a feature that was never built, another showing the wrong data, failing tests, and an agent confidently telling you the project is finished. If you have done any AI coding at all, you have seen this.

Here is the key insight: the model is no longer the problem. The models are very intelligent now. The system around the model is what needs improving.

“The model is no longer the problem here. The system around the model is where we need to optimise and improve.”

Deric Yee, in the video

Engineers working in shifts

Anthropic ran into exactly this while experimenting with long-running coding agents. Their fix was surprisingly simple. Instead of expecting one session to remember an entire project forever, an initialiser broke the project down and created structured files to track the work. Later sessions each made incremental progress and left clean notes for the next one.

Think of engineers working in shifts. One comes in, completes a piece, updates the task list, documents what happened and leaves. The next one does not need the previous person's life story, just the goal, what was done, what to do next and any known issues. That structure is part of the harness.

So instead of "build me a SaaS", the system tells the agent: here is the spec, break it into features, pick one unfinished feature, load the files you need, build it, run the tests, open the app and verify it on your own virtual machine. If it fails, fix it. Once it passes, update the progress file, commit and move on. The system now carries part of the intelligence. It gives the model a way to work, not just something to think about.

Humans steer, agents execute

In 2026 OpenAI published an experiment where a small team started from an empty repository with one rule: humans write zero lines of code by hand. Everything was generated by Codex, which is essentially a harness. Five months later they had roughly a million lines of code and around 1,500 merged pull requests, driven at the start by just three engineers, in what OpenAI estimated was about a tenth of the time it would have taken manually.

The wrong lesson is "wow, Codex can generate a million lines". Lines of code are cheap now. The interesting part is what the engineers did instead: they designed the environment. Architectural rules, tests, documentation, feedback loops, guardrails and tools, plus ways for the agent to check whether its own work was correct. OpenAI described it as humans steering while agents focus on execution. Humans bring taste and direction; AI does the execution. That is harness engineering.

A concrete example: an AI recruitment agent

One project we are building into the Sigmaschool curriculum is an AI recruitment agent. The prompt might be "find me the five best candidates for this software engineering role". The context is the job description, the CV database and each candidate's information. The tools let it search and update the database, read profiles, compare candidates and write notes into Airtable.

That agent can take actions, but I still would not trust it in a real hiring workflow. It might search once, get mediocre results and give up. It might recommend someone for Python when Python appears nowhere in their CV. It might decide to email all five candidates itself. The brain works; the harness is bad. So you add one:

01

Turn the brief into criteria

The agent first converts the job description into clear hiring criteria before it searches.

02

Require evidence

For every candidate it recommends, it must collect evidence from the CV showing why they match.

03

Add an evaluator

A second check reviews the shortlist. If it is weak, it is rejected and the agent tries again. If it passes, it goes to the recruiter.

04

Gate actions behind approval

The AI cannot contact anyone until the recruiter clicks approve.

Most of the harness is normal software

Notice that half of this is not some magical AI technique. It is a database storing progress, a loop over that database, an approval button, permissions, tests and a few if/else statements. That is the point. You are wrapping a probabilistic model in a deterministic system, and that makes things far more predictable. It is also why software fundamentals still matter so much for anyone building agents. If you want to try one yourself, start with how to build an AI agent.

Once agents can work for hours or days, you naturally ask why stop at one. One agent plans, another builds, another checks and sends work back if it finds a problem. Anthropic pushed this far in a 2026 experiment: 16 agents across almost 2,000 coding sessions built a C compiler from scratch, for just under $20,000 in API usage and roughly 100,000 lines of code, and it could build Linux 6.9 for x86. You do not need 16 agents writing a compiler, and neither do I. The architecture is the lesson. The question stops being "how do I write the perfect prompt?" and starts looking like running a business: who does what, who checks the work, where progress is stored, what happens on failure and when to escalate to a human.

Harness versus evals

People always mention evals alongside harnesses, and I used to find them confusing too. They are different. The harness helps the agent do the work. Evals tell you whether the work was done correctly.

If my recruitment agent says "done, here are the five best candidates", I am not going to trust it because it sounds confident. I want to know the candidates actually match, that it did not invent anything about them, that it followed my hiring rules and that it did not try anything it was not allowed to do. If someone tells me they built an agent, my first response is: show me your evals.

Evals are also how you know whether a change helped. Change the prompt tomorrow, or let it search three times instead of once next week: without evals you are staring at output saying "hmm, looks good". That is not engineering, that is vibe coding. Anthropic makes the same point: when you evaluate an agent, you are evaluating the model and the harness together. I cover this properly in AI evals explained.

Learn the principle, not the framework

This is why I do not think developers should spend the next three to six months becoming experts in one specific harness framework. That is learning the tool instead of the principle. Learn how to break a large goal into smaller pieces, design good tools for agents, store state outside the model, write tests and evals, and decide when an agent should retry, ask another agent for help or stop and ask a human. Those ideas survive even if today's frameworks disappear.

For most of software history, the engineer's job was telling the computer exactly what to do. Increasingly you will describe the outcome you want, and your job becomes designing the environment that makes the system produce it reliably. Prompt engineering is how you talk to the AI. Context engineering is what it gets to see. Harness engineering is how it actually gets the work done. As models get smarter, access to the smartest one is table stakes; the advantage is what you build around it.

If you want to build that skill on solid foundations, our AI-Native Software Development Programme teaches software fundamentals first and then agents, tools, evals and harnesses through real projects. You can try the way we teach first with the free trial.

Questions people ask

  • What is an AI agent harness?

    An agent harness is the system an AI model works inside. It includes the tools the agent can use, where it stores progress, its permissions, checklists, retry rules, review steps and human approvals. If the model is the brain and the prompt is the instruction, the harness is the workplace and process that turns a smart model into something that reliably finishes real work.

  • What is the difference between prompt, context and harness engineering?

    Prompt engineering is how you phrase instructions to the model. Context engineering is deciding what information the model gets to see, such as the relevant code, documents or customer records. Harness engineering is designing how the work actually gets done: breaking tasks down, giving tools, tracking state outside the model, testing output and deciding when a human must approve or step in.

  • How are evals different from a harness?

    The harness helps the agent do the work, while evals check whether the work was done correctly. Evals are tests: examples of good behaviour you run the system against to see whether it picked the right tools, avoided inventing facts and followed the rules. They let you measure whether a prompt, tool or harness change made the system better or worse instead of guessing.

  • Should I learn a specific agent framework?

    I would not spend months mastering one framework, because tools change quickly. Focus on the principles that carry across all of them: splitting big goals into small tasks, designing clear tools, storing state outside the model, writing tests and evals, and setting rules for retries, hand-offs and human escalation. With those, picking up any framework takes days rather than months.

Your next step

Our 12-week AI-Native Software Development Programme is a live, mentor-reviewed cohort where you build and ship real products with AI, and learn to explain every line. Start with the free trial to see how we teach, then decide.

Watch next

All videos

Learn the fundamentals that pay off in any direction.
Coding plus AI, taught properly.

Whatever you end up doing, the people who understand how software and AI actually work get to direct them. Try the first lessons free, no card needed, or see the full 12-week AI-Native Software Development Programme.