herdr-spawn: coordinate several coding agents with lanes and a board

herdr-spawn launches coding agents as quiet lanes, each with its own worktree, and a board tells me which one finished. hierarchical-implementation decides who writes the code.

AI-assisted translation, approved by Mateo.

Editorial composite of real captures: a frame of the herdr-spawn demo in the Herdr app and, on the right, a driver lane pane and a lane.sh board from my lab, rendered from real text.

In this post I bring you herdr-spawn and hierarchical-implementation, two tools of mine (MIT) for working with several coding agents at once. Herdr, where they run, is by herdrdev; this post starts where its layout ends.

Real Herdr window with four named tabs: Coord-Textkit, the coordinator's, and demo-docs, demo-slug and demo-words, one per lane. The coordinator shows the notices: demo-docs finished, demo-words escalated a question and then reported a milestone.Enlarge image
A real Herdr window in my lab: three demo lanes on a test project. Lab capture.

What is herdr-spawn?

herdr-spawn launches coding agents (claude, codex, opencode or omp) as lanes: each one is a Herdr tab with its own worktree and goal. A coordinator launches them and reads them; a session becomes one by typing /coordinator or by launching its first lane.

A unit lane executes one unit its coordinator reviews. A driver owns a whole result and integrates it.

It launches like this: spawn.sh --tab <worktree> --lane unit --goal '…' claude name brief.md.

A coordinator launches one tab with a driver lane, its workers and a subtask, and another with a unit lane; the driver reports done.Enlarge image
One tab per lane; a subtask shares its root's tab. Illustration.

What I am building now, in no release yet: an orchestrator mode. The main session hands it one deliverable and stays free to talk to me; it spawns its own lanes, verifies, and escalates to me once, only what needs a person. Three layers at most.

Three layers: the main session hands one deliverable to the orchestrator, which spawns and verifies its unit and driver lanes and escalates once to the main session.Enlarge image
In development, unreleased: main session, orchestrator and its lanes. Illustration.

Why I built it

With three agents in three panes, the one who reads them all is me: I become the message bus. I wanted the opposite, and I wrote it in the design (my translation): "only when there is news, and when the coordinator has something to say".

So each lane gets its own worktree and stays quiet until it reports, and I talk to the coordinator, not to each pane. Lanes share a board: lane.sh post publishes a typed fact (artifact-ready, dep-changed, resource-lock or resource-free) and the other lane gets it when idle, without waking the coordinator.

Two panels: before, three agents write to one person; with lanes, three quiet lanes report to a board the coordinator reads.Enlarge image
Before, every pane writes to me; with lanes, the coordinator reads a board. Illustration.

What it looks like

To try it I built a synthetic project, textkit, with three worktrees and one lane in each. demo-words had an open decision (does "well-known" count as one word or two?) and escalated. The board flagged it, I answered and it finished with six tests. The other two finished without escalating.

Two lane.sh boards as text on a dark background: on top demo-words as needs-coordinator with its question, demo-slug working and demo-docs already done; below, all three lanes done.Enlarge image
lane.sh board twice: one lane waits for an answer, then all three are done. Rendered text, not a window screenshot. Lab capture.

The third lane, a driver, handed the whole unit to one worker; the gate that logged it comes further down.

Trimmed pane of the demo-slug driver lane: the gate refuses the first worker, the lane spawns slug-worker, reviews and closes with the goal achieved; below, three rows of the gate report, one with delegate.Enlarge image
Driver demo-slug: the gate refuses its first worker; report rows show delegate. Rendered text, not a window screenshot. Lab capture.

How it works

A lane works until its criterion holds, saves a report and declares it: done finishes, escalate asks for a decision and milestone, rarely, flags an important step. I answer with lane.sh reply and watch lane.sh board, which flags goals a Claude lane's transcript does not confirm.

A lane in working can go to escalate, which gets a reply; to milestone, which keeps going; or to done, which ends.Enlarge image
Only done ends a lane; escalate waits for a reply and milestone keeps working. Illustration.
PieceWhat it is forWhy this oneIn exchange for
herdr-spawnLaunches lanesNo panes by handNeeds Herdr
lane.shNotices and a lane boardLess chat, more signalEach notice costs a turn
worktreeOne directory per laneKeeps changes apartDisk and branches
stop hookBlocks silent stopsCoordinator hears every laneLets go after 3 blocks
heavy.shQueues heavy builds and testsProtects the machineA lane may wait

And hierarchical-implementation?

hierarchical-implementation is the other side: it makes the session decide whether it writes the code or hands it to a worker. Before the first edit or first worker, a gate asks for that decision to be recorded (for example delegate, lane or trivial) and keeps a log.

The README is blunt: it is a speed bump, not a barrier, and a model set on getting around it can still write files in ways the hook does not see.

Flow: the first edit or first worker reaches the gate; with no decision it is denied; with a recorded decision it is allowed and logged.Enlarge image
Without a recorded decision, the first edit or first worker is denied. Illustration.

Numbers

A worker has only file and shell tools. In my setup it starts at 29,727 tokens against 89,285 for a general-purpose agent, per the README.

Even so, for changes of 40 lines or fewer, delegating used a median of 3 to 4 times the tokens of doing it directly (sample of 11). An old cap that pushed code and its test into delegation partly explains it. For a small edit, editing directly is better.

Two horizontal bars of starting context in tokens: a tool-restricted worker, 29,727; a general-purpose agent, 89,285.Enlarge image
Starting context in tokens: README figures from the author's setup, not measured by me. Illustration.

Pros and cons

What we gain

  • A board instead of reading every pane.
  • Each lane works in its own worktree, apart from the others.
  • The gate keeps a log of what it sees.

What it costs

  • Each lane is one more session, with its own tokens.
  • done is the lane's own word: I re-ran the tests myself.
  • In my run, two lanes waited about 30 minutes for a heavy.sh turn, taken by unrelated jobs, while the board said working.
  • The gate does not see cp, mv, patch or scripts.

When it is not worth it

With a single task or a small change, opening one agent and editing by hand is cheaper.

How to install it

For Claude Code, herdr-spawn:

claude plugin marketplace add mateo-di/herdr-spawn

claude plugin install herdr-spawn@herdr-spawn

And hierarchical-implementation:

claude plugin marketplace add mateo-di/hierarchical-implementation

claude plugin install hierarchical-implementation@hierarchical-implementation

Done! For hierarchical-implementation, we then merge its README's examples/CLAUDE.md into our instructions, and restart open sessions. For Codex, OpenCode and oh-my-pi, the herdr-spawn README explains installing from a clone, and a Codex coordinator starts with codex --no-daemon. I hope you find it useful! Cheers :)

Credits: Herdr (herdr.dev) by herdrdev.

Thanks for reading. The learning continues in the next article.