# What Is an AI Coding Agent Harness?

**Short answer.** An AI coding agent harness is software that sits around an
AI coding agent — Claude Code, Cursor, Codex, or similar — and enforces a
small set of controls mechanically, with hard evidence, instead of only
asking the model nicely through a prompt. Where a prompt or a rules file can
only advise, a harness can check a deterministic condition and refuse to
proceed when it fails.

## Why "advice" is not enough

Most AI coding tooling works by injecting instructions into the model's
context: a system prompt, a rules file, a slash command. That is real and
useful, but it has one structural limit — the model can narrate compliance
and keep going anyway. Nothing mechanically stops a runaway retry loop,
unbounded spend, or a destructive command if the only defense is a paragraph
asking the agent to be careful.

A harness exists specifically to stop the failure modes that narration
cannot: a loop that never stops failing, spend with no ceiling, an
irreversible command, delivery nobody reviewed.

## What Maistik Forge's harness actually enforces

Forge is mostly a **configurator** — it renders instructions the agent's
model then carries out, which is the right shape for anything that needs
judgment. Around that, it ships a small, named set of controls that
**enforce**: they check evidence the tool can verify on its own and return a
non-zero exit when a run has gone wrong, regardless of what the agent
claims. See [the enforcement doctrine](/harness/overview) for the full
list — the ones referenced most often are the [guardrails
gate](/harness/guardrails), the [verify circuit-breaker](/harness/circuit-breaker),
the [spend budget](/harness/budget), and the [secret & PII
scan](/harness/secscan).

## Questions people actually ask

### Is a harness the same thing as an agent?

No. A harness has no model and cannot write code on its own — it wraps and
bounds an agent someone else supplies. Forge's [bounded autonomous
run](/harness/autonomous-run) makes this explicit: it orchestrates an
executor you pass in via `--cmd` and enforces gates between iterations; it
never generates code itself.

### Is a rules file (like a `.cursorrules` file) a harness?

No, and this is the most common confusion. A rules file is advisory context
injected into the model — useful, but the model can still ignore it under
pressure. A harness additionally runs a real check outside the model and
returns a non-zero exit when that check fails. See [Forge vs Cursor
rules](/compare/cursor-rules) for the full comparison.
