Skip to content
anthropic.com·

🤖Anthropic's Harness Trick: Three Agents Build Full Apps for Hours Unattended

Your coding agent probably needs a critic

TL;DR

A three-agent setup (planner, generator, evaluator) kept Claude coding full-stack apps for multi-hour autonomous sessions. The trick: a separate evaluator that grades work skeptically instead of praising it. If you run long agent jobs, that split is the pattern to steal.

Naive agents go off the rails. Give Claude a long, complex task and it loses coherence, or gets what the author calls context anxiety and starts wrapping up early. The fix that worked: split the job across three agents, a planner, a generator, and an evaluator, and stop letting the worker grade its own homework. Self-evaluation is the quiet killer here. Models confidently praise mediocre output, so the judge has to be a different agent with a different job. If you're building agents for anything longer than a single prompt, this is the architecture to study. The generator writes HTML, CSS, and JS from a user prompt. The evaluator opens the live page through Playwright MCP, clicks around, and scores design quality, originality, craft, and functionality before sending feedback back. Context resets, which clear the window and start a fresh agent, beat compaction here because compaction keeps continuity but never gives the model a clean slate. The numbers: the author ran 5 to 15 generate-evaluate iterations per build, with each pass pushing the design in a more distinctive direction. The loop ran on the Claude Agent SDK. Design quality and originality were weighted above craft and functionality, because left alone Claude drifts toward safe, forgettable layouts. The evaluator is still an LLM and still generous by default, so it needed few-shot calibration with detailed score breakdowns to become skeptical.

Anthropic's Harness Trick: Three Agents Build Full Apps for Hours Unattended — anthropic.com

Key Points

1

The generator writes an HTML, CSS, and JS frontend from a user prompt, and the evaluator scores it over 5 to 15 iterations per generation before the build is considered done.

Keep reading — it's free

Enter your email to keep reading — plus the best of AI & tech, daily. Free, forever.

Also get
or

Already a member? Sign in

ClaudeAI agentsmulti-agent systemsPlaywrightautonomous coding

Comments

Subscribe to join the conversation...

Be the first to comment