Agent infrastructure · private repository
agent-orchestrator
Coding agents are easy to run once and hard to run as a fleet. This is the server and the farm-machine CLI that dispatch Claude Code sessions across machines and accounts, and keep them honest while they work.
Two binaries
orchd— the server. One process and one SQLite database: the HTTP API, a GitHub poller that turns incoming work into dispatchable jobs, and an operator UI embedded in the binary and served from/ui. Deployed from a Dockerfile.orchestrator— the farm machine.runholds an SSE connection to the server and executes spawn, notify, peek and kill against a local tmux session;mcpexposes the same operations to agents over MCP;join,statusandleaveenrol a machine, report on it and revoke it, with the enrolment line printed by a server-side token command.
What it enforces
- Hooks, not hope. The same binary is the agents' hook entry point:
heartbeatproves a session is alive,drainretires it cleanly,scope-guardkeeps it inside the files it was given,plan-checkkeeps it on the plan it agreed to. - Isolation per session. Each run gets its own tmux session and its own git worktree, so parallel agents on one machine cannot reach into each other's checkout.
- Few runtime dependencies. On a farm machine the binary needs nothing beyond
gitandtmux; install withcargo installor copy a release binary onto the PATH.
Tested without a fleet
$ cargo test --workspace # core, server, CLI — no network, tmux, git or agent $ cd ui && bun test # the operator UI $ ORCH_E2E=1 cargo test -p e2e builds both binaries, starts a real orchd, drives a real tmux session and a real git worktree through the actual HTTP API
The unit suite touches no real process at all, which is what makes it usable in CI; the end-to-end suite is opt-in and drives the real thing.