TaskWing GitHub
Explainer

What is an agent harness?

By Published 4 min read

Short answer

An agent harness is the software that runs AI agents for you. It decides how a job is split, where each agent runs, what each one can reach, how their work is joined, and how the result is checked before it comes back to you. A coding agent writes the code; the harness makes several of them safe and useful at once.

A plain definition

Think of a horse harness. The horse pulls the cart; the harness directs the pull, keeps the horses apart and connects them to the load. An agent harness does the same for AI agents. The agent writes the code. The harness decides what it works on, where, with what access, and what happens to the result.

When you run one agent in your terminal, you are the harness. You chose the task, you watched it work, you read the diff, you pushed. That stops scaling when you want several agents on one job.

What a harness does

  1. Splits the work. One task becomes pieces that can run at the same time without stepping on each other.
  2. Isolates each agent. Each piece runs in its own sandbox, so one agent's mistakes stay in its box.
  3. Controls access. It decides which secrets, networks and logins an agent can touch. Ideally, as few as possible.
  4. Joins the results. Separate pieces come back as one branch, with conflicts found, not hidden.
  5. Checks the work. Something other than the agent that wrote the code decides whether it is done.
  6. Hands it back. A pull request, a log of what happened, and a receipt: time, checks and cost.

Agent, model, sandbox, harness

LayerWhat it doesExamples
ModelPredicts text and codeClaude, GPT, open-weight models
Coding agentUses a model plus tools to read, edit and run codeClaude Code, Codex CLI, OpenCode
SandboxAn isolated machine or container where an agent runsboat, E2B, Docker, microVMs
HarnessPlans, places, limits, joins and checks the work of many agentsTaskWing

What to look for in a harness

  • Can you read it? The harness decides what agents can touch. If it is closed, you are trusting a description.
  • Does it keep your logins out? An agent with your GitHub token can push anywhere you can. A good harness pushes for the agent, from your side.
  • Who decides "done"? If the agent that wrote the code also writes the tests, it can pass its own exam. Look for checks the workers cannot see.
  • Is it model-neutral? Agents and models change every few months. The harness should let you swap them.
  • Does it say what is not built? A public list of built, partial and planned features is a good sign.

How TaskWing does it, today

TaskWing is an open source harness, AGPL-3.0, written in Go. Your own coding agent is the lead: it plans the task and splits it into pieces that own separate files. A separate session writes a hidden exam, which you approve. Agents build the pieces in parallel, each in its own boat sandbox with no GitHub login. TaskWing joins the work, runs the exam in a clean sandbox and opens one draft pull request from your machine.

It is a proof of concept. It runs Claude Code only, on boat only, from the command line. A second agent runtime, more sandbox providers and per-step model routing are next. The full status is in FEATURES.md.

Questions

Is an agent harness the same as an agent framework?

A framework is a library for building one agent. A harness runs agents that already exist, such as Claude Code or Codex, and manages the work around them.

Is an agent harness the same as a sandbox?

A sandbox is one thing a harness uses: an isolated box where an agent runs. The harness decides which agent goes in which box, with which access, and what to do with what comes out.

Which model does a harness use?

The models of the agents it runs. TaskWing runs your coding agents, and each agent calls the model you chose for it.

Why not just run several agents in several terminals?

You can, and tools exist for that. A harness adds what terminals don't: a plan with no overlapping files, isolation from your logins, one join, and a check you did not have to write by hand.

Is TaskWing an agent harness?

Yes. TaskWing is an open source harness for coding agents, licensed AGPL-3.0. It runs Claude Code today.

Try the proof of concept

TaskWing is open source (AGPL-3.0) and early. Today it runs Claude Code agents in boat sandboxes, or in local folders to try the flow.

go install github.com/josephgoksu/TaskWing/cmd/taskwing@main
taskwing run "add a /health endpoint with a test" --provider local --no-pr