Six engineering articles

Harness Engineering: How Coding Agents Turn Decisions into Work

A coding agent's harness contains code for checks of the model's tool calls. It decides if the calls are permitted to run. It runs permitted calls and records their results. These six articles examine one repair and the tests necessary to verify the last change.

A technician puts one orange drive wheel into an open machine with black outlines. The fixtures around it guide its work.
Controlled work from movement of the drive wheel is possible only with the mechanism around it.
Agent loopEdit toolsContextPermissionsSubagentsInterfaces
  1. Part 1

    From Model Response to Agent Execution

    How a coding agent's loop runs tool calls, handles cut-off responses, errors, and cancellation, and decides when a task is done, traced through one bug fix.

  2. Part 2

    A Patch Is a Protocol

    Why AI coding agents' edits fail, and how an edit tool should handle duplicate matches, patch errors, partial writes, and the regression test that follows.

  3. Part 3

    A Transcript Is Not the Context Window

    How coding agents choose what the model sees: code search, compaction summaries, AGENTS.md or CLAUDE.md files, and memory checked against current files.

  4. Part 4

    Who Gets to Run This Command?

    How a coding agent decides which commands may run: instructions, permission rules, approval prompts, and OS sandboxes, shown with one blocked package install.

  5. Part 5

    More Agents, More State to Own

    When subagents help a coding agent: split research, use worktrees for separate edits, track budgets and cancellation, then test the final combined patch.

  6. Part 6

    When the Harness Becomes a Platform

    Skills, hooks, plugins, MCP, ACP, and SDKs extend a coding agent in different ways. Learn what each one carries and when a task actually needs it.

One repair, six engineering questions

A document-preview service caches pages by document ID. But the page also depends on locale.

The agent must find the mismatch and change the key. It must examine regression tests and get permission to run commands. It must divide the investigation and verify the last change.

Part 1 examines the agent loop. Part 2 examines a patch in an edit tool. Part 3 examines the context as the conversation increases. Part 4 examines permissions and sandboxes. Part 5 examines subagents and shared state. Part 6 examines skills, hooks, plugins, MCP, ACP and SDKs.

Read in sequence for the full trace. Or start with your current problem. It helps if readers know LLMs and tool calling. Each article gives information about its systems concepts. Short code examples give information about decisions.

Evidence and interpretation

The first reference is the study by Barbaste and colleagues, Harness Engineering: Anatomy, Architecture, and Evolution of Coding Agents — A Source-Code Study of Eleven Systems.

Compare a design with the work that it must do. Interface names alone cannot prove speed, quality or security.

Related reading: how AI infrastructure changes model behavior, how research automation does checks of results, and where agents store and change capabilities.