Effective harnesses for long-running agents: Anthropic's two-agent solution for multi-context-window software development
AI coding agents running across multiple context windows have no memory of prior sessions, causing them to either attempt to build everything at once and run out of context mid-implementation, or prematurely declare a project complete after seeing partial progress.
Without a structured harness, Claude agents running in a loop either over-reached by one-shotting the full app (leaving code half-implemented with no documentation) or stopped too early by falsely declaring completion. Context compaction alone was insufficient.
The two-agent harness dramatically improved performance by eliminating wasted re-orientation time, enabling incremental feature-by-feature progress with proper end-to-end verification and clean session handoffs.
Frequently asked questions
What did this team achieve with this AI workflow?
The two-agent harness dramatically improved performance by eliminating wasted re-orientation time, enabling incremental feature-by-feature progress with proper end-to-end verification and clean session handoffs.
What tools did this team use?
Claude Agent SDK, Opus 4.5, Puppeteer MCP, git.
What results were reported?
Agent performance improvement: dramatically improved performance; Session setup token cost: saves Claude some tokens in every session; Re-orientation overhead eliminated: increased efficiency (source-reported, not independently verified).
What failed first in this deployment?
Without a structured harness, Claude agents running in a loop either over-reached by one-shotting the full app (leaving code half-implemented with no documentation) or stopped too early by falsely declaring completion.
How is this quality assurance AI workflow structured?
High-level prompt triggers session → Initializer agent scaffolds environment → Feature requirements file generated → Coding agent reads session state → Smoke test via init.sh and browser → Single-feature incremental coding → End-to-end browser verification → Commit progress and update notes.