Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Hooks still run through cwd-sensitive `/bin/sh`, so tracked commands anchor thro

The Stop-owned watcher hook runs every Stop, foregrounds `../../../bin/fm-watch-arm.sh` only when eligible, and uses exit-2 async reawakening as notification.
The model handles notifications but never routine re-arm.
Unless `config/supervision-host-off` opts the home out, the hook foregrounds the supervision host instead, which also runs Claude's print mode as its headless engine; [`supervision-host.md`](../../../../../docs/supervision-host.md#engines) owns the verified engine facts.
Unless `config/supervision-host-off` opts the home out, the hook foregrounds the supervision host instead, which by default runs Claude's print mode as its headless engine; [`supervision-host.md`](../../../../../docs/supervision-host.md#engines) owns the verified engine facts.
Claude's PreToolUse seatbelt blocks directly, and its deny is honored only with empty stdout; `../../../docs/arm-pretool-check.md` owns that contract.

### Delegation guard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ The tracked hook anchors to `pwd -P`, verifies that root is Firstmate-shaped and

Codex's primary watcher protocol is `../../../bin/fm-watch-checkpoint.sh --seconds "${FM_CODEX_WATCH_CHECKPOINT:-180}"`, not `../../../bin/fm-watch-arm.sh`.
Codex cannot reason while a foreground tool call is running, so the checkpoint is deliberately foreground and bounded to return control regularly for user messages and queued notifications.
In a home with `config/supervision-host` and no `config/supervision-host-off` the checkpoint runs the supervision host instead of the watcher, with Claude's print mode as its headless engine, and holds for at least an hour while away; [`supervision-host.md`](../../../../../docs/supervision-host.md) owns the host and that bound.
In a home with `config/supervision-host` and no `config/supervision-host-off` the checkpoint runs the supervision host instead of the watcher, and holds for at least an hour while away; [`supervision-host.md`](../../../../../docs/supervision-host.md) owns the host, which headless engine it runs, and that bound.
Codex's PreToolUse watcher-arm seatbelt blocks directly through its project hook.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Example: `../../../bin/fm-spawn.sh <task-id> <project> --scout --harness cursor
## Primary integration

Primary supervision is the stop-hook park in `../../../docs/supervision-protocols/cursor.md` through tracked `.cursor/hooks.json`; primary and secondmate launches require `--trust` or hooks do not load.
In a home with `config/supervision-host` and no `config/supervision-host-off` the park runs the supervision host instead of `../../../bin/fm-watch-arm.sh`, with Claude's print mode as its headless engine; [`supervision-host.md`](../../../../../docs/supervision-host.md) owns the host.
In a home with `config/supervision-host` and no `config/supervision-host-off` the park runs the supervision host instead of `../../../bin/fm-watch-arm.sh`; [`supervision-host.md`](../../../../../docs/supervision-host.md) owns the host and which headless engine it runs.
Cursor exposes 20 project events plus a Claude-Code compatibility map that loads `.claude/settings.json`.
Tracked hooks register `stop`, `sessionStart`, and two `preToolUse` seatbelts through `$CURSOR_PROJECT_DIR`; Claude entries stand down on Cursor payloads under `../../../docs/turnend-guard.md`.

