Herdr
Agent-runtime terminal workspace manager that devbot launches in place of the harness.
Herdr is a terminal workspace manager for AI coding agents: sessions, panes and remote hosts in one TUI.
What this module installs
- The
herdrbinary, through the project’s own installer (curl -fsSL https://herdr.dev/install.sh | sh— release manifest, SHA-256 verified, into~/.local/bin). Linux and macOS; an installed herdr is left alone. - The window-title setting:
window_title = "{terminal_title}"under[ui]in~/.config/herdr/config.toml(or$XDG_CONFIG_HOME/herdr/), so the terminal title follows the focused pane’s agent session. An existing key is never touched, a config that the key would break is reverted, and a running server is reloaded. - Nothing in the shell rc. An older release rendered a
herdrfunction into~/.bashrcand~/.zshrc; that block is now removed on install and update (see below).
Where herdr is started
devbot launches it. A bare devbot brings the container stack up and then hands the terminal to
herdr, which restores its panes — each one already running the harness in the session it had when
herdr last exited, so nothing is resumed by dev-bot. Inside one of those panes devbot starts the
harness directly, having brought up only what was missing; --gui and harness arguments bypass herdr
entirely, because they ask for the harness itself.
Because herdr restores its own workspace, a boot that hands over to it needs no project of its own:
devbot starts from any folder in that case and writes nothing there — no project config, no
wiring baseline, and no project-scoped module up.sh scripts. With the module enabled but the binary
missing, the harness is started instead — and that still needs an initialised project.
That is why this module no longer owns the docker stack. An older release rendered a shell function
that ran devbot up --owner herdr around the TUI and released the claim on exit; devbot install and
devbot update now strip that marked block from both rc files, so a machine that ran the old release
does not keep running up a second time or claim the stack as a non-session owner.
The devbot marker token
devbot running inside a pane publishes the terminal marker that ended its turn as display-only
pane metadata — the devbot token, e.g. devbot=NEEDS_INPUT. It is not a state report: the
pane’s lifecycle authority stays with herdr:opencode, so the agent keeps its name and its
idle/working/blocked state. The token has no TTL: it stays until the next turn replaces or
clears it, or the pane closes — so treat it as the last marker reported, not proof of a live state.
Read it with herdr pane get <pane> or herdr agent list; the default sidebar rows do not show
metadata tokens, so add it to a row to see it:
[ui.sidebar.agents]
rows = [["state_icon", "machine", "workspace", "tab"], ["agent", "state_text", "$devbot"]]
All three harnesses publish it — the module’s idle hook on opencode v1, the harness’s
agent-communication-idle package on v2, and the transcript-reading Stop hook on Claude Code. The token follows
the turn:
herdr agent list | jq '.result.agents[] | {pane: .pane_id, marker: .tokens.devbot}'
tokens is omitted from the response while unset, so a pane without a marker has no devbot
key. It is written from session.idle in the pane’s own process, so a server shared across
panes reports to the pane that spawned it, and it is absent wherever herdr is not running.
A turn that pauses — [WAITING_FOR_PTY] or [PARTIAL] — also sets a state label: the text herdr
shows in place of the word for the pane’s current state, working (pty) and unfinished
respectively, cleared by every other marker. Like the token, a label outlives the report that set it:
no TTL expires it, so a pane whose idle pass stops reporting keeps the last label it was given. The
label is presentation only and does not move the state, so herdr agent list still reports idle for
the pane a sidebar row shows as working (pty) — which is opencode’s own reading, since the wait
outlives the turn. Taking the state is not an option: herdr refuses a working claim from a source
that does not hold the pane, and a source that takes the pane from herdr:opencode strands it as
unknown on release. state_text is the row token that renders a label.
Enablement
Disabled by default: opt in with "modules": { "herdr": true } in .devbot.global.jsonc, then run devbot install. The global map is the switch: install and update provision the machine, not a project, so a project-file entry changes nothing here. A disabled module installs no binary — but it still retires the old wrapper block, because that block must not keep running up on a machine that has moved on.
A bare devbot also installs a missing binary before it decides what takes the terminal, so enabling the module and starting devbot is enough — no separate install step. A binary the installer already landed in ~/.local/bin counts as installed even when that directory is not on PATH, so the install runs once. A failed install (offline, say) warns and starts the harness, and is retried on the next boot; --gui, harness arguments and a herdr pane never trigger one.
The 1.25.0 migration writes the explicit false for a config that names neither module, and leaves a value the machine set itself alone — the module scripts run before the reconciler, so the default has to be there first.