{"slug": "what-s-harness-engineering", "title": "What's Harness Engineering?", "summary": "AI models are becoming a commodity, making the software harness that wraps around them the key differentiator for real-world work, according to a technical analysis by Technically. A harness adds tools, memory, guardrails, and an agent loop that lets a model act, self-correct, and complete multi-step tasks, turning a one-shot answer into finished work. The analysis cites Boris Cherny, creator of Claude Code, who says a feedback loop for self-verification can 2–3× the quality of results.", "body_md": "# What's Harness Engineering?\n\n### If AI models are a commodity, the harness is the thing you want to own.\n\n**The TL;DR**\n\nAn AI model on its own can only **talk**.\n\nA **harness** is the software wrapped around it that lets it actually **do things**: touch your files, run your tools, and remember what happened.\n\nAn AI model by itself only\n\n**answers a prompt**. A harness is what lets it** act**: use tools, remember, and take steps until a job is done.Picture\n\n**harnessing a horse**: the horse is the raw power, the harness is what lets you put it to work without it bolting.The AI coding agents you’ve heard of (\n\n**Claude Code, Codex, Cursor**) are all** harnesses**.The\n\n**frontier model** is becoming a**commodity**(everyone rents the same few). Your harnessconfiguration is what you want to own.\n\nThe next decade of software won’t be “an app with AI added on.”\n\nIt’ll be harnesses, and the build-vs-buy call is yours to make. So read this!\n\nFor the past 6 months I’ve done a bet with myself: **do ****everything**** through agentic tools, change a line of code or text only when I absolutely have to.**\n\nAt the beginning this made me incredibly slow, but as I progressed and turned into a power user, I started to see the value in harnessing AI models myself. Currently I am interacting with my computer 90% via Claude Code and I can see how harnesses have the potential to revolutionize how we think about software and computers in general.\n\nNow let’s see why a raw model can’t do the job on its own, what a harness actually is, the everyday parts every harness is built from, and what all of it means for your company.\n\n**Why a Raw Model Isn’t Enough**\n\nOn its own, an AI model does exactly one thing: you give it one input, it hands you one output, and then it stops. No memory of the last step, no ability to take the next.\n\nThat’s *not* the magic you feel in Claude Code or Codex. Those tools take dozens of steps on their own: reading your files, running things, catching their own mistakes, pulling what they need from memory or the internet, looping until the job is actually done. A raw model can’t do any of that by itself.\n\nThat repeat-until-done cycle (*read what’s there → decide the next step → do it → check the result → go again*) has a name. It’s the **agent** **loop**, and it’s the engine that turns a one-shot answer into finished work.\n\nAnd the best ones don’t just act. They *check their own work*.[ Boris Cherny, who created Claude Code](https://x.com/bcherny/status/2007179832300581177), says the most important thing for getting great results is giving the AI a way to verify its own work: a feedback loop that, in his words, can *2–3× the quality of the final result*. That self-correction is a harness feature, not a model one.\n\nThis takes us from **“answers a question”** to **“does the job”:**\n\nIf the model is the easy part and what’s built around it is the hard part, the obvious question is: what *is* a harness?\n\n**So What’s a Harness?**\n\nPicture a wild horse. It’s raw power it’s nearly useless until you **harness** it: reins to steer it, blinders to keep it focused on the road, a saddle so it can carry weight.\n\nA model is the horse. The **harness** is the software wrapped around it. It adds the hands (tools), the memory, the reins (guardrails), and the loop that lets it take many steps. That combination (not the horse alone) is what does real work.\n\n**An** **agent = a model + a harness**. The **agent** is the working thing you actually use: a model with a harness wrapped around it. The model is the raw intelligence.\n\nThe harness is what puts it to work. LangChain (a popular toolkit for building these systems) frames it bluntly: the harness is everything that isn’t the model itself, and that “everything else” is where almost all of the engineering, and the magic, actually lives.\n\nThere’s a name for the work of building one, too. Mitchell Hashimoto (a veteran engineer, co-founder of [HashiCorp](https://technically.dev/posts/what-does-hashicorp-do)) calls it harness engineering: “anytime you find an agent makes a mistake, you take the time to engineer a solution such that the agent never makes that mistake again.”\n\nSo a harness is what that work leaves behind. Lessons about how the AI fails gets built into the wrapper so it stops failing that way (and instead finds new ways to fail :).\n\n**What’s Inside a Harness**\n\nAt the center of the harness, we have the loop, the engine that keeps calling the model until the job is done. Plus a kit of 7 parts that allows us to steer the model’s behavior:\n\n**Tools.** Without them, the AI model can only provide “talk”. In other words, it can only output text, images or audio. With them, it can interact with the outer world, such as reading files from your computer, executing code, searching the web or editing a document.\n\n**Memory**. The AI forgets everything between sessions, so the harness gives it files to write to and read back: its long-term memory and to-do list.\n\nThe files are what let it remember anything at all and pick up where the last session left off. The simplest memory implementations are based on files, but depending on the complexity of your use case, you may need a more sophisticated solution based on [vector](https://technically.dev/universe/vector-database) or graph [databases](https://technically.dev/universe/database).\n\n**Context**. The [context window](https://technically.dev/universe/context-window) is what the [LLM](https://technically.dev/universe/llm) sees at a time, in each iteration of its loop. The problem is that it’s limited to 128K, 256K, up to 1M tokens. As the [context window](https://technically.dev/universe/context-window) grows, the model starts to get confused and produce incorrect results, a problem known as “context rot.” The role of the harness is to keep the [context window](https://technically.dev/universe/context-window) sanitized by adding/removing components at each iteration. Ideally, you want to keep the context with exactly the right information that gets the job done.\n\n**A sandbox**. It’s a safe room where the AI can make a mess (run things, break things) without the risk of touching anything real in your business, such as deleting files, accessing sensitive data or even running malicious code on the computers from your private network.\n\nThe goal is to give the agent exactly as much access as it needs to get the job done. Otherwise, during its agentic loop, it can always decide to go rogue just to achieve its goals. It’s very common to start looking around for [API](https://technically.dev/universe/api) keys to access data from your database or other services.\n\n**Guardrails.** A big part of guardrails is the permission layer, which sets the rules for what the AI may do on its own: what runs freely, what needs your *okay* first, and what’s automatically denied. These need to be carefully balanced to avoid asking the human to accept each command (which adds a ton of friction, forcing the user to babysit the agent) while still asking for user input at essential points, such as deleting a file or changing one that’s not versioned.\n\n**Orchestration.** For complex jobs, 1 AI acts as a project lead, delegates to a team of specialist AIs, each handling a piece and then pulls the results together. A caution from experience: don’t reach for the multi-agent systems too early. I once split a job across 5 or 6 specialist AIs, and a single, well-set-up one beat the whole team.\n\n**Interfaces.** The same harness is reachable from your phone, laptop, browser, Slack, or WhatsApp.\n\n**The AI Tools You Already Know Are All Harnesses**\n\nEvery popular AI tool you are using is a harness. Claude Code, Cursor, Codex: the same kind of model inside, a different harness wrapped around it.\n\nHere’s what usually happens: when a product feels better than a plain chatbot (it remembers your project, fixes its own mistakes, actually finishes the task), that *feeling* is the **harness** doing its job. Two products can call the *exact same* model and feel worlds apart, purely because their harnesses are worlds apart.\n\nAnd this isn’t just a vibe. In one public test done by LangChain, they changed only the harness around a coding agent (same model throughout) and it climbed from roughly 30th place into the top 5 on the [Terminal](https://technically.dev/universe/terminal) [Benchmark](https://technically.dev/universe/benchmark) used to evaluate agents.\n\nBefore we get to what this means for your company, let’s clear up 3 words that get thrown around as if they’re the same thing.\n\n**🚨 Confusion Alert**\n\n1. ** Prompt engineering** = writing good instructions. Telling the AI clearly what you want.\n\n**2. Context engineering** = managing what the AI sees (the context window). You want to keep it *focused* (only what’s relevant), because piling on clutter actively confuses the model (the context rot issue).\n\n3. **Harness engineering** = building the whole system around the model: the tools, the memory, the guardrails, the loop.\n\nSo harness engineering is the last step: the whole AI application around the model. Which raises the real question: should your team buy or build its own harness?\n\n**What This Means for Teams**\n\nClaude Code is a harness someone else built for general coding. It’s superb at that. But it will never know your finance rules, your data, your guardrails or your customers. The moment your AI needs to do *your* job, a generic harness hits a wall.\n\nStill, a harness you build becomes its own product, with its own bugs, issues and maintenance overhead. Owning the layer can give you an advantage, but it’s an ongoing investment, not a one-and-done build. The real question isn’t whether you can (Claude Code can build you a harness), it’s whether you should.\n\nThat’s why most people I know, including myself, are customizing harnesses (via skills and MCP servers) intended for coding, such as Claude Code, for their own use cases, or coupling them with Notion or Obsidian to transform them into their personal assistants.\n\nBut using coding harnesses for everything has one major drawback: they are optimized for coding, and the people building them will keep optimizing them for coding. This might lead them to behave more poorly with each version update.\n\nAnother huge drawback is that it’s almost impossible to build your own product on top of them. They are amazing as internal tools, but once you want to stitch a UI on top of them or distribute them to your users, you hit another wall.\n\nThat’s why we started seeing harnesses specialized for different domains, such as:\n\n**Creative:** Descript (video), Canva Magic Studio & Adobe Firefly (visuals), Figma AI (design)**Legal:** Harvey (drafting contracts), CoCounsel (reviewing contracts)**Medical & Healthcare:** Abridge & Nabla (generating clinical notes from doctor-patient conversations)**Financial:** I personally worked at ZTRON as a harness for financial advisors**Productivity:** Notion AI\n\nBut there is a middle ground between building and buying. As harnesses are being standardized, major frameworks such as [Pydantic AI’s Harness](https://github.com/pydantic/pydantic-ai-harness), [Pi](https://pi.dev/) or [LangChain’s Deep Agents](https://www.langchain.com/deep-agents) have recently entered the game.\n\nThey’re good open source starting points that provide the agentic loop, the 7 key parts and the option to easily add your own UI/UX and [distribution](https://technically.dev/universe/distribution).\n\nYou don’t need to build a harness tomorrow, but it’s important to know that you *can* build a custom harness when you’re ready, and it’s a piece of your stack that’s worth owning.\n\n**Harness in Conversation**\n\n“We’re still building out the harness around the model.”\n\nWe have the AI. Now we’re building the software that lets it actually do the job.\n\n“That’s a model problem, not a harness problem.”\n\nThe AI itself is getting it wrong, versus we just haven’t given it the right tools or memory yet. (Usually it’s the second one.)\n\n“We don’t want to be locked into someone else’s harness.”\n\nWe want to own the layer that makes our AI *ours*, instead of renting it from a vendor.\n\n“We should switch to an open-source harness.”\n\nMove off a closed tool like Claude Code to an open-source alternative you can see inside and bend to your needs, such as OpenCode or Pi.\n\n**Further Reading**\n\nIf this isn’t enough harness engineering talk for you, I’m publishing a series on harness eng soon on my Substack,\n\n[DecodingAI](http://decodingai.com).Letting an AI check its own work is the single biggest lever for getting good results out of it, straight from\n\n[the engineer who built Claude Code](https://x.com/bcherny/status/2007179832300581177).If you want the full parts-list of a harness, plus the test where swapping only the wrapper took a coding agent from 30th place into the top 5, it’s all in\n\n[the anatomy of an agent harness](https://www.langchain.com/blog/the-anatomy-of-an-agent-harness).More on the “notebook” that lets an agent remember across sessions, in Anthropic’s guide to\n\n[effective harnesses for long-running agents](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents).More on keeping the AI’s context window clean, and avoiding “context rot,” in Anthropic’s guide to\n\n[effective context engineering](https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents).", "url": "https://wpnews.pro/news/what-s-harness-engineering", "canonical_source": "https://read.technically.dev/p/whats-harness-engineering", "published_at": "2026-07-21 14:15:10+00:00", "updated_at": "2026-07-21 14:44:22.095760+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-agents", "ai-tools", "developer-tools"], "entities": ["Claude Code", "Codex", "Cursor", "LangChain", "HashiCorp", "Boris Cherny", "Mitchell Hashimoto"], "alternates": {"html": "https://wpnews.pro/news/what-s-harness-engineering", "markdown": "https://wpnews.pro/news/what-s-harness-engineering.md", "text": "https://wpnews.pro/news/what-s-harness-engineering.txt", "jsonld": "https://wpnews.pro/news/what-s-harness-engineering.jsonld"}}