Effective harnesses for long-running agents
Anthropic's harness pattern for multi-session agents: an initializer sets up the env, a JSON feature list, and progress files; each session then ships one feature, verified end-to-end and committed to git.
**The gist** Anthropic describes a harness for agents working across context windows on tasks spanning hours or days. A **two-agent split**: an initializer session creates an **init.sh**, a progress file, a first git commit, and a **JSON feature list** (200+ entries in their claude.ai-clone demo); later coding sessions each pick one feature, implement, test, and commit.
**Why it matters** The failure modes it targets — agents biting off whole features and exhausting context, or declaring a project done early — plague anyone running Claude Code or Codex on long builds. Concrete takeaways: **one feature per session**, JSON over Markdown for tracking files, a fixed startup ritual (read git log and progress, verify the app boots), and end-to-end browser testing via **Puppeteer MCP** rather than unit tests alone.
**The gist** Anthropic describes a harness for agents working across context windows on tasks spanning hours or days. A **two-agent split**: an initializer session creates an **init.sh**, a progress file, a first git commit, and a **JSON feature list** (200+ entries in their claude.ai-clone demo); later coding sessions each pick one feature, implement, test, and commit. **Why it matters** The failure modes it targets — agents biting off whole features and exhausting context, or declaring a project done early — plague anyone running Claude Code or Codex on long builds. Concrete takeaways: **one feature per session**, JSON over Markdown for tracking files, a fixed startup ritual (read git log and progress, verify the app boots), and end-to-end browser testing via **Puppeteer MCP** rather than unit tests alone. **Watch out** The recipe is tuned to **full-stack web apps**; the authors say generalization to other domains is unexplored. Claude also can't see **browser-native alert modals** through Puppeteer, and whether one coding agent beats specialized multi-agent setups is an open question.