Erwin Wu (@ErwinWu000) published How to Build a Multi-Agent Orchestrator from Scratch as an X article on Nov 30, 2026. It analyses how orchestration tools such as T3 Code and Orca put Claude Code and Codex “at the same table”, and organizes the hard parts as four layers.
This is a reading of the article. I did not inspect T3 Code or Orca, so descriptions of their internals are the author’s. Where I add interpretation, I say so.
The workflow in motion
An illustrative walkthrough of the article’s four layers, not an execution trace of one request: context handoff only happens when you switch models. My illustration, not a diagram from the article.
Harness vs orchestration tool
The article’s first move is to stop conflating two things.
- Agent harness: the execution environment around a model, meaning tool chain, prompt formatting and agentic loop. Claude Code and Codex are native harnesses. The author says a model’s native harness is usually the best bet because the model was post-trained against that exact loop and tool format.
- Multi-model harnesses such as OpenCode and DeepSeek Harness plug into several providers, but still run inside one harness where every model shares the same tools.
- Orchestration tool: T3 Code and Orca sit a layer above. They wrap isolated harnesses that are unaware of each other and turn them into a team. Their job is cross-harness collaboration.
The article says four tightly linked problems appear, in order: capability injection, inter-agent communication, state and fault tolerance, and context handoff.
Layer 1: capability injection
The first job is not scheduling. The model must learn that it runs inside a host and can summon other agents. The article names two ways.
-
MCP (T3 Code): the orchestrator runs an MCP server, registers actions like
delegate_task, and injects the JSON schemas into the model API’s nativetoolsparameter. - CLI + Skill (Orca): the system prompt points to a Skill manual, and the model runs the orchestrator’s CLI commands in the terminal.
The author’s trade-off list:
- Reliability: MCP wins. Types and required fields ride on native tool calling, backed by constrained decoding. With CLI the model hand-writes shell strings, so misremembered flags, quoting bugs and skipped manuals happen.
-
Workflow composition: CLI wins. One Bash call can pipe
git diffthroughjqand loop to fan out three sub-tasks. Each MCP call is an isolated round trip. - Integration cost: CLI is zero-friction for any agent that can run a terminal. MCP support in some agents needs plugins or manual wiring.
- Context overhead: CLI + Skill is leaner. MCP loads every registered tool’s schema up front, even on turns with no orchestration.
My interpretation: the last point is the same cost that on-demand schema loading, as in my Gemini Tool Retrieval deep dive, is meant to reduce. A hybrid, MCP for the few critical calls and a Skill for the long tail, would be a natural middle, but the article does not propose it.
Layer 2: how agents talk
In the article’s framing, agents never talk directly: the orchestrator is the middleman. It contrasts two models.
RPC execution tree (T3 Code style). Feels like async function calling: a coordinator spawns a worker, gets a thread handle, and later receives output. It is simple because the orchestrator barely manages intermediate state. The cost appears with real collaboration: a worker missing an API field must surface the question back as a partial result, every exchange is a fresh round trip through the coordinator, and workers cannot talk to each other. The article says this makes the coordinator a message relay and caps the team at that bottleneck.
Persistent mailbox (Orca style). Borrowed from the Actor model: each active agent has its own inbox address. A blocked worker sends a message to the right teammate and suspends in place. The orchestrator checks the recipient’s state, queues the message if the recipient is busy, and wakes the suspended worker when the reply arrives. This gives bidirectional async messaging and peer-to-peer talk, at the price of the orchestrator owning routing, queuing, suspension and wake-up.
The article also says native harnesses are converging on mailboxes, differing in where the mailbox lives: local JSON inbox files for Claude Code’s Agent Teams, in-memory queues for Codex Multi-Agent V2, and SQLite in Orca for durability and dependency triggers.
Layer 3: state and fault tolerance
The baseline, per the article: these tools persist runtime state in an external database or JSON files with locks. The difference is which stage of failure each pattern protects.
-
Before dispatch, T3 Code: Transactional Outbox. The orchestrator must update database state and spawn an agent process. A crash after marking a task
runningbut before the process starts leaves a zombie task. The outbox commits the state update and the pending dispatch command in the same transaction, and a background loop scans and executes them. - After dispatch, Orca: Task vs Dispatch. If Worker A hangs, the task is reassigned to Worker B, and A later wakes and overwrites B’s output. Splitting the logical Task from each concrete Dispatch attempt, with a fresh Dispatch ID per reassignment, lets the orchestrator drop reports with an expired ID.
The article’s point is that the two are not alternatives. Outbox retries can themselves create duplicate dispatches, so Dispatch ID fencing is the natural second line of defense.
Layer 4: context handoff when switching models
The scenario: Codex for turns 1 to 3, Claude Code for turns 4 and 5, back to Codex on turn 6. Replaying turns 1 to 5 into a fresh Codex session invalidates the prompt cache and loses all the file contents Codex had read via tools.
The article describes T3 Code’s answer as two layers:
- AppThread: the user-facing ledger of the whole conversation.
- ProviderThread: a mapping table of each harness’s native session ID plus a cursor marking the last turn synced into it.
On turn 6, the cursor shows Codex is synced through turn 3, so the tool reuses the original native session and appends only turns 4 and 5 as a delta. The article adds a caution: keep prompt cache TTL in mind, typically minutes to an hour depending on the provider.
Design ideas worth borrowing
These are my interpretation.
- Separate the ledger from the engine sessions. One user-visible history, plus a per-harness cursor, is a general way to switch engines without losing state.
- Commit the state change and a durable dispatch command together. The process launch happens afterward and is retried, which is how the outbox pattern closes the “update DB, then launch process” gap.
- Give every attempt an identity. A Dispatch ID turns “which attempt’s result does the orchestrator accept” into a simple check. It does not by itself stop a stale worker from touching shared files.
- Pick the communication model by how much workers need each other. If delegation is one-shot, an RPC tree may be enough. If workers ask each other questions, you are building a mailbox.
- Treat capability injection as a context-cost decision, not only a protocol choice.
Where I would push back
- The article is architecture from first principles and says it skips boilerplate code. It gives no benchmarks, so the MCP vs CLI reliability and cost claims are the author’s analysis, not measurements.
- It describes T3 Code and Orca internals without code in the article. I did not verify them against the repositories.
- Part 1 is half the map. The author lists harness driving, conflict avoidance between agents and permissions as the topic of the next article, so those layers are not covered here.
- “Mailboxes are converging” is the author’s observation across three tools. Three examples show a trend but do not prove one.
Takeaways
- A harness runs a model. An orchestrator runs harnesses, and its problems are distributed-systems problems.
- Four layers, four trade-offs: schema strictness vs pipeline flexibility, simplicity vs peer-to-peer, delivery vs fencing, and replay vs delta sync.
- Part 2 should cover the remaining layers: low-level harness driving, conflict avoidance and permissions.
Source: Erwin Wu, How to Build a Multi-Agent Orchestrator from Scratch.
Designing multi-agent workflows for your team? Get in touch.
Click to load Disqus comments