The Antigravity (agy) adapter has a silent failure mode documented in CLAUDE.md and in the README's caveats: agy does not merge multiple named hooks on PostToolUse, despite its own docs promising it does. If the user already has their own PostToolUse hook in ~/.gemini/config/hooks.json, Logic Loop's may never fire — and the toggle still reads "on".
The result is the worst kind of bug: adapter installed, UI says it's working, zero rows ever land, nothing on screen says why.
We can't fix agy's dispatch. We can stop the user from debugging it blind.
What to do
When the Antigravity toggle is on, check ~/.gemini/config/hooks.json for a PostToolUse hook that isn't ours (ours is identifiable — see MARKER usage in src-tauri/src/ingest.rs and how antigravity.rs writes its entry). If one exists, surface a warning in the UI.
The side panel already has a warning strip used for tailer failures (search ingest://tailer-failed) — reuse that presentation rather than inventing a second warning style. AgentStatusBar.tsx is where the toggle itself lives.
Constraints
- Detection only. Never rewrite or remove the user's foreign hook — install/remove must stay idempotent and byte-identically reversible. That property is unit-tested; keep those tests passing.
- Fail open. If the file is missing, unreadable, or malformed, show nothing and carry on — an ingestion-side check must never affect terminals.
- Add a unit test in
antigravity.rs's existing tests module for the detection function, covering: no file, our hook only, foreign hook present, both present.
Done when: cargo test and cargo clippy --all-targets -- -D warnings pass, npx tsc --noEmit clean, and a hand-added foreign PostToolUse hook produces a visible warning.
The Antigravity (
agy) adapter has a silent failure mode documented inCLAUDE.mdand in the README's caveats:agydoes not merge multiple named hooks onPostToolUse, despite its own docs promising it does. If the user already has their ownPostToolUsehook in~/.gemini/config/hooks.json, Logic Loop's may never fire — and the toggle still reads "on".The result is the worst kind of bug: adapter installed, UI says it's working, zero rows ever land, nothing on screen says why.
We can't fix
agy's dispatch. We can stop the user from debugging it blind.What to do
When the Antigravity toggle is on, check
~/.gemini/config/hooks.jsonfor aPostToolUsehook that isn't ours (ours is identifiable — seeMARKERusage insrc-tauri/src/ingest.rsand howantigravity.rswrites its entry). If one exists, surface a warning in the UI.The side panel already has a warning strip used for tailer failures (search
ingest://tailer-failed) — reuse that presentation rather than inventing a second warning style.AgentStatusBar.tsxis where the toggle itself lives.Constraints
antigravity.rs's existingtestsmodule for the detection function, covering: no file, our hook only, foreign hook present, both present.Done when:
cargo testandcargo clippy --all-targets -- -D warningspass,npx tsc --noEmitclean, and a hand-added foreignPostToolUsehook produces a visible warning.