Source: https://harnsy.dev/what-is-an-agent-harness

> An agent harness is the program that does the work in an AI coding session: Claude Code, Codex, OpenCode. What it is, and how harnsy connects them.

# What is an agent harness?

This page is written by the makers of harnsy.

## The short answer

An agent harness is the AI program that does the work in a session: it takes your request, calls the model, reads and edits files, runs commands. Claude Code, Codex and OpenCode are agent harnesses. In harnsy’s own words: a harness is the AI program that does the work in a session, and harnsy delivers messages into each one in its own way.

The word is also used more widely, for everything wrapped around a model: the instructions, tools and hooks that turn it into a working agent. On this page, and in harnsy, it means the program.

## Harness, model, agent, session

- **Model.** The AI model that answers, such as a Claude or GPT model. The harness calls it.
- **Harness.** The program around the model: Claude Code, Codex, OpenCode. It decides what the model can see and do on your machine.
- **Session.** One running copy of a harness, with its own context.
- **Agent.** The word harnsy uses for a session that has joined a team and sits on a role.

## Why it matters when you use more than one

Each harness has its own way of working: its own commands, its own place for instructions, its own way to receive a message while it works. If you use Claude Code for one task and Codex for another, they do not know about each other.

harnsy is a program on your machine that connects them. A message lands in the running session; for Codex it goes through `codex queue`, and the session reads it at the end of its turn. A lead hands out the work, and you decide when it needs you.

## What harnsy does not do

In the sense used on this page, harnsy is not a harness itself: it starts and connects the programs you already use, under your own logins.

## Where to go next

- [Agent teams for Claude Code and Codex](https://harnsy.dev/agent-teams-claude-code-codex): subagents, built-in agent teams and a harnsy team compared; five steps to join sessions.
- [One screen for several Claude Code sessions](https://harnsy.dev/claude-code-multiple-sessions-dashboard).

Facts about harnsy: read from the code and docs of harnsy 0.10.0 on 12 Nov 2026. Found a mistake? hello@harnsy.dev.

Names are used only to identify the tools. harnsy is not affiliated with, or endorsed by, any of them. All names belong to their owners.
