Round-2 review of 7610258 (planner-reviewer-claude-01, reviewer-grok-01,
N2): the purge tests used two fixed UUIDs, while conversation_in_use scans
every process on the host. A review job's delegation wrapper carries the
whole brief - including this file's diff and so both constants - on its
command line, so five tests read "in use" for as long as that wrapper
lived. Reproduced here: this job's own wrapper named both constants and
the same five tests failed.
- tests: `conv` / `other` fixtures hand every test a fresh uuid4 and
assert that no live process names it yet; the helpers already took the
id as an argument. With a bystander process naming the old constants,
the file passes 21/21 and the brief's required set 248/248
- orc-onboard SKILL.md: any live process whose command line contains the
UUID blocks the purge, not only a resumed session (review R-2), and how
to find it
No product code changes.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HCGpJXhSZasJLU38ksDghe
4.8 KiB
name, description, version, author, license, platforms, environments, metadata
| name | description | version | author | license | platforms | environments | metadata | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| multi-agent-mux-orc-onboard | Register current or specified orchestrator session UUID into agent-sessions.yaml orchestrator_uuids list to prevent sub-agent discovery capture. | 4.4.3 | godopu | MIT |
|
|
|
multi-agent-mux-orc-onboard
Registers an orchestrator session UUID into the orchestrator_uuids list of .mam/agent-sessions.yaml (and underlying state DB). This ensures that find_workspace_uuid and verify_session_uuid in lib.sh exclude orchestrator conversations when discovering unassigned sub-agent session UUIDs.
Usage
.agents/skills/multi-agent-mux-orc-onboard/scripts/orc_onboard.sh [OPTIONS]
Options
--uuid <uuid>: Explicitly register the specified orchestrator session UUID.--remove <uuid>: Remove the specified UUID from theorchestrator_uuidslist.--purge-conversation: With--remove, also delete the conversation's on-disk artifacts through its agent adapter (Issue #13). Irreversible — requires--yes; refused (exit5, registration untouched) while a live process still references the conversation — including the session the command itself runs in: its session-id variable (CLAUDE_CODE_SESSION_ID,ANTIGRAVITY_CONVERSATION_ID,HERMES_SESSION_ID,GROK_SESSION_ID,OPENCODE_SESSION_ID) equals the UUID, or the nearest agent CLI ancestor names it on its command line. An orchestrator therefore cannot purge its own conversation from inside that very session. Any live process whose command line contains the UUID counts, not only a resumed session — an editor, agrepor a delegation wrapper whose prompt merely mentions it blocks the purge too; if it is refused, find the process withps -axww | grep <uuid>.--yes: Skip the--purge-conversationconfirmation (without it the script prints the danger notice and exits4).--agent <name>: Adapter to purge with (claude|agy|hermes|grok|opencode|codex). Defaultauto: each adapter is asked whether it owns an artifact for the UUID (agy→~/.gemini/antigravity-cli/conversations/<uuid>.dbetc.). Needed becauseorchestrator_uuidsstores bare UUIDs, not the agent kind.--list: Display all currently registered orchestrator UUIDs.--no-autodetect: Disable process ancestry auto-detection when--uuidis not provided.--dry-run: Output proposed changes without mutating the state registry.
Purging the orchestrator conversation
multi-agent-mux-stop --purge-conversation only reaches sessions that have a herdr_sessions row; the orchestrator never has one. To wipe an orchestrator conversation for good:
.agents/skills/multi-agent-mux-orc-onboard/scripts/orc_onboard.sh --remove <uuid> --purge-conversation --yes
# purged: ~/.gemini/antigravity-cli/conversations/<uuid>.db
# purged: ~/.gemini/antigravity-cli/brain/<uuid>
# ...
# residual: none (agent: agy)
The purge runs before the registry update, so a refused purge (conversation in use, exit 5) changes nothing. If no adapter finds an artifact for the UUID the registration is still removed with a warning. For agy the adapter also removes the SQLite sidecars (-wal/-shm/-journal), the title annotation and the presence lock (Issue #10) and reports anything under ~/.gemini/antigravity-cli that still carries the UUID as WARN residual:.
Auto-Detection Hierarchy (Rev.2)
When --uuid is omitted, orc_onboard.sh inspects the process ancestry tree of the nearest agent ancestor (claude, agy, hermes, grok, opencode, codex) in the following order:
- CLI
argv:claude -r <uuid>/claude --session-id <uuid>agy --conversation <uuid>grok --session-id <uuid>/grok --resume <uuid>opencode --session <uuid>codex resume <uuid>
- Family-Matched Environment Variables:
claude→CLAUDE_CODE_SESSION_IDagy→ANTIGRAVITY_CONVERSATION_IDhermes→HERMES_SESSION_IDgrok→GROK_SESSION_ID
- Fallback:
- If no valid ID matching the nearest agent family is found, exits with status 3 (
Could not detect orchestrator ID).
- If no valid ID matching the nearest agent family is found, exits with status 3 (
Exit Statuses
0: Success (registered, removed, listed, or already present).1: Conflict — the ID is currently owned by arunningsub-agent session row.2: Invalid arguments or malformed ID format (including--purge-conversationwithout--remove).3: Detection failed — ID could not be determined.4:--purge-conversationneeds--yes— nothing changed.5: Purge refused — the conversation is still in use by a live process; nothing changed.