toryo docs
Documentation navigation

Herdr

Herdr is a desktop terminal app, and toryo works with it in two independent ways. Its mods bring the items waiting on you, and the work toryo is running, into Herdr. Herdr can also be the multiplexer your agent sessions run in, in place of tmux. Use either, both or neither. Board stays the full console.

This release supports Herdr on macOS. Linux and Windows are unverified; see Platforms.

Install the mods#

toryo herdr install             # write the mods and open the notifier
toryo herdr install --dry-run   # show what it would write
toryo herdr install --json      # report the result as JSON

It writes five mods into the Herdr app home (~/.config/herdr-app/mods/, or $HERDR_APP_HOME/mods/), checks each one, and opens the notifier window once. Herdr reopens that window on every start after. Install opens no pane.

toryo setup offers the same install as the herdr.mods question when herdr-app is on your PATH.

Install also records how toryo's daemons nudge the notifier and the Sequence and Deputy panes, so a new item, a parked gate or a finished run shows up at once rather than at the next read. The record takes effect without restarting anything. The install output has a nudge: line saying whether it was recorded, skipped (on a dry run, after a failed install, or when herdr-app is not on your PATH) or failed (it could not be written). A failed record does not fail the install: run toryo herdr install again. toryo setup lists the same shortfall under "still to do". Without the record everything still works, and items and pane rows arrive on the next read.

A reinstall replaces toryo's mod folders whole, so a local edit is lost. To change a mod, clone it first:

herdr-app do mod.clone '{"name":"toryo-answer"}'

If you close the notifier window, it stays closed until the next toryo herdr install.

Notifications and the answer dialog#

The notifier is a small window reading toryo · N waiting. Each new item raises a toast, up to three at a time, then one "N more". Its first run raises a single summary toast rather than a burst. Opening a toast or the window opens the answer dialog, which steps through the waiting items newest first.

ItemIn the dialog
A sequence gate with buttonsIts question cards, if any, a notes box and one button per action
A relay question (ask_operator)Its options
Anything else"Answer this in board", with the reason

Anything else covers a gate with no buttons, a gate whose form only board can fill, dispatch parks, Deputy, ideas and memory. If a gate moves on before you press a button, the dialog sends nothing and says so.

The window follows toryo's live updates, so a new item appears at once, and its line ends · live, as in toryo · 2 waiting · live. When it cannot follow them it reads every 15 seconds instead, and the line ends · polling: <reason>. The common reasons are no daemon token, daemon token refused and messaging not reachable: …. Meanwhile it keeps counting and raising toasts, and it reconnects on its own. A failed read shows toryo unreachable: <reason> instead of a count.

Only when thousands of items are waiting does the window show a lower bound, such as toryo · 2000+ waiting, and tell you to open board for older items.

macOS alerts#

While Herdr is not the focused app, each toast is also posted to Notification Center. Install terminal-notifier so that clicking an alert brings Herdr forward and opens the answer dialog:

brew install terminal-notifier

It takes effect on the next alert. Without it the alert comes from osascript, has no click action, and a click opens Script Editor.

The notifier window's macOS alerts on item turns alerts off and on. When it reads macOS alerts failing, neither sender could post an alert; the Herdr console has the details. macOS may first need the sender allowed under System Settings → Notifications.

Panes#

Three mods are panes that sit beside your terminals:

PaneShowsAction
toryo-dispatchParked jobs, then running, then queuedCancel, which takes two clicks
toryo-sequenceEvery project's runs: gated, then live, then the ten newest finishedAnswer on a gated run, Watch on a live one
toryo-deputyDeputy's goal, state, current work, spend and newest escalationsNone

The notifier window's Dispatch, Sequence and Deputy buttons open them. A click focuses the pane if it is already open in the current tab, and otherwise splits it in to the right of the focused pane. In a tab with no pane to split, it opens the mod as a window instead, and a second click closes it.

Or open one from a shell:

herdr-app do pane.split '{"direction":"right","mod":"toryo-dispatch"}'

From the palette, mod.open opens a pane as a window that offers Open as pane. You can also bind pane.split to a key in the global section of Herdr's keys.json; toryo never writes that file.

Dispatch follows dispatch's live updates, and reads every 15 seconds when it cannot. Sequence reads every 15 seconds and Deputy every 30, and both also refresh at once when toryo nudges them: on a new item, and for Sequence on a finished run. Any number of open copies cost the same as one. A failed read replaces the list with toryo unreachable: <reason>. A list more than three intervals old says stale. Opening board from a pane, and every Deputy control, stay in board.

Run workers in herdr#

tmux is the default multiplexer. To run agent sessions in herdr:

  1. Install the Herdr app. Its hc command ships inside it, and setup cannot install it for you.
  2. Choose both multiplexers at toryo setup and pick herdr to run new sessions: yes to multiplexer.herdr, then herdr at the "Which multiplexer runs new agent sessions?" question, or the flags below. Then restart dispatch, which reads the choice when it starts.
toryo setup --multiplexers tmux,herdr --spawn-multiplexer herdr
toryo foreman restart dispatch

Setup offers herdr only when hc is on your PATH. A request for it anywhere else is dropped, and setup prints the reason. With --spawn-multiplexer herdr, setup stops instead, before it installs any host tools.

Keeping tmux chosen is what lets you move without stranding anything: toryo cleans up sessions on every multiplexer you choose, so tmux workers already running finish and are cleaned up while new ones start in herdr. Once none are left you can choose herdr alone (toryo setup --multiplexers herdr). Choosing herdr alone straight away stops toryo cleaning up its tmux sessions.

Setup asks which multiplexer runs new sessions only when you choose two or more. Unanswered, it keeps the one this install already runs them in, else tmux; the order you name multiplexers in does not change that. Export TORYO_MULTIPLEXER=herdr to run new sessions in herdr for one shell only. TORYO_INSTALLED_MULTIPLEXERS lists what setup recorded. toryo doctor has a herdr row, which checks for hc only when herdr is chosen.

Under herdr each worker is a terminal in a space named after its project. To reach one, use open terminal in board's job detail, or run toryo-dispatch terminal <jobId>, which prints the attach command for that job: hc attach <name> under herdr, tmux attach -t <session> under tmux. A worker in the default print execution mode shows an empty terminal; see Print workers have no screen.

Watch a run#

toryo sequence watch <runId|prefix> follows a run until it ends, then exits with its outcome: 0 succeeded, 1 failed, 2 cancelled. Started in a herdr terminal, it also reports its status to Herdr, so the watcher appears as a row in Herdr's Agents list. While the run waits at a gate, that row shows it as blocked and names the sequence, the run, the gate and its actions, for example code-task 1a2b3c4d · approve_plan: Approve / Revise / Reject. The Sequence pane's Watch starts one for you.

--json prints one JSON event per line, for programs built on toryo. See Building on toryo and the CLI & contract reference for the events.

A worker in the default print execution mode is headless, so attaching to it shows nothing; follow it in the worker feed in board's job detail. Only a Claude Code worker in interactive execution mode shows herdr's agent status; to make that the default for every session, set the Worker setting Execution mode to interactive. Watching agents covers both modes and every way to switch.

Platforms#

Herdr support is verified on macOS for this release. On Linux and on toryo's Windows path, herdr is unverified and not supported yet. tmux stays the default everywhere, and the recommendation wherever the Herdr app is not installed. See Known limitations.