Repository navigation
fix(antigravity): flat hook lists for matcher-less events, SessionStart, and no MCP type - #3584
Merged
Merged
Conversation
…Start, drop MCP type
Antigravity's hooks.json takes a flat handler list under SessionStart,
PreInvocation, PostInvocation and Stop; only PreToolUse/PostToolUse use the
{ matcher, hooks } group. rulesync wrote the group for every event, which the
loader rejects before skipping the whole file. Emit the flat form, accept
both forms on import, and map canonical sessionStart to the newly documented
SessionStart event.
For mcp_config.json, stop writing the canonical `type` (Antigravity infers
the transport from command/serverUrl) and drop an empty args/env on a remote
server, which Antigravity otherwise refuses to start.
Refs #2666
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012y9fNo2AAJdGocxvsHtDhv
… refusal Address review notes: list SessionStart among the flat events in the feature-research reference, reword the hooks location note, mark the remote-server refusal as observed runtime behavior, and note why a group without hooks is dropped. Refs #2666 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_012y9fNo2AAJdGocxvsHtDhv
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_012y9fNo2AAJdGocxvsHtDhv
This was referenced Oct 22, 2026
Merged
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
Follows up the 2026-10-22 re-check on #2666 for
antigravity-ide,antigravity-cliandantigravity-plugin.Hooks: flat handler lists for matcher-less events (gap 1)
The Antigravity hooks docs say that for
SessionStart,PreInvocation,PostInvocationandStop"the structure is simpler (a list of handlers directly under the event key) and the matcher is ignored". OnlyPreToolUse/PostToolUseuse the{ "matcher", "hooks": [...] }group. rulesync wrapped every event in a group, whichagy plugin validate1.4.4 reports ascommand hook must specify 'command'. The loader skips this whole file. So any config withstopor a model-invocation hook disabled all of the user's Antigravity hooks."Stop": [ { "type": "command", "command": "..." } ](handlers from several matcher groups are merged into the one list; a matcher there is still dropped with the existing warning)..agents/hooks.json,~/.gemini/config/hooks.jsonand the pluginhooks.json(shared code path).Hooks:
SessionStart(gap 2)SessionStart("Fires once when a new conversation session starts, before the first model invocation") is now documented, so canonicalsessionStartmaps toSessionStartand is a flat, matcher-less event. The hook-event matrix is regenerated.MCP: no
type, no empty stdio fields on remote servers (gap 3, partial)The Antigravity MCP docs list
command,serverUrl,args,env,cwd,headers,authProviderType,oauth,disabledanddisabledTools; there is notype, and the transport follows fromcommand/serverUrl. The canonicaltypeis no longer written. Per the issue's validator run, aserverUrlserver that also hasargs/env(even"env": {}) fails to start, so an emptyargs/envon a remote server is dropped. Import is unchanged (it does not invent atype).Docs (
docs/reference/file-formats.md) and the embedded docs content are updated.Left for maintainer
command/args/env: drop with a warning, or keep? That is a design call, so it is left as is.timeout) are still passed through; whether to strip them is a broader allow-list decision.agy plugin validatelocally; the validator outputs are taken from the issue comment, while the shapes are checked against the official docs above.Sources
Refs #2666
🤖 Generated with Claude Code
https://claude.ai/code/session_012y9fNo2AAJdGocxvsHtDhv