Repository navigation
The whole team in herdr: agent-started workers and Docker or cloud fleets; release 0.15.0 - #60
Merged
Merged
Conversation
Workers your agent starts in the background (factory_start_worker, factory.workers.start) now get a herdr pane of their own when the starting process runs in herdr: a "FACTORY team" tab, one pane per worker, each running `factory-herdr worker`, which prints what the worker does and reports it to herdr as FACTORY · <agent> (working while a turn runs, idle while it waits, needs you when its run failed), with its job. `factory-herdr fleet <fleet folder>` does the same for Docker, Fly.io and Sprites fleets: one tab per machine, one pane per agent, from the fleet's status report and activity traces (or asking the fleet itself with --observe). `factory-herdr team <board>` opens the panes for workers started elsewhere. Panes are opened with herdr's own tab create / pane split / pane run, quoted for the pane's shell, and reported with report-agent and report-metadata. Refs #51
Found in a real Docker fleet of Claude Code agents shown in herdr: - A fleet agent's pane showed the runtime's raw events (item/completed, thread/tokenUsage/updated, "[object Object]"). It now shows what the agent did (said, used a tool, ran a command, started or finished a turn) and leaves the bookkeeping out. - Ctrl+C typed into a herdr pane on Windows reaches no Node program as a signal, so the follower never stopped or handed its agents back. The followers now read their own keys: Ctrl+C or q stops them, everywhere. Refs #51
…stem Found by local CI on Linux: a PowerShell path with backslashes was not recognized there, so the command got POSIX quoting. Shell names are now split on both separators, as herdr itself does. Refs #51
Version 0.15.0 in package.json and package-lock.json; the guide's install lines point to v0.15.0 and say what is new.
3 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Steps 1b and 3 of #51: the rest of a FACTORY team shows up in herdr, not only workers you start yourself in a pane.
What you get
Workers your agent starts. When the process that starts a worker (
factory_start_worker, orfactory.workers.start) runs inside a herdr pane, each worker gets a pane of its own in aFACTORY teamtab. The pane runsfactory-herdr worker <board> <agent>, which prints what the worker does, step by step. It also tells herdr the worker's state:The name (
FACTORY · builder), title and job text work as in #58.factory-herdr team <board>opens the panes for workers started outside herdr, for example from a Codex supervisor, since Codex passes its MCP servers only a few settings.herdr: falseturns it off.Docker and cloud fleets.
factory-herdr fleet <fleet folder>run in a herdr pane opens one tab per machine and one pane per agent:fleet.observe()/fleet.supervise()keep current, or asks the fleet itself with--observe docker|cloud|sprites.qstops it and hands the agents back to herdr. Started again, it reuses its panes and writes nothing twice.How it works. It uses only herdr's documented commands:
tab create,pane splitandpane runopen the panes. The command is quoted for the pane's own shell (PowerShell, cmd or POSIX), as reported bypane process-info.pane report-agent(sourcefactory:follow, agentfactory) andreport-metadatareport each agent. A worker or fleet agent has no program of its own in the pane that herdr could recognize.New files:
src/herdr-panes.mjs,src/herdr-follow.mjs, andbin/factory-herdr.mjs(a newfactory-herdrcommand).LocalWorkers.startopens the pane. README and guide updated. The SDK exportsshowWorkerInHerdr,followWorker,followFleet,workerView,fleetAgentViewandfleetActivity.Checks
Tests:
test/herdr-follow.test.mjs, 10 tests, added topublic-sdk.yml. They use a stand-in herdr that answers with herdr's JSON shapes and cover:LocalWorkers.startopening a pane inside herdr, and none outsideLocal CI, on e45aaf2: each run used a clean LF snapshot, as in
public-sdk.yml(npm ci, production audit, the focused list through the temp guard, both Python suites, a fresh install of the packed package includingfactory-herdr --helpand the installed MCP tests, evidence regressions).Real runs, herdr 0.9.5 on Windows 10, in its own named session:
claude -pand a small MCP server that records itsHERDR_*settings.factory.workers.startstarted a real two-worker team: builder and reviewer, Claude Code on Haiku, in the background.FACTORY teamtab. The panes showed each step, from "used Write" and "used mcp__factory__factory_submit_workspace" to "finished: nothing assigned to it is left open".scripts/docker-fleet-smoke.mjs --program claude --teams --machines 2 --agents 2 --prebuild --quickpassed every step, whilefactory-herdr fleetfollowed it from a herdr pane.This PR is also release 0.15.0 (version and install lines). Not run live: a Fly.io or Sprites fleet. It uses the same folder-reading path as Docker, and
--observe cloud|spritesonly picks the fleet class.Not in this PR
Refs #51