Overview
Cole Medin breaks down harness engineering — the 2026 evolution of context engineering — explaining that it's not just about feeding context to an LLM, but about building the entire wrapper around the model: rules, skills, hooks, sub-agents, and orchestration layers. The video covers two key dimensions: the AI layer within a single coding agent session, and the more powerful practice of orchestrating multiple agent sessions into automated workflows (like the RALF loop). Most importantly, Cole argues that harness engineering is a mindset: every model mistake is an opportunity to improve your harness, not a reason to wait for the next model version.
1 What Is Harness Engineering?
Cole opens by noting that "harness engineering" is rapidly becoming the next big buzzword in the AI space for 2026, much like "context engineering" was for 2025. But just like its predecessor, people are already throwing the term around without truly understanding what it means.
The core question he poses: Is this skill — or even mindset — worth learning? His answer is an emphatic yes. The video promises a breakdown in under 15 minutes with concrete examples and demos to make it tangible.
2 Defining the Agent Wrapper
At its core, harness engineering is about building the wrapper around the model. Any AI agent is the combination of two things:
- The underlying LLM — GPT, Claude, etc. — providing the reasoning capability
- The wrapper (harness) — everything around the model that gives it context, defines processes, and provides capabilities
While the video focuses primarily on AI coding assistants, Cole emphasizes that the concept of harness engineering can be extrapolated to any agent you build for anything.
There are two distinct parts of harness engineering:
- Within a single coding agent session — the AI layer, rules, skills, and context you inject
- Across multiple sessions — orchestrating many coding agent sessions into a larger workflow to handle bigger tasks (the real evolution)
3 The Three Layers of AI
Cole presents a layered diagram that makes the architecture crystal clear. From inside out:
- Layer 1 — The LLM: The raw reasoning engine (GPT, Claude, etc.). This is the foundation but by itself it can't do much — no file system access, no command execution, nothing practical.
- Layer 2 — The Coding Agent Tool: Claude Code, Codex, Pi, and others. These are harnesses that companies have already engineered around the model. You don't build this layer — you pick it when you choose your tool. "Some people think Claude Code is the best harness for coding. Some people think Codex is."
- Layer 3 — Your AI Layer: This is the ultimate wrapper and the part you actually get to build. It defines all your context and processes for coding agents.
The Six Components of Your AI Layer
- Global rules — constraints and conventions
- Skills — reusable workflows (plan, implement, validate)
- MCP servers — external capabilities and integrations
- Codebase searching — LSP, knowledge graphs
- Hooks — pre/post tool-use automation
- Sub-agents — delegated specialized tasks
4 Harness vs. Context Engineering
Cole addresses the elephant in the room: isn't this just context engineering? The answer is "yes, to an extent" — and that's exactly why it's becoming a buzzword. Most people don't understand the true evolution.
He outlines two key distinctions, referencing a Martin Fowler article:
- Most of the harness IS context engineering — context injection, actions through tools and MCPs, persistence, observability. These haven't changed.
- The new element is control — RALF loops, orchestrating different coding agent sessions, and sub-agents. This is a true evolution beyond what "context engineering" covered.
The article breaks the harness down into: context injection, actions (tools, MCPs), persistence, observability, and control. The first four are essentially context engineering. The fifth — control — is what makes harness engineering genuinely new.
5 The Harness Engineering Mindset
Beyond being a skill, harness engineering is fundamentally a mindset reframe. Cole quotes from an article by Addy Osmani:
"There's a pattern I watch engineers fall into. The agent does something dumb, the engineer blames the model, and the blame gets filed under 'wait for the next version.'"
This is the anti-pattern: Claude messes up → "let's wait for Opus 5." GPT fails → "let's wait for GPT-6." Cole admits he's tempted to think this way too. But the harness engineering mindset rejects that default.
System Evolution
- The agent didn't know about a convention? → Add it to agents.md
- The agent ran a destructive command? → Add a hook that blocks it
- Any mistake? → An opportunity to improve your harness
This creates a virtuous cycle: you become the human steering the system, feeding forward with principles and context for generation, and sensors (hooks, review agents, skills) for feedback and self-correction — evolving your AI layer over time.
6 Components of the AI Layer — Companion Repo
Cole walks through his companion repo (harness-engineering-demo) which provides a concrete, reusable AI layer template. Here are the key components:
Rules (Foundation)
- Global rules define the constraints, conventions, and patterns your coding agent must follow
- Also includes on-demand context as markdown/Confluence documents
Skills (Workflows)
- Separate skills for plan, implement, and validate
- Each skill runs in a separate coding agent session for token efficiency and focus
- Each skill outputs an artifact (e.g., markdown plan document) that serves as a handoff to the next session
Hooks (Underused Power)
- Pre-tool-use security hook — triggers before any tool call (file write, command execution) to block destructive operations like reading sensitive files or running
rm -rf - Stop validation hook — when the agent says "I'm done," deterministically runs unit tests, linting, and type checking. If anything fails, it forces the agent to iterate until everything passes
- Post-edit lint hook — runs a quick lint after every single file edit to keep the codebase clean, which also makes future agent sessions more reliable
The repo also includes instructions for running a basic PIT (Plan → Implement → Test) workflow manually: plan with the plan skill, iterate, produce a markdown document, hand it off to the implement skill in a separate session.
7 Orchestrating Coding Agent Sessions
This is what Cole calls the "peak evolution of harness engineering" — the real power move. The core idea:
- Don't hand a massive task or PRD to a single coding agent session — it won't be token efficient and the LLM will be completely overwhelmed
- No matter how good your AI layer is, if you send too much into the LLM at once, "it is going to fall flat on its face"
- Instead, give each coding agent a very focused task
Example Harness Workflow
- Explore — one agent explores the implementation from a user requirement
- Plan — one agent writes the plan
- Implement — one agent handles the implementation
- Review (parallel) — multiple review agents run simultaneously, each with a different focus:
- Security review agent
- Correctness review agent
- Simplicity review agent
- Decision gate — if all reviews pass → create the PR. Otherwise → iterate back to implementation.
You can do all of this manually (opening separate Claude Code sessions, copying plan documents between them), but the real power of harness engineering is automating the entire pipeline.
8 Automating with the RALF Loop
The RALF loop (created by Jeffrey Huntley) is one of the first and most influential examples of an agent harness that automates multi-session orchestration. Cole walks through how it works:
How It Works
- A simple script (Python or Bash) takes a larger scope of work (e.g., a massive PRD) as input
- It splits that scope into individual tasks
- It runs coding agent sessions (Claude Code, Codex, etc.) to handle them one at a time until everything is done
The Loop Mechanics
- You provide a prompt with the spec items you want built
- The system produces a fix plan — what to do in iteration 1, iteration 2, iteration 3, etc.
- It builds up a log as different Claude Code sessions run
- When the system decides it's done, it produces an indicator (e.g., a
done.txtfile) - The exit condition: the main
whileloop only exits whendone.txtexists AND the coding agent is confident the implementation is complete with all validation passing
Cole also mentions Archon, his open-source harness builder, as the easiest way to get started building custom harnesses tailored to your exact process and software development lifecycle.
🎯 Key Takeaways
- Harness = Everything Around the Model — Any agent is the combination of the LLM (reasoning) plus the harness (context, tools, processes). The harness is the part that matters most and the part you control.
- Three Layers of AI Agents — The LLM at the core, the coding agent tool (Claude Code, Codex) as the first harness, and your AI layer as the ultimate wrapper that you build and evolve.
- Six AI Layer Components — Global rules, skills, MCP servers, codebase searching (LSP/knowledge graphs), hooks, and sub-agents. Every process you inject goes through one of these six channels.
- Context Engineering ⊂ Harness Engineering — Most of the harness IS context engineering. The new element is "control" — orchestrating sessions, RALF loops, and sub-agents.
- Mindset Over Skill — The harness engineering mindset rejects "blame the model, wait for the next version." Instead, every mistake becomes an opportunity to improve your harness.
- System Evolution — Treat your AI layer as a living system. Convention missed? Add it to rules. Destructive command? Add a hook. Each session should leave your harness better than before.
- Separate Sessions for Plan, Implement, Validate — Keep each coding agent session focused and token-efficient by using separate skills/sessions for planning, implementation, and validation, with artifact handoffs between them.
- Hooks Are Underused — Pre-tool-use security hooks, stop validation hooks (force tests to pass before "done"), and post-edit lint hooks are powerful but most engineers don't use them enough.
- Don't Overwhelm a Single Session — Never hand a massive PRD to one agent session. No matter how good your AI layer is, too much context will make the LLM "fall flat on its face."
- Orchestrate Multiple Sessions — The peak of harness engineering: automate pipelines where focused agent sessions handle explore → plan → implement → review → PR creation.
- The RALF Loop Pattern — A simple script that splits a large scope of work into tasks, runs coding agent sessions iteratively, and only exits when all specs are met and validation passes.
- Building Harnesses Is the Future — As models and tools get more powerful, the competitive advantage shifts to who builds the best harness — the orchestration layer that makes agents reliably tackle larger scopes of work.
🔗 Resources & Links
- Companion Repo — harness-engineering-demo — Cole's demo repo showing a complete AI layer setup with rules, skills, hooks, and a RALF loop implementation
- Addy Osmani — Agent Harness Engineering — Article on the harness engineering mindset and the "every mistake becomes a rule" philosophy
- Martin Fowler — Harness Engineering — Article breaking down the five components of the harness: context injection, actions, persistence, observability, and control