What a harness is
A harness is everything around the model that makes its work checkable: the context it reads, the gates that block it, the sessions it runs in, the skills it is handed. In a pull request it takes the checks’ seat: it blocks or it passes.
The layer around the model
Section titled “The layer around the model”On its own, a model “can’t read a file, run a command, or remember the last turn. The harness supplies all of that.” (source: Matt Pocock: Dictionary of AI coding, harness) Claude Code is the first layer; in Anthropic’s words, “this surrounding layer is what the term agentic harness refers to” (source: Anthropic: How Claude Code works). The rest is what I build around it.
Every part encodes an assumption
Section titled “Every part encodes an assumption”Anthropic’s engineers put it plainly: “every component in a harness encodes an assumption about what the model can’t do on its own” (source: Anthropic: Harness design for long-running application development), and those assumptions “can quickly go stale as models improve” (source: Anthropic: Harness design for long-running application development). Their example: a harness that handed the work to a fresh agent, because some models “begin wrapping up work prematurely as they approach what they believe is their context limit” (source: Anthropic: Harness design for long-running application development). The next model “largely removed that behavior on its own” (source: Anthropic: Harness design for long-running application development), and that part of the harness came out.
On a model upgrade, I revisit the effort defaults and every rule written because of what the old model could not do: rule 7, measure before adding, turned on what is already there.
The four parts
Section titled “The four parts”- Context. What the agent reads, from the instruction file to memory. Its assumption is Matt Pocock’s picture of the agent, “a new starter with no memory” (source: Matt Pocock: How to make codebases AI agents love). On this site:
CLAUDE.md,PRODUCT.mdandDESIGN.md, withGLOSSARY.mdanddocs/adr/kept local and untracked, in Context the agent reads. - Checks. The gates that block a change until it passes, and the hooks that run them. Their assumption: a claim of success is not evidence, since the agent can deliver “a plausible-looking implementation that doesn’t handle edge cases” (source: Anthropic: Best practices for Claude Code). On this site: a Stop hook, git hooks on every commit and CI on every pull request, in Checks that block.
- Sessions. The context window a ticket runs in, and the effort spent inside it. Their assumption: the model’s “ability to accurately recall information from that context decreases” (source: Anthropic: Effective context engineering for AI agents) as the window fills. On this site: one fresh session per ticket and the effort set per model, in Sessions and effort.
- Skills. Procedures handed to the agent by name. Their assumption: the agent does not know the procedure, and Anthropic compares writing a skill to “putting together an onboarding guide for a new hire” (source: Anthropic: Equipping agents for the real world with Agent Skills). On this site: Matt Pocock’s skills for the engineering and Impeccable for the design.
The agent that works, and the one that reviews
Section titled “The agent that works, and the one that reviews”An agent reviewing its own work “reads its own conclusions back as confirmation” (source: Matt Pocock: Dictionary of AI coding, automated review), while “a reviewer with a fresh context window has none of that attachment” (source: Matt Pocock: Dictionary of AI coding, automated review). The second model “is still an LLM that is inclined to be generous towards LLM-generated outputs” (source: Anthropic: Harness design for long-running application development), yet the split pays: “tuning a standalone evaluator to be skeptical turns out to be far more tractable than making a generator critical of its own work” (source: Anthropic: Harness design for long-running application development).
On this site, the review never runs in the context that built the ticket: mattpocock-skills:code-review reviews it in a fresh one, on its two axes, and CI runs the gates on the pull request. The reviewer’s seat stays mine. Before this run, every merge waited for my green light; for the run that built this section, I moved my judging to the end: each pull request merges once the review and CI pass, and I test the finished site before launch.
Parts that join later
Section titled “Parts that join later”The minimal setup leaves four parts for the day you miss them, each in one of the four:
- A browser for the agent, in the checks, to see what it built before you do. I use the Playwright MCP server, which lets the agent act on a page “through structured accessibility snapshots” (source: Microsoft: Playwright MCP). Its README points coding agents at the Playwright CLI instead, “because CLI invocations are more token-efficient” (source: Microsoft: Playwright MCP).
- Current library docs, in the context, because otherwise “LLMs rely on outdated or generic information about the libraries you use” (source: Upstash: Context7). Context7 “pulls up-to-date, version-specific documentation” (source: Upstash: Context7) when asked.
- A language server, in the checks, as feedback rather than a gate: with a code intelligence plugin the agent “catches type errors and missing imports that its own edits introduce” (source: Anthropic: Code intelligence plugins). Mine is
typescript-lsp. - A pinned plugin, in the skills. A plugin source with no
reffollows “the repository’s default branch” (source: Anthropic: Marketplace reference). I keep Impeccable on a published release, in a marketplace of my own whose entry names arefand asha: “when you set both ref and sha, Claude Code checks out sha” (source: Anthropic: Marketplace reference).
Sources
Section titled “Sources”- Matt Pocock: Dictionary of AI coding, harness github.com
- Anthropic: How Claude Code works code.claude.com
- Anthropic: Harness design for long-running application development anthropic.com
- Matt Pocock: How to make codebases AI agents love aihero.dev
- Anthropic: Best practices for Claude Code code.claude.com
- Anthropic: Effective context engineering for AI agents anthropic.com
- Anthropic: Equipping agents for the real world with Agent Skills anthropic.com
- Matt Pocock: Dictionary of AI coding, automated review github.com
- Microsoft: Playwright MCP github.com
- Upstash: Context7 github.com
- Anthropic: Code intelligence plugins code.claude.com
- Anthropic: Marketplace reference code.claude.com