How to keep background training processes alive after disconnecting from Antigravity IDE Server?

Hi everyone,

I am using Antigravity IDE Server for my AI/ML research, and I’ve run into an issue with long-running tasks.

Every time I start a heavy PyTorch training job in the IDE terminal and close my laptop for the night, the process is terminated by the next morning. It seems like the training script dies whenever the SSH/client connection drops.

When checking the server process logs, I noticed it runs with several flags like this:

sh /home/lsy/.antigravity-ide-server/bin/2.0.4-.../antigravity-ide-server --start-server --host=127.0.0.1 --port=0 --enable-remote-auto-shutdown --accept-server-license-terms

Could the --enable-remote-auto-shutdown flag potentially be causing this issue by terminating the server and its child processes when the connection drops?

If so, or if there is another root cause, what is the recommended way to keep my background tasks running continuously even after I close my laptop? Are there any specific configurations or environment variables I should look into?

Any help or workarounds would be greatly appreciated! Thanks in advance.

Hi @xlooslo,

Yes, the --enable-remote-auto-shutdown flag is designed to terminate the server and its child processes to save resources when the client connection drops.

To keep your long-running ML tasks alive overnight, we recommend running your PyTorch training scripts inside a terminal multiplexer like tmux or using nohup. This will detach the process from the IDE’s TTY session, allowing it to survive disconnects even if the IDE server auto-shuts down.

Since you are running overnight ML tasks, you might find our Remote Control feature very helpful. It allows you to securely access your active Antigravity IDE session from any web browser (like your phone or tablet). As long as your training job is detached in a tmux session, you can close your laptop for the night, connect via Remote Control and check your terminal output right where you left off.