Remote Agents hang when HTTPS_PROXY is set (dials <google_ip>:<proxy_port>)

Summary

When HTTPS_PROXY / HTTP_PROXY is configured, Remote Agents (aicode.googleapis.com/v1alpha/remote:*) bypass the proxy host and dial <remote_google_ip>:<proxy_port> directly, causing all cloud project and remote conversation requests to hang until context deadline exceeded.

Environment

  • OS: Arch Linux x86_64
  • Antigravity CLI: 1.5.3 / Antigravity App: 2.31.0

Steps to Reproduce

  1. Start a local HTTP(S) proxy on 127.0.0.1:8888:
    mitmdump --listen-host 127.0.0.1 -p 8888
    
  2. Launch Antigravity CLI in Remote Agent mode (or Antigravity App) with proxy environment variables set:
    HTTPS_PROXY=http://127.0.0.1:8888 HTTP_PROXY=http://127.0.0.1:8888 agy --remote-agent --conversation=<remote_conversation_id>
    
  3. Capture DNS and outbound TCP traffic while it hangs:
    sudo tcpdump -ni any '(port 53) or (tcp and port 8888 and not host 127.0.0.1)'
    

Observed Behavior

  1. GET https://aicode.googleapis.com/v1alpha:fetchConfig correctly routes through 127.0.0.1:8888 and returns 200 OK:
    [127.0.0.1:52174] server connect aicode.googleapis.com:443 (172.217.115.4:443)
    127.0.0.1:52174: GET https://aicode.googleapis.com/v1alpha:fetchConfig HTTP/2.0
         << HTTP/2.0 200 OK 8.4k
    
  2. None of the aicode.googleapis.com/v1alpha/remote:* requests ever reach 127.0.0.1:8888:
    • Antigravity CLI: TUI hangs indefinitely at Loading conversation..., while ~/.gemini/antigravity-cli/log/cli-*.log logs repeated timeouts:
      W1111 04:57:46.927063     227 poll.go:51] cloud projects poll failed; keeping previous snapshot: Get "https://aicode.googleapis.com/v1alpha/remote:listProjects": context deadline exceeded
      W1111 04:58:01.945337     234 cloud_permissions_manager.go:54] FetchCloudPermissionSettings failed: reading global remote permission settings: Get "https://aicode.googleapis.com/v1alpha/remote:getPermissionSettings": context deadline exceeded
      W1111 05:00:53.994441     226 poll.go:51] cloud summaries poll failed; keeping previous snapshot: Get "https://aicode.googleapis.com/v1alpha/remote:listConversations?pageSize=20": context deadline exceeded
      W1111 05:01:48.996393    4925 server_cloud.go:571] Listing cloud projects failed (attempt 1), retrying in 1s: Get "https://aicode.googleapis.com/v1alpha/remote:listProjects": context deadline exceeded
      
    • Antigravity App: Cloud projects fail to load in the sidebar, and creating a remote project fails with toast Failed to save project: Post "https://aicode.googleapis.com/v1alpha/remote:createProject": context deadline exceeded.
  3. tcpdump reveals that for remote:* calls, the client resolves prod-blue-layer1-no-cloudpath-wd.l.google.com (172.253.120.126) and sends TCP SYN packets directly to 172.253.120.126:8888 — combining the resolved remote Google server IP with the local proxy port (8888):
    05:38:38.559666 lo   In  IP 127.0.0.53.52029 > 127.0.0.53.53: 27057+ A? prod-blue-layer1-no-cloudpath-wd.l.google.com. (63)
    05:38:38.564259 lo   In  IP 127.0.0.53.53 > 127.0.0.53.52029: 27057* 1/0/0 A 172.253.120.126 (79)
    05:38:38.564758 eth0 Out IP 192.168.50.102.53580 > 172.253.120.126.8888: Flags [S], seq 489986194, length 0
    05:38:38.564892 eth0 Out IP 192.168.50.102.53590 > 172.253.120.126.8888: Flags [S], seq 2396761513, length 0
    05:38:38.565067 eth0 Out IP 192.168.50.102.53600 > 172.253.120.126.8888: Flags [S], seq 2626625963, length 0
    05:38:39.579832 eth0 Out IP 192.168.50.102.53590 > 172.253.120.126.8888: Flags [S], seq 2396761513, length 0
    

Expected Behavior

aicode.googleapis.com/v1alpha/remote:* transport should connect to the configured proxy address (127.0.0.1:8888), matching :fetchConfig.

Hi @Luke_Lyu,

Welcome to the Forum.

Thank you for the super clear mitmdump and tcpdump capture isolating aicode.googleapis.com/v1alpha/remote:* dialing <resolved_google_ip>:<proxy_port>.

Since your test was on CLI 1.5.3 / App 2.31.0, could you check whether this still reproduces on Antigravity CLI v1.5.11 (agy update) and Antigravity App v2.33.0?

In the meantime, two workarounds avoid the HTTPS_PROXY port mismatch:

  • Browser UI: Access Remote Agents directly at antigravity.google.com, which uses your browser’s standard proxy transport.
  • Transparent TUN routing: If your proxy client supports TUN mode (leaving HTTPS_PROXY / HTTP_PROXY unset so outbound traffic stays on port 443), remote:* calls connect normally.

Let us know if CLI v1.5.11 / App v2.33.0 still dials <google_ip>:<proxy_port>.

Hi @Rebbanpalli_Naveen, thanks for following up!

I tested on Antigravity CLI v1.5.11 and Antigravity App v2.32.2 (haven’t received the v2.33.0 rollout yet), and I can confirm the issue is fixed.

With HTTPS_PROXY / HTTP_PROXY set, remote:* requests now route cleanly through the proxy and Remote Agents / Cloud Projects load normally (and TUN mode works well too).