Knaph

Depth 1 · 170 s

Everything but the model

The same Claude can edit your files in Claude Code but not in the phone app. The difference is the harness, everything in an agent except the model, and it's the part you can actually change.

About this video

Claude answers in the Claude app on your phone, and Claude answers in Claude Code. The phone app can't edit the files in your project folder; Claude Code can. Same model, so the difference must be everything around it: the tools it is given, the system prompt, the loop. That program around the model is called the harness, like a horse's harness, which lets the animal's strength be used for work.

The harness is everything in an agent except the model itself. It runs the loop, sending requests and deciding when a session is over. It holds the tools and runs them. It writes the system prompt and the tool descriptions. It builds the context: what goes into each request, in what order, and what is compacted when the window fills. It decides what is allowed, which actions need your permission and which are blocked. It talks to you through the screen, and it keeps records, saving sessions so you can come back. A useful way to divide the work: the model decides what to do; the harness decides what's allowed, carries it out, and remembers.

Because so much lives in the harness, the same model can be a chat assistant in one, a coding agent in another, and a careful assistant that can only read one database in a third. And one harness can run different models: Claude Code lets you switch between a faster, cheaper model and a slower, stronger one mid-task. The harness also decides where the tools act: on your own computer, with your own files and permissions, or in a sandbox, a closed-off computer where the agent can't reach anything else. Programmers can build on the same harness with the Claude Agent SDK.

When an agent disappoints you, ask which part failed. Sometimes it is the model's judgement; often it is the harness: a missing tool, a crowded context, a blocked action, an instruction it never saw. Learn your harness's commands, settings and files: they work whichever model you choose.

This video shows depth 1 of Agent harness.

Learn Agent harness

Transcript

  1. 0:00The same Claude answers in the phone app, and in Claude Code. The phone app can only reply with text. Claude Code edits the files in your project. So the difference isn't the model.
  2. 0:20It's everything around it. People call it the harness, like a horse's harness. It runs the loop. It holds the tools and runs them. It writes the system prompt. It builds the context. It decides what's allowed. It's the screen you use. And it saves your sessions.
  3. 0:50A useful way to divide the work. The model decides what to do. It wants to delete some old files. The harness decides whether that's allowed, maybe by asking you first. It carries it out. And it remembers.
  4. 1:18So the same model behaves very differently in different harnesses. A chat app's harness lets it reply with text. A coding agent's gives it files, commands, and a loop. And one harness can run different models. Claude Code lets you switch mid-task.
  5. 1:45The harness also decides where the tools act. On your own computer, with your own files and permissions. Or in the cloud, in a sandbox, a closed-off computer of its own. Programmers can build on the same harness with the Claude Agent SDK.
  6. 2:08So when an agent fails, ask which part failed. Sometimes it's the model's judgement. But often it's the harness. A missing tool. A crowded context. A blocked action. An instruction it never saw.
  7. 2:30Learn your harness, its commands, settings and files. They work whichever model you choose. And know where your agent runs.
  8. 2:43An agent is a model, plus a harness.