Mode: OpenCode TUI plugin background wake.
When this session owns supervision and away mode is not active:
- Drain first with
bin/fm-wake-drain.sh. After handling all emitted wakes and reconciling open decisions and unread status lines, run the exact--ack-throughcommand printed asWAKE_ACK_REQUIRED; until then the work remains durable for idempotent re-handling after interruption. - First cycle: let
.opencode/plugins/fm-primary-watch-arm.jsarm supervision after the OpenCode session goes idle. - The plugin listens for
session.idle, spawnsbin/fm-watch-arm.sh --restartwithout awaiting it in the idle handler, and owns every later successor launch. - After an actionable child close, the plugin rechecks session-lock ownership and verifies one singleton successor before it calls
client.session.promptAsync; its bounded fallback is defined indocs/watcher-continuity.md. - Ordinary wake: do not ask the model to re-arm because continuity is plugin-owned.
- An unexpected child close enters bounded exponential retry, and an exhausted retry or lost session lock is surfaced as a watcher failure instead of disappearing.
- Failure or missing cycle only: if the plugin reports a watcher failure, drain queued wakes, inspect the failure text, and use
bin/fm-watch-arm.shmanually only as a short recovery probe. - Never use shell
&for watcher supervision. The arm mechanism above is plugin-owned, not a model tool call, but a manual recovery probe that backgrounds, pipes, or bundles the arm is denied automatically by the PreToolUse seatbelt (.opencode/plugins/fm-primary-pretool-check.js,bin/fm-arm-pretool-check.sh). - Do not rely on this plugin in headless
opencode run; firstmate primary supervision targets persistent OpenCode TUI sessions.
OpenCode's persistent TUI plugin runtime is the wake mechanism. The plugin applies in the main primary checkout and a secondmate's own home, and stays silent only in child crewmate and scout worktrees.