YardletBlog

What Does "Harness" Mean? The 4 Layers of a Coding Agent Stack

People use "harness", "multiplexer", "orchestrator", and "ADE" for different parts of the same setup. Splitting the coding agent stack into four layers explains why the names collide, why Layer 3 workarounds expire, and what Layer 4 should actually do.

On November 30, Theo Browne posted, "I give up. You can call T3 Code a harness." That single line sums up how messy the vocabulary around coding agents has become. A CLI runtime is called a harness. A bundle of skills, hooks, and prompt rules is called a harness. A desktop app that runs Claude Code and Codex side by side is called "a harness for your harnesses", an orchestrator, an agent multiplexer, a control surface, a workbench, or an ADE (Agentic Development Environment).

One word keeps getting stretched because there are actually four different layers in a modern coding agent setup, and in practice those layers frequently reach into each other.

Output
Layer 4  Outer Workspace   PTY multiplexers, protocol workbenches, session bridges
         -- ACP (emerging Layer 2 <-> Layer 4 protocol) --
Layer 3  Sub-Harness       Version patches, taste rules, workflow plugins, domain context & hooks
         -- AGENTS.md / SKILL.md (emerging shared file conventions) --
Layer 2  Core Harness      Provider-shipped CLIs (Claude Code, Codex) / independent CLIs (OpenCode, Pi)
Layer 1  Model             Frontier and open-weight LLMs

Cross-cutting tool standard: MCP (connects external tools across Layers 2, 3, and 4)

The 4 layers at a glance

LayerWhat it ownsExamples
Layer 1: ModelWeights, reasoning, raw token generationClaude, GPT, Gemini, open-weight models
Layer 2: Core HarnessThe agent loop: tool execution, file edits, shell commands, context compaction, permission prompts, session historyProvider-shipped: Claude Code, Codex, Antigravity CLI, Kimi Code, Grok Build. Independent: OpenCode, Pi, Hermes Agent
Layer 3: Sub-Harness (Workflow Overlay)Everything layered on top of a core harness without replacing its binary: rules, skills, hooks, domain context, and orchestration workflowsAGENTS.md, CLAUDE.md, skill packs, hooks, superpowers, oh-my-claudecode, oh-my-opencode, gstack
Layer 4: Outer WorkspaceArranging multiple sessions, accounts, diffs, browsers, shared MCP connectors, or remote devices around Layers 1 to 3PTY multiplexers (tmux, cmux), protocol-wired workbenches (Yardlet, T3 Code), remote/team session bridges

Layer 1 and Layer 2: Models and core harnesses

A core harness is the agent architecture itself: the runtime that turns a language model into a coding agent by running the loop, calling tools, compacting context, enforcing permissions, and persisting sessions on disk.

Core harnesses already split into two distinct patterns:

  • Provider-shipped harnesses, where a lab ships the model and its runtime together (Claude Code, Codex, Antigravity CLI, Kimi Code, Grok Build). Prompt caching, compaction, and tool-loading changes tuned to that lab's models tend to ship here first.
  • Independent harnesses, which pull models through APIs or existing logins and build the harness loop from scratch (OpenCode, Pi, Hermes Agent). Developers pick them when they want to switch models freely, read the loop code directly, or customize the runtime.

Both kinds sit in Layer 2 because both own the model loop.

Recent benchmarks also make clear that there is no single "best" harness across frontier models. In Google DeepMind's MultiVerse benchmark (12 models evaluated across 35 simulated services and 809 tools under one bare loop and four end-user harnesses: OpenCode, OpenClaw, OpenHands, and Hermes), no harness was consistently best. On average, end-user harnesses performed nearly identically to a plain model-and-tool loop, even while producing large gains on some model-setting pairs and losses on others. Strong models do not rely on one magic harness, and a harness that helps one model can hurt another.

Layer 3: The sub-harness (and why four very different things get mixed here)

Layer 3 is the most crowded and fastest-moving layer in the entire stack. Almost nobody trains a Layer 1 model, and relatively few teams maintain a Layer 2 CLI runtime. By contrast, Layer 3 is mostly plain Markdown, scripts, and hooks, so developers publish new skill packs, review loops, and multi-agent setups on GitHub every week and call them "my harness".

When people talk about "harness engineering" today, they usually mean Layer 3. Yet sorting Layer 3 by file type hides what actually matters. It is much more useful to split Layer 3 by what problem it solves and how long it lasts:

Layer 3 typeWhat problem it solvesExamplesShelf life
1. Model or CLI version workaroundsPatches quirks, bugs, or missing features of one specific model generation or CLI releaseHooks that keep a model from stopping early, third-party memory or tool-search shims for older CLIs, CLI-specific prompt workaroundsShortest. Often expires on the next model or CLI update, and can actively hurt newer models
2. Default-bias and taste steeringPushes back against generic LLM habits that persist even as models get smarterWriting-voice and anti-cliche skills, UI design-craft rules, code style and testing standardsLong. Smarter models still default to an average style, so your own taste needs to stay explicit
3. Complex workflows and orchestrationBreaks multi-step work into specs, plans, tests, independent reviews, and role handoffssuperpowers, gstack, oh-my-claudecode, oh-my-opencode, custom coordinator-worker pipelinesMedium to long, shifting form. Generic loops get absorbed into Layer 2; team-specific review gates remain
4. Domain context and hard guardrailsSupplies local facts, repo rules, and safety boundaries no model weights can ever containRepo AGENTS.md, company context, deploy checklists, deterministic hooks blocking destructive commandsPermanent. No future model knows your private codebase, people, or deploy boundaries without it

