Skip to content

Commit e06c582

Browse files
authored
[NO-JIRA] Clarify swarm_launch creates goose sessions and forbid spawning sessions for reviewers (#1052)
#### Description - Updates `swarm-messaging/SKILL.md` to reflect `pigeon#272` (`workstation-i0hi.9`): `swarm_launch` now starts headless **goose** (`gse_`) sessions on every host, prompts must use goose terms (`delegate`, `shell`, `load_skill`), remote reachability includes `swarm_launch`ed `gse_` sessions, and service-restart guidance distinguishes macOS (`home-switch` restarts `goose-serve`) from cloudbox/devbox (`predicting-switch-restarts`). - Updates `swarm-messaging/SKILL.md`, `shepherding-pull-requests/SKILL.md`, `shepherding-pull-requests/reference/pre-pr-checks.md`, and `assets/agents/AGENTS.md` to explicitly forbid starting another session (`swarm_launch`, `opencode run`, `opencode-launch`, `honk launch`, `goose run`) to stand in for an in-session reviewer or oracle when `delegate`/`Task` is unavailable. - Updates two stale comments in `users/dev/home.darwin.nix` that still claimed `swarm_launch` starts opencode. #### References - Follow-up to `johnnymo87/pigeon#272` (`workstation-i0hi.9`) and trace of Mac session `20261201_1` improvising `opencode run 'Dispatch the Task tool with subagent_type "adversarial-reviewer-opus"...'` when `summon` was absent from its session extensions.
1 parent a1b7283 commit e06c582

5 files changed

Lines changed: 81 additions & 52 deletions

File tree

‎assets/agents/AGENTS.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,11 @@ harnesses, generated from the same agent definitions
7070
`ro-shell` in place of the developer shell.
7171

7272
Wherever a skill says "dispatch `adversarial-reviewer-opus`" (or the oracle),
73-
it names a role; use your harness's handle for it.
73+
it names a role; use your harness's handle for it. Always run reviewers and
74+
oracles in-session (`delegate` in goose, `Task` in opencode); if your session
75+
lacks that tool, stop and report rather than starting another session to stand
76+
in for it (e.g. via `opencode run`, `opencode-launch`, `honk launch`,
77+
`goose run`, or `swarm_launch`).
7478

7579
### Executing a plan (subagent-driven-development)
7680

‎assets/opencode/skills/shepherding-pull-requests/SKILL.md‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,17 @@ PR progress:
4040
(compare with `origin/<trunk>`, never local trunk), and no invented author
4141
email on them.
4242
3. **Adversarial review of the diff, unasked:** dispatch
43-
`adversarial-reviewer-opus` with the intent, the range
43+
`adversarial-reviewer-opus` (in goose: `delegate` with
44+
`source: "adversarial-reviewer"`) with the intent, the range
4445
`origin/<trunk>...HEAD`, and what is out of scope. Apply what holds up. If
45-
the reviewer is unavailable or returns nothing, stop and report the diff as
46-
unreviewed. Skip only for a diff that is all docs/locks/fixtures or under
47-
~30 lines, and never when it touches `assets/opencode/**` or an `AGENTS.md`.
48-
Do not narrate the review to the user.
46+
the reviewer is unavailable (including when `delegate` or `Task` is missing
47+
from your session) or returns nothing, stop and report the diff as
48+
unreviewed — never start another session to stand in for an in-session
49+
reviewer (e.g. via `opencode run`, `opencode-launch`, `honk launch`,
50+
`goose run`, or `swarm_launch`). Skip only for a diff that is all
51+
docs/locks/fixtures or under ~30 lines, and never when it touches
52+
`assets/opencode/**` or an `AGENTS.md`. Do not narrate the review to the
53+
user.
4954

5055
Details, including the skip rule and the opt-in twins:
5156
[reference/pre-pr-checks.md](reference/pre-pr-checks.md).

‎assets/opencode/skills/shepherding-pull-requests/reference/pre-pr-checks.md‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,13 @@ devbox and cloudbox) and `-fable` (claude-fable-5-2) are opt-in: only when the
7373
user asked for that model.
7474

7575
**If it is unavailable, stop and report** that the diff is unreviewed, and let
76-
the user decide. No silent fallback. If the user asked for astra and it fails,
77-
falling back to opus is fine; say so in one clause (unless they asked for both
78-
twins: then report it, since two opus reviews are not a second opinion).
76+
the user decide. No silent fallback — including when `delegate` or `Task` is
77+
missing from your session's tools: never start another session to stand in for
78+
an in-session reviewer (e.g. via `opencode run`, `opencode-launch`,
79+
`honk launch`, `goose run`, or `swarm_launch`). If the user asked for astra and
80+
it fails, falling back to opus is fine; say so in one clause (unless they asked
81+
for both twins: then report it, since two opus reviews are not a second
82+
opinion).
7983

8084
**An empty result is never a review.** The `subagent-failure` plugin refuses an
8185
`-astra` dispatch when `astra-probe` says DOWN and rewrites a child that died on

