Repository navigation
Conversation
The host assigned FM_HOME without exporting it. The hand-back owner then exits before it can arm a watcher, and the branch offer falls back to the repository that contains its script. Export the computed home before any child starts, and repeat it on the owner. A successor that never becomes healthy still hands the close to main.
…ts; all 29 tests pass
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Captain Q2074 (2026-11-13): "q2074 y use grok and/or deepseek for that. important". The question was: "Start a fix now so the supervision session keeps routine notifications instead of handing them all to the main chat? Y = start now on Grok: find the cause and fix it as one firstmate PR, which then waits for your merge word."
Evidence: /root/firstmate/data/fm-claude-use-measure-m1/report.md measured $350.30 of Claude use in 27.8 h; the main chat is 51.4%, and its watcher-wake turns alone are $144.54 (41% of everything). On 2026-11-12 and 2026-11-13 nearly every Stop-hook wake that reached the main chat carried the line "supervision-host: the acknowledged hand-back successor could not be verified" plus a queued "check: supervision-handoff - the host handed supervision to main" wake, including for routine wakes the supervision session is allowed to take (status signals, rearm-resurface, wait-claim, stale declared pauses). Earlier note (2026-11-12): the Stop guard also said no live watcher held the home lock while seconds later a new fm-watch.sh and auto-arm were live; either the guard or hand-back runs before the host's successor claim is visible, or the successor check is wrong. Related: fm-autoarm-lost-close-durable-a1, fm-turnend-guard-host-false-blind-g1, fm-handoff-retry-herdr-transport-h1. This home runs Claude Code main under herdr with the supervision host on.
What Changed
FM_HOMEso child processes can verify handoff successors and keep subsequent routine notifications with supervision.FM_HOME, routine notification retention, and fallback to main when successor verification fails.Risk Assessment
✅ Low: The change exports a home value that every child already computes the same way, from the same bin directory or override. It fixes the confirmed root cause at the only place the hand-back owner is launched. The production Stop hook in .claude/settings.json does not export FM_HOME, so the owner's
FM_HOME:?check made it exit at once, which produced the 'successor could not be verified' line. New behavioural tests cover both the verified hand-back and the unverifiable one.Testing
The focused hook suite passed, and a base-version control reproduced the reported failure. A real Claude launch in an isolated Herdr lab stopped at workspace trust; terminal evidence was captured and the lab was removed. No live notification scenario completed.
Evidence: Base version reproduces reported successor-verification failure
Source: Base version reproduces reported successor-verification failure
Evidence: Real Claude session blocked by workspace trust
Source: Real Claude session blocked by workspace trust
Evidence: Isolated Herdr launch, inspection, and cleanup
Source: Isolated Herdr launch, inspection, and cleanup
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
bin/fm-supervision-host.sh:772- Simplification:acknowledged_handbacksets the same environment a second time. The intent does not need this, because line 214 already runsexport FM_HOME. (1) TheFM_HOME="$FM_HOME"prefix on the owner launch at line 775 has no effect after that export. (2) The two lines[ -z "${FM_STATE_OVERRIDE:-}" ] || export FM_STATE_OVERRIDEand the CONFIG equivalent at lines 772-773 also do nothing. The host never assigns those variables itself, so they can only come from the inherited environment, where they are already exported. The block at lines 647-649 is different: it runs inside a subshell next toexport ... STATE. Recommended fix: remove lines 772-773 and theFM_HOME=prefix, and keep the single export at line 214 as the one rule. Also drop the header sentence 'The launch repeats the home on the owner.' (line 127). The header's claim about the branch offer (lines 124-126) is also overstated.fm-branch-dispatch.mjsfalls back toFM_ROOT_OVERRIDE, then the script's own repository. On a home that is only computed, that repository is the same as the home, so only the hand-back owner (FM_HOME:?at fm-supervision-handoff.sh:25) actually failed.🔧 Fix applied.
2 issues (1 warning, 1 info) still open:
bin/fm-supervision-host.sh:772- Simplification:acknowledged_handbacksets the same environment a second time. The intent does not need this, because line 214 already runsexport FM_HOME. (1) TheFM_HOME="$FM_HOME"prefix on the owner launch at line 775 has no effect after that export. (2) The two lines[ -z "${FM_STATE_OVERRIDE:-}" ] || export FM_STATE_OVERRIDEand the CONFIG equivalent at lines 772-773 also do nothing. The host never assigns those variables itself, so they can only come from the inherited environment, where they are already exported. The block at lines 647-649 is different: it runs inside a subshell next toexport ... STATE. Recommended fix: remove lines 772-773 and theFM_HOME=prefix, and keep the single export at line 214 as the one rule. Also drop the header sentence 'The launch repeats the home on the owner.' (line 127). The header's claim about the branch offer (lines 124-126) is also overstated.fm-branch-dispatch.mjsfalls back toFM_ROOT_OVERRIDE, then the script's own repository. On a home that is only computed, that repository is the same as the home, so only the hand-back owner (FM_HOME:?at fm-supervision-handoff.sh:25) actually failed.bin/fm-supervision-host.sh:124- The new ACKNOWLEDGED HAND-BACK header comment (lines 123-126) is still partly inaccurate. Round 1 noted this, and the fix round deliberately did not change it. The comment says the branch offer's fallback is 'the repository that contains its script rather than that home'. In factfm-branch-dispatch.mjs:59resolvesFM_HOME || FM_ROOT_OVERRIDE || root, and the host computes its home asFM_ROOT_OVERRIDEor the script's repository too. So when the home is only computed, the offer already landed on the same home before this change. Only the hand-back owner (FM_HOME:?atbin/fm-supervision-handoff.sh:25) actually failed. The code is correct; only the comment over-claims. You could trim the clause to name only the owner. The user scoped the round-1 fix to the env lines, so this is left as information.bash tests/fm-supervision-host-hook.test.sh— completed successfully.bash tests/.test-baseline-home-export.sh— temporary focused driver ran the computed-home regression against the base host; failed with the reported successor-verification warning as expected.python3 .test-supervision-live.py— temporary driver provisioned a named Herdr lab, attached a sized viewer, launched real Claude Code 2.1.319, and captured its workspace-trust dialog.bin/fm-herdr-lab.sh teardown fm-lab-home-export-g1— completed successfully.git status --shortandgit diff --stat— confirmed no remaining worktree changes after cleanup.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.