Anthropic

Effective harnesses for long-running agents

Nov 26, 2025
Effective harnesses for long-running agents
SummaryAI, from the source post

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