Agent Harness vs Loop Engineering
An agent harness is the system that validates, authorizes, executes, records, and returns observations for the actions a model proposes. Loop engineering decides how that harness iterates: the goal, validation, stop rule, budget, and feedback.
Which controls belong to the execution harness, and which decide whether another iteration or external action is justified?
What we tested
We mapped worktree isolation, write scope, network access, and protected credentials to the harness, then mapped evidence requirements, retry caps, fallback, persistence, and human merge approval to the loop specification.
Observed result
The harness could contain an unsafe proposal, but containment alone did not make the proposal correct. The loop's checker still had to reject unrelated edits and missing evidence. Conversely, a good stop rule could not protect files if the runtime ignored its sandbox boundary.
What this does not prove
This is a responsibility map, not a claim that every product exposes the same layers. Some runtimes combine permissions, hooks, scheduling, memory, and review. The practical test is whether each control is technically enforced and independently reviewable.
Why it matters
The model proposes; the harness acts. A strong harness without a loop runs one safe step at a time; a loop without a harness iterates fast but unsafely. Production agents need both — the harness for safety per action, the loop for direction across many actions.
Practical checklist
- Decide what the harness validates and authorizes before any action runs
- Record every action and its observation so failures can be audited
- Wrap the harness with the loop's stop rule and budget cap
- Require human approval for irreversible actions
- Keep the model proposing actions, not executing them directly
Example
A code agent: the harness runs only allow-listed commands, records each result, and refuses writes outside the repo. The loop wraps that with goal = make CI green, stop after 5 failures, and escalate to a human before merge.