A lot of the churn in Layer 3 comes from dumping all four types into the same folder. Plain instruction files travel reasonably well between Claude Code, Codex, and OpenCode. Version-specific workarounds, hook formats, and plugin APIs are tightly coupled to one core harness and rot quickly when Layer 1 or Layer 2 moves on.

Layer 4: The outer workspace

Once you run several sessions across repositories or accounts, you end up needing an outer layer to organize them. Layer 4 itself has already split into at least three shapes:

  • PTY multiplexers (tmux, Ghostty splits, agent-oriented terminals like cmux). Each harness runs in a terminal pane, and the outer tool watches output or OSC escape sequences for waiting states. You get zero adapter lag and each CLI's native TUI, at the cost of having only terminal text instead of typed events.
  • Protocol-wired workbenches (desktop apps that connect over structured CLI protocols). Instead of scraping a PTY, the app speaks each harness's machine protocol. While building Yardlet, we wired 10 built-in harnesses across 6 wire transports: codex app-server --stdio (Codex), stream-json (Claude Code, Cursor Agent), ACP (OpenCode, Antigravity CLI, Kimi Code, Grok Build, Hermes Agent), MSP (Muse Code), and RPC (Pi). Structured events enable native approval cards, phone approvals, multi-account quota routing, and shared panels, at the cost of maintaining adapters as upstream CLIs evolve.
  • Session bridges and remote surfaces, which expose running CLI sessions to a phone, browser, or team chat stream instead of trying to be a full desktop IDE.

Protocols growing between the layers

One reason these boundaries are getting easier to talk about is that several pieces are graduating out of individual harnesses and turning into shared protocols or conventions across layers:

  • MCP (Model Context Protocol) sits sideways across Layers 2, 3, and 4. Like LSP for editors, it is no longer part of any single harness. Layer 2 runtimes speak it natively, Layer 3 workflows call its tools, and Layer 4 workspaces can attach shared MCP servers across every CLI.
  • ACP (Agent Client Protocol) targets the boundary between Layer 2 and Layer 4. Five of the ten harnesses we wired into Yardlet (OpenCode, Antigravity CLI, Kimi Code, Grok Build, and Hermes Agent) already speak ACP, while others still use their own transports (app-server, stream-json, MSP, RPC). As ACP matures, the adapter cost of supporting multiple harnesses at Layer 4 drops.
  • **AGENTS.md and SKILL.md** are not wire protocols, though they play a similar role inside Layer 3 by letting repo instructions and reusable skills move across CLIs without being rewritten for each one.

As these cross-layer standards settle, swapping any one layer without replacing the rest gets much easier.

Why the layers blur and interfere in practice

A clean diagram makes the stack look tidy, though real tools cross these boundaries all the time. That overlap is the main reason the vocabulary stays muddy.

Layer 2 and Layer 3 constantly pull on each other. Patterns that start as Layer 3 plugins or prompt workarounds (memory files, skill loading, subagent delegation, tool search, lifecycle hooks) regularly get absorbed into Layer 2 as built-in CLI features. At the same time, heavy Layer 3 plugins use hooks and injected instructions to override Layer 2's default loop, so a minor CLI update can break a Layer 3 setup overnight.

Layer 4 tools often reach down into Layer 2 and Layer 3. To track session state, trigger notifications, or bundle opinions into the workflow, many outer workspaces write hooks into ~/.claude/settings.json, drop global skill files into a harness's config folder, or edit shared MCP config files. Once a Layer 4 app modifies your Layer 2 and Layer 3 files, it starts behaving like a sub-harness, collides with rules you already wrote, and leaves residue behind if you try another tool.

What Layer 4 is actually for (and how it shaped Yardlet)

In my own personal and company work, I swap and experiment with Layer 2 and Layer 3 all the time. Different tasks call for different models and harnesses, old version workarounds get deleted, and repo rules evolve every week.

Because Layers 1, 2, and 3 keep moving, I do not think Layer 4 should try to lock everyone into one heavy, opinionated ADE. Workflows above Layer 2 diverge sharply from person to person anyway: some developers live happily in tmux, some prefer a few small independent tools, and with coding agents making personal software cheap to build, many will tailor their own outer setup.

What actually matters at Layer 4 is staying a light, non-intrusive layer that lets you swap Layers 1, 2, and 3 freely, while giving you real everyday convenience around them. In practice, that means passing ephemeral per-process config and MCP servers (--mcp-config, thread config, ACP mcpServers) at launch, never writing into ~/.claude or ~/.codex, and keeping quality-of-life features (structured approval cards, multi-account quota routing, shared diff/browser/simulator panels, remote phone access) cleanly outside each CLI's own files. If a terminal multiplexer or a different tool fits you better next month, removing Layer 4 should leave your Layer 2 runtimes and Layer 3 rules untouched.

That exact principle is what shaped Yardlet, the open-source Swift and AppKit workbench I built for my own daily work on macOS (MIT-licensed, overview at yardlet.app). I do not assume one ADE fits everyone. I built it to stay light and out of the way of Layers 1, 2, and 3, so anyone who wants protocol-level convenience without writing adapters for six CLI transports from scratch can start there and still walk away cleanly at any time.