Harness engineering

What is a coding harness?

Everything in the agent that is not the model. The part you can actually change.

Download for macOS
v0.1.33 · .dmg · Apple Silicon & Intel
Signed & notarized by Apple · opens without a Gatekeeper warning
sha256 698955a0187bc039f4c74f5d05a9f10fbb27376a45788a0a241d1326b73873c7
Download for Windows instead
$curl -fsSL https://lucidtrain.com/install.sh | sh

A coding harness is everything in an AI coding agent except the model itself, commonly written as Agent = Model + Harness. It is the layer that assembles context, exposes tools, runs the agent loop, interprets tool calls, enforces approvals, and verifies the result before a human sees it. Two agents running the identical model produce very different output depending on their harness, which is why the term exists at all.

The definition people are converging on

Birgitta Böckeler, writing on martinfowler.com in April 2026, puts it directly: the term has emerged as shorthand for everything in an AI agent except the model itself, Agent equals Model plus Harness. The formulation originates with LangChain's piece on the anatomy of an agent harness. The VS Code team's version is the most concrete: the harness is the layer that assembles context, exposes tools, runs the agent loop, interprets tool calls, and turns a model's output into something useful in the editor.

Why the distinction earns its keep

Because the model is the part you cannot change and the harness is the part you can. Run the same frontier model through two different harnesses and the results diverge sharply, which means most of the engineering leverage available to a team sits in the harness rather than in model selection. That is also why harness comparisons and benchmarks have appeared faster than harness definitions: practitioners felt the difference before anyone named it.

Guides and sensors

Böckeler splits the controls in two. Guides are feedforward: they anticipate the agent's behaviour and steer it before it acts, raising the probability of a correct first attempt. Sensors are feedback: they observe after the agent acts and help it self-correct, and she notes they are particularly powerful when their signals are written for a language model to consume, such as a linter message that carries its own correction instructions. She describes the combination as a cybernetic governor, regulating the codebase toward a desired state.

Computational and inferential

The second axis is cost. Computational controls are deterministic and fast, run on a CPU in milliseconds to seconds: tests, linters, type checkers, structural analysis, with reliable results. Inferential controls are semantic analysis, AI code review and LLM-as-judge, typically GPU-bound, slower, more expensive and non-deterministic. A harness that reaches for the inferential control when a computational one would do is burning money and latency for a less trustworthy answer.

Where Lucid Train sits

Lucid Train is a harness, and unusually it can run other harnesses as its execution engine: Claude Code, Codex, Cursor and OpenCode are interchangeable per tab, each CLI's native permission model mapped onto one set of approval modes. Its own controls include sub-agents that execute in isolated git worktrees with the diff applied back, concurrent read-only explorers, automatic context compaction with an emergency retry on provider overflow, Claude Code-compatible SKILL.md packs, and a publish-state guard that blocks destructive commands once an acceptance check has passed.

The four control types, after Böckeler

ComputationalInferential
Guide (before the act)Type systems, scaffolds, templates, lint configPrompts, skills, AGENTS.md, personas
Sensor (after the act)Tests, linters, type checks, structural analysisAI code review, LLM as judge, semantic checks
SpeedMilliseconds to secondsSeconds to minutes
DeterminismReliable and repeatableNon-deterministic
Runs onCPUGPU or NPU
FAQ

Questions

What is a coding harness?

Everything in an AI coding agent except the model: context assembly, tool definitions, the agent loop, approval policy and verification. Agent equals Model plus Harness.

Is a coding harness the same as an agent framework?

No. A framework is a library for building agents. A harness is the specific running configuration around one model: which tools it can reach, what context it gets, what it must ask permission for, and what checks its output before a human sees it.

Is Claude Code a harness?

Yes. Claude Code is a harness around Anthropic's models. Lucid Train is also a harness, and can run Claude Code as one of its execution engines.

Who coined the term?

It emerged from practice rather than from one paper. LangChain's anatomy-of-an-agent-harness piece is the usual origin cited for Agent equals Model plus Harness, and Böckeler's April 2026 article on martinfowler.com is the most complete treatment of what belongs in one.

Related