Do Antigravity IDE / 2.0 actually execute plugin hooks (PreToolUse/PostToolUse), or is that CLI-only right now?

Hi, I built a personal plugin (skills + rules + hooks) following the official Plugins and Hooks docs exactly, and I’m running into a case where the hooks portion seems to never execute in Antigravity IDE, even though everything else in the same plugin works fine.

Setup:

  • Plugin lives at .agents/plugins/<my-plugin>/, with plugin.json declaring "hooks": "hooks.json" alongside skills/ and rules/.
  • Skills and rules from this exact plugin are confirmed loaded (they show up correctly under Customizations, tagged “Global” / "Plugin: ").
  • hooks.json follows the documented schema exactly: top-level hook name (not wrapped in any extra key), with PreToolUse using a matcher + hooks array, each handler using only the documented type/command/timeout fields.

Test case:
My PreToolUse hook is supposed to hard-deny npm install <package> for a specific known package name, by returning {"decision": "deny", "reason": "..."} on stdin/stdout per the documented PreToolUse output contract. When I ask the agent to run that exact install command, it succeeds every time, no denial, and I see nothing hook-related in the “Antigravity IDE” Output channel around that tool call, even though that same channel does log other events (terminal command completions, LS errors, etc.) right next to it.

Environment: Antigravity IDE Latest.

Is there a known limitation where PreToolUse/PostToolUse hooks bundled inside a plugin aren’t wired up yet in IDE/2.0 (as opposed to the CLI, where I can find other reports confirming PreToolUse hooks do fire)? Or am I missing a step to get IDE to actually pick these up? Happy to share my full hooks.json if useful.

My repo : Hooks File Here

Hi @Ryujin,

To help us reproduce this issue, could you please provide a bit more information.

  • Operating System (macOS/Windows/Linux) and version.
  • Antigravity IDE version.
  • Model you were using when the issue occurred (e.g., Gemini 2.5 Pro, GPT-OSS 120B).
  • Are there any messages in the Antigravity IDE Output or Developer Tools Console when the tool call runs?
  • If possible, could you share a screen recording showing the complete workflow—from opening the workspace, confirming the plugin is loaded, running the command, and the Output panel afterward?

this,

  1. Operating System:
    Windows 10 Enterprise LTSC (Version 10.0.19044, Build 19044, 64-bit)

  2. Antigravity IDE Version:
    v2.1.1 (User Install)

  3. Model Used:
    Gemini 3.6 Flash (and Claude Opus 4.6)

  4. Developer Tools Console & Output Panel Logs :
    Below is the complete log snippet captured from the Antigravity IDE Output panel while an AI tool call (write_to_file / replace_file_content) was triggered:

2026-08-05 18:24:37.600 [info] I0805 18:24:37.599781  5324 http_helpers.go:183] URL: https://daily-cloudcode-pa.googleapis.com/v1internal:loadCodeAssist Trace: 0x576d5194233c3a35
2026-08-05 18:24:37.782 [info] W0805 18:24:37.782239  5324 mcp_manager.go:1113] Failed to write server states, eagerly loading all tools: failed to get server directory
2026-08-05 18:24:38.003 [info] I0805 18:24:38.002155  5324 http_helpers.go:183] URL: https://daily-cloudcode-pa.googleapis.com/v1internal:fetchAvailableModels Trace: 0xa4d5c1c424a5fda0
2026-08-05 18:24:38.010 [info] I0805 18:24:38.009675  5324 server.go:2283] Auth succeeded, refreshing features and managers
2026-08-05 18:24:38.073 [info] I0805 18:24:38.072640  5324 server.go:2289] State refresh took 62ms
2026-08-05 18:24:38.084 [info] (Antigravity IDE) 2026-08-05 18:24:38.083 [INFO]: Language server started
2026-08-05 18:24:38.098 [info] I0805 18:24:38.093842  5324 server.go:1944] initialized server successfully in 2.2602663s
2026-08-05 18:24:38.128 [info] (Antigravity IDE) 2026-08-05 18:24:38.127 [INFO]: LS lspClient started successfully
2026-08-05 18:30:36.586 [info] I0805 18:30:36.586383  5324 http_helpers.go:183] URL: https://daily-cloudcode-pa.googleapis.com/v1internal:fetchAvailableModels Trace: 0xfeb70b74d033ef04
2026-08-05 18:30:37.559 [info] I0805 18:30:37.559623  5324 http_helpers.go:183] URL: https://daily-cloudcode-pa.googleapis.com/v1internal:loadCodeAssist Trace: 0x98028cb7721e41ca

