The Harness Is Eating the Orchestrator

On my laptop right now, four different tools can drive a Claude Code session. Rex can open a pane, type into it and read the screen back. Herdr can start an agent in a pane and tell me when it’s blocked or done. Orca can start a Codex worker in its own worktree and collect its report. And Claude Code itself can start a session in the background, list it with its state, and send it a message. That’s four orchestrators wrapped around one agent, and only one of them can see inside it.
I wanted to know whether that difference matters in practice. So I gave the same small task to four setups, each with a different orchestrator, and recorded how each one learned the work was done. In three of them, the signal that held up came from the agent reporting on itself. The fourth, Herdr, read the screen and was right too, because it keeps versioned detection rules for each agent. My own screen check, with nobody maintaining it, was wrong from the first frame to the last.
Key Takeaways
- Outside orchestrators (Herdr, cmux, Rex, Orca) host the agent’s terminal and drive it with keystrokes. Claude Code now does the same jobs natively: background sessions (
claude --bg), a session list with state (claude agents), messages between sessions (SendMessage), and panes drawn inside Claude Code by mods.- I ran one task through four paths: Claude to Claude natively, Orca to Codex, and Rex and Herdr each driving an interactive Claude. All four finished, in 29, 60, 47 and 24 seconds.
- Three reliable “done” signals came from the agent’s own report: the harness’s session state, a
worker_donemessage the Codex worker sent, and a status escape sequence Claude Code writes to its terminal. The fourth came from Herdr’s versioned screen rules, which reported idle 0.4 seconds after the agent’s last output.- My screen-scraping check said “idle” for the entire Rex run. A rule combining it with a marker file would have called the task finished about 16 seconds early. Reading the screen works only when someone maintains the rules for every release.
- Mods move the dashboard inside the harness. A 63-line mod I wrote shows every session’s state in a pane beside the chat, and it surfaced three background sessions, started months ago, still sitting at
blocked.- The outside layer can type into any pane, so it can click through gates meant for a human. I used Rex to accept a folder-trust prompt that
claude --bghad refused to skip. The native message path held a message for approval instead.
What did the outside orchestrators build?
They built a terminal that knows an agent is inside it. Each tool hosts real agent sessions in panes, keeps them alive when you walk away, and offers a way for a script, or another agent, to drive them.
Herdr is a single Rust binary, Apache-2.0, that behaves like tmux for agents. It exposes a socket API (newline-delimited JSON over a Unix socket) and a CLI, with commands such as herdr agent wait <pane> --until done and herdr pane read. How it knows an agent’s state is the interesting part: for Claude Code, its docs say the state “comes from Herdr’s screen manifest detection”. It reads the screen, using a versioned rule file per agent. Several other agents (Pi, OpenCode, Kimi Code CLI and others) report their state through integrations instead (Herdr integrations).
cmux is a native macOS terminal built on libghostty. It picks up the notification escape sequences agents already emit (OSC 9, 99 and 777), offers a cmux notify command to wire into agent hooks, and accepts JSON commands over a Unix socket. By default, only processes started inside cmux can connect to that socket (cmux API docs).
Rex, from Superlogical, combines a terminal and a multiplexer and puts a rex command on the PATH of every pane it opens. The CLI opens panes, types into them (rex send) and reads them back (rex capture). It also accepts a status report: programs can announce themselves as idle, working, done, blocked or in error with an OSC 7501 escape sequence, and say whether a block is a permission prompt, a question or a credential request.
Orca (MIT) is a desktop app that runs any CLI agent, each in its own git worktree. Its experimental orchestration commands start supervised workers (orca orchestration worker-start --agent codex), exchange messages, and settle each task when the worker reports worker_done (Orca orchestration docs).
Strip the branding and the four tools do the same four jobs: launch an agent, observe its state, message it, and show you all of them at once.
How is the harness absorbing each job?
One job at a time, through features with plain names. I covered the GUI side of this in the year the coding UI stopped being a text box. This is the layer underneath, where scripts and other agents do the driving.
Launch. claude --bg "<task>" starts a full session with no terminal attached, run by a per-user supervisor process. Before editing files, the session moves itself into an isolated git worktree under .claude/worktrees/ (Claude Code agent view docs). Unlike a subagent, it isn’t tied to the conversation that started it.
Observe. claude agents opens a list of every session, and claude agents --json prints it for scripts. Each row carries a state. When I ran it, a blocked session also said why: "waitingFor": "permission prompt". Agent view is still a research preview, introduced in v2.1.139.
Message. Since v2.1.224 on macOS and Linux (v2.1.234 on Windows), a session can find others with ListAgents and write to them with SendMessage. Messages are plain text only. On one machine they travel “over a per-session socket on macOS and Linux, or a per-session named pipe on native Windows, never through Anthropic servers”. Each session decides what to do with incoming messages through the crossSessionInbound setting: accept, hold or refuse (Claude Code cross-session messaging docs).
Show. Mods let a plugin draw inside Claude Code itself: a pane in a sidebar on the right, a toast, a row in the transcript, a band above the prompt, and a status line (Claude Code mods docs). A mod is a plugin whose code is a TypeScript module. It hooks engine events (a session starting, a tool call, a prompt being submitted) and draws with a small set of terminal components. It reaches the outside world only through the engine: $.process.run for commands, $.clock.every for timers, $.http for the network.
To see what that means for orchestration, I wrote one. agent-board is 63 lines. Every three seconds it runs claude agents --json and draws the result in a pane titled Agents, with a ! beside anything blocked. I opened it with /agent-board in a fresh session. It listed six sessions, including three background sessions, started 82 to 113 days ago, still sitting at blocked without my having noticed. That’s the job a multiplexer’s sidebar does from outside. Here the harness draws it, in the window where I already work, from the harness’s own state.
The fifth job, talking across vendors, is the one a single harness shouldn’t be able to absorb. It’s being absorbed anyway, as the cross-model section below covers.
What happened when I ran the same task four ways?
All four paths finished the task, but each learned it was finished in a different way. The task was deliberately small: write a slugify function and three tests in an empty repository, run bun test until it passes, and as the very last action write the current time to a .done file. That file was my ground truth. I recorded when the work really ended, then when each coordinator found out.
Here are the four paths:
- A, Claude to Claude, natively.
claude --bgstarted the worker. My coordinator polledclaude agents --jsonevery half second. - B, Orca to Codex.
orca orchestration worker-start --agent codexstarted the worker. The coordinator waited for itsworker_donemessage. - C, Rex to an interactive Claude. Rex opened a pane running
claude, typed the task in, and read the pane twice a second two ways: a screen-scraping check that looked for the “esc to interrupt” text Claude Code shows while busy, and the OSC 7501 status record. - D, Herdr to an interactive Claude.
herdr agent start --kind claudelaunched the worker in a Herdr pane, andherdr agent prompt --waitsent the task and returned at the first settled state. Herdr decides that state from its own screen rules.
Versions: Claude Code 2.1.322, Codex CLI 0.167.0, Orca CLI 1.4.253, Herdr 0.9.5, Rex beta. One run per path, one machine, one task. Read the timings as an anecdote with timestamps, not a benchmark.
| Path | Signal the coordinator used | Work time | Signal after last action |
|---|---|---|---|
| A: Claude to Claude | Session state from claude agents --json | 21.7 s | 6.9 s |
| B: Orca to Codex | worker_done message sent by the worker | 59.6 s | under 1 s |
| C: Rex to Claude | OSC 7501 status written by Claude Code | 43.8 s | 3.4 s |
| C, scraped | “esc to interrupt” on screen, plus .done | 43.8 s | fired 16 s early |
| D: Herdr to Claude | Herdr’s versioned screen rules | 12.4 s | 12.0 s; the agent was still replying, and Herdr said idle 0.4 s after it stopped |
Path A, native. The worker ran for 21.7 seconds. claude agents --json showed it as done 6.9 seconds after its last action, and most of that gap is the model writing its closing reply, not transport. The call itself takes 0.16 seconds. My first attempt is the more instructive one. It sat at blocked after 21 seconds, and the JSON said exactly why: "waitingFor": "permission prompt". The worker had picked up a hook from my user-level config and stopped at a permission prompt for a command outside its allowlist. Nothing outside the harness could have told me that without reading the screen, and that only works with rules kept current for this exact screen.
Path B, Orca and Codex. The worker ran for about 60 seconds, and its worker_done arrived within the same second as its last action. That message was structured: "outcome": "succeeded", the two files it changed, and a one-paragraph summary. Notice who sent it. Orca doesn’t watch Codex finish. Orca gives the worker a preamble, and the worker reports through Orca’s CLI. Like the native path, the signal is the agent’s own account.
Path C, Rex. The worker ran for 43.8 seconds, and the OSC 7501 record, which Claude Code writes itself, said done 3.4 seconds later. It had said working from the moment the task landed. My screen check, the kind of check you write when the tool gives you nothing better, read “idle” on every frame. This build of Claude Code, with my status line, never showed the text I was matching. Then the agent wrote .done at 30.2 seconds and wrote it again at 43.8, after another pass. A completion rule of “marker file exists and the screen looks idle” fired at 30.7 seconds, about 16 seconds before the agent finished.
Path D, Herdr. This is screen reading done properly, and it held up. Before the task, herdr agent start returned agent_not_ready within 3.6 seconds, because Claude Code was showing its folder-trust prompt. herdr agent explain showed its working: state blocked, rule live_blocked_form, from a versioned Claude Code rule file Herdr keeps under a remote folder (version 2026.10.11.1, last updated 11 October). Then the run itself. The agent wrote .done at 12.4 seconds, but it wasn’t finished. A Stop hook in my config sent it back for a second reply, which ended at 24.0 seconds. Herdr reported working throughout and idle at 24.4 seconds, 0.4 seconds after the agent’s real last output. My file-plus-screen rule would have fired the moment .done appeared, nearly 12 seconds early.
When does reading the screen work?
When someone treats it as a contract and maintains their side of it. The screen is a rendering for a human, and it changes whenever the agent’s UI does. My scraper didn’t fail because I wrote a bad regex. It failed because the text it matched was never a contract, and the vendor owes my regex nothing.
Herdr’s rules worked because Herdr does the upkeep, and its rule file for Claude Code shows what that costs. The rules are versioned, and each one names the screen region it reads. The comments track individual releases: # Braille covers <= 2.1.227; half-circles are the 2.1.228 busy spinner. Others cite the issues where a screen was missed (#3283, #4573). One explains a rule’s shape “prevents user prompt text from impersonating this signal”, because anything the agent prints can also be typed by someone else. Every UI change in every supported agent becomes Herdr’s maintenance, and a rule set is only as good as its last update.
The detail I like most is the rule Herdr checks first for working. It reads the terminal title, where Claude Code draws its own spinner. Even the best screen reader in the experiment listens to the agent first and watches it second. The agent’s own report costs nothing to keep current, because the agent writes it.
The outside tools know this, which is why the good ones have stopped relying on it. Rex defines a status escape sequence and Claude Code writes to it. cmux reads the notification sequences agents emit and asks you to wire cmux notify into hooks. Herdr takes state from integrations where an agent offers one and maintains screen rules where it doesn’t. Orca has the worker call worker_done itself. Wherever they can, all four take their truth from inside the agent. That’s the absorption in miniature: an outside orchestrator works best when it has become a listener for something the harness reports.
The screen does keep one job, and it’s a revealing one. Prompts built for humans are stable enough to detect. Orca failed my first Codex start loudly at agent_readiness, with the reason agent-hooks-review-prompt, because it recognised Codex’s hooks-review screen. Herdr and my Rex script both recognised Claude Code’s folder-trust prompt. Every detection worked. What each prompt wanted was a human decision, and that’s where the outside layer gets uncomfortable.
Who answers the prompt meant for a human?
Whoever holds the keyboard, and for an outside orchestrator that’s a script. Three gates came up in the experiment. The harness treated them differently from the terminal tools.
claude --bg refused to start in a folder I hadn’t trusted, and it told me to run claude there once and accept the prompt. So I did it through Rex: open a pane, read the screen, press down, press enter. The gate assumed a person, and a person-shaped script satisfied it.
Codex’s hooks prompt warned that “hooks can run outside the sandbox after you trust them”. I picked “continue without trusting”, but orca terminal send would have typed “trust all” just as easily. Herdr is the one tool that addresses this, in words rather than code: the guide it prints for agents (herdr --skill) says to “inspect the blocked UI and ask the user before answering it.” herdr agent send-keys will still press the keys if you don’t.
Then the native path showed what a harness-owned gate looks like. My session bypasses permission prompts and the background worker doesn’t, so when I sent it a follow-up with SendMessage, Claude Code held the message. The docs say a session that prompts for permissions holds a message “only when the sending session identifies itself as bypassing permission prompts”. A message from a looser session can’t quietly become an action in a stricter one. The worker’s state flipped to waiting on a permission prompt, and attaching to it showed a “Held message from another session” dialog naming the sender, its verified process ID and the full body, with Deny as the default.
Rex could have pressed “Deliver” for me. I used it to press Deny instead, and the notice that came back said my message “was denied by the recipient user”. The harness credited a person with a keystroke my script had sent. Even the native gate trusts whoever is at the keyboard once the decision reaches a terminal.
I repeated the test with a worker that also bypasses permission prompts. That message went straight through, and the worker finished the follow-up five seconds before its state said done. I had also asked to be told when it went idle. That notice carried the worker’s own one-line summary (“bun test passes with all 4 tests green”), but it reached me only when my own turn ended, about 17 minutes after the worker went idle. A coordinator that stays busy hears nothing until it stops.
That difference is the strongest argument for the harness owning orchestration. A harness can tell one session from another, check a permission mode, and refuse. A terminal multiplexer sees bytes and keystrokes. It can’t tell a human pressing enter from an agent doing it, so every gate it passes through is only as good as the script driving it. I made the same argument about approval prompts in the permission prompt is dying: a gate is only as strong as the place it lives. The same goes for the approvals it saves: a “don’t ask again” click ends up as a config file that outlives the moment anyone looked.
The native path had a rough edge too. Two background sessions given the same prompt both moved into .claude/worktrees/slugify, the second into a worktree that already held the first one’s work. Isolation was keyed on a name the model chose, and both runs chose the same one.
What about talking across models?
That’s the job a single vendor’s harness shouldn’t be able to absorb, and it’s being absorbed through plugins instead. On 30 March 2026, OpenAI tagged the first release of codex-plugin-cc, an official plugin that puts Codex inside Claude Code. /codex:review runs a read-only Codex review, /codex:adversarial-review argues with your design, /codex:rescue hands a task to a Codex subagent, and /codex:transfer moves the session into a resumable Codex thread.
The plugin can also wire Codex into Claude’s own lifecycle. With the review gate enabled, a Stop hook runs a Codex review before Claude finishes. The README is candid about the cost: it “can create a long-running Claude/Codex loop and may drain usage limits quickly.” A rival vendor shipped into the harness rather than building a neutral layer above both. That’s the clearest sign yet of where the industry thinks orchestration lives.
Path B is the neutral-layer alternative, and it worked. It also showed the price. Orca would not accept a coordinator outside its own terminals: worker-start from my shell failed with no_active_sender_terminal until I created an Orca terminal to send from. The neutral layer is neutral about which agent you run. It isn’t neutral about where you run the coordinator, because the mailbox lives in the terminal it hosts.
What’s left for the outside layer?
Three things the harness can’t easily reach: other vendors, other machines, and one view across all of them. If you run Claude Code and Codex side by side, Orca’s worktree-per-agent model and Herdr’s vendor-neutral panes still earn their place. If you work over SSH, a multiplexer that outlives the connection is still worth having. I made a similar call about protocols in A2A vs. MCP: reach for the outside layer when you cross a boundary, not before.
The honest counterweight is that the native features are young. Agent view is a research preview. Cross-session messages are plain text, a session holds at most 100 of them before dropping the oldest, and a held message waits for a human. Nothing in the docs promises delivery. An outside tool with a documented socket API is, for now, the more predictable thing to script against.
But the direction is visible in the experiment. Three of the four reliable signals came from the agent reporting on itself, and the fourth came from rules someone has to rewrite whenever the agent’s screen changes. As harnesses report more, launching sessions, publishing state and routing messages, the orchestrator turns into a viewer and a router for signals the harness publishes. That’s a fine business for a terminal. It’s a poor place to keep your safety gates.
Frequently Asked Questions
Do I still need tmux or Herdr for coding agents?
If you run agents from more than one vendor, or over SSH, a multiplexer still helps. If you only run Claude Code on one machine, claude --bg and claude agents now cover launching, listing and supervising sessions without one. Whatever you use, prefer a tool that reads the agent’s own status report, or one like Herdr that maintains its screen rules, over a scraper you wrote yourself.
Can Claude Code sessions talk to each other?
Yes. Since v2.1.224 on macOS and Linux (v2.1.234 on Windows), Claude finds other sessions with ListAgents and messages them with SendMessage. Messages are plain text, travel over a local socket or named pipe, and are held for approval when one side bypasses permission prompts and the other doesn’t. The crossSessionInbound setting can make a session accept, hold or refuse them.
What is a Claude Code mod?
A plugin that draws inside Claude Code. A mod’s TypeScript module hooks engine events and can add a pane, a toast, a row in the transcript, a band above the prompt or a status line. It reaches commands, timers and the network only through the engine. That’s enough to build an agent dashboard: mine runs claude agents --json every three seconds and shows each session’s state in a pane.
Can Claude Code drive Codex?
Yes, two ways. OpenAI’s official codex-plugin-cc adds /codex:review, /codex:rescue and related commands inside Claude Code. An outside orchestrator such as Orca can also start a Codex worker in its own worktree and collect a structured worker_done report. The plugin keeps you in one harness. Orca keeps the agents separate.
Is it safe to let an orchestrator type into agent terminals?
Only as safe as the script doing the typing. A terminal tool can’t tell a person pressing enter from an agent, so it can accept trust prompts, approve held messages or trust hooks on your behalf. Keep those decisions human. Prefer harness-native messaging, which checks permission modes and holds a message when only one side bypasses prompts.
Where the truth lives
I set out to compare four orchestrators and ended up comparing the ways an agent gets described. The native session state, the Codex worker’s worker_done, Claude Code’s OSC 7501 status and Herdr’s maintained screen rules were all accurate within seconds. The one signal I produced by my own observation was wrong for the whole run. If you’re building on any of these tools, wire your automation to the agent’s own report. Read the screen only through rules someone keeps current, and never through a regex of your own. Leave the prompts meant for a person to a person, whatever the keystroke API allows.
Sources
All accessed 2026-11-10.
- Anthropic, Message your other Claude Code sessions (documentation). https://code.claude.com/docs/en/cross-session-messaging
- Anthropic, Agent view and Run agents in parallel (documentation). https://code.claude.com/docs/en/agent-view, https://code.claude.com/docs/en/agents
- Anthropic, Draw in the interface with a mod (documentation). https://code.claude.com/docs/en/plugins/mods/interface
- OpenAI, codex-plugin-cc (repository, README and tags). https://github.com/openai/codex-plugin-cc
- Herdr, repository and documentation (socket API, integrations). https://github.com/herdrdev/herdr, https://herdr.dev/docs/socket-api/, https://herdr.dev/docs/integrations/
- Herdr 0.9.5 CLI output (
herdr --skill,herdr agent explain), 10 Nov 2026. - cmux, repository and API documentation. https://github.com/manaflow-ai/cmux, https://cmux.com/docs/api
- Orca, repository and orchestration CLI documentation. https://github.com/stablyai/orca, https://www.onorca.dev/docs/cli/orchestration
- Rex (Superlogical), CLI guide and block API as printed by the installed beta (
rex __internal skill,rex block inspect), 10 Nov 2026. - First-party experiment: one task run through four orchestration paths on the author’s machine, 10 Nov 2026. Claude Code 2.1.322, Codex CLI 0.167.0, Orca CLI 1.4.253, Herdr 0.9.5, Rex beta. Timestamps from
claude agents --json, Orca’s message store, Rex’s OSC 7501 records, Herdr’s agent state, the worker transcripts and the task’s own.donefile. - First-party mod:
agent-board, a 63-line Claude Code mod that listsclaude agents --jsonin a pane, built and run on Claude Code 2.1.322, 10 Nov 2026.