Expand Down
2 changes: 1 addition & 1 deletion .agents/skills/harness-adapters/references/harness/grok.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,5 @@ The exact running Stop payload selects same-process continuation on 0.2.112; 0.2
Grok also loads Claude project settings, so Claude entries for Grok-covered events stand down under `GROK_AGENT` or `GROK_HOOK_EVENT`; that owner records the exact set and why `GROK_SESSION_ID` is excluded.
Project-local hooks require launch-time `--trust`; without it the guard steps aside and `../../../bin/fm-guard.sh` is the next-command alarm.
Watcher supervision remains tracked background notification around `../../../bin/fm-watch-arm.sh`, not Pi-style extension ownership.
In a home with `config/supervision-host` and no `config/supervision-host-off` the session-start block renders that background call as `../../../bin/fm-supervision-host.sh park`, with Claude's print mode as its headless engine; [`supervision-host.md`](../../../../../docs/supervision-host.md) owns the host.
In a home with `config/supervision-host` and no `config/supervision-host-off` the session-start block renders that background call as `../../../bin/fm-supervision-host.sh park`; [`supervision-host.md`](../../../../../docs/supervision-host.md) owns which headless engine that host runs.
PreToolUse blocks directly, but every `$VAR` in a hook command needs inline `:-default` or Grok refuses the hook.
2 changes: 1 addition & 1 deletion .agents/skills/harness-adapters/references/harness/omp.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ There is no `agent_settled` event; `agent_end` plus `willContinue` replaces it.
The omp primary follows the Pi extension-owned watcher model through `../../../docs/supervision-protocols/omp.md`: `.omp/extensions/fm-primary-omp-watch.ts` arms `bin/fm-watch-arm.sh --restart` through the `fm_watch_arm_omp` tool and owns every successor, and `.omp/extensions/fm-primary-turnend-guard.ts` answers omp's blocking `session_stop` hook by forcing one continuation when `../../../bin/fm-turnend-guard.sh` returns 2, bounded per turn by omp's `stop_hook_active` flag.
The same file ports the `tool_call` seatbelts and delivers the session-start digest through `before_agent_start` on the Run tier; omp's `session_start` carries no reason, so the source is derived (first start `startup` or `resume` from the launch line, later in-process starts `clear`, `session_compact` as `compact`).
omp has no asynchronous Stop-hook equivalent, so the Claude auto-arm model does not apply; `fm_supervision_model` classifies omp as `extension`, and `fm_omp_extension_owns_supervision` in `../../../bin/fm-wake-lib.sh` is the ownership proof that tolerates the extension's own watcher hand-off.
The Pi supervision branch does not run on omp; without the supervision host every actionable wake is delivered to main, and in a home with `config/supervision-host` and no `config/supervision-host-off` the watch extension spawns the host instead of the arm, with Claude's print mode as its headless engine ([`supervision-host.md`](../../../../../docs/supervision-host.md)).
The Pi supervision branch does not run on omp; without the supervision host every actionable wake is delivered to main, and in a home with `config/supervision-host` and no `config/supervision-host-off` the watch extension spawns the host instead of the arm; [`supervision-host.md`](../../../../../docs/supervision-host.md) owns which headless engine that host runs.
Launch a primary with plain `omp` inside the home (`FM_OMP_HARNESS=omp omp` when starting from a Claude pane); `../../../bin/fm-session-start.sh` prints `OMP_WATCH_EXTENSION: not loaded` when the running session has not loaded both tracked extensions.
`FM_OMP_LIVE_E2E=1 ../../../tests/fm-omp-primary-live-e2e.test.sh` is the opt-in live guard; `../../../tests/fm-omp-harness.test.sh` is the portable regression.
A secondmate registered with `remote=1` in `data/secondmates.md`, spawned through the ordinary `../../../bin/fm-spawn.sh <id> <home> --secondmate` path, is refused on omp until a remote host verifies it, as is `../../../bin/fm-remote-secondmate-control.sh launch`; there is no `--remote` flag.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The primary integration was verified on 2026-07-08 with OpenCode 1.17.6.
`.opencode/plugins/fm-primary-turnend-guard.js` listens for `session.idle`.
Throwing from `session.idle` does not block `opencode run`, so the primary adapter treats the event as passive and uses `client.session.promptAsync` to force one follow-up turn when `../../../bin/fm-turnend-guard.sh` returns 2.
The follow-up was verified in the interactive TUI.
In a home with `config/supervision-host` and no `config/supervision-host-off` the watch-arm plugin spawns the supervision host instead of `../../../bin/fm-watch-arm.sh`, with Claude's print mode as its headless engine; [`supervision-host.md`](../../../../../docs/supervision-host.md) owns the host.
In a home with `config/supervision-host` and no `config/supervision-host-off` the watch-arm plugin spawns the supervision host instead of `../../../bin/fm-watch-arm.sh`; [`supervision-host.md`](../../../../../docs/supervision-host.md) owns the host and which headless engine it runs.
`opencode run` can exit before displaying a queued follow-up, so the adapter steps aside in headless mode.
On native Windows, the operational-input adapter runs its Bash helper through `bash`; macOS and Linux invoke it directly.

Expand Down
8 changes: 6 additions & 2 deletions bin/fm-lock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,9 @@ publish_lock_session() {
return 0
}

# Record this session's harness, native profile, retained Claude profile and pane,
# bound to the pid now on line 1. Best effort by design: it is evidence for the
# Record this session's harness, native profile, retained Claude profile, Grok
# seat when this harness is Grok, and pane, bound to the pid now on line 1.
# Best effort by design: it is evidence for the
# lead-restart path, never ownership, so a failure to write it must not refuse a
# lock the session has already verified it owns. The pane is recorded only when
# bin/fm-supervisor-target-lib.sh established one; its guessed fallback is left
Expand All @@ -304,6 +305,9 @@ publish_lock_runtime() {
printf 'harness=%s\n' "$harness"
printf 'profile=%s\n' "$profile"
printf 'claude_profile=%s\n' "${CLAUDE_CONFIG_DIR:-}"
# The Grok engine spends this seat. Other harnesses leave the key absent
# so a legacy record stays a Claude answer rather than an empty Grok one.
[ "$harness" != grok ] || printf 'grok_profile=%s\n' "${GROK_HOME:-}"
[ -z "${FM_LEAD_LAUNCH_ARGV:-}" ] || printf 'launch_argv=%s\n' "$FM_LEAD_LAUNCH_ARGV"
printf 'ambient=%s\n' "${FM_AMBIENT_CLAUDE_CONFIG_DIR-${CLAUDE_CONFIG_DIR:-}}"
if target=$(discover_supervisor_target) && backend=$(discover_supervisor_backend); then
Expand Down
1 change: 1 addition & 0 deletions bin/fm-session-lock-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ fm_session_lock_handover_admits() { # <state> [<ancestry-pids>]
# harness=<detected primary harness; legacy records omitted this for Claude>
# profile=<CLAUDE_CONFIG_DIR for Claude, CODEX_HOME for Codex>
# claude_profile=<Claude engine profile retained when the leader uses Codex>
# grok_profile=<GROK_HOME when the leader's harness is Grok; absent otherwise>
# launch_argv=<JSON argv of the leader command, excluding its startup prompt>
# ambient=<the profile a worker spawned on the default seat gets from it,
# per fm_seat_config_dir; read by pipeline launches on that seat>
Expand Down
Loading
Loading