Agent Harness
The model only turns text into text, and the harness does everything else around it: it builds the prompt on each turn, offers the tools, runs the tool calls the model asks for, decides what stays in context, asks a person for approval when a rule says so, and stops when the task is done or a budget runs out. Coding agents that run in a terminal are harnesses, and so are the hosted agent runtimes that model providers offer.
Two agents on the same model can behave very differently because of their harness. Anthropic's guide to context engineering for AI agents describes harness-level techniques such as compaction and clearing old tool results. When an agent misbehaves, check the harness before you rewrite the prompt: what it put in context, which tools it offered, and whether it verified the result. Qurtoo's articles on managed agent runtimes and on gating completion on evidence cover both sides.
Example
# A minimal harness policy, in plain words
model: the model you chose for this task
tools: read_file, search_code, run_tests, edit_file
needs approval: edit_file outside src/, any network call
max turns: 40
spending limit: set per task
context: keep the goal, the plan and the last 5 tool results; summarize older turns
done when: run_tests passes and a person has seen the diffWhen to use it
- Choosing or building an agent product
- Debugging an agent that loops, forgets or stops too early
- Deciding what an agent may do without asking
When not to use it
- Single prompt calls with no tools or loop
- Expecting a model upgrade to fix problems that come from the harness

