Skip to content

// Engineering - November 10, 2026

What is an agent harness? Everything around the model.

An agent harness is all the software around an AI model that turns it into an agent: the loop that calls the model, the tools it can use, the context it sees, the state it keeps between sessions and the checks on its work. Claude Code and the Claude Agent SDK are harnesses. In short, agent = model + harness.

What is an agent harness?

A harness is the part of an agent that is not the model. A model takes text in and sends text out. It cannot run a command, open a file or remember yesterday. The harness does all of that: it calls the model in a loop, runs the tools the model asks for, decides what goes into the context window, saves state and checks the result.

The cleanest version of the definition comes from LangChain. In The Anatomy of an Agent Harness (March 10, 2026), Vivek Trivedy writes: "Agent = Model + Harness. If you're not the model, you're the harness." He defines a harness as "every piece of code, configuration, and execution logic that isn't the model itself."

Anthropic uses the word the same way. The Claude Code docs, in How Claude Code works, say Claude Code "is the layer around the model that provides the tools and manages the context the model sees. This surrounding layer is what the term agentic harness refers to." Anthropic's engineering blog calls the Claude Agent SDK "a powerful, general-purpose agent harness."

The term is young. When Harrison Chase of LangChain sorted its open source packages into frameworks, runtimes and harnesses on October 25, 2025, he wrote that "Agent Harness" was "a term I'm just starting to see be used more (I didn't come up with it)."

What does an agent harness include?

Trivedy lists five groups of parts, and Claude Code ships a version of each. The first column is his list. The last column shows where each part lives in Claude Code, per Anthropic's docs as of November 10, 2026.

Harness part What it does In Claude Code
System promptsTell the model who it is and how to workThe built-in system prompt, plus your CLAUDE.md files
Tools, skills and MCP serversLet the model act: read, edit, run, search, call other systemsBuilt-in tools, skills, and any MCP server you add
Bundled infrastructureA filesystem, a sandbox and a browser to work inYour project folder and shell, with permission modes on top
Orchestration logicStarts helpers, hands work off, routes to other modelsSubagents and agent teams
Hooks and middlewareSteps that always run, such as compaction, continuation and lint checksHooks, and automatic compaction near the context limit

Trivedy also explains why the filesystem keeps coming up. Models can't keep "durable state across interactions" on their own, so harnesses give them files. In his words, the filesystem is "a natural collaboration surface. Multiple agents and humans can coordinate through shared files." That point returns in the board section below.

Agent harness vs framework vs runtime: what is the difference?

A framework helps you build an agent, a runtime keeps it running in production, and a harness comes ready to work. This is Chase's split, with his own examples:

Layer What it gives you Examples Chase names
FrameworkAbstractions: a standard agent loop, content blocks, middlewareLangChain, Vercel's AI SDK, CrewAI, OpenAI Agents SDK, Google ADK, LlamaIndex
RuntimeDurable execution, streaming, human-in-the-loop support, persistenceLangGraph, Temporal, Inngest
Harness"Batteries included": default prompts, opinionated tool handling, planning tools, a filesystemDeepAgents, Claude Agent SDK, and arguably every coding CLI

He is open that "the lines are blurry" (LangGraph is both a runtime and a framework, he says). Use the table as a map, not a standard. A simple test: if you could hand it a task today and it would start working, it is a harness. If you would first have to write the loop, it is a framework.

What does a harness keep between sessions?

A long-running harness keeps a task list, a progress log and the code history, because every new session starts with an empty context. The Claude Code docs say: "Each new session starts with a fresh context window, without the conversation history from previous sessions." So anything the next session needs has to be written somewhere.

Anthropic's Effective harnesses for long-running agents (Justin Young, November 26, 2025) is the clearest worked example. It compares the problem to "engineers working in shifts, where each new engineer arrives with no memory of what happened on the previous shift." The harness has two prompts:

  • An initializer agent runs once. It writes an init.sh script that starts the dev server, a claude-progress.txt file "that keeps a log of what agents have done", an initial git commit, and a feature list. For their claude.ai clone the list had over 200 features, all marked as failing.
  • A coding agent runs in every later session. It reads the progress file and the git log, runs a basic end-to-end test, picks the highest-priority feature that isn't done, works on that one feature, then commits and updates the progress file.

Two details are worth copying. The feature list is JSON, because "the model is less likely to inappropriately change or overwrite JSON files compared to Markdown files", and agents may only change each feature's passes field. And the harness exists to stop two failures the team saw: an agent that tries to build everything at once, and a later agent that "would look around, see that progress had been made, and declare the job done."

What is harness engineering?

Harness engineering is improving the system around the model, one repeated mistake at a time. Trivedy calls it "how we build systems around models to turn them into work engines." Three ideas from people who do it:

  • Guides and sensors. Birgitta Böckeler's Harness engineering for coding agent users (Thoughtworks, April 2, 2026) splits your outer harness into guides that steer the agent before it acts, like AGENTS.md and skills, and sensors that let it self-correct after, like tests, linters and AI code review. Your job is the loop: "Whenever an issue happens multiple times, the feedforward and feedback controls should be improved."
  • Separate the worker from the judge. In Harness design for long-running application development (March 24, 2026), Prithvi Rajasekaran found agents grading their own work "reliably skew positive", so he added a separate evaluator agent. The planner, generator and evaluator talked through files. On his retro game maker test, the full harness cost $200 and took 6 hours, against $9 and 20 minutes for a single agent. That is "over 20x more expensive, but the difference in output quality was immediately apparent." How to set up and check that kind of judge is in our guide to LLM as a judge.
  • Remove parts as models improve. The same post says "every component in a harness encodes an assumption about what the model can't do on its own", and those assumptions "can quickly go stale as models improve." When Opus 4.6 came out, he removed the sprint structure the first version needed.

