Loading...
Loading...
Multi-agent work through hc: start real pi, Claude Code or Codex sessions as hc terminals (watchable in Herdr, any model, any hc machine), brief them, collect their results and clean up, by hand or with a scripted runner (flow.mjs: agent/parallel/pipeline). Use for fan-out, review panels, pipelines of agents, or work on another machine; from pi it is the only way to run other agents.
npx skill4agent add deevsdeevs/agent-system hc-flowhcflow.mjsR=~/.local/state/hc-flow/<run>; mkdir -p $R # result files for this run
hc run --bg --name <run>-<role> --cwd <dir> pi # or: claude --permission-mode auto --add-dir $R,
# codex --no-daemon --add-dir $R; --on <machine>
hc wait <run>-<role> # ready: it reports idle
hc send <run>-<role> "<brief>"
hc wait <run>-<role> # the turn your send started
cat $R/<role>.md
hc kill <run>-<role>; hc rm <run>-<role> # once you accept the resultrunhc waithc wait <t>reason: messagereason: timeouthc wait --children anyhc readblockedsend --force--model <m>pi --model provider/idclaude --modelcodex --no-daemon --model--permission-mode auto--add-dir $Rnode <chains skill>/chain.mjs context <chain>Write your answer to, then finish your turn. Start no other agents. If you're stuck, say so with$R/<role>.md.hc send $HC_TERMINAL_ID "<what you need>"
<hc from="t7 run-role">…</hc>hc run --bg --name flow-<name> --cwd <dir> -- node <this skill's folder>/flow.mjs run <script.js> [--args JSON] [--max 4]
hc wait flow-<name> # exits 0 when the script returned, 1 when it threw
hc read flow-<name> --lines 60 # progress and the run dir
cat ~/.local/state/hc-flow/<run>/result.json && hc rm flow-<name>result.json{name, run, ok, result | error, blocked: [{name, address, reason}]}result--max--diragentparallelpipeline