Slopfluencer

Notes › AI › Agents

Agent harnesses

An agent harness is the program that wraps a language model and turns it into an agent. The model on its own only predicts text. The harness gives it a loop: it sends the model a task and a list of tools, carries out the tool calls the model asks for (read a file, run a command, search the web), returns the results, and repeats until the task is done. Around that loop sit the system prompt, permission rules, a way to save and resume sessions, and the interface a person uses to watch and steer the work. Anthropic's Claude Code, OpenAI's Codex and the open-source Pi are well-known harnesses for coding.

The same model can be useful or useless depending on its tools, how much of the conversation it keeps, and how easily a person can correct it. Harnesses are also cheap to build, and many appeared in 2026. In August I wrote that agent harness work was jumping the shark and felt like the JavaScript framework wars.[2]

I built five of them in 2026: pi-deck, Task Factory, Neon Pilot (Personal Agent), a plugin layer on bb and bb-plugins, and my fork BB Studio. Every harness has to settle the same questions about its loop, tools, context, review, interface, memory, coordination and extensions. My attempts settled them differently each time, and the lessons, each tied to its evidence, are in Lessons from a year of building agent harnesses.

Background

Early coding assistants lived inside an editor and completed the line you were typing. The agent form appeared when models became reliable enough at calling tools that a program could let them act for many steps without a person approving each one. The first popular harnesses ran in a terminal: the user typed a request, and the agent edited files and ran tests in the same window.

Terminal harnesses are easy to build and script, but hard to supervise once a person runs more than two or three. Each agent needs its own window, and tool output scrolls past the replies a person needs to read. Nothing shows which agent is waiting for an answer. Since 2025 most harness work has gone into supervision.

The design space

The loop

The loop is a few dozen lines of code. It sends the conversation and a tool list to the model, executes any tool call that comes back, appends the result and sends the conversation again. The design questions sit at its edges. One is how the loop ends: when the model stops calling tools, or only when it calls an explicit "done" tool. Another is what happens to a message a person sends while the agent is mid-turn. It can steer the running turn, reaching the model at its next step, or wait as a follow-up for the turn to end. A third is whether the agent can schedule its own continuation, for example waking itself in ten minutes to check a build. Permission rules belong here too. Some harnesses ask before each command, some run freely inside a sandbox, and some run with the user's full permissions.

Tools

The tools are how the agent acts on the world: file reading and editing, a shell, search, and sometimes a browser. Minimal harnesses such as Pi ship with four tools (read, write, edit and a shell) and let the model do the rest through the shell. Reading and searching dominate in practice; one 2026 count found that about half of a coding agent's tool calls were reads and searches.[9] Many harnesses also accept tools from outside through MCP, so one tool server works with many agents. Every tool's description is sent to the model on every turn, so a long tool list costs tokens and attention whether or not the tools are used. Newer harnesses load a tool's full description only when the agent asks for it.

Context management

Context management decides what the model sees. Long sessions outgrow the model's context window, so harnesses compact them, replacing older turns with a summary or clearing old tool results. Providers also offer a prompt cache, which makes re-sending an unchanged conversation prefix much cheaper, so a harness that keeps the start of the conversation stable saves money on every turn. Reusable instructions called skills are listed by name and loaded only when a task needs them, and an AGENTS.md file gives the agent a repository's conventions at the start of each session.[10] A related pattern is to give the agent a short pointer to related material, such as a past conversation, plus a tool to read more, instead of pasting the material in.[12]

Supervision and review

Supervision covers everything a person does to keep agents on track: approving plans, reading diffs, answering questions and deciding when to step in. A harness can help by showing which agents are waiting, by asking for a plan before code, by separating "finished" from "needs you" in its notifications, and by running a second agent to review the first one's work. The basic constraint is that a person's attention doesn't grow with the number of agents.

Interface

