This is a summary and translation of an Anthropic engineering blog post by Prithvi Rajasekaran on harness design for long-running application development with Claude models.
Original article: https://www.anthropic.com/engineering/harness-design-long-running-apps
Key points
- Two core failure modes in long-running agent tasks:
- Context anxiety — models lose coherence as the context window fills. Compaction (summarizing earlier dialogue in place) preserves continuity but doesn't eliminate the problem. A full Context Reset with structured handoff works best; for Claude Sonnet 4.5, it is described as necessary for long tasks.
- Self-evaluation bias — agents evaluating their own work tend toward over-optimism, praising mediocre output. This is especially damaging for subjective tasks like design, where no binary test equivalent exists.
- GAN-inspired Generator-Evaluator for front-end design. A separate Evaluator scores designs over 5–15 iterations using Playwright MCP against the live page, on four weighted criteria:
- Three-agent full-stack architecture (V2: Opus 4.6):
- Planner expands a 1–4 sentence prompt into a full product spec (e.g., 16 feature specs plus a visual design language) while avoiding premature detail specification that causes cascading errors.
- Generator implements features in sprints (React + Vite + FastAPI + SQLite), with self-assessment and Git version control.
- Evaluator tests the running app via Playwright — UI functionality, API endpoints, database state — with hard thresholds per criterion.
- Sprint Contracts bridge user stories and testable implementations: before coding, the Generator proposes what it will build and how it will be verified; the Evaluator reviews and both iterate until they agree on the definition of "done."
- Solo (single agent): 20 min, $9. Wasted layout space, rigid workflow, and — critically — broken core gameplay: entities rendered but unresponsive to input, caused by a broken connection between entity definitions and the game runtime.
- Full harness: 6 hr, $200. Additional sprite animation, behavior templates, sound effects, AI-assisted sprite generation, a level designer, and game export. The game mode was fully playable.
- Rectangle fill tool only placed tiles at drag start/end —
fillRectangleexisted but wasn't correctly triggered onmouseUp. - Entity deletion required both
selectionandselectedEntityId, but clicks only setselectedEntityId; the condition neededselection || (selectedEntityId && activeLayer === 'entity'). PUT /frames/reorderwas defined after the/{frame_id}route, so FastAPI matched "reorder" as an integer frame_id and returned a 422.
| Criterion | Weight | |---|---| | Design Quality (cohesive mood, identity) | High | | Originality (deliberate creative choices) | High | | Craft (typography, spacing, harmony) | Low | | Functionality (usability) | Low |
Claude already performs well on Craft and Functionality by default; weighting Design Quality and Originality pushes the model to take greater aesthetic risks. In one case, a Dutch art museum site evolved from a conventional landing page into a 3D spatial experience with CSS-perspective rendering.
Solo run vs. full harness
Task: "Create a 2D retro game maker with a level editor, sprite editor, entity behaviors, and playable test mode."
Typical defects the Evaluator caught via Sprint Contract criteria:
Build to delete
> "Every component in a harness encodes an assumption about what the model can't do on its own, and those assumptions are worth stress testing."
When Opus 4.6 shipped (better planning, long-context retrieval, code review, and debugging), Sprint structures were removed. The Planner was kept to prevent underscoping, and the Evaluator was kept because it still adds value for tasks beyond reliable generator capability. QA moved to a single pass at the end.
A browser-based DAW built with the Web Audio API under this simplified harness took 3 hr 50 min and $124.70 total across three build/QA rounds. QA still caught real gaps: clips couldn't be dragged on the timeline, no synth/drum UI panels, audio recording was stub-only, clip trimming/splitting unimplemented, and effects were numeric sliders rather than graphical EQ curves.
Core takeaways
1. Context Reset > Compaction for context-anxiety-prone models. 2. Generator-Evaluator separation is a strong lever — easier than making a generator critique itself. 3. Make subjective quality scorable via explicitly defined, weighted criteria. 4. Sprint Contracts prevent cascading errors and implementation drift from user intent. 5. Build to delete: harness complexity should shrink as models improve; each component encodes an assumption worth re-testing. 6. Evaluator value boundary: it justifies its cost when tasks exceed the model's reliable capability range — it is not a fixed yes/no gate.