AI GLOSSARY · AGENTS AND AGENT TOOLING
Agent harness
Definition
An LLM agent harness is software around a language model that supplies context, executes requested tools and returns their results. It may also provide permission controls, hooks and context management; those features vary by implementation.
Also called: harness, AI harness, harness in AI, what is a harness in AI, what is harness in AI, what is AI harness, coding agent harness.
In plain language
In an LLM-based agent, the language model proposes responses or tool requests. The harness is the program around it that executes permitted requests and returns results. It gathers your request and the relevant files, sends them to the model, runs the commands or edits the model asks for, applies its configured controls, and feeds the results back. Some harnesses ask for approval; others use different policies. Claude Code and Codex are harnesses. Swap the model and the harness stays; change the harness and the same model behaves differently.
Technical definition
An LLM harness commonly runs a loop: assemble the prompt from instructions, history and tool results; call the model; parse any tool calls; check them against permission rules; execute them; append the output; repeat until the model stops. Around that core it may manage the context window, for example by compacting history, and expose extension points such as hooks. Claude Code's documentation describes hooks as user-defined actions that run at specific points in its lifecycle. Anthropic describes agents as typically just LLMs using tools based on environmental feedback in a loop.
Worked examples in this catalogue
Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.
Guide · Illustrative, not executed
What Is Claude Code and What It Can Touch on Your Machine
- What you see
- The guide explains what Claude Code can read, edit and run on your machine, and how permission modes and rules decide which actions go ahead and which prompt you first.
- Why it exercises the concept
- Those permission decisions are made by the harness, not the model. This guide shows the harness's gatekeeping role in a real tool.
Guide · Illustrative, not executed
Claude Code Hooks: Setup, One Example, and Failure Modes
- What to try
/hooks- What you see
- The guide shows how to add a hook in a settings file, read its JSON input and block a tool call with exit code 2. Typing /hooks at the Claude Code prompt opens a browser of configured hooks.
- Why it exercises the concept
- Hooks are extension points in the loop. They run code at fixed moments such as before a tool call, which only a harness can offer.
Skill by Skill Almanac · Illustrative, not executed
agent-hooks-authoring 47/100 · Provisional, not yet measuredScored · Method v0.2 · How we score
- What you see
- The skill helps you write, install, test and debug coding-agent hooks, proving each one by firing it with sample input.
- Why it exercises the concept
- It treats the harness as something you program: you change what the loop does without touching the model.
Coding tool · Illustrative, not executed
Claude Code
- What to try
claude- What you see
- Starting claude in a project opens a session where the model proposes edits and commands and the tool asks for approval where your permission settings require it.
- Why it exercises the concept
- Claude Code is a harness around Claude models. Instruction files, skills, hooks, MCP servers and permissions all attach to the loop, not to the model.
How it shows up when you use agents
When you run claude or codex in a project, the program you are talking to is the harness. The model is a separate service it calls. The harness reads your instruction files, collects the files and command output that fit in the context window, sends them to the model, and acts on the reply. Anthropic's overview describes Claude Code as a tool that reads your codebase, edits files and runs commands. The OpenAI Codex CLI page describes the same shape, and its /permissions command sets when Codex may edit files or run commands without asking.
Most of what you configure lives in the harness. Permission rules decide which tool calls run unprompted. Hooks run your scripts at fixed points in the loop. Skills, instruction files and MCP servers add instructions and tools. Context management, such as compacting a long session, is also the harness's job.
What breaks when this is misunderstood: people blame the model for behaviour that is the harness's, such as a blocked command, a forgotten instruction after compaction or a hook that did not fire. Equally, they credit a model for results that came from good tooling. To compare models fairly, hold the harness constant. See AI agent for the larger idea.
Common confusions
- Harness versus model. In this LLM-agent setting, the model proposes text or tool requests. The harness decides what the model sees, which of its requests run and what happens to the results. Same model, different harness, different behaviour.
- Harness versus agent. An agent is the whole running system with a goal. The harness is its software shell, the loop and controls. See AI agent.
- Harness versus framework or SDK. A framework gives you parts to build a harness. Claude Code's overview says the Agent SDK lets you build your own agents with Claude Code's tools and capabilities.
- Harness versus test harness. In software testing a harness drives code under test. An agent harness drives a model. The words match; the jobs differ.
- Myth. "Hooks and permissions are enforced by the model." When present, those controls run in the harness as ordinary code, which is why they can block an action the model has already asked for.
Related terms
Show all 41 related terms
Terms that mention Agent harness
34 terms mention this one
- Agent hooks
- Agent instruction file
- Agent loop
- Agent orchestration
- Agentic AI
- Agentic coding
- AI agent
- AI agent builder
- AI agent framework
- AI model
- Autonomous agent
- Chatbot builder
- Claude Agent SDK
- Coding agent
- Microsoft Copilot Studio
- Foundation model
- GPT (generative pre-trained transformer)
- GPT4All
- History of AI
- Human in the loop (HITL)
- HumanEval
- Inference cost
- LangChain
- LLM benchmark
- Multi-agent system
- Neural network
- AI observability (LLM observability)
- OpenAI Agents SDK
- Sim-to-real transfer
- SWE-bench
- Terminal-Bench
- Vision-language-action model (VLA)
- Windsurf
- World model
Guides that mention Agent harness
More in Agents and agent tooling
Sources
- Claude Code overview, Anthropic (Claude Code Docs) (accessed 2026-11-23)
- Hooks reference, Anthropic (Claude Code Docs) (accessed 2026-11-23)
- Codex CLI, OpenAI (Codex documentation) (accessed 2026-11-23)
- Building effective agents, Anthropic (accessed 2026-11-23)
Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-25. Wikipedia is never the only source.
Review record
Last verified
Drafted by Claude (original draft) and Codex (targeted revisions); sources and example targets checked by Independent automated source review (OpenAI Codex); not human peer review on 2026-11-25. Last verified .
Change log (5)
- : Independent automated factual/example review completed. Cached US query estimate aligned to receipt; no traffic promise. Final technical gate recorded separately; publication disabled.
- : First version.
- : Corrected explicit MCP-server anchor; link-only verification does not assert complete content approval.
- : Scoped claims and exceptions from independent batch02 review; affected-claim recheck pending.
- : Automated review completed; approved for the staged public release. Search indexing is controlled by the release configuration.