All guides

Antigravity notifications not working? A checklist

Updated 27 November 2026 · 6 min read

When Google Antigravity notifications stop working, the cause is almost always one of five things: the hooks file isn't where Antigravity looks or isn't valid JSON, the session was started before you changed it, the hook runs but fails, the event you rely on doesn't exist or doesn't fire when you expect, or the operating system or phone hides the alert. Check the file with python3 -m json.tool ~/.gemini/config/hooks.json, start a new agy session, then run the hook's command by hand with sample input. If a hook is blocking commands instead, it's a PreToolUse hook that isn't printing a decision. If you use Antigravity Notifier, antigravity-notifier doctor and antigravity-notifier test cover most of this.

01Is the file in the right place, and valid?

  • Right place? The global file is ~/.gemini/config/hooks.json: in config, inside .gemini in your home folder. A project's file is .agents/hooks.json. Both load. Where is hooks.json? has the details.
  • Valid JSON? No trailing commas, no comments. Run python3 -m json.tool ~/.gemini/config/hooks.json; it prints the file back, or the line with the mistake.
  • Right shape? The top-level keys are named groups, and each group holds the events. A file copied from another tool's documentation, with a "hooks" object at the top, is a different layout. Compare yours with Antigravity hooks explained.
{
  "my-alerts": {
    "Stop": [
      { "type": "command", "command": "/Users/you/.gemini/hooks/done.sh", "timeout": 10 }
    ]
  }
}

02Did you start a new session?

Antigravity has no trust step, so there is nothing to approve: a hook in the global file runs from the next session, even in an untrusted workspace. But it is the next session. An agy session that was already open when you edited the file doesn't pick up the change. Quit it and start again.

03Does the hook run, and succeed?

Run the command yourself with the kind of payload Antigravity sends. Payloads are JSON on standard input, with camelCase names:

echo '{"hookEventName":"Stop","cwd":"/tmp/demo","conversationId":"test","lastUserInput":"hi"}' | ~/.gemini/hooks/done.sh

Then look for:

  • Command not found. A hook may not see the same PATH as your interactive shell. Use full paths, both for the script in hooks.json and for tools inside it, such as /opt/homebrew/bin/terminal-notifier.
  • A relative path. A path like .gemini/hooks/done.sh depends on the folder the session started in. Use an absolute path.
  • Not executable. chmod +x the script, or call it through its interpreter (/bin/sh /path/done.sh).
  • A timeout. Timeouts are in seconds and the default is 30. A curl with no --max-time that hangs on a bad network uses all of it. Add --max-time 10.

To see exactly what Antigravity sends, make the hook save its input once: put cat > /tmp/agy-payload.json at the top of a test script, run a turn, and read the file.

04Is a hook blocking your commands?

Antigravity is fail-closed. A PreToolUse hook that prints no decision, exits with an error or times out blocks the tool. A notification script that forgets to answer, or crashes before it does, looks like Antigravity refusing to run anything.

The fix is to make every PreToolUse script print a decision on every path, and exit 0:

echo '{"decision":"allow"}'
exit 0

allow leaves the call to Antigravity's own permission rules, as if the hook weren't there. The PreToolUse guide lists the other decisions.

05Does the event fire when you think it does?

  • There is no notification or permission event. The events are SessionStart, PreInvocation, PostInvocation, PreToolUse, PostToolUse and Stop. A hook named Notification or PermissionRequest, copied from another tool's setup, never runs.
  • Most commands never ask. Interactive sessions start in Auto mode, where sandboxed "safe" commands run without asking. A hook can see every command in PreToolUse, but it can't tell which ones will stop for you.
  • Stop fires once per turn, not once per task. In a long back-and-forth you get an alert per reply.
  • The last message isn't in the Stop payload. A script that reads it from the payload gets nothing. It's in the conversation's transcript_full.jsonl; see the Stop hook guide.
  • A continue that loops. If your Stop hook answers {"decision":"continue",...}, Antigravity starts a new turn, and continuationActive stays false afterwards, so a hook that checks only that flag continues forever.
  • Print mode. In agy -p nobody can answer a prompt, and a force_ask is answered with a denial.

06Is the operating system hiding it?

  • macOS: osascript notifications appear as Script Editor. Allow it in System Settings > Notifications, and check Focus. See the macOS guide.
  • Windows: check Do Not Disturb (Focus assist), and that the BurntToast module is installed for your user.
  • Linux: notify-send needs a notification daemon and a desktop session. Over SSH there is none.
  • Phone: check notification permission for the app, Focus or Do Not Disturb, and battery savers that delay background apps on Android.

07Two alerts for one moment?

Every group in every file runs. The same hook in the global file and in a project's .agents/hooks.json, or in two groups, runs twice. If you also use Google's Remote Control or a notifier app, you may get its alert as well as your hook's. Keep one per moment.

08If you use Antigravity Notifier

Two commands check most of the setup:

antigravity-notifier doctor   # checks the installation
antigravity-notifier test     # sends a test notification to your paired phones

If the hooks have gone missing, for example after you moved the binary or another tool rewrote the file, antigravity-notifier setup puts its antigravity-notifier group back. It refuses to change a hooks.json that isn't valid JSON, so fix the file first.

Common cases:

  • Nothing on the phone while you're at the computer. That's by design. Input in the last 30 seconds on an unlocked screen means you're there, so nothing waits for the phone and tool calls aren't sent; Antigravity asks you itself. Lock the screen (macOS, Linux) or step away, or run antigravity-notifier test.
  • No done card for a turn. It isn't sent while background tasks still run, or when you stopped the turn yourself, and only one is sent per execution.
  • Quiet at night. Check quiet_hours in antigravity-notifier config show.
  • A script using agy -p gets notes, not approvals. Print mode is never held, so cards arrive as notes.
  • Only commands wait for the phone. That's the default, phone_approvals commands. Set it to all to also approve file writes and edits, or off.
  • The desktop app or IDE. They read the same hooks file but aren't supported yet. Use agy in a terminal.

09FAQ

My hook worked yesterday and stopped today. Why?

Check that hooks.json is still valid JSON: one stray comma from a later edit stops it loading. If another tool rewrote the file, your group may be gone. If you updated Antigravity, save a payload (step 3) and compare it with what your script expects: Google's documentation lags behind what agy sends in places.

Do I need to trust or approve a hook?

No. Antigravity has no trust step. If a hook doesn't run, it isn't waiting for approval; the file, the session or the command is the problem.

Can I test a hook without waiting for Antigravity?

Yes. Pipe sample JSON into the command, as in step 3. For Antigravity Notifier, antigravity-notifier test sends a test push.

Does --dangerously-skip-permissions turn hooks off?

No. It doesn't skip hooks, so your notification hooks, and any PreToolUse hook that blocks, still run.

Antigravity Notifier Get a push on your phone when Antigravity finishes or needs you, then allow, deny or answer from there. The antigravity-notifier command line tool is free on Mac, Windows and Linux.