Repository navigation
docs: record how Antigravity CLI reads hooks.json - #564
Merged
Merged
Conversation
The trap entry states the schema agy 1.1.27 actually accepts -- a hook name mapping to an object keyed by event -- and that Claude Code shape fails to parse with the error only in ~/.gemini/antigravity-cli/cli.log, while /hooks answers identically to having no file. It records which four events load and fire, the stdin payload carrying transcriptPath, and the probing rule that a firing test must leave a side effect rather than trusting the reply. Refs #553, #563. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Bv6BGZD2EdZ9EuJ7tPDTb7
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.
Records what probing Antigravity CLI (
agy) 1.1.27 established about its hook manifest, as a jit-context trap plus a changelog fragment. No plugin code changes.Why this is a trap rather than a doc page
Every failure mode here is silent. A Claude Code-shaped
hooks.jsondoes not parse, andagy -p "/hooks"then answers{"hooks":[]}-- byte-identical to having no file at all. An unrecognised event inside an otherwise valid file is dropped the same way: the listing prints fewer rows than the file declares, with no error. The only witness for either is~/.gemini/antigravity-cli/cli.log, which nothing points you at.That is this project's own worst failure mode -- an install that looks present and captures nothing -- landing on the host side, so it is worth the injection cost at the moment somebody types
agy.What the entry states
SessionStart,PreInvocation,PostInvocation,Stop), and which six are silently dropped -- includingPreToolUse/PostToolUse, which the published docs list and which fired onagy1.0.5 per Antigravity (agy): injected PreToolUse hook denies every tool call (invalid_args) — agy unusable in cmux manaflow-ai/cmux#5358.transcriptPaththis plugin's capture needs and where Antigravity writes its transcript.DONEwithout calling a tool at all -- it looked like a pass and proved nothing.~/.gemini/config/hooks.json,<workspace>/.agents/hooks.json) and the one that does not (a plugin's own bundled file, which is copied in and counted).Two things are labelled as inference rather than measurement: the
GetEnableJsonHooksflag, and the untested workspace-local path.Verification
Rebuilt the index and drove the prompt hook in both directions rather than trusting the rebuild:
{"prompt":"agy hooks not firing"}-> injects the entry,matched: agy{"prompt":"rebase the branch onto main"}->{}A rule that matches everything is worse than no rule, so the negative case is the one that matters. Cost is one 5.4KB injection per match, on a keyword set (
antigravity,agy,gemini cli,hooks json,fourth host,jsonhook) that carries no ordinary-English word.Measured on macOS darwin/arm64,
agy1.1.27, one machine. The entry says so; nothing is claimed for Linux, Windows or other versions. Scoped by keyword rather than by path, so it costs nothing on a session that never mentions this host.Refs #553, #563.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Bv6BGZD2EdZ9EuJ7tPDTb7
[AI-generated]