[Antigravity IDE] Potential Socket Leak

After using Antigravity for long time, socket gets blocked.
I am observing a significant number of TCP connections associated with the Antigravi process that remain in a (CLOSED) state according to lsof. While the connections are no longer active, the process appears to be holding onto the file descriptors, suggesting a potential socket leak.

I am using macOS 15.5
This is the sample output of lsof -i

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
Antigravi 58941 dahyunjeon *122u IPv4 0xb0ef2501670b8288 0t0 TCP localhost:41171->localhost:49498 (CLOSED)
Antigravi 58941 dahyunjeon *124u IPv4 0xdb013d44df681007 0t0 TCP localhost:43767->localhost:49504 (CLOSED)
Antigravi 58941 dahyunjeon *126u IPv4 0xa7c96cfac8b0687a 0t0 TCP localhost:43767->localhost:49508 (CLOSED)
… [many more entries] …

Hi there, thank you for bringing this up.

To help us pinpoint the source (whether it’s the core editor, the remote agent, or a specific extension), could you please provide a few more technical details?

  1. Is the high socket count occurring on your local machine (the client) or the remote environment (the SSH host/container)?

  2. Have you noticed if this spike correlates with specific actions, such as heavy AI context generation, indexing a large monorepo, or a specific language server (e.g., Python/Pylance, TypeScript) running in the background?

  1. Is the high socket count occurring on your local machine (the client) or the remote environment (the SSH host/container)?

It is occurring on my local machine.

To be exact, i have not checked socket count on the remote environment.

  1. Have you noticed if this spike correlates with specific actions, such as heavy AI context generation, indexing a large monorepo, or a specific language server (e.g., Python/Pylance, TypeScript) running in the background?

It is probably related to ai context generation or multiple “reload window”. I have number of windows open on different projects and usually keeps them open. Everytime screen saver goes on, ssh server requires me to reload windows. Since i have multiple windows, reload window is called multiple times everytime.

This problem occurred few times after the last update. When the problem occurs, i have shut down all AG and restarted it. The problem was resolved for awhile then problem reoccurred after some time.

Thanks for the detailed report. The accumulation of sockets in a (CLOSED) state strongly suggests that the Agent Manager or the internal language server isn’t releasing file descriptors correctly during those “reload window” cycles you mentioned.
To ensure our team has all the necessary details, we also highly recommend filing a bug report directly through the Antigravity in-app feedback tool. You can access this by clicking the Feedback icon in the top-right corner of the interface and selecting Report Issue.

Having exactly the same issue:

sudo lsof -n -P -i TCP -s TCP:ESTABLISHED | awk ‘{print $1}’ | LC_ALL=C sort | uniq -c | LC_ALL=C sort -nr | head -n 10
31586 Antigravi
18 ssh
15 language_

Antigravity is opening 30k connections and exhausts my ports, making any further connections (like Chrome saying ERR_ADDRESS_INVALID for all websites) failed to be established.

1 Like