The doctor
When a tool an agent needs seems gone (subagent, intercom, todo, MonitorCreate), the doctor says which fault it is before anyone routes around it: H1, its package loaded nothing in this process (a /reload does not cure what a process keeps: hand over to a fresh session); H2, the package registered the tool and an extension’s setActiveTools left it out (/boss doctor fix makes it active again); H3, pi has it active and the provider does not show it, which only a direct call of the tool tells. A stale load, a process that runs an older pi-herdr-agents or pi than the one installed, is reported beside them.
What it reads. Each role expects the tools of the packages the settings name: a main, a member, a train and an unjoined session the six subagent* tools, intercom, todo and MonitorCreate; a tower the last three (it runs no subagent); a child all of those plus caller_ping and subagent_done, minus what its launch denied (PI_DENY_TOOLS). A tool is missing when it is not registered, or registered direct and not active; a deferred tool is reachable without being active. pi-herdr-agents writes a load stamp at each load (globalThis[Symbol.for("pi-herdr-agents/load-stamp")]: its version, root and HEAD, the Maestro build, the time, a generation, and failed when the load threw), and the doctor compares it with the settings pin and the install’s HEAD.
In the session. sb_doctor (joined sessions and towers, as the other net tools) and /boss doctor (every session in a pane that is no child) report the verdict, the missing tools with their state, the stamp, the pi versions and the model. At the first turn after each session start (startup, /reload, new, resume, fork) every session in a pane that is no child runs the same check once: when an expected tool is missing it shows a warning and adds one message to that turn, which says not to route around it with plain panes, and to run sb_doctor and hand over. A child gets no such message: its tools are its launch’s choice (a role’s tool list leaves out intercom, todo or subagent; an auto-exit launch has no subagent_done), its parent supervises it, and a child told to hand over stopped before its work (2026-11-26).
The host. The report names the subagent host: sb’s (active, with the Maestro version and the commit its lock resolved), stood down (who registered subagent, and from where), off, or failed to load. Under sb’s host a role expects the five tools from pi-straw-boss, not pi-herdr-agents’ six. The doctor notes that steering and the sb server need pi-intercom, but dispatch does not.
From a shell. cli.mjs doctor --session <id|prefix|pane> [--json] checks another session, such as the one whose tools are gone. It cannot read that process, so it reads what it can: a fresh load of the same folder and settings by pi’s own loader (in a child node without the session’s Herdr, subagent and intercom variables), whose errors are pi’s; the session file, for the expected tools the provider answered “No such tool available” after the pi process started; and the pane in Herdr, with its pi’s start time against when pi-herdr-agents was installed. A tool the fresh load has and the session was refused is H1-or-H3: the fault is in that process, and sb_doctor inside it tells which. It exits 0 when healthy, and 1 on a fault or when it cannot look.