Skip to main content

11 · Agents and AI engineering

Coding agents: harnesses and skills

The tools that let agents write code, the ways teams teach them how a project works, and how to run several of them from one system.

13 minCase study: docket (opens in new window) · Tack (opens in new window)

A model that writes code only produces text. Something has to read the project, choose what the model sees, run the commands it asks for, check with you before risky steps and keep the session going. That program is the 's , and it shapes the result as much as the model does.

This lesson covers four ideas: what a harness is made of, how to give it instructions without confusing advice with control, how to run it with nobody at the keyboard, and how to avoid tying your process to one product.

What a coding harness is

On every turn, the four layers work together like this:

  1. Modelasks for an action
  2. Permissionsallowed, asked about or refused
  3. Toolsread, edit, run a command
  4. Resultadded to what the model sees next

back to the model, until the task is done

One turn of a coding harness. The model only asks; the harness decides what runs and what the model sees next.

The general idea is covered in Tool calling and harnesses. Products change quickly; what lasts is where they run, whether the code is open and whether they tie you to one model vendor (checked in September 2026):

Product Where it runs Open source Models
Claude Code (Anthropic) terminal, IDE, desktop, web no, commercial license Claude family
Codex CLI (OpenAI) terminal; also IDE and cloud yes, Apache-2.0 OpenAI; configurable providers
Gemini CLI (Google) terminal yes, Apache-2.0 Gemini
OpenCode terminal, IDE, desktop yes, MIT many providers
Cursor its own editor no many providers
Copilot coding agent (GitHub) cloud, on GitHub Actions no those GitHub offers

Advice versus rules

Every harness lets you teach it about your project. For each piece, ask: is this advice the model reads, or a rule the harness enforces?

Instruction files are advice. is an open format: a Markdown file at the root of the repository with what an agent needs to work there (commands, conventions, constraints). Codex, Cursor, Gemini CLI, Copilot and others read it, and since late 2025 it has been stewarded by the Linux Foundation's Agentic AI Foundation, alongside . Claude Code reads CLAUDE.md instead, and its documentation suggests having that file import AGENTS.md so there is one source. These files are context, not control: the model tries to follow them, nothing more.

Skills are advice that loads on demand. A skill is a folder with a SKILL.md file (a name, a short description and step-by-step instructions) plus optional scripts and references. At startup the agent reads only each skill's name and description, like book spines on a shelf, and opens the rest when a task matches. This keeps unused skills almost free. Anthropic created the format and released it as an open standard (agentskills.io); Codex, Gemini CLI, OpenCode, Cursor and GitHub Copilot are among the adopters.

and permissions are rules. A hook is a command the harness runs on a fixed event, such as session start or before a tool call, whatever the model wants. Permissions decide what the agent may do at all.

The working rule: what applies always goes in the instruction file; a procedure for some tasks goes in a skill; what must hold without exception goes in a hook or a permission.

  • Instruction filealways loaded
    • Advice the model reads
  • Skillloaded when a task matches
    • Advice, in stages
  • Hook or permissionenforced by the harness
    • A rule that holds
Only the third column binds the agent. The first two are context the model tries to follow.

In docket

  1. Instruction fileread in every session
  2. Skillsopened when the task calls for them
  3. Deeper skill notesonly for the case at hand
  4. Session-start hookat start, on resume, after condensing
docket keeps what loads on every run small and leaves detail to what loads only when needed. The hook runs no matter what the model decides, and restores a short summary of the work's state. Source: Development harness and context policy

Running with nobody at the keyboard

To automate a harness, for example in a pipeline, you run it in : a task goes in and a machine-readable result comes out. Claude Code, Codex and Gemini CLI all offer one; Codex defaults to a read-only .

With nobody present, nobody answers "may I run this command?". Decide in advance what is allowed and what happens to the rest: denied, the run stopped, or held until someone approves from elsewhere. Never run headless with broad permissions outside a sandbox (Sandboxing and agent security).

Several harnesses behind one interface

If your platform launches coding agents, plug each harness into one interface you own, and record what each can guarantee, because they differ. Our two products take opposite paths.

A closed harness decides for itself what to do with your policy, and you cannot fix that from outside.

Common risks

Putting it into practice

  • Choose one harness or several on purpose. One simplifies support, licensing and audit, at the price of depending on one vendor's pace, pricing and models.
  • Keep instructions portable. AGENTS.md and skills in the open format move with you; hooks and settings usually must be rewritten per product.
  • Put every hard rule in permissions, hooks or a sandbox, never only in an instruction file.
  • Test each adapter if you automate several harnesses, and write down what each guarantees.

Sources

Go deeper

docket's documentation shows these ideas applied, and Tack's shows what launching several harnesses looks like in practice:

  • Development harness and context policy explains the four context layers docket uses for its own development and how Codex, Claude Code and OpenCode each read them.
  • ADR 0002: Own the loop, rent the protocols records why docket runs its own instead of building on an agent framework.
  • ADR 0001: harness mode describes how docket runs one agent, with no prompts to answer, inside a workspace another program provides.
  • Agent Runners & Fleet Execution compares the harnesses Tack can launch: what each one measures, whether it can pause to ask you, and how much of Tack's permission policy it honours.

Key takeaways

  • A coding harness is the loop, tools, permissions and context around a model.
  • Instruction files and skills are context, not control: what must hold goes into permissions, hooks or a sandbox.
  • Skills load in stages, so they suit procedures; audit them like software.
  • Headless runs need every permission decided in advance.
  • Several harnesses belong behind one interface that states what each guarantees.

Check yourself

Why shouldn't a critical rule live only in AGENTS.md?

The model receives the file as text to follow, not as a constraint, so it can misread it, forget it or be talked out of it. An action that must never happen is blocked with permissions, hooks or isolation.

Why can a project have dozens of skills without slowing every session down?

At startup the agent reads only each skill's name and description. The full instructions and references load only when a task needs them.

Your platform launches two different harnesses. Why record what each one guarantees?

They differ in ways that matter for safety, such as whether cancelling a run really stops everything it started. If the platform assumes both behave the same, a gap in one goes unnoticed.