TL;DR: The model proposes; the harness does everything else. It runs the loop, executes the tools for files, shell and web, decides through permissions which proposed calls actually run, keeps an append-only session log from which every model request can be rebuilt, manages context so long runs stay coherent, spawns subagents for isolated work, loads skills and fires hooks, and confines execution in a sandbox. A framework is a kit of parts; a harness is the assembled, opinionated whole that ships to a user. Change the harness and the same model gets better or worse on the same tasks, which is why harness engineering is its own discipline.
How to approach it
Define by listing the parts and what each decides, then draw the two boundaries: harness against framework, harness against model. Use the session log as the anchor, because it is the part that makes the others possible and the one people leave out. End with the claim that the harness changes outcomes, and say how you would show it.
A strong answer
Start from the model's limits. It is stateless, it produces text and structured tool calls, and it cannot touch a file, run a command or remember yesterday. Everything between a user's request and a changed repository is done by code around the model, and that code, assembled into one product, is the harness (Anatomy of an Agent Harness).
The parts, and what each one decides:
| Part | What it does | What it decides |
|---|---|---|
| Loop | Calls the model, dispatches tool calls, appends results | When the run ends: done, budget, error, stopped by a person |
| Tools | Read and edit files, run shell commands, fetch pages | What the model can do at all |
| Permissions | Classifies each proposed call | Which calls run automatically, which ask, which are refused |
| Session log | Appends every message, call and result | The source from which any model request can be rebuilt |
| Context management | Compacts, clears and reorders the transcript | What the model sees on a long run |
| Subagents | Runs isolated loops with their own context | Which work happens outside the main transcript |
| Skills and hooks | Loads procedures on demand; runs code at fixed events | How the harness is extended without changing the loop |
| Sandbox | Confines execution | What a command can reach |
The session log is the backbone. Every request to the model is built from it, every resume after a crash or a day's pause replays it, every trace you read later is it, and compaction is a transformation applied to it rather than a loss of it. A harness without an append-only log has a transcript in memory and nothing else, which means no recovery, no audit and no evaluation of past runs. Ask of any harness where the log is before asking anything else.
Permissions are where the authority line lives in a harness. The model proposes rm -rf build/; the permission layer decides whether that runs without asking, asks the user, or refuses, from rules about the command, the path and the session's mode. The sandbox is the backstop for when the rules are wrong.
Now the boundaries. A framework gives you a loop abstraction, a state store, tool helpers and tracing hooks, and leaves the decisions to you. A harness has made the decisions: these tools, this permission policy, this compaction strategy, this log format, this sandbox. You can build a harness with a framework, and a harness is what a user installs. The model, finally, is one component inside, and a replaceable one: the harness sends it requests and interprets its replies.
That replaceability is the point of the discipline. Run the same model inside two harnesses on the same coding tasks and the pass rates differ, sometimes by more than the gap between two models in one harness. Tool design, context management, what the log keeps and how errors come back to the model are all harness decisions, and all of them move the number. So the question "which model is best for coding" is incomplete without "in which harness", and improving the harness is often the cheapest way to improve the agent.
Authority line: the model proposes every action; the harness's permission layer and sandbox decide what runs; the loop decides when the run ends.
What interviewers probe next
"Why append-only? Why not store the current state?" Because the current state cannot tell you how you got there. Replay, audit, debugging a failed run and compaction that can be undone all need the history. State is derived from the log, not kept instead of it.
"Where do subagents' logs go?" Each subagent has its own log, and the parent's log records the delegation and the result that came back. The parent never sees the child's transcript, which is the reason to spawn one, and the child's log still exists for the trace.
"How would you prove the harness matters, not the model?" Fix the model and the task set, vary one harness decision at a time, compaction threshold, tool error format, permission mode, and measure pass rate with repeated runs. The size of the deltas is the argument.
How it's scored
Weak: Defines the harness as "the code around the model", or as a framework by another name.
Hire: Lists the parts with what each decides, makes the session log the backbone, and separates harness from framework and from model.
Strong Hire: Also places the authority line in permissions with the sandbox as backstop, explains subagent logs, and describes the experiment that shows the harness changes outcomes.
Common mistakes
- Treating the harness as a thin wrapper around a model call.
- Keeping state instead of an append-only log.
- Letting the model's output decide what runs, with permissions as advice.
- Spawning subagents whose transcripts return into the parent's context.
- Comparing models across harnesses and attributing the difference to the model.