Blog · Guide · 27 November 2026

What Is an Agent Harness, and What Sits Around It

An agent harness is the program around a language model that turns it into an agent: the loop that calls the model again after each action, the tools it can use, the context it is given, and the permissions that decide what it may do. Claude Code, Codex, Factory's Droid, Cursor's agent and Gemini CLI are harnesses. The model is the engine; the harness is everything else in the car. This article explains what a harness owns, why vendors now compete on harnesses rather than only on models, and what no single harness can see once several agents work on one codebase.

The definition: model inside, harness around

Anthropic's Claude Code glossary gives the plainest version (read 27 Nov 2026): an agentic harness is "the tools, context management, and execution environment that turn a language model into a capable coding agent. Claude Code is the harness; Claude is the model inside it." It lists what the harness supplies: "file access, shell execution, permission gating, memory loading, and the loop that chains actions together."

Others say the same in fewer words. Matt Pocock's dictionary of AI coding: "Everything around the model that turns it into an agent." Hugging Face's agent glossary (May 2026): "The harness is what makes the agent run."

Scaffold vs harness

The two words are often used interchangeably, and Hugging Face's glossary is titled "Harness, Scaffold, and the AI Agent Terms Worth Getting Right" because they are not quite the same. In common usage a scaffold is the structure built around a model for a particular task (prompts, a fixed chain of steps, a specific tool set), often for an evaluation. A harness is the general runtime that runs the model on any task you give it. In coding, the harness is the product you install; the scaffold is how you configure it for your repository.

What a coding agent harness owns

Whatever the vendor, a coding agent harness is responsible for six things:

Part What it does Example in Claude Code
The loop Calls the model, runs the tool it chose, feeds back the result, repeats until done The agentic loop: gather context, act, verify
Tools The actions the model can take Read, Edit, Bash, web search, subagents
Context What the model sees each turn System prompt, CLAUDE.md, files read, tool output
Compaction What happens when context runs out Automatic summary; /compact
Permissions Which actions run without asking Permission modes, allow and deny rules
Hooks Fixed points where outside code runs PreToolUse, PostToolUse, Stop, PermissionRequest

Two of these matter for anyone building around a harness. Permissions decide when a person is asked, and in an unattended run there may be no person. Hooks are the only reliable way for outside code to see and block what the agent does, because they fire every time, not when the model decides to call something. Anthropic's glossary is explicit: "Hooks are deterministic: they fire at fixed lifecycle points rather than at the model's discretion."

Harness engineering

Because the harness controls what the model sees and can do, much of an agent's quality comes from how the harness is configured. HumanLayer's March 2026 post "Skill Issue: Harness Engineering for Coding Agents" argues that most agent failures are "not a model problem. It's a configuration problem", and lists the levers: CLAUDE.md and AGENTS.md, MCP servers (kept few), skills, subagents, hooks, and back-pressure from type checks and tests. It credits Mitchell Hashimoto with the goal: "engineer a solution such that the agent never makes that mistake again."

For a team, harness engineering usually means:

  • A short instructions file that says how to build, test and where things live.
  • Fast checks the agent can run (types, tests, lint) whose output is short when they pass.
  • Hooks for anything that must always happen: formatting, blocking edits to generated files, reporting activity.
  • Permission rules so routine commands do not stop the agent, and risky ones always do.

Why vendors now compete on the harness

For a while, the model was the product and the harness was a thin wrapper. That has changed. Factory (the company at factory.com, not Forkit's feature of the same name) called its October 2026 release "Droid 1.0: Building a Frontier Harness" and describes the harness as everything around the model: prompts, tools, how results come back, and the loop. Warp's Oz goes a level up and runs several harnesses. Its May 2026 post "A single pane of glass for managing all of your cloud agents" names Claude Code, Codex and Warp Agent, and argues that "agent performance is a function of the harness and the model together" and that "companies shouldn't have to bet their future on a single model or harness" (read 27 Nov 2026).

That is the multi-harness idea: the same task can go to whichever harness does it best, and a platform above compares them. Tembo makes the same pitch for background agents: its features page says it is "Harness-agnostic, so you're never locked in" (read 27 Nov 2026).

What sits outside any harness

A harness is built around one session: one model, one context, one working directory, one person at the keyboard (or none). Everything it knows, it knows about itself. Once several agents work on the same codebase, a set of questions appears that no single harness can answer:

  • Is another agent changing this file right now? A harness sees its own checkout. Worktrees and sandboxes give each agent a separate copy, which prevents overwrites but hides overlap until merge time.
  • Would my change merge with theirs? Only something that sees every agent's diff can say.
  • Who should answer this permission request? In a headless run, a harness either asks nobody or falls back to a default. Twenty agents asking the same question get twenty separate prompts.
  • How much has this whole run cost? Each harness can report its own session. A run spread over Claude Code, Codex and Cursor has no single meter.
  • How do I stop all of them? Each harness has its own stop; a run across vendors does not.
  • What did a person decide, and does it still hold? An approval given in one session means nothing to another.

These are coordination questions, and they sit between harnesses, not inside one. Vendors do answer some of them for their own agents (Claude Code's agent teams share a task list and mailboxes on one machine; Devin's coordinator manages other Devins), but the answer stops at the vendor's border. More on this in multi-agent architectures compared and what is agent orchestration.

Where Forkit sits

Forkit is not a harness, and its servers never run agents (its CLI can start them on your own machines). It connects to the harnesses you already use through their hooks, and supplies the shared state the questions above need:

  • File claims that refuse an edit to a file another agent holds, naming the holder.
  • A merge check that compares each agent's diff with its peers' before it finishes (textual, the way git decides a merge; it does not run tests).
  • Permission requests answered by rules, by one designated agent, or by a person, with identical requests from a fan-out shown as one question.
  • Typed messages between agents under limits the server enforces.
  • A dollar budget and a stop for a whole fan-out (costs are estimates at list prices).

Hooks are how it gets there, which is why Claude Code hooks vs MCP matters: MCP gives the agent tools it may choose to call, while hooks run whether or not the model remembers. Claude Code and Codex connect through hooks that have been run with real agents. Cursor, Gemini CLI, GitHub Copilot and Devin are supported through their own hooks as of 26 Nov 2026, built from each agent's documentation and tested with the payloads those docs describe, but not yet run against the real agents. Cursor's CLI is reported to skip hooks in some versions. Agents with no hooks at all (Aider, for example) can run under forkit run, which watches the checkout and makes claimed files read-only.

When you do not need anything around the harness

If you run one agent, or a few that never touch the same files, the harness is enough. Its own subagents, worktrees and permission modes cover the work, and adding a coordination layer would only add setup. The case for something outside the harness begins when agents overlap in files, belong to different people, come from different vendors, or run with nobody watching.

Sources

Read on 27 Nov 2026: