The Harness
The software loop around the model: tool dispatch, context management, retries, and compaction. The half of an agent that is code rather than model.

What it is
An agent is a model plus a loop. The model decides; the loop does everything else: it dispatches tool calls, feeds results back, manages the context window, retries failures, and compacts the conversation when it grows too long. Anthropic's engineering post Scaling Managed Agents (April 2026) names that loop the harness, and separates it cleanly from the deployment, the infrastructure the loop runs on.
The concrete jobs a harness does, drawn from Anthropic's own harness writing: run the tool-use loop, decide what stays in context, apply prompt caching, trigger compaction as the context window fills, and keep a long task on the rails with progress files and checkpoints. The engineering post Effective harnesses for long-running agents (November 2025) adds the long-horizon toolkit: initializer agents, progress files, environment management.
Why it matters
Anthropic's central claim about harnesses is that they age badly. The blog post Agent harness design (April 2026) puts it directly: "Agent harnesses encode assumptions about what Claude can't do on its own, but those assumptions grow stale as Claude gets more capable." Scaffolding written to compensate for last year's model becomes drag on this year's. The Managed Agents post makes the same argument the reason for the product's design: harness assumptions go stale, so the platform is built around interfaces that stay stable while harnesses change underneath.
The practical consequence: treat a harness as a depreciating asset. Code you wrote to babysit the model should be deleted as models improve, not defended.
Who supplies it
Every one of the four ways to build is an answer to two questions, and this is the first one: who supplies the harness. Write a manual loop over the Messages API and you own it. Use Tool Runner or the Agent SDK and the SDK owns it. Use Managed Agents and Anthropic runs it as a service, with compaction and caching included by default (per the Managed Agents docs; verify against platform.claude.com/docs, beta surfaces drift).
How it shows up in the field
- CircleCI built Chunk, its task-to-validated-pull-request agent, on the Agent SDK's harness rather than its own: "We could not have built Chunk without the Claude Agent SDK," per its customer story.
- Greptile runs its code-review agent on the Agent SDK and reports "~90% cache hit rates" from the harness's caching behavior. (source)
- Sentry moved its fix-writing agent onto Managed Agents so a single engineer could ship the integration, saying the platform "eliminated the ongoing operational overhead of maintaining bespoke agent infrastructure." (source)
Further Reading
- The Deployment: the other half of the split, the infrastructure the loop runs on.
- The Four Ways to Build: who supplies the harness and deployment on each path.
- Long-Running Work: the workload class that stresses harnesses hardest.
- Prompt Caching: the harness behavior with the largest cost consequence.