Repository navigation
Merged
Conversation
…cation, Stop (#563) Re-derives #553's own hooks.json schema finding live against agy 1.1.27, confirms firing (SessionStart, PreInvocation, PostInvocation, Stop) and wires the first three into this plugin's capture pipeline: pipeline/host.py gains an ANTIGRAVITY host and antigravity_exchange() reader for Antigravity's own flat transcript shape, and three new adapter scripts rename Antigravity's stdin payload into the shape the existing Claude Code hook scripts already understand rather than teaching those scripts a second payload shape. Stop fires after every turn, not once at session end (manaflow-ai/cmux#5000), so it is deliberately NOT wired to session-end-hook.sh -- agy-stop-hook.sh instead triggers save-session.sh's own idempotent, cooldown-gated flush, the same safe-to-repeat call post-tool-hook.sh already makes. No Antigravity session-end signal was found; that gap is documented, not silently patched over. Three defects were found and fixed only by driving this against a real agy process (none visible from a transcript-parsing unit test alone): agy's hook executor fails to protojson-parse a Claude Code-shaped hook stdout, a plain backgrounded save did not survive the hook process exiting (needed nohup + disown), and the backgrounded save had no stdin of its own to resolve PROJECT_DIR from. Installed via scripts/install_agy_hooks.py, which merges into the shared, per-machine ~/.gemini/config/hooks.json without a static manifest -- nothing observed on Antigravity supplies a variable a checked-in file could rely on. Also corrects .claude/jit-context/vocabulary/02-hosts/antigravity-hooks.md, which pinned an earlier, wrong hooks.json schema and a "PostToolUse/Stop never fire" finding that turned out to be an artifact of that schema, not of the host. Self-review (Explore + oss:auditor) found and fixed 4 issues against the original two-commit history: a live-looking CLAUDE_CODE_MESSAGING_TOKEN value in tests/fixtures/antigravity-env-563.txt trimmed to only the variables the tests actually read; a corrupt-hooks-file data-loss bug in install_agy_hooks.py's _load_existing() (an existing-but-unparseable ~/.gemini/config/hooks.json was treated as absent, so install() would have silently discarded another plugin's real hook entries -- it now raises CorruptHooksFile and writes nothing); a one-directional gap in the agy-*-hook.sh wiring guard; and stale host/envelope counts in pipeline/host.py and pipeline/extract.py docstrings. Squashed to one commit before push: the token above was present in this branch's original first commit and trimmed in a follow-up commit, which does not remove it from a pushed branch's history. Squashing here means no object ever reaches the remote carrying the real value; the fixture's tree state (token already trimmed) is unchanged. Refs #553, #563. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Bv6BGZD2EdZ9EuJ7tPDTb7
CI (pytest windows-latest 3.10) failed #497's own meta-guard, tests/test_windows_skip_triage_497.py: every module that carries a module-level `pytestmark = pytest.mark.skipif(sys.platform == "win32", ...)` must have an entry in docs/windows-skip-triage.md, and this new module (added in the previous commit) did not. Added the entry: `unclear`, the same templated reason string and verdict already given to test_session_end_hook_345.py, test_post_tool_hook_spawns.py and test_prompt_hook_spawns.py, which this module's own three subprocess tests are modelled on. Bumped the doc's own recomputed counts (97 -> 98 total, 77 -> 78 unclear) to match. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Bv6BGZD2EdZ9EuJ7tPDTb7
This was referenced Sep 5, 2026
fdaviddpt
added a commit
that referenced
this pull request
Sep 5, 2026
The `agy` port shipped in #563/#566 with a full install page, and the README never mentioned it -- `grep -niE 'antigravity|agy' README.md` returned nothing. The README also stated the rule for its own host badges ("Gemini CLI carries no host badge above, while Claude Code and Codex do") while being wrong about its own badge row: Antigravity is an observed host under exactly that rule, driven end to end against a real `agy` 1.1.27 process rather than reasoned from docs. Antigravity gains a badge, an install section around `scripts/install_agy_hooks.py`, its own hooks-table column and a docs-list entry. The column is separate rather than folded into `Claude Code / Codex` because the mapping genuinely differs: `UserPromptSubmit` maps to `PreInvocation`, `PostToolUse` is not wired, and `SessionEnd` has no analogue found. That last row is stated in the README itself, not left to the install page -- none of the four Antigravity events confirmed to fire is a process-exit signal, so a short conversation can end with no final flush, and that belongs in front of a reader choosing a host. Gemini CLI comes off the README: its install section, table column and docs-list link are removed. `gemini extensions link` is refused on a free-tier individual account with working credentials (`IneligibleTierError: UNSUPPORTED_CLIENT`, #532) and Google's own error text names Antigravity as the migration. This is NOT a claim that Gemini CLI was withdrawn upstream: paid tiers were never tested and nothing above 0.58.0 was re-probed, so "refused on the tiers that could be tested" is the whole observation, and the README says no more than that. `.gemini/settings.json` and `tests/test_gemini_manifest_456.py` are untouched. `tests/test_host_neutral_wording_562.py:61` hard-asserted the old table header verbatim, so it moves with the table; the #562 guard it belongs to is unchanged. Known follow-on, deliberately not settled here: `docs/install-gemini-cli.md` is now linked from nowhere while its manifests stay checked in and tested, which this repo's own bar counts as a defect. Named in #572 for a decision. Closes #572 Claude-Session: https://claude.ai/code/session_01Bv6BGZD2EdZ9EuJ7tPDTb7 Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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.
Summary
Ports Remember's session-memory capture onto Antigravity CLI (
agy), a fourth agent-CLI host, for issue #563 (superseding #553's investigation). Re-derives #553's own hooks.json schema finding live againstagy1.1.27 rather than trusting it as given -- confirms firing forSessionStart,PreInvocation,PostInvocation,Stopand wires the first three into capture.pipeline/host.py: newANTIGRAVITYhost (real, live-capturedANTIGRAVITY_CONVERSATION_IDsignature) andantigravity_exchange()reader for Antigravity's own flat transcript shape.pipeline/extract.py: a third understood envelope,"antigravity".scripts/agy-session-start-hook.sh,scripts/agy-pre-invocation-hook.sh,scripts/agy-stop-hook.sh) rename Antigravity's stdin payload into the shape the existing Claude Code-oriented hook scripts already understand, rather than teaching those scripts a second payload shape.Stopfires after every turn, not once at session end (Hermes (hermes-agent) sessions never auto-restore — per-turn on_session_end deletes the restore record manaflow-ai/cmux#5000) --agy-stop-hook.shis deliberately not wired tosession-end-hook.sh; it triggerssave-session.sh's own idempotent, cooldown-gated flush instead, the same safe-to-repeat callpost-tool-hook.shalready makes.scripts/install_agy_hooks.pymerges a "remember" entry into the shared, per-machine~/.gemini/config/hooks.jsonwithout a static checked-in manifest -- nothing observed on Antigravity supplies a variable such a file could rely on.docs/install-antigravity.md(new) and a correction to.claude/jit-context/vocabulary/02-hosts/antigravity-hooks.md, which had pinned an earlier, superseded hooks.json schema and a "PostToolUse/Stop never fire" finding that turned out to be an artifact of that wrong schema.No genuine Antigravity session-end signal was found -- of the four events confirmed loading and firing, none is a process-exit or conversation-close event. Reported as an open gap in
docs/install-antigravity.md, not silently worked around.Three real defects were found and fixed only by driving this against a live
agyprocess (protojson stdout parse failure on a Claude Code-shaped hook stdout; a backgrounded save not surviving the hook process exiting; a missingCLAUDE_PROJECT_DIRfor that backgrounded save) -- see the commit messages and the developer note for the exact log evidence.Self-review
Two spawns (Explore, oss:auditor) reviewed the first commit. Three real findings were fixed in a follow-up commit: stale docstrings after adding the fourth host, a one-directional wiring guard closed with a reverse-direction test, and
install_agy_hooks.pysilently treating a corrupt shared hooks.json the same as an absent one (now raisesCorruptHooksFileand writes nothing). The auditor also caught an unused, live-lookingCLAUDE_CODE_MESSAGING_TOKENcommitted into a test fixture -- trimmed in the same follow-up commit.Below the bar:
agy-stop-hook.sh'ssed -n Npfield extraction (splittingconversationId/transcriptPath/workspacePaths[0]by line number) would misalign if one of those fields ever contained an embedded newline. Not fixed: both values are host-generated byagyitself (a UUID; a filesystem path Antigravity constructs deterministically), never attacker- or remote-authored text reaching this boundary, so the reachable input space that would trigger it is empty in practice -- there is no real caller for this class here.Maintainer note on the leaked-looking fixture value: the raw
CLAUDE_CODE_MESSAGING_TOKENvalue is still present in this branch's first commit's diff (before the follow-up trimmed it). Consider squash-merging this PR rather than merging both commits individually, so the raw value never reaches the default branch's own history.Test plan
pytest tests/test_antigravity_signature_563.py tests/test_antigravity_envelope_563.py tests/test_install_agy_hooks_563.py tests/test_agy_hooks_563.py tests/test_extract.py tests/test_hooks_json.py tests/test_host_shell_parity_407.py tests/test_codex_signature_463.py tests/test_codex_manifest_410.py tests/test_gemini_manifest_456.py tests/test_cross_host_lock_contract_491.py -q-- 129 passed, 40 skipped (platform-tooling skips, pre-existing) locallypython3 .oss/assemble_changelog.py --check-- passesCloses #563
🤖 Generated with Claude Code
Verified by the maintainer
The "leaked-looking fixture value" this PR itself flags is real:
tests/fixtures/antigravity-env-563.txtin this branch's original first commit (88f1769) carried this machine's liveCLAUDE_CODE_MESSAGING_TOKEN, and it compared equal to the actual value in this session's own environment -- not a placeholder. A squash-merge does not contain that exposure: pushing the branch at all uploads the blob to GitHub, and once a pull request exists the object stays reachable viarefs/pull/N/headeven after the branch is deleted -- the exposure happens at push time, not merge time.Before pushing, I rewrote this branch to a single commit (
git reset --softto the base, one fresh commit over the already-trimmed final tree) rather than pushing the original two-commit history and relying on squash-merge to hide the first commit. Confirmed the token string does not appear in any commit reachable from the newfix/563HEAD (9efbf6e) viagit rev-list HEAD | xargs -n1 git show | grep, and confirmed it is absent from the working tree via a full-tree grep. Whether the token itself should also be rotated is a separate question outside this PR's scope, raised with the maintainer.Independently re-ran the new/changed test files against a scratch worktree of
origin/mainwith this fix absent:tests/test_agy_hooks_563.py,tests/test_antigravity_envelope_563.py,tests/test_antigravity_signature_563.pygenuinely fail (15 failed, 4 passed) andtests/test_install_agy_hooks_563.pyfails to even collect (ModuleNotFoundError: No module named 'install_agy_hooks') -- confirming these are not vacuous tests. Re-ran the full new/changed test set against this branch's rewritten HEAD: 36 passed, 40 skipped (pre-existing platform-tooling skips), matching the report's own claim.Accepted the
below-barfinding onagy-stop-hook.sh'ssed -n Npextraction as reasoned -- both fields are host-generated (UUID, deterministic path), not attacker-reachable.[AI-generated]