Claude Code is a harness: CLAUDE.md, hooks, MCP, skills, subagents and permissions are the pieces around the model. This guide is the map. Each piece has a published how-to, listed below. Anthropic describes the impact of "harness design" on long-running coding agents (March 2026). The sentence "Claude Code is the harness, Claude is the model inside it" comes from third parties (MindStudio, WaveSpeed), not from Anthropic.
Map of the published how-tos
This is the map of Claude Code as a harness. The concept, the layer around any model, is in what an AI harness is. Here each Claude Code piece points at the published how-to. Read the map and open the spoke for what you are about to configure.
- How to install Claude Code on Windows — PowerShell, CMD, WinGet or WSL, Git for Windows, PATH, login, and the install errors that show up most often. The outputs were captured on a clean Windows Server 2025.
- How to install Claude Code on macOS and Linux — The native curl installer, Homebrew, apt, dnf, Alpine and npm, PATH, login and the most common install errors. The outputs were captured in clean Ubuntu and Alpine containers.
- How to write a CLAUDE.md — The guide Claude reads at the start of the session. The spoke writes a file line by line and a script that reviews that file in CI.
- How to configure hooks — The sensor. Three hooks in plain Python, with no jq, at the lifecycle points where the rule has to hold every time.
- How to create a skill — A folder with a SKILL.md that Claude loads on demand. The published example is a skill that records an architecture decision.
- How to configure MCP in Claude Code — claude mcp add, the .mcp.json file, and the local, project and user scopes. This is configuration, not writing the server.
- How to build an MCP server in Python — The server that exposes tools, resources and prompts. The result of each call enters the model context window.
- How to create subagents — A file in .claude/agents, with its own prompt, tools and permissions, in a separate context window.
- MCP vs API vs Skills vs CLI — The same task through the paths Claude Code offers, and when each one is the right one. MCP does not replace an API.
- How to save tokens — Measure with /context, the difference between /clear and /compact, what breaks the prompt cache, and the role of subagents and a short CLAUDE.md.
Note: "AI harness" here is the software concept — the infrastructure around an LLM that turns it into a reliable agent — not harness.io (the CI/CD platform) nor the literal harness/wiring sense of the word.
What Claude Code says it is
Claude Code's repository describes it as an agentic coding tool that lives in your terminal and understands your codebase (github.com/anthropics/claude-code). The sentence doesn't use the word harness, and the caveat about that is further down. The model running inside it is the same one you would call from the API. What makes Claude Code work in a real repository is the layer around the model: file access, tools, permissions and command execution. Cursor plays the same role inside the editor and presents itself as your coding agent for building ambitious software (cursor.com). The difference between the two is the form factor, terminal or editor. Both wrap the model with project context, file editing and execution.
Claude Code already ships the pieces of a harness
Claude Code already ships with the pieces of a harness. CLAUDE.md holds the instructions Claude reads at the start of every session. Hooks run on their own at lifecycle points and can be a shell command, an HTTP call, an MCP tool, a prompt or an agent. Skills are folders with a SKILL.md that Claude loads on demand when a task calls for them. MCP connects external tools and data: you add a server with claude mcp add and pick whether it stays with you, with the project or in all your projects. The walkthrough is in how to configure MCP in Claude Code. Subagents work in separate context windows, each with its own prompt and permissions. And permissions are tiered: plan mode, for one, only reads. It maps straight onto Birgitta Böckeler's taxonomy (Thoughtworks, April 2, 2026): guides direct the agent before it acts; sensors observe afterward and help it correct course.
Each of these pieces has a step-by-step guide with tested code: hooks, with 3 ready-to-use examples, how to write CLAUDE.md, how to create a skill and how to build an MCP server in Python. On Windows, start with how to install Claude Code on Windows.
An attribution note (and a practical point)
One attribution note, because the distinction matters. Anthropic doesn't call Claude Code "a harness" in those words. It talks about "harness design" and says it has a substantial impact on the effectiveness of long-running agentic coding (March 2026). The explicit line "Claude Code is the harness, Claude is the model inside it" is third-party (MindStudio, WaveSpeed), not Anthropic. And there's a practical point in that: you don't get a finished harness. You get primitives, and you engineer the harness by configuring them. The way to engineer it is Hashimoto's loop: every time the agent gets something wrong, you write a permanent rule into CLAUDE.md, or into a hook if the rule must always hold, instead of fixing it by hand.
Feature by feature: guide or sensor
| Claude Code feature | Guide or sensor | What it does |
|---|---|---|
| CLAUDE.md | Guide (feedforward) | Persistent instructions Claude reads at the start of every session |
| Hooks | Sensor (and gate) | User-defined actions (shell command, HTTP, MCP tool, prompt or agent) that run automatically at lifecycle points |
| MCP | Guide | Connects external tools and data sources. Setup with claude mcp add and .mcp.json in how to configure MCP. When to pick MCP, API, a Skill or a CLI: when to use each one. |
| Subagents | Guide | Each runs in its own context window, with its own system prompt, tools, and permissions. Walkthrough in how to create Claude Code subagents. They also keep verbose output out of the main conversation: see how to save tokens |
| Permissions | Guide (gate) | Tiered permissions; plan mode only reads files and runs read-only commands |
| Skills | Guide | Folders with a SKILL.md, instructions and scripts that Claude loads on demand when a task calls for them |
capivaOS: a harness engineered on top of Claude Code
You can see the pattern in a concrete example. capivaOS is a harness engineered on top of Claude Code: a spec-first, test-enforced development pipeline, state-machine enforced, installed as a plugin (per the README). It doesn't replace Claude Code. It takes the primitives (CLAUDE.md, hooks, subagents, permissions) and ties them into a disciplined flow with phases, artifacts, and gates. That's what harness engineering enables: engineering a harness as a layer on top of another.
The coding harness is the visible part
The coding harness is the visible part. Claude Code, Cursor, agents that read a repository and run tests. Configuring these primitives well already changes the result. But the bigger part, and the one where almost no one is engineering with discipline, is the operational harness: the same guides-and-sensors pattern applied to running an entire business, AI beyond code. We solve the coding layer with capivaOS, the open-source harness on top of Claude Code. If you want the concept before the features, start with What is an AI Harness.
Frequently asked questions
Is Claude Code a harness?▼
It functions as one. Its features map onto the guides-and-sensors model: CLAUDE.md, hooks, MCP, subagents, and permissions are the layer around the model. Anthropic frames this as "harness design" (March 2026); the explicit "Claude Code is the harness" phrasing comes from third parties (MindStudio, WaveSpeed), not from Anthropic.
Which Claude Code features make up the harness?▼
CLAUDE.md (persistent instructions read each session), hooks (automatic actions at lifecycle points), skills (instructions and scripts loaded on demand), MCP (connection to external tools and data), subagents (isolated context windows with their own prompt and permissions), and tiered permissions. Together they are the guides and sensors around the model.
Is CLAUDE.md a guide or a sensor?▼
A guide: in Böckeler's taxonomy (Thoughtworks, 2026), guides direct the agent before it acts. CLAUDE.md is read at the start of every session, so it steers behavior up front, not after the fact.
How do hooks work as sensors?▼
Hooks run automatically at points in Claude Code's lifecycle; wired to tests, linters or typecheck after an edit, they become sensors the agent reads and uses to correct itself. A failing hook can also stop the action, working as a gate.
What is capivaOS and how does it relate to Claude Code?▼
capivaOS is an open-source harness engineered on top of Claude Code: a spec-first, test-enforced, state-machine enforced development pipeline installed as a plugin (per the README). It doesn't replace Claude Code. It turns the primitives into a disciplined flow with phases, artifacts, and gates.
How do I engineer my own harness on Claude Code?▼
In five steps, in this order: 1) install Claude Code; 2) write CLAUDE.md with the project rules; 3) add hooks as sensors (tests, linters, typecheck); 4) package repeated workflows as skills; 5) connect external tools through MCP. Then run Hashimoto's loop: every agent mistake becomes a permanent rule.
Claude Code gives you the pieces. The harness that decides whether the agent works, you engineer.
Explore more: Free GEO audit