‎assets/opencode/skills/swarm-messaging/SKILL.md‎

Lines changed: 54 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -333,25 +333,25 @@ configured. Check before you send; do not assume it works.
333333
not start with "Sessions on machines other than" or "No sessions on other
334334
machines", the machine's pigeon predates remote discovery: treat
335335
cross-machine as unavailable.
336-
- **Send as usual.** Use the same `swarm_send` with the session's `ses_` id.
337-
`msg_id`, `kind`, `priority` and `reply_to` are carried across unchanged.
338-
Normally it lands within seconds. If the target's machine is asleep (or
339-
down), pigeon's worker holds the message for up to 24 hours. It is then
336+
- **Send as usual.** Use the same `swarm_send` with the session's `ses_` or
337+
`gse_` id. `msg_id`, `kind`, `priority` and `reply_to` are carried across
338+
unchanged. Normally it lands within seconds. If the target's machine is asleep
339+
(or down), pigeon's worker holds the message for up to 24 hours. It is then
340340
delivered when the machine wakes, or you get a failure notice about a day
341-
later. You are not told separately that it is being held. So silence proves nothing, and a payload whose meaning depends on time
342-
should say when it was written.
343-
- **A goose session (`gse_…`) on another machine is reachable only once it
344-
has reached out across machines itself**: it launched you with
345-
`swarm_launch`, or a message it sent to another machine was accepted. So a
346-
session a goose session launched can always `swarm_send` its report back to
347-
the `gse_` id named in the launch framing. **Stall-watch program
348-
coordinators are the exception**: they accept relayed messages without
349-
having reached out, and `swarm_list remote: true` lists them (and
350-
`coordinator <tag>` finds them). Any other `gse_` on another machine is
351-
refused at once with a 409. If the 409 says "no machine has registered it
352-
with the relay" and that session contacted you just now, retry in a few
353-
minutes. `swarm_list remote: true` lists no other goose sessions, so get
354-
the id from the message or the launch that named it.
341+
later. You are not told separately that it is being held. So silence proves
342+
nothing, and a payload whose meaning depends on time should say when it was
343+
written.
344+
- **A goose session (`gse_…`) on another machine is reachable only if** it has
345+
reached out across machines itself (it launched you with `swarm_launch`, or a
346+
message it sent to another machine was accepted), **or** it was started by
347+
`swarm_launch` (pigeon grants remote reachability at launch, so you can send
348+
follow-ups to the `gse_` id named in `launch.result`), **or** it is a
349+
**stall-watch program coordinator** (listed by `swarm_list remote: true` and
350+
found by `coordinator <tag>`). Any other `gse_` on another machine is refused
351+
at once with a 409. If the 409 says "no machine has registered it with the
352+
relay" and that session contacted you just now, retry in a few minutes.
353+
`swarm_list remote: true` lists no other goose sessions, so get the id from
354+
the message or the launch that named it.
355355
- **Read the failure notice's verb; it tells you what to do.** A cross-machine
356356
`delivery.failed` comes from the receiving machine or the worker:
357357
- "was NOT received … safe to resend": resend once (but see
@@ -388,22 +388,33 @@ configured. Check before you send; do not assume it works.
388388
## Starting a session on another machine: `swarm_launch`
389389

390390
`swarm_launch {machine, directory, prompt, tag?}` starts a **fresh** headless
391-
opencode session on another machine with your prompt. Use it when work has to
392-
happen on that machine (a deploy, a rebuild check, something only it can
393-
reach) instead of asking the human to paste commands, or borrowing an existing
394-
session there that was doing something else.
395-
396-
Goose sessions have the same tool (from honk's swarm extension, along with
397-
`swarm_schedule` and `swarm_scheduled`). The launched session is opencode
398-
either way, and it reports back to the launching `ses_` or `gse_` id.
399-
391+
**goose** session (`gse_…`) on another machine with your prompt. Use it when
392+
work has to happen on that machine (a deploy, a rebuild check, something only
393+
it can reach) instead of asking the human to paste commands, or borrowing an
394+
existing session there that was doing something else.
395+
396+
Both goose and opencode sessions have `swarm_launch` (in goose from honk's
397+
swarm extension, along with `swarm_schedule` and `swarm_scheduled`). Since
398+
`pigeon#272` (`workstation-i0hi.9`), the launched session is **goose** on every
399+
host, regardless of which harness called `swarm_launch`, and it reports back to
400+
the launching `gse_` or `ses_` id. **Write the prompt in goose terms**
401+
(`delegate` with `source:`, `shell`, `load_skill` — never opencode's `Task`
402+
tool or `-opus` subagent handles).
403+
404+
- **Never start another session to stand in for an in-session reviewer or
405+
oracle.** Reviewers and oracles run **in-session** (`delegate` with
406+
`source: "adversarial-reviewer"` or `"oracle"` in goose; the `Task` tool in
407+
opencode). If the reviewer tool is unavailable in your session, stop and
408+
report — never work around it by starting another session (whether via
409+
`swarm_launch`, `opencode run`, `opencode-launch`, `honk launch`, or
410+
`goose run`).
400411
- **It is off unless both machines opt in.** Yours needs
401412
`PIGEON_REMOTE_LAUNCH_SEND=1` (otherwise the tool errors with
402413
`launch_send_disabled`), and the target must list your machine in
403414
`PIGEON_REMOTE_LAUNCH_FROM` (otherwise `not_accepted`). Both are
404415
host-configuration changes for the human; do not attempt them. If the tool is
405416
missing from your tool list, your session predates it: it appears after the
406-
serve pool restarts (the nightly reset at the latest).
417+
serve restarts (the nightly reset at the latest).
407418
- **Refusals at call time are final for now; do not retry in a loop.** The tool
408419
errors at once with the reason: `launch_send_disabled` and `not_accepted` (see
409420
above) and `target_offline` (that machine has not polled for over a minute,
@@ -426,16 +437,21 @@ either way, and it reports back to the launching `ses_` or `gse_` id.
426437
cannot chain.
427438
- **Call it once per launch.** The tool answers at once with `accepted` or
428439
`pending`. The outcome arrives later as a `launch.result` swarm message from
429-
`pigeon`, saying the session started (with its `ses_` id to `swarm_send`), was
430-
refused, or is unconfirmed. `pending` means the daemon may already have the
431-
request, so **do not call again**: a second call is a new launch and can start
432-
a duplicate session. Read the result's verb as with relay failures: "Safe to
433-
retry" means retry once; "UNCONFIRMED … Do NOT launch again" means message the
434-
session it names, or check `swarm_list remote: true` first.
435-
- **A serve pool restart on the target kills the launched session**, because it
436-
runs inside that pool. A launched session that upgrades pigeon may restart the
437-
pigeon daemon, but must restart the pool last, from a delayed detached job,
438-
after it has reported. See pigeon's `cross-device-deployment` skill.
440+
`pigeon`, saying the session started (with its `gse_` id to `swarm_send`),
441+
was refused, or is unconfirmed. `pending` means the daemon may already have
442+
the request, so **do not call again**: a second call is a new launch and can
443+
start a duplicate session. Read the result's verb as with relay failures:
444+
"Safe to retry" means retry once; "UNCONFIRMED … Do NOT launch again" means
445+
message the session it names, or check `swarm_list remote: true` first.
446+
- **Switching or restarting services on the target can cut the launched
447+
session's turn.** On macOS, `home-switch` restarts `goose-serve` whenever its
448+
plist changes and drops in-flight turns with no automatic resume. On cloudbox
449+
and devbox, `goose-serve` has `restartIfChanged = false` and
450+
`goose-turn-resume` recovers cut turns, while a home switch that adds,
451+
removes, or renames the `goose-agent` slice kills running tool commands. Check
452+
`predicting-switch-restarts` before switching, and run any disruptive restart
453+
last from a delayed detached job after reporting back. See pigeon's
454+
`cross-device-deployment` skill.
439455
- **Every launch is visible.** The target posts a `🚀 Remote launch from …`
440456
notice to the chat, and the launched session gets its own channel. There is no
441457
per-launch approval, so the human sees launches only after they start; launch

‎users/dev/home.darwin.nix‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -930,9 +930,8 @@ lib.mkIf isDarwin {
930930
# the default harness run on this macbook". `--backend opencode` still
931931
# works per launch. If goose is unconfigured (no Keychain token unsets
932932
# the URL above), unnamed launches are refused in chat, never silently
933-
# sent to opencode. swarm_launch (remote launch) is unaffected and
934-
# still starts opencode. Rollback: delete this line and home-switch
935-
# (restarts pigeon-daemon).
933+
# sent to opencode. (`swarm_launch` also starts goose since pigeon#272.)
934+
# Rollback: delete this line and home-switch (restarts pigeon-daemon).
936935
PIGEON_LAUNCH_DEFAULT_BACKEND = "goose";
937936
# Who may prompt a topic-bound goose session or leave a message for a
938937
# pull-mode session (pigeon config.ts pullAllowedUserIds): the owner's
@@ -971,8 +970,9 @@ lib.mkIf isDarwin {
971970
# delivery.failed (never_collected), nothing is lost silently.
972971
PIGEON_SWARM_RELAY_ACCEPT_FROM = "cloudbox,devbox";
973972
PIGEON_SWARM_RELAY_SEND = "1";
974-
# Remote launch (pigeon-k0qn.18). FROM: machines whose agents may start a
975-
# fresh headless opencode session HERE, with any prompt in any directory
973+
# Remote launch (pigeon-k0qn.18, switched to goose in pigeon#272).
974+
# FROM: machines whose agents may start a fresh headless goose
975+
# session HERE, with any prompt in any directory
976976
# (pigeon's swarm_launch tool; no per-launch approval, by Jonathan's choice,
977977
# so listing a machine trusts it with a shell here). SEND=1: agents here may
978978
# launch on machines that list this one. Receiving also needs the relay SEND

0 commit comments

Comments
 (0)