Summon a fleet,
token savings
you can't beat.
Claude Code or Codex spawns parallel OpenCode workers in your own repository. They see each
other's edits and leave the work in your tree, uncommitted. Every claim they make is checked
against git diff first.
Delegation
The context firewall
The model reads a result. The transcript stays on your machine.
Everything a worker produces — its narration, its tool calls, the files it opened — stops at the manager. What passes through is a fixed-shape result under a hard budget. Drawn to scale:
What a worker's life looks like
-
Spawned, and maybe queued
worker_spawnreturns an id in under a second. Past the concurrency cap a worker waits in line, costing you nothing; its session opens and its clock starts when it actually runs. -
Running in your repository
By default every worker works in your checkout, together, seeing each other's edits. The work stays uncommitted in your tree. Three watchdogs read the event stream — wall clock, idle, budget.
-
Blocked, if it needs you
A worker that hits a question stops and says so. You answer with
worker_messageand it picks up in the same session, keeping everything it had already worked out. -
Settled, then checked
The manager snapshots the worktree, re-runs the repository's own test suite itself, and reconciles the worker's report against
git diff --name-only. Its summary is a claim. The discrepancies are Dispatched Code's own finding. -
Or it fails, and says which kind
Timed out, over budget, cancelled, interrupted by a dead process — the result says which. A
kill -9mid-run is salvaged from the worktree into a real result on a mergeable branch.
What comes back
This is the whole of what the model sees for one worker.
Worker: w-001 · model: opencode/muse-spark-1.2-contributor-free · mode: implement · status: completed · 15s · ~12,985 tok
Task: Add a `range` function to src/stats.js that returns the largest value minus the smallest.
Summary: Added `range(values)` to src/stats.js returning max-min with RangeError on empty input, and
added corresponding tests to test/checks.mjs. Verified range([3,1,4])===3 and range([]) throws
RangeError, and npm test passes.
Changes (2 files, +18/−1): src/stats.js, test/checks.mjs
Tests: 4 passed / 0 failed / 0 skipped
Discrepancies: none
Snapshot: a7c6376179 on the worker's branch
The tool surface
Sixteen tools. Each returns in under two seconds.
worker_spawn | Delegate a task. Returns an id immediately; the work runs in the background. |
|---|---|
worker_status | Where workers are. Cheap, safe to poll. |
worker_wait | Block until a worker settles — or any, or all, of several. Capped. |
worker_result | The verified result. The default thing to read. |
worker_output | The lifecycle audit trail, paginated. Debugging only. |
worker_message | Answer a blocked worker; the session is reused. |
worker_revise | Send a settled worker back with feedback, capped, in the same session. |
worker_recover | Resolve a worker whose session this process no longer has. |
worker_budget | Give an exhausted worker more tokens or wall clock, and carry it on. |
worker_stop | Graceful abort, with the worktree snapshotted. |
worker_list | Inventory, filterable by state and run. |
worker_diff | The unified diff a worker produced, paginated under a 400-line cap. |
run_report | The run's markdown audit trail: spend, tests, discrepancies, merges, timeline. |
workspace_merge | Start a gated merge of completed workers into an integration branch. |
workspace_merge_status | Poll it: which merged, which one broke it, where it rolled back to. |
workspace_cleanup | Prune merged worktrees and branches. Unmerged work needs an explicit force. |
Who calls them
Claude Code or Codex. The server cannot tell which.
The client is a slot. Codex fills it.
Dispatched Code speaks stdio MCP and nothing else, so whatever holds the other end of the pipe
is the thing doing the delegating. Codex is the second one that has actually held it: one entry
in ~/.codex/config.toml, and it spawns, waits, answers a blocked worker, revises
and merges through the same sixteen tools, reading the same verified result.
- The tool surface is the same sixteen. Same names, same arguments, same results. Nothing in it branches on who is calling.
-
The dashboard is the same page. It is served over HTTP on
127.0.0.1:4180, and a browser does not care which client started the process behind it. - The repository is the same repository. The server works in the directory its client was started in, so the rule does not change: start the client in the project.
Sharp edges
The list you would find on your own, in week two.
-
No container sandbox. Workers run with your permissions, in your
repository. An
implementworker can write anywhere this process can, and the diff is what tells you where it went. Your client's own approval and sandbox settings cover the client; they do not reach the workers behind the tool call. - Cost is unverified on a paid provider. Every run so far has been on a free tier, where the number is always zero. Trust the token counts; treat the dollar figure as a placeholder.
-
The queue is lost on restart. A restarted manager mints ids from
w-001again, so it can collide with rows a dead one left behind. -
Two clients means two managers. Each client launches its own copy of
the server over stdio. Claude Code and Codex open at once are two independent managers minting
ids from
w-001into one repository, and only one of them can have127.0.0.1:4180. - A question still costs a turn. Permission requests are answered in band and the worker carries straight on. An actual question is answered by picking one of the labels the worker offered, so the exchange moves one label at a time.
-
Your test command is taken at face value. The manager re-runs it and
reports the exit code honestly, but
node --check file.jspasses on anything that parses. Whether the command proves something is your call.
Install
Bun, git, and an OpenCode binary on your path. One command, run once, in whichever client you drive it from.
claude mcp add dispatched-code \
-- bun run "$PWD/src/mcp/server.ts"
codex mcp add dispatched-code \
-- bun run "$PWD/src/mcp/server.ts"
Workers work in the directory you launched the client from, so starting Claude Code or Codex
inside a project is the whole of the setup. The dashboard comes up on
127.0.0.1:4180, and the URL is printed to stderr at startup.