Herdr addon
Herdr puts coding agents in panes, on your machine and on machines it reaches over SSH. This addon lets a Deep Work Plan use those agents as peers: a plan can hand a bounded task to an agent in another pane, receive exactly one authorized reply, and keep a record of the exchange.
It is an optional addon of DWP v8 (pack v8.0.6). The methodology works the same without it: with the addon absent or disabled, every task runs in the current session, exactly as before.
Deep Work Plan has four pillars: spec-first plans, the repository as the harness, loop engineering, and measured efficiency. Addons and integrations can extend the harness and loop; the methodology works on its own.
The plan loop
- 01 Register the plan
- 02 A human starts the daemon
- 03 Read plan state and queue
- 04 Prompt the lead or successor
- 05 Report events; respect gates
- 06 Continue with the next approved plan
What it integrates
The addon is a thin integrator. The work is done by herdr-peers, a standalone MIT skill pinned at v2.2.2 that is useful without Deep Work Plan. It defines what Herdr itself leaves open: who may answer, how the answer finds its way back across machines, how two agents avoid answering each other forever, and where the record of “I asked, it answered” lives.
| Item | Value |
|---|---|
| Product | DailybotHQ/herdr-peers, tag v2.2.2, protocol 2 |
| Registry key | herdr in .dwp/config.json |
| Transport | interactive: a peer in a Herdr pane |
| Provides | subagents, cancel_children |
| Requires | the plan contract’s agent_delegation grant |
Stable since v1.0.0. The public interface follows semantic versioning: the CLI verbs and their documented flags, exit codes 0–7, the documented HERDR_PEERS_*, DWP_PLAN and DWP_TASK variables, protocol 2, and the JSON contracts herdr-peers/lanes-v1, herdr-peers/lead-v1 and the delegation record. A breaking change to any of them bumps the major version, and a wire-format change also bumps the protocol number. v1.0.0 changes no behavior from v0.3.3, and 0.x releases are no longer supported.
Install
Install herdr-peers and Herdr’s official skill, which it depends on. Every machine whose agents should answer needs the skill too.
npx --yes skills add https://github.com/DailybotHQ/herdr-peers/tree/v2.2.2 --skill herdr-peers -g -y
npx --yes skills add https://github.com/herdrdev/herdr/tree/v0.9.3 --skill herdr -g -y
Requirements: Herdr 0.9.1 or newer, bash, and python3 3.9 or newer (standard library only). Onboarding offers the addon and records your answer in the addon registry; it is never enabled without consent.
What it adds to a plan
- Delegation to a peer. On a v7 or v8 plan whose contract grants
agent_delegation,executemay hand aparallel_safetask, or a read-only question, to an agent in another pane, on this machine or another one. - One authorized reply. The request carries a stamp that authorizes exactly one answer. The peer replies once through the helper, and the reply carries a stamp of its own.
- A record before reliance. Every delegation is written to the plan’s
analysis_results/delegations.ndjsonbefore the reply is used, and maps to thedelegationjournal event of v7 and v8 plans. - Results stay claims until checked. A peer’s answer is
assertedevidence until the plan’s own gate runner observes it. It never closes a task by itself.
Safety model
| Rule | What it means |
|---|---|
| Grant first | Delegation runs only when the plan contract grants agent_delegation. |
| Depth limit 1 | A message stamped depth=1 or reply-to= is never answered, and a delegate never delegates. |
| Fan-out cap | At most four peers per caller by default. |
| Data, not instructions | A reply never grants authority the receiver did not already have. |
| One writer per path | A peer that writes works in its own git worktree. |
herdr-peers does not authenticate the sender: the from= field in a stamp is a claim. The mitigation is the HERDR_PEERS_SCOPE allow-list, which limits the workspaces and machines a peer accepts.
Containers and the host
With the devcontainer addon on devcontainer-kit v1.4.4, every dck container ships herdr-peers and joins the mesh at dck up: its agents can ask agents on the host, in the other containers and in the host’s other loopback containers, and get the reply back. dck setup installs a verified herdr-peers on the host, so host agents reply too. The host listener and the extra keys that let other containers in are your decisions in the kit’s host profile; this addon never sets them. Since herdr-peers (v0.2.3), each machine keeps its own state ($XDG_STATE_HOME/herdr-peers/<server>/), so a checkout shared by the host and a container no longer mixes their records, and since devcontainer-kit (v0.3.3) the container exports HERDR_PEERS_SELF itself, so Codex agents inside reach other machines with no hand step.
Herdr or agentkit
Both addons implement the same delegation interface — launch, observe, collect, cancel — with different transports.
| Situation | Use |
|---|---|
A bounded parallel_safe task with a declared output |
agentkit (headless ak run in a worktree) |
| The task needs interaction, runs long, or lives on another machine | Herdr (a peer in a pane) |
For a lead running many lanes at once — panes on the host, in containers and on other machines, each on its own account — herdr-peers lanes lists every lane with its state, herdr-peers status <pane> classifies the screen a blocked lane is on, and every delegation record names the account and vendor that carried it. See Running many agents.
Every lane names its pane. Under swarm autonomy rules (Guide §17.2), every lane passes its own pane with --pane <pane> on every herdr-peers verb (ask, reply, notify, check, wait, lanes, cancel) to prevent message misattribution and fan-out slot saturation. Codex lanes require it especially strictly due to background server sharing across sessions.
Notices and leadership
herdr-peers (v0.3.2) adds what lets a swarm outlive its lead (Swarm autonomy):
- Notices.
herdr-peers notify <addr|lead> "<text>" --pane <pane>sends a one-way message stampedreply=no. The receiver’scheckclassifies it as a notice, records it as data and never answers. Notices cost no fan-out slot and may be sent while an ask is open; use them for handoff announcements, lead changes and release broadcasts. - A lead record per plan.
herdr-peers lead claim --plan <P> --succession <A,B> --lanes <A,B>makes an agent the lead of one plan;lead showprints the record (schemaherdr-peers/lead-v1: plan, lead, epoch, succession, lanes, updated time).lead handover <addr> --plan <P>passes the leadership on,lead takeover --plan <P>lets the first reachable deputy take it when the lead is gone, andlead release --plan <P>ends it. Each change raises the epoch and notifies every lane. Claim the plan before launching its lanes:leadresolves only once a record exists. Fromv0.3.2the record keeps the claiming repository locally and refuses a claim of the same plan id from another repository; name that plan--plan <repo>/<id>. - Fencing. A lane accepts a lead notice only from the agent that briefed it (first claim), from the current lead at the next epoch (handover), or from the first reachable succession entry at the next epoch (takeover). Anything else is recorded and ignored, and a returning lead that sees a higher epoch steps down.
- The
leadaddress.ask lead …andnotify lead …resolve to the current lead of--plan(else$DWP_PLAN), so no lane brief hard-codes the lead’s pane. usage_limitscreens.statusandlanesrecognize a CLI’s usage-limit message as the screen classusage_limit, whose next step is a handoff. It is never keyed.lanes --jsonadds the plan, its lead, the epoch and each lane’s last reported capacity.
Lanes may also ask each other for information and coordination — an interface, a flag name, a branch state — but only the lead assigns work. Depth 1 and the fan-out cap still hold. With v0.2.x there are no notices or lead records: lanes ask the lead’s address from their brief, and a lead change is relayed by the developer.
Debates
herdr-peers 1.1.0 adds a native debate sub-skill (debate.md): a lead agent runs a panel of peers in Herdr panes through rounds and closes with one result the human can trust, with its evidence and its dissent. Use it only when the human asks for a debate, a panel, a red team, research from several agents or angles, or a second panel on a result; one agent’s opinion is a single ask.
- Purpose first. The lead chooses the purpose — decide, research the state of the art, stress-test, verify or generate — and each has its formats, its counting and its deliverable. Purposes chain (research → decide, decide → verify), and a debate is sized quick, standard or deep.
- The lead’s contract. The lead never votes; the human’s words are copied verbatim; briefs reach the panel through one channel; each pane writes its filing to disk and replies with one line; no pane takes external actions.
- Formats. Angle research, classic rounds, draft package, claim-by-claim cross-exam, red team then defenders, steelman then judge, blind fresh-context challenge, replication panel and divergent proposals. A decision always ends in a forced verdict space.
- The
herdr-peers debateverb.tallycounts ranked ballots and per-item verdicts (Borda, Copeland, pairwise duels, the Condorcet winner and loser);claimsmerges the lanes’ claims ledgers into statuses such as established, contested or refuted, which are a quorum, not a verification;anoncopies filings under anonymous names, with the mapping in a private key;filingslists present, missing and short filings so only missing panes are re-asked. - Seating the panel.
panelproposes a panel and runs nothing. Seats go round-robin over model providers, and within a provider the seat with the most quota goes first, drawn from idle panes and, when agentkit (ak) is installed, from the accountsak pickproposes. Withoutak, it recommends coding-agents-kit (optional,v1.0.1or later). - Templates. Sixteen templates under
templates/debate/, from the human’s note and the research, stress-test and round briefs to the ballots and claims files, the lead’s handoff packet, and the decision, state-of-the-art, stress-test and replication records. - Delivery to a blocked peer.
replyandnotifyretry delivery to a peer blocked at a question for up to--wait-blockedseconds; it is still exactly one reply.
The release is additive: protocol 1 and every verb, flag, exit code and JSON contract stay unchanged.
Autopilot
herdr-peers 1.2.0 adds autopilot (autopilot.md): an optional daemon, herdr-peers autopilot, that a human starts so that a long plan does not stop at an approval screen. It watches every agent on every enabled Herdr machine and, when one waits at a screen, accepts an option. Release 1.2.1 fixes a case in which a question whose options have long descriptions was left unanswered. Release 1.2.2 answers a question shown with a preview beside its options and recognises the recommended mark in Spanish, French, German and Italian. Release 1.3.0 adds the loop: autopilot --loop keeps every open plan running to its end on every machine, --notify/--notify-env point its reports where you want them, and the read-only plans and fleet verbs plus the fleet UI show every lane, machine and open plan at a glance.
Release 2.0.0 moves the wire to protocol 2 and adds three things: lead appointment — on the human’s explicit word (lead claim --allow-appointment), a granted plan whose lead and every successor are gone may appoint its first live lane as the new lead (lead takeover --as-lane, probed twice, at most two appointments per plan), and lead verify is the read-only check to run before any merge, tag or release; the autopilot brain — with --brain the human-started daemon launches one dedicated agent (coding-agents-kit 1.3.0 or later) and obeys it only within a closed list of actions, refusing to start at all when ak is missing or older; and the plan queue — the pack writes .dwp/queue.json (schema dwp-queue-v1) and with --loop the daemon starts the next queued, approved plan without you. On a granted plan every lane and successor must run 2.0 or later.
- Only a human starts it. No message, peer or plan can start it, stop it or change what it does. An agent starts it only when its human asked for it directly in the session.
- What it accepts. A question with options, a tool approval, a plan approval, folder trust and an update prompt, which it skips. It takes the option marked recommended, else the one the CLI pre-selected, else the first, and follows a multi-step dialog to its end, re-reading the screen after every key.
- Agents that stop to ask. An agent that ended its turn asking in prose receives one fixed prompt to continue, at most three times per pane per hour. A usage limit is retried every 30 minutes, for at most a day.
- What it never touches. A login, sign-in, API-key or device-code prompt; Claude’s bypass-permissions acknowledgement; an option that refuses; an option that widens an agent’s standing permissions, such as
always allowor auto mode; a pane with no menu it recognises; a pane whose input line holds a human’s draft. - Controls.
--dry-runrecords what it would do and sends nothing;--scopeand--excludekeep it away from a machine or a pane;herdr-peers autopilot statusandherdr-peers autopilot stopreport on it and end it. Every action is one line in the delegation log, without screen text. - Verified CLIs. Claude Code, Codex, Cursor, Grok, Pi and Antigravity, on real panes. OpenCode’s screens have not been verified.
What you accept by running it. With autopilot on, an agent’s request is approved without the human seeing it, including a command the human would have refused. There is no deny-list: autopilot does not judge what a command does. The controls that remain are each agent’s own permission mode and guardrails, what its account and machine can reach, the repository’s rules, and code review before a merge.
Autopilot is outside the delegation protocol: it sends no ask, reply or notice, and the rule for agents and leads is unchanged — the only screen they key is folder trust, on panes they launched. Release 1.2.0 also documents, in launcher.md, how a lead opens several agents at once with ak.
Daemon controls and the v2 loop
autopilot run runs in the foreground; start runs in the background; stop, status, and logs control or inspect it. A human must start it. With --loop, it nudges only an idle plan lead, leaves blocked plans alone, stops after three prompts without progress, asks a recorded successor to take over a missing lead, and consumes the approved plan queue by prompting its lead. The queue is read-only to Herdr. --notify "<command>" sends plan events without adding authority.
--notify-env NAME passes one named environment variable to the command. Otherwise it runs with a minimal environment (PATH, HOME, the locale and the XDG directories), never with tokens or keys.
With --brain, Herdr uses coding-agents-kit 1.3.0 or later: ak pick supplies a validated pick-v2 launch contract in ask mode. --brain-kinds codex,claude sets provider priority and --brain-model claude=sonnet selects a model. The brain can return only a closed-list action; missing or old ak makes startup fail closed. Appointment requires both a plan grant (lead claim --allow-appointment) and the human-started daemon option --appoint; the lane uses lead takeover --as-lane. Run lead verify before a merge, tag, or release. plans, fleet, and fleet ui are read-only views. The daemon never starts itself, appoints without a grant, writes the queue or lead record, acts on free text, or widens permissions.
Release v2.0.1 keeps protocol 2. It changes the default --brain-kinds to claude (other kinds can still be selected) and records brain retirement reasons and excluded profiles in the log, map and status output. A permission_mode retirement names the likely ask-mode cause. Queue state no longer needed is dropped only after an answering machine report; the daemon also caps map-listed excluded profiles at 16 without forgetting the full exclusion set. Appointment now treats a lane in another open plan as plan membership.
Release v2.0.2 keeps protocol 2. In an ask-mode pick-v2 launch, exactly one trailing --ask is accepted after an optional --model <name> and removed before launch; the daemon adds its own --ask --trust-cwd. Other --ask placements, CLI permission flags and arguments after -- remain refused. Kit 1.4.x launch arguments remain accepted unchanged. Pane addresses ending in a newline are refused.
Release v2.1.0 keeps protocol 2. fleet ui adds Attention, Active, Waiting, Done and All views across groupings, including queues; the map gains optional state_updated_at and unreadable_reason fields. The human-started daemon denies permission or plan-approval dialogs it cannot safely accept; it never denies an agent’s own work question, and login, bypass-permissions acknowledgement and folder trust remain for the human. A brain denial is handled explicitly; three denials in an hour retire that brain. The brain may now be asked about a classed blocker. Its ask_lead_to_resolve action may send a blocker with resolver: lead to the plan’s lead only when its class is none, C3, C4 or C7; C1 (approval), C2 (consent or login), C5 (damage) and C6 (terms) stay with the human, and a class outside C1–C7 is refused. The release also reads pack 8.0.0 journal-event/v8 blocker events and plan-snapshot/v8 blocker data.
Release v2.2.0 keeps protocol 2 and adds revive (autopilot --loop --revive); the human starting the daemon with it is the grant. A plan on this machine whose lead is gone, or at a usage limit that resets more than 30 minutes away, and whom no successor or lane can take over gets one fresh agent: an account with quota from ak pick, in ask mode, in a workspace that starts in the plan’s checkout. The daemon gives it a one-time ticket that alone allows lead takeover --reason revive; the new lead then runs lead verify and resumes the plan. A stalled plan whose lead is still live is never taken over: that lead is asked once to lead handover to the fresh agent. Caps: one revive per plan per 6 hours, two per plan, and two an hour across the fleet, kept across daemon restarts. The old pane is never closed or keyed. Each revive sends one plan_revived event to --notify, and fleet ui marks the lead as revived. A 2.0 or 2.1 receiver refuses the revive record (fail closed). The daemon also keeps a sanitized copy of any screen it could not recognise, with secrets and key blocks removed, so it can be added as a test case; autopilot status shows how many it holds.
Release v2.2.1 keeps protocol 2 with no wire change. autopilot --loop --revive now refuses to start when coding-agents-kit is missing or older than 1.3.0, the same fail-closed check as --brain, instead of spending the revive caps on failed launches; the daemon launches the brain and revived agents only through ak (ak pick, ask mode), never the bare CLI.
Notes
Optional and never required. A repository is fully conformant with zero optional addons, and no flow depends on this one. The two-pane, cross-machine round trip is covered by tests against a simulated Herdr; plan a supervised first run.