A plain agy session runs on your laptop, so when you close the lid and the laptop sleeps, Antigravity stops working until it wakes. To keep work going with the lid shut you have three real choices: run the agent somewhere else (Google's Remote Agents, or a Linux host over SSH), or stop the laptop from sleeping when the lid closes. Remote Agents run in a Google-managed environment and keep going while your machine sleeps, but need a Google AI Pro or Ultra plan on a personal account. Google's Remote Control, even its always-on daemon, does not help here, because it needs the host awake.
01Why closing the lid stops Antigravity
agy is a program on your computer. When the computer sleeps, so does every program on it, including the agent, its commands and any hooks. Nothing happens until it wakes, and anything that connects through your laptop, such as Remote Control, shows it offline.
So the question is really: where should the agent run while the lid is shut?
02Option 1: Google's Remote Agents
Remote Agents run your sessions and tools in an isolated, Google-managed environment instead of on your machine. Google's docs say a remote agent keeps working even if your machine goes to sleep or loses its connection.
- Who can use it: Google AI Pro and Google AI Ultra subscribers, signed in with a personal Google account. It isn't available on the free plan, Google AI Plus, or Workspace and Cloud business accounts, and it is rolling out gradually.
- How to start: you need Antigravity CLI 1.4.12 or later (
agy update), then runagy --remote-agentand enter a prompt.--project="<name or ID>"picks a project and--new-projectmakes one. You can also start from the Antigravity app or the web. - Coming back:
agy --remote-agent -ccontinues your latest remote conversation, and/resumelets you pick one. You can also continue it in the app or on the web.
Things to know before you rely on it:
- It can't see your laptop's files. Files must be attached to the remote project, within upload limits (8 MiB per file, 50 files and 100 MiB per project).
- Commands run without asking by default. The default permission preset is
always-proceed (turbo), and remote sessions always use the default execution mode, so plan, accept-edits and auto aren't available. Remote agent settings are separate from your local ones. Permission presets explained covers what the presets mean. - Some features are missing, including print mode,
!shell commands and locally installed MCP servers, plugins and skills.
03Option 2: run it on an always-on Linux host
If your code lives on a server or a desktop that stays on, run the agent there.
- The Antigravity app over SSH. The app can open a remote Linux machine over SSH in its own window. Google's docs say running agents keep working even if you close the window or put your laptop to sleep, and reattach when you're back online. The host must be 64-bit Linux (x86_64 or arm64) with glibc 2.26 or newer; macOS, Windows and Alpine-style musl hosts aren't supported.
agyin a terminal on the host. SSH in, startagyinsidetmux, detach and close the laptop. The session lives on the host. Antigravity notifications in tmux and over SSH cover getting alerts from that setup.
04Option 3: keep the laptop awake with the lid closed
If the work has to run on the laptop itself, it must not sleep. Keep it on power and somewhere it can stay cool.
- macOS:
caffeinate -i agystops idle sleep whileagyruns. It does not stop a MacBook sleeping when you shut the lid, so withcaffeinatealone, leave the lid open. - Windows: in Control Panel, Power Options, "Choose what closing the lid does", set "When I close the lid" to "Do nothing" for Plugged in.
- Linux:
systemd-inhibit --what=sleep:handle-lid-switch agyasks systemd to hold off both sleep and the lid switch whileagyruns. Plainsystemd-inhibit agyuses the defaultidle:sleep:shutdown, which does not include the lid switch.
05What doesn't work: Remote Control on a sleeping laptop
Remote Control lets you follow and answer a session from your phone's browser, and its always-on daemon starts by itself in the background. But Google's Remote Control documentation says the host needs an internet connection and must not be asleep or suspended. Close the lid on a sleeping laptop and Remote Control can't reach it. Put the daemon on a machine that stays on instead.
06Which to pick
agy in tmux)For the rest of the routine (a clear task, a commit before you go, and a way to hear when it's done), see walking away from long Antigravity tasks.
07Hearing from it while you're away
Antigravity Notifier is an independent app by TouchTap Ltd, not made by or affiliated with Google. Its free antigravity-notifier tool plugs into agy's hooks on Mac, Windows (beta) and Linux, and a paid iPhone or Android app (pricing) tells you when a turn finishes and lets you approve commands, answer questions and send the next instruction. Because the hook runs where agy runs, it covers Options 2 and 3, including a session on a server over SSH. It doesn't cover Remote Agents, which run on Google's machines rather than where antigravity-notifier is installed.
08FAQ
Does Antigravity keep running when my laptop sleeps?
A local agy session doesn't; it pauses until the laptop wakes. Remote Agents and agents on an SSH host keep going.
Does Remote Control work with the lid closed?
Only if the laptop stays awake. Google's docs say the host must not be asleep or suspended.
Do I need a paid plan to use Remote Agents?
Yes. Google lists Google AI Pro and Google AI Ultra on a personal account, with CLI 1.4.12 or later.
Will Remote Agents ask before running commands?
Not by default. Their default permission preset is always-proceed (turbo), so change it in the remote agent settings if you want prompts.