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. - 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 callsclient.session.promptAsyncwhen the child exits with an actionable watcher reason or failure. - If the plugin reports
watcher: healthy ..., do not start another cycle. - 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.