---
title: Harness
order: 3
description: "The deterministic scaffolding around the work on a change, for a person or an agent: compiler errors, formatters, linters, checks, gates, leases and hooks, placed at points a person chose. Around an agent's loop, magus supplies one and keeps it outside."
tags: [glossary, agents]
---

# Harness

The deterministic scaffolding around the work on a change, whoever does it:
compiler errors, formatters, linters, checks, permission gates, typed contracts,
leases, graph-backed answers and hooks, placed at points a person chose, with
judgment covering the steps between them. It holds a person to the green path
the same way it holds an agent
([A harness is not an agent thing](../design/principles/a-harness-is-not-an-agent-thing.md)).
Around a model's agent loop, magus supplies one (guard hooks, skills, MCP tools, job leases) and keeps it outside
the host's loop. Some vendors use the word for the loop itself; magus keeps the
two apart.

- Is: code and reviewed text that answer or decide the same way every time.
- Is not: the model, the agent loop that reads a tool call and runs it, an
  agent framework, or a prompt.
- Layers, from the inside out: the model; the host's agent loop (Claude Code,
  Codex, Cursor, OpenCode); the harness magus supplies; magus's deterministic
  workspace model, which the harness reads.

## Elsewhere

Anthropic calls Claude Code and the Claude Agent SDK an agent harness: the loop that sends the
model a prompt, runs the tools it calls and feeds back the results. A test harness is the
scaffolding that drives code under test. magus means neither: its harness is the
deterministic checks around a host's loop, and the loop stays the host's.

## Example

`magus describe harness` shows what a wired host needs: the guard hooks, the skills and the
MCP tools magus supplies.

```sh
magus describe harness
```

## Used in

<!-- BEGIN GLOSSARY USAGE (generated by glossary-usage-generate from the knowledge graph; edit the generator, not this list) -->

In the docs:

- [The agent harness benchmark](../benchmarks.md#the-agent-harness-benchmark)
- [Harness-effectiveness benchmark](../benchmarks/2026-09-10/anthropic/claude-opus-5.md#harness-effectiveness-benchmark)
- [Harness-effectiveness benchmark](../benchmarks/2026-09-10/anthropic/claude-sonnet-5.md#harness-effectiveness-benchmark)
- [6. Harness and host configuration](../decisions/0005-deterministic-answers.md#6-harness-and-host-configuration)
- [The outer harness stays outside](../design/judgment/the-outer-harness-stays-outside.md#the-outer-harness-stays-outside)
- [A harness is not an agent thing](../design/principles/a-harness-is-not-an-agent-thing.md#a-harness-is-not-an-agent-thing)

<!-- END GLOSSARY USAGE -->

## See also

- [The outer harness stays outside](../design/judgment/the-outer-harness-stays-outside.md)
- [A harness is not an agent thing](../design/principles/a-harness-is-not-an-agent-thing.md)
- [Agent](agent.md)
- [Tool](tool.md)
- [Skill](skill.md)
