Wink Pings

Claude Code Writes the Backend, Codex Writes the Frontend, and Nobody Talks About the Missing Layer in Between

Erwin breaks T3 Code and Orca down into four floors: how to call teammates, how to pass messages, what to do when things crash, and how to switch models without losing memory. Two demo videos are at the beginning, and the comments add a bucket of cold water: don't use multi-agent unless necessary.

Claude Code writes the backend, Codex writes the frontend; the two agents don't know each other, and there is no pipe between them. Erwin recently took apart two open-source orchestration tools, T3 Code and Orca. In his view, a multi-agent orchestrator can be built as a four-story building. First, watch the two demo videos.

Let's separate the concepts first. Official tools like Claude Code and Codex are agent harnesses: they surround the model with an execution environment, toolchain, prompt format, and agent loop. The model has been post-trained for this loop and tool format. T3 Code and Orca add a layer on top of them and belong to orchestration tools. They do not replace the underlying harness; their focus is cross-harness collaboration. For ordinary readers, think of them as adding a dispatch desk for coding assistants from different vendors.

First layer: how does the model know it can call a teammate? T3 Code uses MCP. The orchestrator starts an MCP server and registers actions such as delegate_task as standard tools; the JSON schema goes directly into the model API's tools parameter. Parameter types and required fields use the native tool-calling protocol, with constrained decoding, so errors are fewer. Orca uses CLI plus Skills. The system prompt points the model to the Skill manual; when collaboration is needed, the model reads the manual and runs orchestrator commands in the terminal.

The trade-offs are clear. MCP is reliable and compliant, but weak at composing complex workflows. Each tool call is an isolated round trip, and all tool schemas must be loaded in advance, so even idle turns pay tokens. CLI integration has zero friction: if it can run in a terminal, it can join; manuals are loaded on demand; and in a single Bash call it can chain git diff, jq, and a for loop, fanning out several subtasks at once. The cost is that the model writes shell strings by hand and may misremember flags, break quoting, or skip the manual and guess commands from memory.

Second layer: how do teammates pass messages? Agents do not talk directly to each other; the orchestrator always sits in between. T3 Code uses an RPC execution tree, like asynchronous function calls. The coordinating agent calls a delegation tool, spawns a worker, gets a thread handle, continues doing other things, and waits for the worker to return asynchronously. Simple; the orchestrator does not need to manage much intermediate state. The problem appears when collaboration gets complex: a backend worker gets halfway through and doesn't know the interface fields, so it has to stop and throw the question back to the coordinator as a partial result. The coordinator becomes a relay for messages, and the main-thread context is inflated by fragmented recovery cycles. Workers cannot talk directly to one another either; if A needs to ask B for a field name, it still has to go through the coordinator.

Orca uses persistent mailbox queues, borrowing from the Actor model. Each active agent is a persistent entity with its own inbox address. When a worker gets stuck, it sends a message to the right teammate and suspends in place. The orchestrator intercepts the message and checks the recipient's status. If the other party is running a tool, the message is queued and delivered after this round ends. When the reply arrives, the orchestrator wakes the suspended worker. This gives true bidirectional asynchrony and peer-to-peer worker communication; the cost is that the orchestrator must manage routing, queuing, suspension, and wake-up lifecycles. Claude Code's Agent Teams uses local JSON inboxes; Codex Multi-Agent V2 keeps queues in process memory; Orca uses SQLite for persistence, supporting durability and dependency-triggered execution.

A commenter added one point: mailbox messages should carry unique IDs for idempotency, so that when a message is replayed, a teammate doesn't do the same thing twice.

Third layer: what happens when the program crashes? T3 Code focuses on reliable delivery before dispatch. It is a multi-client synchronized control plane, prioritizing state consistency. The orchestrator must both update database state and spawn local or remote agent processes. If the database has just marked a task as running but the process has not started yet and the application crashes, after restart you will see zombie tasks. T3 Code uses a transactional outbox: state updates and pending dispatch commands are committed in the same database transaction, and a background loop scans and executes them. This way, after a client disconnects or crashes, it can still return to strict synchronization.

Orca focuses on isolating stale workers after dispatch. A task is given to A; A hangs; the coordinator times out and reassigns it to B. A few minutes later A comes back to life and overwrites B's new output. Orca separates the logical Task from each concrete Dispatch, generating a new Dispatch ID for each reassignment. If a stale worker reports back with an expired ID, the orchestrator simply drops it.

These two approaches are often used together. Outbox retries themselves may create duplicate dispatches, and Dispatch ID is the second line of defense. A commenter said that the handoff layer should also keep an extra set of reproducible acceptance conditions. Even if both agents report completion, run the same input from the beginning once more and record the first output that does not match.

Fourth layer: does switching models cause amnesia? The everyday usage is very concrete: in the same thread, rounds 1 to 3 ask Codex to write the implementation, rounds 4 to 5 switch to Claude Code to design a refactor, and round 6 switches back to Codex to modify the code. The naive approach is to open a new Codex session and replay the first five rounds. There are two downsides. The prompt cache from rounds 1 to 3 is completely invalidated, and token costs are paid again. Also, the contents of files that Codex previously read through tool calls are gone, so it has to reread the codebase.

T3 Code splits the conversation into two layers. AppThread is the user-facing ledger, recording the complete conversation from round 1 to round 6. ProviderThread is the engine mapping table, recording the native session ID of each underlying harness, plus a cursor that marks the last round synchronized to that session. When round 6 switches back to Codex, the orchestrator checks the table and finds that the Codex native session has already been synchronized through round 3 and only lacks rounds 4 and 5, so it reuses the original session and appends only the two-round delta. Switching back to Claude Code works the same way. Pay attention to prompt cache TTL; it is usually a few minutes to an hour, depending on the provider.

A commenter said that when you switch models to continue the work, it isn't dumb; it will just earnestly propose again a plan that was rejected last week. Another comment was more direct: the tool layer solves invocation, and the state layer solves whether you can continue.

Stack the four layers together and you have the skeleton: capability injection, communication, state and fault tolerance, and context handoff. There are no standard answers at each layer, only trade-offs. Once you understand these trade-offs, you know what these tools are worrying about for you in the background.

The comments also throw cold water. Erwin himself replied that all three above are good, but don't use multi-agent unless necessary; just tell the AI to use local codex or agy to go talk to someone else. Someone reminded that putting one agent on the frontend and one on the backend easily produces two 'my side is done' claims, and when integrating, they haven't even agreed on what a null value looks like. First make them share an interface contract, then run the same contract tests; whoever changes a return value should see their side go red first. Some people were not convinced by Codex writing the frontend, asking whether the blood pressure is too low. Others asked: in a large repo, can't you just read the code directly? Why pass messages? Different harnesses have isolated sessions, so you cannot assume they share context; that is why the message-passing layer exists.

Sources: Erwin, 'How to Build a Multi-Agent Orchestrator from Scratch'; Baoyu's tweet and video.

Original article link: https://x.com/i/article/2126531226655936512

Tweet link: https://x.com/dotey/status/2127694846206861746

发布时间: 2026-12-02 03:32