Skip to content
LastPing
GUIDE · ANTIGRAVITY CLI

Antigravity CLI notifications: know when an agy turn finishes, fails or hangs

LastPing's Antigravity hook install reports every Antigravity CLI turn: a start, a step for each tool call, then a finish or a failure with agy's own error text. LastPing alerts you by Slack, Discord, email or your phone, and a turn that hangs opens an incident. It needs no package: one shell script and three of agy's own hooks.

Your assistant can do this for you

Monitor this agent with LastPing

On this page
  1. What gets reported
  2. Set it up
  3. Good to know
  4. Questions people ask

What gets reported

The hook install turns every Antigravity CLI turn into one LastPing run.

  • Start and finish: the first event of a turn opens a run, and agy's Stop hook closes it. Nothing to remember: the hooks fire on every turn.
  • Each tool call: every tool agy runs is a progress step on the run, named after the tool, so the console shows where a turn was.
  • Failure: when agy's Stop reports an error, the run closes as failed, with agy's termination reason and error text on the incident.
  • Hung or never started: a maximum runtime on the monitor catches a turn that never finishes; a silence floor catches an unattended agent that stops running.
  • Which repository: inside a git repository, every run is labelled with it, so one monitor per machine still tells your projects apart.

Set it up

Connect once, then ask agy to set up its own monitoring. Each change is shown to you first.

Connect LastPing to Antigravity CLI

In a terminal:

agy mcp add lastping https://mcp.lastping.dev/mcp

Start agy, type /mcp, choose lastping, choose Authenticate and sign in to LastPing in the browser that opens. If the LastPing tools do not appear, restart with agy -c. Other ways to connect, including an API key, are on the MCP server page.

Ask agy to monitor itself

In agy: Monitor this agent with LastPing. With your agreement it creates a monitor and fetches LastPing's Antigravity hook install. You can also start from the monitor's Connect page in the console: "What runs your agent?", then Antigravity CLI.

Let it write the hook

The install writes one script, ~/.lastping/agy-report.sh, and merges a hook group named lastping into ~/.gemini/config/hooks.json with three hooks: PostToolUse, PostInvocation and Stop. An existing hooks file is backed up first, and every other group in it is kept as it is.

Check it

agy -p "/hooks" must list three lastping entries. Then run one turn: it arrives in LastPing as a run within a minute.

Good to know

What the hooks can and cannot see.

  • No waiting-on-you signal. Antigravity CLI has no hook for a turn that waits on a person, so a run is never marked blocked. Claude Code is the one client where LastPing detects that on its own.
  • A POSIX shell. The hook script runs on macOS, Linux or WSL.
  • One monitor per machine. Every agy turn on the machine reports to the same monitor, and the repository label splits the runs.
  • Traces are optional. With a tracing key stored, the same script also sends a span per model call and per tool call; there are no token counts or cost, because Antigravity does not expose them. See trace your agents.

Questions people ask

Front-loaded answers: the most important fact first.

  • Can I get a notification when Antigravity CLI finishes a turn?

    Yes. The hook install closes a run on every Stop. Route the success or every-run event to Slack, Discord, email or a phone app such as ntfy or Pushover in the LastPing console.

  • Which Antigravity CLI hooks does LastPing use?

    Three, in a hook group named lastping in ~/.gemini/config/hooks.json: PostToolUse with a matcher, and PostInvocation and Stop as plain lists. Each runs ~/.lastping/agy-report.sh with the event as its argument.

  • Does LastPing detect when agy is waiting for me?

    No. Antigravity CLI has no hook for a turn that waits on a person, so LastPing never marks an Antigravity run as blocked. A maximum runtime on the monitor still catches a turn that does not finish.

  • Does it need anything installed besides agy?

    No package. The install is one shell script, ~/.lastping/agy-report.sh, and three hooks; the script needs a POSIX shell, so it runs on macOS, Linux or WSL. LastPing itself connects with agy mcp add.

  • Does the hook send my prompts or commands?

    No prompt or command text is sent. The pings carry the run, the tool names and, on a failure, agy's termination reason and error text; optional spans carry model and tool names.

  • Is LastPing free for Antigravity CLI monitoring?

    Yes. LastPing is free for individuals, with no monitor cap.

FREE FOR INDIVIDUALS · FULLY HOSTED

agy runs on. You hear when it stops.

Connect once, ask once. First notification in minutes, and LastPing monitors itself the same way.