The interface is where people spend their time: a terminal, a desktop app with a list of conversations, an editor, a phone app, a chat channel or voice. The interface decides how many agents a person can follow and how they answer them. Interfaces are covered in Interfaces for working with agents.

Memory

Memory is how an agent keeps what it learned between sessions: a person's preferences, reusable workflows and what was done before. Approaches range from plain files the agent reads at start-up to retrieval systems over embeddings. The subject has its own article, Agent memory.

Multi-agent coordination

A harness can let one agent start others. A subagent gets its own context, does one job and returns a result, which keeps the parent's context small. Agents that change code in parallel usually each get their own git worktree, a separate checkout of the same repository, so their edits don't collide. Larger setups put a coordinating agent in charge of several others, or put several agents in a shared channel. The coordination problems are routing (which agent should handle a message), noise (which updates deserve a person's attention) and cost.

Extension systems

Extension points let users change the harness without forking it. They range from hooks that run a script before or after a tool call, to skills and MCP servers, to full extension systems where a plugin can add tools, commands and interface panels. The furthest step is self-extensible software, where the agent inside the app writes the extensions itself, guided by documentation written for it.[11] System prompts, skills, MCP servers and plugins, and the case for connecting them once and sharing them across agents, are covered in Skills, plugins and MCP.

Meta-harnesses

A meta-harness drives other harnesses instead of replacing them. The argument is that each lab trains its models alongside its own harness, so Anthropic's Claude models tend to work best inside Claude Code and OpenAI's GPT models inside Codex. A meta-harness runs each model in its native harness while keeping the interface, tool connections and skills in one place, so the user can switch models without switching tools.[4][1] Open-weight models, which have no vendor harness, run in a neutral one such as Pi. A meta-harness connects to some agents through their own programs and to others through ACP, the Agent Client Protocol, a standard way for an interface to drive any agent that supports it.

The counterargument is that a model trained for one harness generalizes less. I hold both views. I use vendor harnesses because they work best today. Still, I have said that tying models to one harness kind of admits defeat, when the point was to build generalizable models.[5]

My attempts

My five attempts ran from pi-deck in January 2026 to BB Studio, released as v1.0.0 in November.[14][16] Their dated timeline is in Agent workbench.

What each attempt taught

Each attempt left a lesson, from pi-deck's structured agent events over terminal text to BB Studio's ledger of core edits that keeps a fork cheap.[13][17] They are in Agent workbench, and the full set is in Lessons from a year of building agent harnesses.

What I would keep and what I would drop

Models keep absorbing what harnesses provide, so most harness code is temporary (The bitter lesson). I would keep a meta-harness with tools and skills shared across providers,[1] and drop my own loop and app shell. Both lists are in Agent workbench.

Evidence

Harnesses appear to be converging on Pi's design, with a small core loop, a few tools and everything else added as extensions. That rests mostly on observation. In August 2026 I noted that more harnesses were adopting Pi's way of thinking about plugins, brought out of the terminal.[3]

The evidence that most harness code is temporary is mostly about maintenance cost. I tried four homes for my agent work in turn: pi-deck, Task Factory, Personal Agent (later renamed Neon Pilot) and finally bb. The first three were my own code, and each was organized around a different idea. I kept bb. I run my own fork of it with features tailored to me, but it stays close to the upstream app, and most of my additions are plugins, so I no longer maintain a whole app from scratch (From pi-deck to bb: four tries at a home for agent work). The public Neon Pilot repository alone has 7,589 commits between 15 March and 17 July 2026, after its earlier history was rewritten.[15]

There is also evidence that harness design still matters for small models. In a June 2026 paper, Jiang et al. trained Harness-1, a 20-billion-parameter search agent, inside a "state-externalizing" harness, one that keeps the search state (candidate results, curated evidence and verification records) outside the model. They report that it stays competitive with much larger frontier-model searchers and beats the next strongest open search agent by 11.4 points of average recall across eight retrieval benchmarks.[8]

Criticism and counterpoints

Product teams argue that harnesses are where durable value lives. Models can be swapped, while the workflow and integrations around them are what a team adopts, so harness work keeps its value as models improve.

A reported result suggests that a well-designed harness can let a small model compete with much larger frontier models on one kind of task, search (Harness-1, above).[8] A harness built for cheap models (see Cheaper models are enough for most work) may stay useful for years.

For multi-agent setups, Putting agents in the same room found that bots posting scheduled updates to a shared channel produced noticeable noise. Narrowing what each bot watches has helped, but deciding which updates deserve attention is still unsolved. Whether agents working together in one room do better is still untested.[18]

My own record cuts against my advice. After saying in August that I was divesting from harnesses, I spent the autumn building a fork, and in November I joked about spending compute on yet another harness only I will use.[2][7] One reading is that a thin layer is still a harness and still costs upkeep. I also wrote in August that a saturated field is probably good, because now people can actually build things.[6]

Open questions

  • How thin can a personally owned layer get before it stops being worth owning?
  • Will vendors open their harnesses to outside interfaces through protocols such as ACP, or close them to keep users?
  • Do multi-agent setups beat one agent that makes several attempts and votes on the answer? Li et al. found that simple voting across more samples keeps improving results (see Reading).
  • How should a harness decide which of many agent updates deserves a person's attention?

See also

Change log

Reading

References

  1. ^ The harness features I can't live without (post, Nov 2026)
  2. ^ Agent harnesses are jumping the shark, like the JavaScript framework wars; I'm divesting (@trashpandaemoji, Aug 2026), since deleted
    All this agent harness bullshit is starting to jump the shark. Feels a lot like the javascript framework wars of olde. There is already a lot of time wasted on small details that ultimately won’t matter. Models will devour capabilities, all harnesses will converge to Pi with some twist. I’m glad I learned all there is about harnesses but I’m divesting.
  3. ^ Plugins are hot right now (@trashpandaemoji, Aug 2026), since deleted
    Plugins are so hot right now. Really cool to see more harnesses adopt the Pi style of thinking, just brought forward out of the terminal. I'm still using BB as my main harness. It offers cross-provider capabilities other harnesses tied to labs can't offer, but this is great to see.
  4. ^ What a meta-harness combines (@trashpandaemoji, Aug 2026), since deleted
    You guys need to get in on this early. BB is THE meta-harness. Multi-provider like t3code, so you can take advantage of harnesses that are purpose built for the model. Interface like Codex Desktop. Self-extensibility like Pi so you can build whatever features you need for your workflow.
  5. ^ Tying models to one harness admits defeat (@trashpandaemoji, Aug 2026), since deleted
    @NousResearch @firesidealpha I thought the whole point was to build generalizable models. Tying them to the harness kinda admits defeat?
  6. ^ A saturated harness market is good, people can build things (@trashpandaemoji, Aug 2026), since deleted
    @tunahorse21 It’s probably a good thing harnesses are saturated. Now people can actually build stuff
  7. ^ Spending compute on yet another agent harness only I will use (@trashpandaemoji, Nov 2026)
  8. ^ Jiang et al., Harness-1: Reinforcement Learning for Search Agents with State-Externalizing Harnesses (arXiv, Jun 2026)
  9. ^ It's time to let the model drive (post, Dec 2025)
  10. ^ Self-extensible software is here and it's amazing (post, Jun 2026)
  11. ^ Seeding context in Personal Agent (post, May 2026)
  12. ^ From pi-deck to bb: four tries at a home for agent work (experiment, Sep 2026)
  13. ^ pi-deck source code and commit history (GitHub)
  14. ^ Neon Pilot source code and commit history (GitHub)
  15. ^ BB Studio releases (GitHub)
  16. ^ BB Studio fork scripts: the core-edits.json ledger, sync, identity and rebrand scripts (GitHub)
  17. ^ Putting agents in the same room (experiment, Sep 2026)