↗OpenInput.
← Back to the feed
HarnessesAnthropic Engineering

Building coding-agent workflows with the Claude Agent SDK

Anthropic explains the engineering primitives behind the Claude Agent SDK, formerly the Claude Code SDK. The article presents the harness that powers Claude Code as a reusable foundation for agents with access to a computer. For software development, the essential capability is not simply generating an answer: an agent needs to locate files, edit code, run commands, inspect failures and repeat until it can verify the result.

The proposed loop is gather context, take action, verify work and repeat. Context can come from the file system and agent-directed searches using familiar terminal tools. Subagents provide separate context windows and can return relevant excerpts to an orchestrator rather than forwarding everything they read. Compaction summarizes prior messages as the context limit approaches, although the article does not establish that compaction preserves every project constraint.

Execution combines deliberately designed tools, shell commands and generated code. The article also discusses MCP connections for external services. Verification closes the loop: linting and other explicit rules provide actionable feedback, while screenshots or renders can help with visual tasks. The source argues that agents become more reliable when they can inspect and correct their own output, but does not provide a standardized coding benchmark comparison for these practices.

the architectural takeaway is to build a testable execution environment around the model. Decide which tools represent meaningful actions, what context they expose and what evidence counts as success. Access to a terminal or external service should not be confused with permission to perform every possible operation; review those boundaries for your application.

use the environment to recover context, execute focused changes and evaluate concrete outcomes before continuing. Isolated subagent contexts and feedback from checks can support that workflow. The examples extend beyond coding, so developers should validate the SDK’s behavior on their own repositories rather than assume the article proves universal software-engineering performance.

Read the original report at Anthropic EngineeringMore on Coding agent SDKs →