TAU-HOME.COM
LOADING

Anthropic Publishes Harness Architecture for Long-Running Coding Agents

Anthropic has released a design pattern and environment setup methodology for long-running agent harnesses that overcome context window limits and maintain deve

tau · November 21, 2026

#Anthropic #AgentSDK #DevTools

Anthropic Publishes Harness Architecture for Long-Running Coding Agents

As artificial intelligence models grow more capable, developers increasingly ask them to tackle complex tasks spanning hours or even days. However, getting agents to make consistent progress across multiple context windows—the total pool of input tokens a model can process at once—remains an ongoing challenge. To address the limits of long-running agents, Anthropic has officially published research detailing a harness architecture and environment setup methodology designed to preserve continuity between sessions.

Anthropic long-running coding agent harness architecture and session handover workflow diagram

Image source: Anthropic

Image Credit: Anthropic

The newly released design patterns offer practical guidelines to help AI coding agents transcend single-session limits and execute projects over extended periods. Utilizing Anthropic's Claude Agent SDK, this approach establishes the core mechanisms required to secure development continuity across multi-context environments.

The Session Disruption Problem in Long-Running Agents

Completing a complex software development project within a single context window is nearly impossible given current technological limits. Large language models start every session with zero memory of what came before, much like software engineers working in shifts where each new engineer arrives completely unaware of previous progress.

According to Anthropic's experiments, running agents in a loop with high-level prompts alone led to two primary failure modes:

  • Trying to do too much at once: The agent attempts to build an entire application in one shot, runs out of context mid-implementation, and leaves the next session to inherit a half-built, undocumented feature.
  • Declaring victory prematurely: After building a few initial features, a later agent instance looks around, assumes the job is done, and prematurely terminates the project.

To resolve these issues, Anthropic proposed a dual-part solution combining an initializer agent and a coding agent.

Initializer Agent and Feature List-Based Design

The first phase of the long-running agent harness relies on the 'Initializer Agent' to lay the groundwork for the project.

  • Generating Init Scripts and Work Logs: The very first agent session is prompted to create an init.sh script to run the development server, a claude-progress.txt file logging what agents have accomplished, and an initial git commit reflecting added files.
  • Structuring a Comprehensive Feature List: Expanding upon the user's initial prompt, the initializer generates a structured JSON file (feature_list.json) containing hundreds of detailed requirements. For instance, in a chat application clone, items such as "New chat button creates a fresh conversation" are listed, with all items initially marked as failing (passes: false).

Using JSON proved more reliable than Markdown, as models are less prone to improperly altering or overwriting JSON file structures, providing a clear blueprint for subsequent sessions.

Incremental Progress and Browser Automation Testing

With the initial environment scaffolding in place, subsequent 'Coding Agents' follow a systematic workflow:

  • Incremental Feature Implementation: Each session's coding agent is tasked with working on only one uncompleted, high-priority feature at a time.
  • Git Commits and Progress Handover: Upon completing a feature, the agent records its progress in git with descriptive commit messages and updates the progress notes file, allowing the next session's agent to easily grasp the current state.
  • End-to-End Testing via Puppeteer MCP: After modifying code, the agent runs browser automation tools using the Puppeteer MCP (Model Context Protocol, a standard protocol enabling models to control browsers directly) server to execute end-to-end (E2E) testing from a human user's perspective, identifying and fixing bugs that code inspection alone might miss.

Limitations and Future Work

Anthropic's research outlines concrete engineering patterns enabling AI models to maintain incremental progress across multiple context windows. However, certain limitations remain. Visual and automation tool constraints—such as Claude's inability through Puppeteer MCP to visually recognize browser-native alert modals—can result in buggier features in those areas. Additionally, whether a single general-purpose coding agent performs best or if a multi-agent architecture with specialized roles (such as testing, QA, and code cleanup agents) yields superior results remains an open question for future research.

Sources

Impact-Site-Verification: 9b3ebd10-6c45-44cf-a014-5b8c19b7b285