A harness is the code and tooling built around a piece of software or an AI model so it can be run under control. A test harness supplies what a test suite needs to run, an agent harness supplies the tools and loop that let a large language model act as an agent, and an evaluation harness runs a model against benchmark tasks.
The word has three common senses, and which one is meant depends on context.
Test harness
In software testing, a test harness is the set of drivers and test doubles needed to run a test suite, as the ISTQB glossary defines it. A driver controls or calls the code under test, and a test double is a replacement component, such as a stub, that stands in for something the code depends on.
Agent harness
In AI, an agent harness, also called an agentic harness, is the software around a language model that lets it act rather than only respond. Anthropic’s Claude Code documentation defines it as “the tools, context management, and execution environment that turn a language model into a capable coding agent,” and says, “Claude Code is the harness; Claude is the model inside it.” The same glossary lists what the harness supplies: “file access, shell execution, permission gating, memory loading, and the loop that chains actions together.” In Claude Code, permission gating is part of the harness, so what the agent may do without asking depends on how the harness is configured. What it can do also depends on the credentials and systems it is given access to. Coding agent products such as Claude Code are agent harnesses built for software development: the coding agent is the harness and the model working together.
The related phrase harness engineering appears in the title of an OpenAI engineering post by Ryan Lopopolo dated February 11, 2026, “Harness engineering: leveraging Codex in an agent-first world.” The post describes a team whose primary job was no longer to write code, “but to design environments, specify intent, and build feedback loops that allow Codex agents to do reliable work.”
Evaluation harness
An evaluation harness runs a model against a fixed set of benchmark tasks and scores the results, so different models or versions can be compared the same way. EleutherAI’s Language Model Evaluation Harness, an open source example under the MIT License, describes itself as “a unified framework to test generative language models on a large number of different evaluation tasks.”
Sources
- test harness, ISTQB Glossary. Retrieved October 21, 2026.
- Claude Code glossary: Agentic harness, Anthropic. Retrieved October 21, 2026.
- How Claude Code works, Anthropic. Retrieved October 21, 2026.
- Harness engineering: leveraging Codex in an agent-first world, Ryan Lopopolo, OpenAI, February 11, 2026. Retrieved October 21, 2026.
- Language Model Evaluation Harness, EleutherAI, GitHub repository. Retrieved October 21, 2026.