Repository navigation
feat(bin): add agy (Antigravity CLI) as a crewmate/scout worker runtime - #3858
RooseveltAdvisors wants to merge 18 commits into
Conversation
Wire agy as a firstmate worker runtime so a crewmate or scout can be spawned on it, reach its brief without a human answering a workspace-trust dialog, and report turn end back to firstmate's supervision. Registered agy across the adapter plane: harness detection tests ANTIGRAVITY_CONVERSATION_ID before CLAUDECODE (agy does not clear an inherited marker), and fm-spawn.sh gained an agy launch template (--dangerously-skip-permissions, prompt-last -i flag ordering, --effort low|medium|high only) plus exit/interrupt/select keys, quota mapping, dispatch validation, process classification, and an `esc to cancel` delivery guard. --secondmate on agy is refused: there is no agy primary supervision protocol. bin/fm-agy-trust.sh pre-registers the task worktree in trustedWorkspaces in ~/.gemini/antigravity-cli/settings.json so a fresh worktree does not park on the workspace-trust dialog, which renders no status text and is therefore indistinguishable from idle. Registration is scope-tested to linked worktrees of the named project, recorded in state/<id>.agy-trust, and withdrawn by the exact spellings the spawn added on teardown and on aborted-spawn cleanup. bin/fm-agy-turnend-hook.sh installs one key-preserving firstmate-turn-end entry in ~/.gemini/config/hooks.json with a private token registry and per-worktree .fm-agy-turnend pointer; it touches the turn-end state file only when the Stop payload's workspacePaths, the pointer, and the token agree and fullyIdle is true. A Stop event is not on its own a finished turn: agy backgrounds a command that outruns its own wait and fires Stop with fullyIdle false, so the gate is load-bearing. Teardown retires grok, kimi and agy registry entries together. tests/fm-agy-harness.test.sh and tests/fm-agy-signals-live-e2e.test.sh are wired into fm-test-run.sh, and the adapter's verified facts, including the declined-tool-call and Escape-interrupt paths where no Stop fires, are documented in the harness-adapters skill reference and the runtime-backend docs.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Reviews (8): Last reviewed commit: "no-mistakes(ci): The failing check 'fm-a..." | Re-trigger Greptile |
Provenance record for the failing
|
| Suite | Result |
|---|---|
fm-agy-harness |
46/46 |
fm-backend-herdr |
183/183 |
fm-teardown |
85/85 |
fm-quota-choose |
50/50 |
fm-secondmate-harness |
49/49 |
fm-spawn-dispatch-profile |
44/44 |
fm-control |
35/35 |
fm-muse-harness |
26/26 |
fm-kimi-harness |
17/17 |
fm-tmux-agent-liveness |
16/16 |
One suite is not in that table: fm-bootstrap fails one assertion (the unsplit run lost its local diagnostic) in my environment, and it reproduces identically on unmodified main (22 ok / 1 not ok, same assertion, same output — it expects a missing-node diagnostic and gets NEEDS_GH_AUTH first). Pre-existing and unrelated to this change; I checked it against a clean baseline rather than assume.
These are local suite runs, not CI. Upstream CI on this PR is the authority for its own tree.
The only conflicts in the replay were one shape: main has since added a rovo adapter to several of the same adapter lists this change adds agy to. Both are listed in each; no behavior of either was changed, beyond rovo joining the launch-boundary marker scrub so it cannot inherit a stale ANTIGRAVITY_CONVERSATION_ID.
Happy to re-raise this through the pipeline so the gate passes on its own terms if you would rather have it that way than review it as it stands.
fm-agy-trust.sh follows the settings.json symlink so a dotfile manager or synced folder keeps working. That follow is only safe while no other account can write the directory holding the link: anyone who can create or replace an entry there repoints the store at an unrelated file this user owns, and every check on the store itself still passes, because the file that would be rewritten is owned by the very user the script runs as. Ownership cannot catch a confused deputy pointed at its own owner. Reproduced before fixing: with a world-writable settings directory whose settings.json was a symlink to an unrelated user-owned JSON file, a registration exited 0 and rewrote that file, injecting trustedWorkspaces into it. Refuse a settings directory other accounts can write, at the directory holding the link and again at the one holding a resolved symlink target. World-writable is refused everywhere; group-writable is judged against the user's own primary group, so a private user group -- the umask-002 default that leaves a home 0775 user:user, with no other members -- is not failed closed for no gain, while any shared group is refused. Where the primary group is itself shared, as macOS staff is, a deliberately group-writable directory is not caught by this test; world-write and every foreign group are. The refusal names the chmod that fixes it. This removes the ability to plant the link rather than removing the symlink support the dotfile-manager layout needs, so test_symlinked_store_to_an_owned_target_is_accepted still passes. Reported by Greptile on kunchenguid#3858.
Greptile's security finding was real — fixed in
|
|
Speaking as Kun's firstmate: Triage on HEAD Contract-class: opt-in. Attestation: MISSING on this PR head (author discloses hand-raise / fork attestation at Security FYI (tip only — not waiting-captain): Greptile P1 on VISION.md (each rule)
Merge-eligible N. Waiting on the author (attestation rebind via no-mistakes + close Greptile security P1). Not a captain hold. |
The first fix for Greptile's confused-deputy report exempted the caller's own
primary group from the group-write refusal: a private user group has no members
but its owner, so refusing it looked like failing ordinary homes closed for no
gain. That carve-out WAS the remaining hole. Where the primary group is itself
shared - macOS `staff` is the example Greptile named - every other member of it
could still plant the settings.json symlink, and registration would rewrite
whatever user-owned file the link pointed at.
Reproduced against the previous guard before changing it, with a settings
directory that is group-writable and owned by the caller's OWN primary group,
and deliberately not world-writable:
settings dir: drwxrwxr-x jon:jon (gid=1000, our gid=1000)
BEFORE victim: {"important":"unrelated user config"}
added: /tmp/.../wt
trusted: /tmp/.../wt
exit=0
AFTER victim: {"important":"unrelated user config","trustedWorkspaces":[...]}
Refuse write for group or for other, with no carve-out. The mode bits cannot
distinguish a shared group from a private one, and membership cannot be
enumerated portably or completely: `getent` does not exist on macOS, a group's
primary members are not listed in its group entry on any platform, and a
directory service is free not to enumerate at all. Guessing at that is what
opened this hole once already, so mode 0022 is now the whole test.
That costs a one-time `chmod g-w` on a settings directory some other tool
created group-writable, and the refusal names it. It costs nothing on agy's own
directory, which its first run creates 0755 whatever the umask is. This script
creates that directory too when agy never has, so that creation is pinned to
0755 as well - under the umask-002 default it would otherwise produce a 0775
directory and then refuse its own work (verified: mode=775 exit=1 before the
pin, mode=755 exit=0 after).
Both new cases fail against the unfixed script and the suite is 49/49 (was 47).
The agy store fixtures in the teardown suite now match the 0755 a real
installation has, rather than inheriting a umask-002 default.
Reported by Greptile on kunchenguid#3858 as still open after the
first fix.
The previous commit closed the shared-primary-group bypass and still left one
member of the same class open: only the settings directory and the FINAL
target's directory were checked, so a symlink CHAIN whose middle hop sat in a
directory other accounts can write reached the same clobber with both ends
tight. Reproduced against that guard before changing it:
config dir : drwxr-xr-x jon:jon
middle hop : drwxrwxr-x jon:jon <- other accounts can write this
victim dir : drwx------ jon:jon
BEFORE victim: {"important":"unrelated user config"}
added: /tmp/.../wt
exit=0
AFTER victim: {"important":"unrelated user config","trustedWorkspaces":[...]}
Whoever can write one of those directories repoints what comes after it, and
every check on the resolved store still passes, because the file that would be
rewritten is owned by the very user this runs as. A middle hop is the same
confused deputy as a first hop.
Walk the resolution one link at a time and judge the real directory each name
lives in, which also subsumes the two checks it replaces. Ancestors ABOVE the
settings directory are deliberately not walked, and the comment says so: an
account that can write $HOME owns this login long before it reaches agy, and
refusing a 0775 home would fail the umask-002 default closed over an exposure
this script cannot be the control for.
The new case fails against the unfixed script (`expected exit 1, got 0`), and
its second half re-runs the same chain with the hop tightened and requires the
registration to be ACCEPTED, so the refusal is pinned to the permission rather
than to chains as such. The agy suite is 50/50 (was 47 before this pair of
fixes) and the teardown suite is 85/85.
Reported by Greptile on kunchenguid#3858.
…ook installer directory permissions
Four sites had asked the same question - can any account but this one write a
directory on the way to this path - and each had answered it separately with a
different range and a different exception. Every one of those answers was wrong
in a way the next round found:
1. the settings store exempted the caller's own primary group, which is what
let a shared macOS `staff` plant the symlink (Greptile);
2. closing that left the middle of a link chain unjudged;
3. closing that left the ANCESTORS of the settings directory unjudged, so a
writable ~/.gemini let the whole directory be renamed aside and replaced;
4. closing that judged the ancestors of the settings directory only, so the
ordinary stow layout - tight ~/.gemini, tight victim directory, a
group-writable ~/dotfiles holding the next hop - still reached the clobber;
5. and the turn-end hook installer had grown a third spelling of the mode test
with no ancestor walk at all, over the directory holding the script agy
executes on every Stop.
bin/fm-path-trust.mjs is now that question's single owner, and both callers ask
it rather than restating it. The predicate it implements: a path is only as
trustworthy as every directory it passes through - the one holding each name,
and every ancestor of those, to the filesystem root. Group-write is refused with
no carve-out, because the bits cannot tell a shared group from a private one and
membership cannot be enumerated portably or completely. The stop at $HOME is
gone too: ~/.gemini is not $HOME, and neither is a ~/dotfiles a store is
symlinked into, so writing them does not own this login.
The one real exception is the sticky bit, and it is not a convenience: `chmod +t`
is exactly the rule that stops a non-owner renaming or removing an entry that is
not theirs, which is the capability being guarded. So a world-writable sticky
directory is safe for an entry that already exists and belongs to this user or
root, and unsafe for a name that does not exist yet.
Each shape was constructed and watched to fail before it was made to pass:
- hop ancestor (4), against the previous commit: `~/dotfiles` 0775 with a
planted hop, both ends tight -> exit=0, the 0600 victim in a 0700 directory
rewritten. Now refused, naming `~/dotfiles`.
- hook installer ancestor (5), against both earlier heads: a group-writable
home with a clean `.gemini` -> `installed:` and exit=0 from both. Now
refused, naming the home.
- hook installer umask: a fresh home under umask 002 left `.gemini`,
`.gemini/antigravity-cli` and `.gemini/config` all 0775 - the directories
holding the Stop-hook script - and now creates all three 0755.
- the first two shapes (1 and 2) were re-run and stay refused.
Four regression cases cover them; the fix commit they follow added none. The
suites are fm-agy-harness 54/54 (47 before this work) and fm-teardown 85/85, and
`bin/fm-lint.sh` is clean.
The helper is resolved with `${0%/*}` rather than `dirname`, because it must
resolve before the missing-node refusal and has to keep working on the minimal
PATH the suite uses to exercise that refusal - caught by that test.
Reported by Greptile on kunchenguid#3858; items 4 and 5 found by the
pipeline review while closing 3, and item 2 while closing 1.
The PR had gone CONFLICTING against main. Merged forward rather than rebased, so 181bea4 and every published commit stay in this branch's history. One conflict, tests/lib.sh: main added a `umask 022` fixture pin in 85ad5e7 (kunchenguid#3852) after this branch's base, and a pipeline fix round had independently re-derived the same pin here with different comment wording. Resolved by taking main's version verbatim, so the file is byte-identical to main and carries no diff of its own.
main landed the omp (Oh My Pi) adapter in 2e65d2e, which touches every list this branch's agy adapter touches. Merged forward rather than rebased, so 181bea4 and every published commit stay in this branch's history. 24 hunks across 15 files. Most are two adapters appended to the same list and both entries are kept. Six are NOT that, and are resolved on what each side means rather than by taking both: - fm-control-lib.sh exit verb: agy exits with /exit, omp with /quit; each stays in its own case arm rather than being merged into one. - backends/tmux.sh: the anchored `agy)` arm survives (agy's live process name is the bare word and a glob would claim legacy/agyneja/magy), and omp joins main's glob arm. - fm-composer-lib.sh: the shared busy default needs BOTH signatures, so `Working(\.\.\.|…)` and `esc to cancel` are both alternations. - fm-teardown.sh: main's omp-ext.ts and this branch's agy-turnend-token and agy-trust are all removed, at both cleanup sites. - AGENTS.md: omp is verified for primary too, agy is crewmate/scout only, so each joins its own list rather than a combined one. - fm-tmux-agent-liveness.test.sh: two independent liveness blocks, both kept. docs/configuration.md is restored rather than merged. The omp rewrite of that sentence dropped `muse` from the crewmate/scout-only set and dropped the clause recording that fm-spawn refuses a secondmate on each. Both are restored, and omp is added to the verified list, because main's own bin/fm-spawn.sh:256 still refuses a secondmate on muse and gemini and main's AGENTS.md still classifies them that way - a doc sentence describing a refusal the code still performs is true, and deleting it would leave main's documentation contradicting main's behaviour. Flagged on the PR for the maintainer to overrule if the reclassification was deliberate.
Merged
|
…end hook reinstall
|
| head | what it is | result |
|---|---|---|
29015a26 |
main, our merge base |
success |
9db66eeb |
our merge, before the last fix commit | success |
de1cbfc3 |
9db66eeb + a two-line chmod |
failure |
That is one commit of ours, so we did not stop at "the topic sounds unrelated".
We could not reproduce it. We pushed de1cbfc3's exact tree to two throwaway branches on our own fork and ran the same job twice on identical code:
RooseveltAdvisors/firstmaterun34069865568—Behavior tests (Herdr)pass, 9m34sRooseveltAdvisors/firstmaterun34069871407—Behavior tests (Herdr)pass, 9m7s
(The second run's overall status is red for an unrelated reason: Behavior portable serial 1 exceeded the 20-minute job limit. That is a timeout, not an assertion, and not the job under test.)
What we think happened, offered as a diagnosis and not as proof. The failure is a fail-closed refusal in bin/fm-teardown.sh (require_exclusive_worktree_slot_record): task resume-wave-primary's recorded worktree is also task p1's. An interactive treehouse get auto-returns its pool slot when the pane's process tree dies, so the suite's own herdr stop/provision cycles free slots held by earlier fixtures while their .meta records persist until the late teardown loop; a later spawn handed a recycled slot path is then correctly refused. That guard came from #3837 (b028e8b1), which is already in our base — it is your check doing its job, not ours breaking it. Which spawn draws a poisoned slot is nondeterministic, and the failing run also showed runner degradation (352s duration, ~128s stalls, watcher beacon stale 347s against a 300s grace).
What we are not claiming. Two passes against one failure is weaker evidence than a clean disagreement would be. We are saying the upstream red did not reproduce on identical code in the same CI — not that it cannot occur. If you would rather we chase it further before you look at this, say so and we will.
…am-20260906 # Conflicts: # tests/fm-spawn-dispatch-profile.test.sh
…-token teardown finding not reproducible
…ust open with the shared live gate' was caused by this PR: the new opt-in guard tests/fm-agy-signals-live-e2e.test.sh hand-rolled its own env check (echo 'skip: set FM_AGY_SIGNALS_LIVE_E2E=1 ...') instead of opening with fm_live_gate from tests/lib.sh, so the fm-live-gate.test.sh family sweep (which runs every live-harness-optin guard with FM_LIVE=0 and requires the shared refusal line 'skip: live: disabled by FM_LIVE=0') failed on it. Fix: source tests/lib.sh and open with 'fm_live_gate opt-in FM_AGY_SIGNALS_LIVE_E2E agy tmux', matching every other signal guard (e.g. fm-muse-signals-live-e2e.test.sh), and drop the now-redundant manual absent-tool failures since the gate already skips with a named capability when not requested and hard-fails when requested. Verified locally: default run prints 'skip: live: opt-in; set FM_AGY_SIGNALS_LIVE_E2E=1 to run' exit 0; FM_LIVE=0 prints 'skip: live: disabled by FM_LIVE=0' exit 0; requested with agy absent hard-fails 'not ok - FM_AGY_SIGNALS_LIVE_E2E was requested but agy is not installed'; and the full tests/fm-live-gate.test.sh passes with the sweep now covering all 26 live guards
Triage conditions on
|
|
Adding the exact failed run for the record, so the rerun is one click: |
Additive merge of upstream main (fa65b5d) into the agy adapter branch; no rebase, no history rewrite, every prior commit retained. Conflict resolutions keep upstream's work and layer ours on top: - bin/backends/tmux.sh: upstream moved the process-name classifier into bin/fm-agent-process-lib.sh; upstream's refactor kept, our anchored agy arm added to the shared lib. - bin/fm-bootstrap.sh: upstream's effort_ok($h; $m; $e) signature kept; agy stays in the verified list. - bin/fm-spawn.sh: upstream's secondmate-inclusive Claude trust kept; our agy trust + turn-end hook arm layered into the same case (agy --secondmate is refused at validation, so the arm stays crewmate/scout only). - bin/fm-teardown.sh: upstream's slot-ownership guard kept; .fm-agy-turnend added to both child-worktree cleanup sites. - docs/tmux-backend.md: upstream's fm-agent-process-lib.sh ownership note kept; agy named in the classified set.
…abort with behavioral test
|
Speaking as Kun's firstmate: closing as leftover after overlapping agy adapter #4200 landed (squash |
|
Thanks for the review. Taking each point in turn:
|
Intent
Rebind the no-mistakes attestation to the agy adapter PR's new head after an additive upstream integration. The agy (Antigravity CLI) crewmate/scout harness adapter PR #3858 had its attestation bound to the previous head cd2df46; upstream main moved and GitHub reported the PR CONFLICTING. Per firstmate's steer I merged origin/main (fa65b5d) into fm/agy-adapter-upstream-20260906 additively (no rebase, no force-push, every prior commit kept), resolving the five conflicted files by keeping upstream's work and layering the agy adapter on top: upstream's tmux process-name classifier refactor into bin/fm-agent-process-lib.sh kept with the anchored agy arm added there; upstream's effort_ok model signature and secondmate-inclusive Claude trust pre-registration kept with the agy trust + turn-end hook arm layered into the same case (agy --secondmate refusal intact); upstream's child slot-ownership teardown guard kept with .fm-agy-turnend added to its cleanup lists; docs updated the same way; and upstream's new claude-permission-mode test helper adapted to this branch's documented ANTIGRAVITY_CONVERSATION_ID launch-marker clear, which the branch's own assertions at lines 134/150/822 already assert. Targeted suites re-run green locally (fm-agy-harness, fm-omp-harness, fm-bootstrap, fm-backend-herdr, fm-quota-choose, fm-secondmate-harness, fm-kimi-harness, fm-muse-harness, fm-control, fm-live-gate, and fm-spawn-dispatch-profile after the helper adaptation); the one local red (fm-teardown mate-teardown-delivers) reproduces identically at the pre-merge head in this seat's sandbox and is environment-induced, not merge-caused. No behavior change is intended beyond the conflict integrations; this run exists to rebind the attestation to the merge head and re-green CI.
What Changed
fm-harness.shdetects agy viaANTIGRAVITY_CONVERSATION_ID(checked before claude/gemini markers) with an anchoredagyprocess-name arm,fm-spawn.shadds an agy launch template (crewmate/scout only, refused for--secondmate) with launch-boundary marker clearing, abort-time withdrawal of trust registration and turn-end wiring, andfm-teardown.sh/fm-control-lib.shhandle agy teardown and turn-end paths.bin/components:fm-agy-trust.shpre-registers the task worktree in agy'strustedWorkspacesbefore launch (structural linked-worktree scope test, atomic writes,--removeat teardown),fm-agy-turnend-hook.shinstalls/removes a guarded Stop hook in$HOME/.gemini/config/hooks.jsonthat fires only onfullyIdleand touches a turn-end marker via a.fm-agy-turnendpointer, andfm-path-trust.mjsbecomes the single owner for judging whether any other account can write a directory on a path (ownership plus mode bits, group-write refused with no carve-out, full ancestor walk).agy.mdreference,docs/verification/runtime-backends.md,docs/turnend-guard.md,docs/configuration.md,docs/trace-context.md) and add tests: newtests/fm-agy-harness.test.shandtests/fm-agy-signals-live-e2e.test.sh(behind the shared live gate), teardown guard coverage, and updates to existing harness, herdr, quota-choose, spawn-dispatch-profile, and tmux-liveness suites.Risk Assessment
✅ Low: The fix is small, mechanically correct, matches the user-authorized remedy exactly, and is covered by a behavioral test; the only residual finding is a narrow ENOSPC-class window worth one statement of tightening.
Testing
Ran the 11 targeted suites named in the author's intent plus fm-teardown; all green at merge head 7a30c2d, and the previously reported environment-induced teardown red does not reproduce in this seat. Proved the agy token-abort fix behaviorally by running the new harness test against both the pre-fix head (stranded token reproduced, exit=1) and the fixed head (registry empty, exit=0), recorded in an evidence log; no visual surface changed, so no screenshot artifact applies.
Evidence: agy turn-end token recordless-abort regression demonstration (pre-fix FAIL vs post-fix PASS)
Source: agy turn-end token recordless-abort regression demonstration (pre-fix FAIL vs post-fix PASS)
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
⏭️ **Rebase** - skipped
.agents/skills/harness-adapters/SKILL.md- merge conflict rebasing onto origin/mainAGENTS.md- merge conflict rebasing onto origin/mainbin/backends/tmux.sh- merge conflict rebasing onto origin/mainbin/fm-bootstrap.sh- merge conflict rebasing onto origin/mainbin/fm-composer-lib.sh- merge conflict rebasing onto origin/mainbin/fm-control-lib.sh- merge conflict rebasing onto origin/mainbin/fm-harness.sh- merge conflict rebasing onto origin/mainbin/fm-spawn.sh- merge conflict rebasing onto origin/mainbin/fm-teardown.sh- merge conflict rebasing onto origin/mainbin/fm-test-run.sh- merge conflict rebasing onto origin/maindocs/agent-control.md- merge conflict rebasing onto origin/maindocs/architecture.md- merge conflict rebasing onto origin/maindocs/configuration.md- merge conflict rebasing onto origin/maindocs/tmux-backend.md- merge conflict rebasing onto origin/maintests/fm-spawn-dispatch-profile.test.sh- merge conflict rebasing onto origin/maintests/fm-tmux-agent-liveness.test.sh- merge conflict rebasing onto origin/mainbin/fm-spawn.sh:3760- A spawn that aborts between minting the agy registry token (bin/fm-spawn.sh:3760 writes state/<id>.agy-turnend-token and $HOME/.gemini/antigravity-cli/fm-turn-end.d/fm.XXXXXXXXXXXX) and publishing the task record (bin/fm-spawn.sh:3889/3946) leaves the registry token stranded with no supported removal path: teardown refuses for an id with no task record, and fm-agy-turnend-hook.sh remove refuses while any token is live ('N task token(s) still registered; tear those tasks down first') - so the stranded token permanently blocks the hook's remove action. The spawn_abort_cleanup block added in this change (bin/fm-spawn.sh:1061-1078) explicitly handles this same recordless-abort class for the trust entry ('a spawn that registered and then left no record has to take it back itself, or nothing ever can') but does not withdraw the turn-end token minted one step later. This mirrors pre-existing grok/kimi behavior (their tokens at bin/fm-spawn.sh:3655/3737 have the same window and no abort cleanup), so the remedy choice - extend abort cleanup to all three token harnesses, have remove prune provably-stale tokens, or accept parity - is a scope decision rather than a mechanical fix, and needs the author's authorization.🔧 Fix: Withdraw agy turn-end token on recordless spawn abort with behavioral test
1 info still open:
bin/fm-spawn.sh:3768- AGY_TURNTOKEN_MINTED=1 (bin/fm-spawn.sh:3772) is set only after the two writes that follow the mktemp at bin/fm-spawn.sh:3768. A failure in 'printf > "$auth_file"' or in the '$STATE/$ID.agy-turnend-token' write (ENOSPC-class) exits with the flag still 0, so the just-minted registry auth file strands with no cleanup - the same recordless-abort class this fix targets, just one statement earlier. Reachability requires I/O failure after trust registration already proved $STATE writable, so it is a narrow residual window. Mechanical remedy within the authorized scope: set AGY_TURNTOKEN_MINTED=1 immediately after mktemp succeeds, before the writes.✅ **Test** - passed
✅ No issues found.
bash bin/fm-test-run.sh tests/fm-agy-harness.test.shat HEAD — all pass, includingfm-spawn.sh: a spawn that aborts after minting its turn-end token removes it againRegression reproduction:git checkout 24c4a7e -- bin/fm-spawn.sh(pre-fix) + same suite — new test fails withnot ok - the aborted spawn stranded turn-end registry token(s): fm.xHsQkFKRevoD, exit=1, confirming the test exercises real behavior and the fix closes the leakRestoredbin/fm-spawn.shto HEAD and re-ran the suite — exit=0, registry empty after simulated abort, operator trust entries preservedbash bin/fm-test-run.sh tests/fm-omp-harness.test.sh tests/fm-bootstrap.test.sh tests/fm-backend-herdr.test.sh tests/fm-quota-choose.test.sh— all exit=0bash bin/fm-test-run.sh tests/fm-secondmate-harness.test.sh tests/fm-kimi-harness.test.sh tests/fm-muse-harness.test.sh tests/fm-control.test.sh tests/fm-live-gate.test.sh tests/fm-spawn-dispatch-profile.test.sh— all exit=0 (covers the helper adaptation to the branch's ANTIGRAVITY_CONVERSATION_ID clear asserted at tests/fm-agy-harness.test.sh:134/150/822)bash bin/fm-test-run.sh tests/fm-teardown.test.sh— full suite exit=0; the author's reported environment-induced red does not reproduce here, leaving zero local redsgit status --shortafter all runs — worktree clean, no transient artifacts✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.
The recordless-abort token window fixed here for agy pre-exists identically for grok and kimi tokens (bin/fm-spawn.sh mint windows with no abort cleanup). Left untouched deliberately to keep this PR's contract scoped; worth its own follow-up.