The Loop Harness verification loop
A scheduled Loop Harness workflow that runs Claude in an isolated worktree and ships staged output only after a second Claude ses…
A scheduled Loop Harness workflow that runs Claude in an isolated worktree and ships staged output only after a second Claude session verifies it.
Use when
Use this when a recurring repository task should run unattended but one agent must not be allowed to generate and approve the same output.
The loop
Use Loop Harness for scheduled repository work such as CI triage, issue grooming, dependency updates, or docs sync. Set [retry limit], then start an isolated git worktree. Let one Claude session stage a patch or outbox message and a second Claude session verify it against explicit criteria. Ship only after a pass; otherwise preserve the findings and retry only within the limit. Finish with the source revision, staged output, verifier result, delivery status, and next run.
Steps
- Set the retry limit, wake the due Loop Harness task, and create an isolated worktree from the approved source revision.
- Have the primary Claude session stage one bounded result without publishing it.
- Have a second Claude session inspect the staged work against explicit acceptance criteria.
- Ship on a pass; otherwise preserve the findings, publish nothing, and retry only until the preset limit.
Verification
Only independently verified output ships. A second-agent pass releases the configured output; a failed verification preserves evidence and produces no external change.
Why it works
Workspace isolation limits interference, and the second-agent gate separates generation from approval. The result can run repeatedly without relying on one session's confidence.
Maintain The Loop Harness verification loop?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[](https://getagentictools.com/loops/loop-harness-verification-loop?ref=badge)