Part
Agent harness
You might say: headless agent loop, coding-agent runner, harness
The program around a model that drives an agent loop in a run. It supplies tools, a system prompt, context-window management, permissions, and hooks, executes the model's tool calls, and returns results in a non-interactive run.
- What it does
- Makes an agent loop repeatable inside a non-interactive run.
- Ask
- Which tools can the agent call, what can it change, and how does the harness know the run is finished?
What to look for
- A headless command with an explicit prompt and allowed tools
- Tool calls and their results in a run log
- A non-zero exit or structured result when the run fails
Connections
- Controls: Model choice
- See also: Instructions
- See also: Security boundary
Sources
- Anthropic, Run Claude Code programmatically, Run Claude Code programmatically
To run Claude Code in non-interactive mode, pass `-p` with your prompt and the CLI options you need:
- Anthropic, Best practices for Claude Code, Give Claude a way to verify its work
Claude does the work, runs the check, reads the result, and iterates until the check passes.
- Theo Browne, What is a "harness"?, LLMs use harnesses
A system that parses the message to identify that syntax and run the code … A method to give the response from the tool back to the LLM
- Theo Browne, What is a "harness"?, Isn't Claude Code a harness?
Claude Code has 2 parts: the interface and the harness
- Matt Pocock, AI Coding Dictionary, Harness
Everything around the model that turns it into an agent: tools, system prompt, context-window management, permissions, hooks.
Use it on your project
teardown-apply: hold "Agent harness" (agent-harness) from the teardown at https://teardownatlas.com/software-factory/ against my project
Paste it into a coding agent that has the teardown skills.
An AI agent wrote this map with the teardown skill. It can contain errors: check the sources before you rely on a part. About and legal