I also double-checked our plugin’s hooks.json schema:

The matcher explicitly registers for all standard file edit tools:
“matcher”: “Edit|Write|replace_file_content|write_to_file|write_file|multi_replace_file_content”

When tested manually via Node CLI with mock stdin payloads, the hook script dedup-gate.js runs cleanly without syntax or execution errors. This indicates our hook schema is valid, but the Antigravity IDE v2.1.1 host event dispatcher is not firing the PostToolUse event callback when tools like write_to_file execute.

(post deleted by author)

I can add an independent, controlled reproduction of this. Short version: on current public builds, hooks execute in the agy CLI only. The IDE and the Antigravity 2.0 desktop app do not execute PreToolUse hooks at all — under any documented registration route, and it is not a manifest error.

Environment (the diagnostics requested upthread)

Component Version
Antigravity IDE 2.1.1 (VS Code OSS 1.107.0, commit e0b7a2b, build 2026-06-17) — latest on the public changelog
Antigravity 2.0 desktop 2.5.0 (956667124)
agy CLI 1.1.10
OS macOS, Apple Silicon (Darwin 25.5.0)
Node v26.4.0
Model Install defaults, unchanged. The CLI control runs captured "modelName": "gemini-3.6-flash-high" in the hook payload

What we registered

A single probe hook — a shell script that appends its stdin and environment to a log file and prints {"decision":"allow"} with exit 0 — registered simultaneously through every documented route:

  1. <workspace>/.agents/hooks.json (workspace root exactly matching the opened folder, folder trusted)
  2. ~/.gemini/config/hooks.json (global)
  3. Plugin route: ~/.gemini/config/plugins/denied-probe/ with plugin.json containing only name/description (no invented "hooks" key — this differs from the OP’s setup and rules out the manifest-error explanation) and hooks.json at the plugin root

hooks.json used the documented named-group schema:

{
  "denied-step0-probe": {
    "PreToolUse": [
      {
        "matcher": "*",
        "hooks": [
          { "type": "command", "command": "/absolute/path/to/probe.sh", "timeout": 10 }
        ]
      }
    ]
  }
}

Full apps were restarted after installation.

Results

Surface Result
agy CLI (control) Fires on every tool call, from the global registration. Full payload arrives on stdin (toolCall.name/args, conversationId, transcriptPath, modelName, …). {"decision":"deny"} hard-blocks with the reason surfaced.
Antigravity IDE 2.1.1 Zero hook invocations. run_command (pwd, echo hello) executed normally with no log entry, no error, no console message — silent non-engagement. Retested with file read/write tools on a later day to rule out tool-type-scoped wiring: also zero invocations.
Antigravity 2.0 desktop 2.5.0 Zero hook invocations, same conditions.

The CLI control fired correctly under the identical global registration the entire time, which rules out a probe-script, permissions, or schema problem. There was no console/output-panel error in either GUI app — the hooks are simply never consulted.

Why this looks like a product gap, not user error

  • The bundled offline docs that ship inside the apps (builtin/skills/agy-customizations/docs/hooks.md, regenerated by the current builds) document the hook payload’s transcriptPath as surface-specific — explicitly listing antigravity-cli/ (CLI), antigravity/ (2.0), and antigravity-ide/ (IDE) directory variants. So the documentation clearly intends hooks to run on all three surfaces.
  • The same bundled docs name .agents/ and ~/.gemini/config/ as the customization roots — exactly what we registered.
  • Every hook-related fix on the public changelog (1.1.7 “disabled plugins still running their hooks”, 1.1.9 stop-hook and PostToolUse matcher fixes, 1.1.10 hook ordering) is on the CLI track. No IDE- or 2.0-track entry has ever mentioned hooks.

One piece of conflicting public evidence: a 2026-07-16 blog post by Mete Atamel shows captured hook payloads whose paths sit under ~/.gemini/antigravity-ide/brain/…, i.e. apparently from the IDE. No version is stated there, and no public IDE build newer than 2.1.1 exists — so if that capture is genuine, it suggests GUI hook execution exists in a build that hasn’t shipped publicly.

Question for the Antigravity team: is PreToolUse/PostToolUse execution in the IDE and the 2.0 desktop app (a) implemented but gated on something undocumented, (b) shipping in an upcoming release, or (c) currently CLI-only by design? Any of those answers would be useful — several of us are building governance/safety tooling on the hook contract, and right now the docs say one thing and the shipped GUI builds do another.

Happy to provide the probe script, full logs, or a screen recording if that helps triage.