# Harness Engineering: What Separates Top Agentic Engineers Right Now
<!--
ref: @content/youtube/cole-medin/harness-engineering-what-separates-top-agentic-engineers-right-now
tags: [harness engineering, context engineering, AI layer, hooks, skills, sub-agents, agent orchestration, Ralph loop]
version: 2
updated_at: 2026-11-24T06:05:57.987Z
-->

**[Watch on YouTube](https://www.youtube.com/watch?v=ulNsa0sD8N0)**

# Harness Engineering: What Separates Top Agentic Engineers Right Now

*Synthesized from Cole Medin, 2026-05-28.*

Cole Medin presents this solo episode, which explains harness engineering and focuses on AI coding assistants.

## Core Thesis
Cole argues that harness engineering is the next step beyond context engineering: the wrapper around a model (rules, skills, tools, hooks and sub-agents) matters as much as the model. He also argues that when an agent fails, the engineer should fix the harness rather than wait for a better model, and that the real leverage comes from orchestrating several focused agent sessions instead of prompting one.

## Key Insights
- **Agent = model + wrapper.** Coding assistants such as Claude Code and Codex are already harnesses built by their vendors. The part a team builds and controls is the AI layer on top.
- **Six components of the AI layer:** global rules, skills, MCP servers, code-search capabilities (LSP or knowledge graphs), hooks, and sub-agents.
- **Where it differs from context engineering.** Most of the single-session work is context engineering again. The genuinely new element is control: Ralph-style loops that orchestrate multiple coding-agent sessions and sub-agents.
- **Skill-issue reframe.** Drawing on an article he cites, Cole describes the pattern of blaming the model and waiting for the next version. The alternative is to treat each failure as a fixable gap: add a convention to the rules file, or a hook that blocks a destructive command, so the next session is less likely to hit it. He calls this system evolution.
- **One session per phase.** Planning, implementation and validation should each run in a separate session with its own skill. Each skill writes a markdown artifact that serves as the handoff, which keeps each context token-efficient.
- **Three hook uses.** A pre-tool-use hook can block things like reading `.env` files or destructive directory removal. A stop hook can run unit tests, linting and type checking and force the agent to keep iterating until they pass. A lint after every file edit keeps the code base clean.
- **Scaling past one session.** A single session given a massive PRD will be overwhelmed. Splitting the work into focused tasks, with parallel review agents for security, correctness and simplicity before a pull request, works better.
- **Ralph loop.** Jeffrey Huntley, whom Cole credits as the creator of the Ralph loop, is cited as an early example. It is a simple script that splits a large spec into tasks, runs coding-agent sessions one at a time, and exits only when a done marker file appears.

## Actionable Takeaways
1. When the agent makes a mistake, add the fix to the harness: a convention in the rules file, a blocking hook for the bad command, or an updated skill.
2. Run planning, implementation and validation as three separate coding-agent sessions, each handing off a markdown artifact.
3. Add a pre-tool-use hook that blocks reads of `.env` files and destructive deletes.
4. Add a stop hook that runs the unit tests, lint and type checks, and makes the agent iterate until they pass.
5. Run a lint after every file edit.
6. For larger scopes, script a loop that splits the PRD into tasks and starts a fresh coding-agent session per task until a done marker appears.

## Notable Quotes
> "Harness engineering is all about building the wrapper around the model." — Cole Medin

> "every mistake becomes an opportunity to improve your harness" — Cole Medin

> "harness engineering is all about claiming that agency, taking ownership of your system" — Cole Medin

---

*Related: `@content/youtube/zazencodes/build-your-own-ai-software-factory-with-claude-code` · `@content/web/github/2026-11-25-claude-code-v2-1-332` · `@content/web/github/2026-11-24-builtin-ship-shadows-user-skill` · `@content/web/github/2026-11-17-open-artifact` · `@content/youtube/yifan-bth/i-reverse-engineered-claude-code-learn-these-agent-tricks`*

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*