Effective harnesses for long-running agents

This post details a two-fold solution for enabling long-running AI agents to make consistent progress across multiple context windows within the Claude Agent SDK. It introduces an 'initializer agent' to set up the initial environment (init.sh, progress log, git commit) and a 'coding agent' that makes incremental progress, leaving clear artifacts for the next session. Key technical contributions include using a JSON feature requirements file marked as 'failing' to guide incremental work, prompting agents to commit progress with descriptive messages and write summaries in a progress file, and leveraging browser automation tools (Puppeteer MCP) for end-to-end testing to identify and fix bugs. The post also discusses failure modes like one-shotting and premature completion, and suggests future directions like multi-agent architectures.
More from the AI Code Generation and Software Engineering Agents trail
- Using Claude Science to produce the first complete map of the sky in UV light
- Project Swap: What happens when agents trade for us?
- Automated researchers can reliably mitigate alignment failures
- How Claude is accelerating protein design and analytical chemistry
- Patterns and problems in multiagent systems