To get notifications from Google Antigravity's agy inside tmux, turn on the CLI's Notifications setting so it rings the terminal bell, and let tmux's bell monitoring flag the window: monitor-bell is on by default, and bell-action and visual-bell decide what happens next. Google also recommends setting the CLI's altScreenMode to never for terminal multiplexers such as tmux and screen. A bell only helps while a client is attached, so for a detached session use a hook that sends a push to your phone, which works whether anyone is attached or not.
01Why run agy in tmux
tmux and screen keep a session running on the machine when you disconnect. Start agy inside one, detach (Ctrl-b d in tmux), close your laptop or lose your SSH connection, and Antigravity carries on. Later you reattach with tmux attach and find it where you left it, or waiting for you.
That's the main reason to use one with agy on a server. Antigravity's desktop app has its own SSH windows that keep agents running on the host, but agy in your own ssh session is an ordinary terminal program that ends with the connection unless something like tmux holds it. Antigravity notifications over SSH covers the difference.
02The rendering setting Google recommends
The Antigravity CLI can draw its interface in two ways. Google's CLI settings documentation describes them under Rendering Mode (altScreenMode):
defaultrenders the conversation inline in your terminal's scrollback and opens full-screen views, such as the diff viewer, in the alternate screen.alwaysruns the whole interface in the alternate screen, with its own scrollback and mouse-wheel scrolling.nevernever uses the alternate screen, even for full-screen views. It can only be set insettings.json, not in/config.
For inline rendering, the docs say it's best used for "remote SSH terminals, terminal multiplexers such as tmux or screen, and low-bandwidth remote sessions." To keep everything inline, add this to ~/.gemini/antigravity-cli/settings.json:
{
"altScreenMode": "never"
}
Inline rendering keeps the session in your terminal's native scrollback, which in tmux means tmux's own history and copy mode. If the file already has other keys, add this one beside them.
03Turn on the bell in agy
The Antigravity CLI's Notifications setting is off by default. When it's on, the docs say it "rings the terminal bell and shows a desktop notification when the agent needs your approval or an answer, or finishes its turn." Turn it on from /config, or add "notifications": true to the same settings.json. Turn on Antigravity's built-in notifications has the steps.
Google's docs don't describe how the setting behaves inside tmux or screen. What follows is how tmux treats a bell from any program. We haven't tested the combination with agy ourselves, so check it in your own setup.
04What tmux does with a bell
These are standard tmux options from the tmux manual:
monitor-bellwindowWatches for a bell in the window and highlights windows with one in the status lineonbell-actionsessionWhich windows' bells cause an alert: any, none, current or otheranyvisual-bellsessionon shows a message instead of passing the bell to your terminal; both does bothoffWith the defaults, a bell in any window is passed through to your terminal, which may beep, flash or badge depending on its own settings, and the window is marked in the status bar. That's useful when agy is in a window you aren't looking at.
Some common tweaks, for ~/.tmux.conf:
# Show a message as well as passing the bell through
set -g visual-bell both
# Only alert for bells in windows other than the one you're looking at
set -g bell-action other
Reload with tmux source-file ~/.tmux.conf. Check the current values with tmux show-options -g bell-action and tmux show-options -gw monitor-bell.
05Activity and silence monitoring
tmux can also watch for output without any bell at all:
monitor-activity on(window option) highlights a window when something is printed in it.monitor-silence 30(window option) highlights a window that has printed nothing for 30 seconds.
Silence monitoring can be a rough "it's stopped" signal for a long task. It can't tell finished from waiting for approval, though, and any output while it works, such as a progress animation, may keep resetting it. The bell from Antigravity's own setting is more precise, because Antigravity knows when it is waiting for you.
06When nobody is attached
Everything above relies on a tmux client being attached and someone looking at it. Once you detach and walk away, a bell rings into an empty room: tmux marks the window, and you see it only when you reattach.
To hear about it while detached, the alert has to leave the machine. A Stop hook in ~/.gemini/config/hooks.json that sends a push runs inside the agy process, so it doesn't care whether a client is attached. Antigravity notifications with ntfy shows a one-line version. It's one-way: you learn Antigravity has finished, then reattach to carry on.
07Antigravity Notifier in tmux
Antigravity Notifier is an independent tool made by TouchTap Ltd, not affiliated with Google. Its free antigravity-notifier command line tool (Mac, Windows (beta) and Linux) adds one named group of hooks to ~/.gemini/config/hooks.json, and its iPhone and Android apps let you answer.
Because the hooks run inside agy, they work the same in a detached tmux session as in an attached one. While you're away you get "Antigravity has finished" with its last message, commands to allow once, allow for the session or deny with a note, and Antigravity's questions to answer, all from the phone, without reattaching. While you're at the keyboard it doesn't hold anything, and it never holds agy -p scripts. On a Linux server it judges presence from the last keypress in the terminal agy runs in; where it can't tell, nothing waits and the phone gets a note instead.
The command line tool is free; the apps need a subscription or a one-off purchase, see pricing. Set up Antigravity Notifier takes about a minute.
08FAQ
Does agy work in tmux?
Yes, it's a normal terminal program. Google's docs recommend inline rendering for multiplexers, and setting altScreenMode to never in ~/.gemini/antigravity-cli/settings.json keeps every view inline.
How do I get a tmux alert when Antigravity needs me?
Turn on the CLI's Notifications setting so it rings the bell, and keep tmux's monitor-bell on (the default). Set visual-bell to on or both if you want a message in tmux too.
Will I be notified if my tmux session is detached?
Not by a bell, which only reaches an attached client. Use a hook that sends a push, such as ntfy or Antigravity Notifier.
Does Antigravity keep running when I detach from tmux?
Yes. Detaching leaves the tmux session, and agy inside it, running on the machine until you reattach or end it.