Antigravity Bug Report: IDE Wizard Migration Failure on Update

Antigravity Bug Report: IDE Wizard Migration Failure on Update

Issue Summary

When the Antigravity application attempts to auto-update in the background (e.g., to version 2.0.1), the [IDE Wizard] attempts to copy user data from ~/.gemini/antigravity to ~/.gemini/antigravity-ide. This process crashes if a symlink for mcp_config.json already exists in the destination folder, causing a fatal EEXIST error.

Because the migration wizard aborts mid-way, the application is left in a broken state, preventing the user from opening existing projects.

Environment details

  • OS: macOS (darwin-arm64)
  • App Version: Updating to 2.0.1

Steps to Reproduce

  1. Have an existing installation of Antigravity (e.g., v2.0.0) with user data in ~/.gemini/config/.
  2. Ensure a symlink for mcp_config.json is present in a target backup/ide directory.
  3. Trigger the auto-updater to download a new version (e.g., 2.0.1).
  4. The IDE Wizard will attempt to copy user data to ~/.gemini/antigravity-ide.
  5. The process will crash, and the user will be unable to open existing projects.

Error Logs

From main.log:

[2026-05-20 09:32:00.164] [info]  [IDE Wizard] All conditions met — will show wizard.
[2026-05-20 09:32:27.501] [info]  [IDE Wizard] Copied user data: /Users/andlibsaif/.gemini/antigravity → /Users/andlibsaif/.gemini/antigravity-ide
[2026-05-20 09:33:19.707] [info]  [IDE Wizard] Background download requested. Starting installation in background...
[2026-05-20 09:33:46.435] [info]  [IDE Wizard] Installing IDE to /Applications/Antigravity IDE.app…
[2026-05-20 09:33:56.090] [info]  [IDE Wizard] Copying user data…
[2026-05-20 09:33:56.104] [error] [IDE Wizard] Background download/install failed: Error: EEXIST: file already exists, symlink '/Users/andlibsaif/.gemini/config/mcp_config.json' -> '/Users/andlibsaif/.gemini/antigravity-ide/mcp_config.json'

Proposed Fix

The IDE Wizard’s file copying logic (fs.copy or similar) should pass a flag to gracefully overwrite existing files/symlinks in the destination directory (e.g., using force: true or unlinking the destination before copying) to prevent EEXIST errors from halting the entire migration pipeline.

The initial endeavor proved unfruitful, necessitating a pursuit of alternative methods.

Antigravity IDE Version: 2.0.1
VSCode OSS Version: 1.107.0
Commit: bf9a033f33934fb4496d7eebed52486272437c3a
Date: 2026-05-19T04:56:43.093Z
Electron: 39.2.3
Chromium: 142.0.7444.175
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Darwin arm64 25.4.0
Language Server CL: 917586812

Bug & Fix Report: Antigravity IDE Wizard Migration Failure & UI Access Restore

1. Issue Summary

During the update of Antigravity to version 2.0.1, a critical failure occurred in the IDE migration wizard. The update process is designed to migrate user data and split the application into a launcher (Antigravity Hub) and the full IDE (Antigravity IDE).

However, two major bugs prevented this migration from completing:

  1. The Symlink Race Condition (EEXIST): The language server and the Electron GUI both attempted to migrate and establish symlinks for mcp_config.json at the same time. The language server created the file first, causing the Electron installer to fail with EEXIST (file already exists) and abort.
  2. Circular Symlink Loop (too many levels of symbolic links): After the initial failure, the configuration state was left corrupted, with ~/.gemini/config/mcp_config.json pointing to itself/~/.gemini/antigravity/mcp_config.json in a circular loop. This caused the language server to throw errors and disabled the File Explorer and Terminal inside the UI.

Additionally, the Electron app marked ide-install-wizard-shown as true in its local settings despite the failure, leaving the user permanently stuck with a broken Hub interface.


2. Root Cause Analysis

A. The Race Condition

When the application starts, it launches the gRPC Language Server and the Electron browser environment. Both execute migration routines:

  • Language Server (migrate.go): Checks if ~/.gemini/config/.migrated exists. If not, it attempts to migrate mcp_config.json to the shared ~/.gemini/config/ directory.
  • Electron GUI (main.js): Checks if ide-install-wizard-shown is true. If not, it attempts to copy user data to ~/.gemini/antigravity-ide and symlink /Users/andlibsaif/.gemini/config/mcp_config.json to /Users/andlibsaif/.gemini/antigravity-ide/mcp_config.json.

Because the Language Server ran faster, it created ~/.gemini/config/mcp_config.json first. When Electron attempted to create its symlink at the same path, it crashed with:

[error] [IDE Wizard] Background download/install failed: Error: EEXIST: file already exists, symlink '/Users/andlibsaif/.gemini/config/mcp_config.json' -> '/Users/andlibsaif/.gemini/antigravity-ide/mcp_config.json'

B. The Symlink Corruption

Due to the aborted installation, the symlinks for mcp_config.json were incorrectly pointed:

  • ~/.gemini/config/mcp_config.json pointed to itself.
  • ~/.gemini/antigravity/mcp_config.json pointed to ~/.gemini/config/mcp_config.json.

This resulted in:

failed to stat mcp config file: stat /Users/andlibsaif/.gemini/config/mcp_config.json: too many levels of symbolic links

Which completely blocked the loading of the user workspace and terminal elements.


3. Resolution & Fix Steps Implemented

The following steps were executed to restore the workspace and complete the migration:

Step 1: Cleaned the Corrupt Directories & Symlinks

We deleted the partially migrated, corrupted folders:

  • rm -rf /Users/andlibsaif/.gemini/antigravity-ide
  • rm -rf /Users/andlibsaif/.gemini/antigravity-backup
  • Removed all circular symlinks for mcp_config.json.

Step 2: Wrote a Clean, Valid Configuration

We replaced the circular links in the source folder (~/.gemini/antigravity/mcp_config.json) with a clean, real configuration file enabling the user’s MCP servers (such as chrome-devtools-mcp, prisma-mcp-server, sequential-thinking, etc.).

Step 3: Prevented the Race Condition

We manually created the empty marker /Users/andlibsaif/.gemini/config/.migrated. This instructed the Language Server to bypass its migration steps on boot, leaving the path clear for the Electron installer.

Step 4: Reset the Electron Installer Wizard State

We modified the Electron local settings file at /Users/andlibsaif/Library/Application Support/Antigravity/app_storage.json, resetting the installation flag:

"ide-install-wizard-shown": "false"

Step 5: Ran the Installer & Launched the IDE

After restarting, the IDE Installer Wizard successfully executed the migration from scratch without colliding. We then established the correct, non-circular symlink hierarchy:

  1. ~/.gemini/antigravity/mcp_config.json $\rightarrow$ ~/.gemini/config/mcp_config.json
  2. ~/.gemini/config/mcp_config.json $\rightarrow$ ~/.gemini/antigravity-ide/mcp_config.json (Real file)

Finally, we launched the correct binary: /Applications/Antigravity IDE.app.


4. Verification

We verified that the full IDE is now running correctly:

  1. The Antigravity IDE process is active.
  2. The internal language server is running using the correct data directory (--app_data_dir antigravity-ide).
  3. The File Explorer, Terminal, and project views are now fully functional and accessible in the user interface.