Böckeler adds: "A good harness should not necessarily aim to fully eliminate human input, but to direct it to where our input is most important."

Where does a task board fit in an agent harness?

A board can hold the harness state that people need to see: the task list, the progress notes and the review step. In Anthropic's examples that state lives in files inside one repository, read by one agent loop. That works until a person needs to know what the agent did overnight, re-order the work, or check a result before it ships. Then the same three things are more useful on a board your agents and team share:

Harness state in files Same state on a Flux board
Feature list, one entry per featureOne card per feature in a Ready column, in priority order
"passes": false with test stepsThe steps written in the card description
claude-progress.txtA signed comment on the card at the end of each session
"passes": trueThe card moves to Needs review, and a person moves it to Done
Git historyStays in git; put the card ID in each commit message

Here is the example feature from Anthropic's post, rewritten as a card. The title is "New chat button creates a fresh conversation" and the description holds the steps:

Steps to check:
1. Open the main screen.
2. Click New Chat.
3. A new conversation opens with the welcome screen.
4. The conversation appears in the sidebar.

Done when: all four steps pass in a real browser,
not only in unit tests.

And here is their session-start routine, rewritten for the Flux MCP server. Put it in the agent's instruction file (CLAUDE.md or AGENTS.md). Flux's MCP server sends no instructions of its own, so the routine has to live there:

## Flux board: start of every session
1. Call get_board with board ID <your board's short ID>. Note the
   column IDs of Ready, In Progress and Needs review.
2. If a card is in In Progress, the last session left it unfinished.
   Call get_card on it and read every comment before you do anything.
3. Otherwise take the first card in Ready, call get_card, and
   move_card it to In Progress.
4. Run the smoke test in init.sh before you change any code.

## End of every session
5. Commit, and put the card's ID (like PROJ-42) in the message.
6. add_comment, starting with "[coder]": what changed, what you
   tested and how, and what is left.
7. Move the card to Needs review only if every step in its
   description passed. Never move a card to Done.

This routine assumes one agent working one board. We checked each step against Flux's code on November 10, 2026. Five things to know before you rely on it:

  • "Never move a card to Done" is a rule, not a lock. Flux doesn't enforce column order. Any API key with the Write scope, owned by someone with the Member role or higher, can move a card to any column on the board. Anthropic hit the same limit with its feature file, which is why it used JSON and "strongly-worded instructions." A board doesn't make the rule enforceable, but it does make a broken rule easy to spot.
  • Sign every comment. Comments posted with an API key show under the name of the person who made the key, and get_card returns comments oldest first without author names. The [coder] prefix tells the next session and your team who wrote what.
  • Put the steps in the description. get_card returns the card and its comments, but not checklist items or labels.
  • Use the UUID for writes. get_board lists each card's UUID and its PROJ-42 style ID. Pass the UUID to get_card, move_card and add_comment; a PROJ-42 ID doesn't work reliably in get_card today. A card moved with move_card goes to the bottom of its new column.
  • MCP changes are not in the activity log yet. Changes made in the app, through the REST API and by the AI assistant are logged; changes over MCP are not. Until they are, the signed comment and the commit are the record of what the agent did.

If you would rather run the loop from a script than from one long session, our Ralph loop guide covers a fresh session per card. For what each board tool costs in context, see context engineering for AI agents.

// FAQ
06 questions
01

What is the difference between an agent harness and an agent framework?

+

A framework gives you building blocks to write an agent, such as a standard agent loop and middleware. A harness comes ready to run, with default prompts, built-in tools, planning and a filesystem. Harrison Chase of LangChain calls LangChain a framework, LangGraph a runtime and DeepAgents a harness, and admits the lines are blurry.

02

Is Claude Code an agent harness?

+

Yes. Anthropic's own docs say Claude Code is the layer around the model that provides the tools and manages the context the model sees, and that this layer is what the term agentic harness refers to. Anthropic also calls the Claude Agent SDK a general-purpose agent harness.

03

What is harness engineering?

+

Harness engineering is the work of building and tuning the system around a model so it does useful, checkable work. In practice that means writing instruction files, choosing tools, adding checks the agent runs on its own output, and improving the harness whenever the same mistake happens more than once.

04

How is a harness different from context engineering?

+

A harness and context engineering overlap. Context engineering is about what the model sees in each call. The harness is the whole system that delivers that context, plus the tools, state and checks. Birgitta Böckeler at Thoughtworks calls engineering a user harness for a coding agent, the outer harness you build on top of the one the agent ships with, a specific form of context engineering.

05

Does a better harness matter more than a better model?

+

A better harness can matter a lot for the same model. LangChain says it moved its coding agent from the top 30 to the top 5 on Terminal Bench 2.0 by changing only the harness. Anthropic also expects harness parts to go stale as models improve, and removed parts of its own harness when a newer model no longer needed them.

06

Is Flux an agent harness?

+

No. Flux does not run models or agents. It is a task board that agents connect to over MCP or the REST API with an API key, so it can hold the part of a harness that people also need to see: the task list, the progress notes and the review step. Agents that connect this way never take a seat, unless you add the agent as its own workspace member.

// Harness state where people can see it

Give your harness a shared board. Cards, comments and a review step.

Connect your agents to a Flux board over MCP or the REST API: one card per task, a signed comment per session, and a person who moves work to Done. Free to start, and agents that connect with a member's API key never take a seat.