Repository navigation
Workers started in a herdr pane show their agent and job in herdr's sidebar - #58
Conversation
…idebar A factory-lite claude or codex worker started inside a herdr pane now appears in herdr's sidebar as "FACTORY · <agent>", with the job it is on (building, fixing, reviewing or next). It uses herdr's own display-only labels, so herdr keeps deciding whether the agent is working, waiting or needs you. - factory-lite hands its board server herdr's four HERDR_* settings, and only for sessions in a terminal; background workers never label a pane. - The worker's board server labels the pane at start, after each board call and every 15 seconds, sending only changes, newest first, with rising numbers. - The label is removed when the session ends; outside herdr nothing happens, and a missing, failing or stuck herdr never holds a worker up. Refs #51
Checked on a clean Windows VM with a real Claude Code sessionMachine: the local Hyper-V VM Real worker in herdr. I ran
After Tests in the VM (focused list from
Found on the way. herdr's panes on Windows start with the user's normal Windows settings, not the herdr server's. A worker therefore needs |
Explains how a factory-lite worker started in a herdr pane shows up with its team name and current job, and says plainly that workers your agent starts in the background have no pane yet, so they don't show up. Refs #51
|
README section added (2e738ff): "Watch your team in herdr". It says plainly that only workers you start yourself in a pane show up, not the ones your agent starts in the background. Local CI on 2e738ff, clean LF snapshot: Windows 10 and Linux (Docker bookworm-slim), Node 22.17.0 and 24.22.1. Each had 359 of 359 focused tests, 2 of 2 installed-package MCP tests, 7 of 7 evidence tests, audit and both Python suites passing. |
Step 1 of #51: a swarm's workers show up in herdr.
What you see
Start
factory-lite claude …orfactory-lite codex …in a herdr pane. In herdr's sidebar the worker now reads FACTORY · builder instead of plain "Claude". The pane title is the job, for example "page: Write the landing page". The text next to the state follows the board:next: pagewhen the job is waiting for the workerbuilding pageafter the worker claims itfixing pagewhen a review sends it backreviewing menufor a reviewerWhen the session ends, all of it goes. Outside herdr nothing changes.
How it works
factory-litehands its board server herdr's fourHERDR_*settings plus which program it is. It does this only for sessions in a terminal, so background workers fromfactory_start_workernever label the pane that started them. Codex gives its servers only a few settings of its own, so these are passed explicitly, for both programs.herdr pane report-metadata … --source factory:worker --agent claude|codex:--agent. herdr's own Claude Code and Codex support keeps deciding whether the agent is working, waiting or needs you.$factory_agentand$factory_job.--seq. Failures are ignored, and a stuck herdr is killed after 3 seconds.startLiteWorkerclears everything FACTORY put on the pane.New:
src/herdr.mjs. Changed:src/lite-worker.mjs,bin/factory-mcp.mjs,PUBLIC_SDK.md("Seeing your workers in herdr"),README.md(one line), and the workflow's test list.Checks
New tests (
test/herdr.test.mjs, 8 tests, added topublic-sdk.yml):Local CI, matching
public-sdk.yml. Each run used a cleangit -c core.autocrlf=false archivesnapshot of 0482943 and ran:npm ci,npm audit --omit=dev --audit-level=high, the focused test list throughscripts/test-temp-guard.mjs, both Python suites,npm packwith a fresh install of the package (verify script, CLI help, installed MCP stdio tests), and the evidence regressions.node:22.17.0-bookworm-slim)node:24.22.1-bookworm-slim)On Windows, Windows' own
tar.exehas to come first on the path, as the workflow's runners have it. With Git'star, five archive tests fail for reasons unrelated to this change.Real herdr 0.9.5 (the official release files from herdrdev/herdr):
factory-lite clauderan in a herdr pane, with a stand-in for Claude Code started under the nameclaudeso herdr recognizes it. Runningherdr agent listshowed:claude,display_agent"FACTORY · builder", title "page: Write the landing page", state labels idle "idle · next: page" / working "next: page", tokensfactory_agent=builder,factory_job=next: pageherdr.exe, own named session). The same flow through the realstartLiteWorker. The tokens appeared, changed to "building page" after the claim, and were cleared when the session ended. The name and state text need herdr to recognize Claude Code, and a Windows stand-in cannot pass forclaude.exe. The Linux run covers that part.Real Claude Code 2.1.289 in herdr 0.9.5 on a clean Windows Server 2025 VM: name, title, state text and job values shown, then cleared on /exit (see the comment below). Not run: a real Codex session.
Not in this PR
Refs #51