Bug Report: Spurious Multi-Root Workspace (.code-workspace) Mismatch Warning & folders[0] Git Root Catch-22

Environment

  • Product / Version: Antigravity IDE 1.107.0 (IDE Core 1.23.2, Extension google.antigravity 0.2.0) / Antigravity IDE 2.5.5
  • OS / Platform: Linux x86_64 (Ubuntu 26.04 LTS)
  • Install Method: Antigravity IDE / VS Code Extension (google.antigravity)

Description

In a multi-root workspace (.code-workspace), if folders[0] is configured as the primary codebase / Git repository and a subsequent folder (e.g., folders[1]) is the workspace root / documentation & artifacts directory where the AI conversation was initialized, the IDE permanently displays a spurious warning:

“This conversation’s workspace does not match the IDE workspace.”

Attempting to eliminate this warning by moving the workspace root to folders[0] triggers a critical regression: Antigravity stops recognizing the Git repository root on the codebase (folders[1]), downgrades the actual source directory to an “external file” path, and begins prompting for manual permission on every minor edit.

Steps to Reproduce

  1. Create a multi-root .code-workspace configuration where:
    • folders[0] points to a Git repository (e.g., path: "../../../../src/project").
    • folders[1] points to the workspace root directory containing the .code-workspace file and project metadata/artifacts (e.g., path: ".").
  2. Open the workspace via File -> Open Workspace from File....
  3. Open or resume an AI conversation anchored to the workspace root (folders[1]).
  4. Observe the warning banner in the chat panel: “This conversation’s workspace does not match the IDE workspace.”
  5. Invert the folder order in .code-workspace so . is folders[0] to appease the warning banner.
  6. Attempt to have the agent edit a file or inspect Git status in the codebase folder (folders[1]).

Expected Behavior

  1. The workspace validator should perform a set-containment check across all configured workspace folders (vscode.workspace.workspaceFolders.some(...) or check against vscode.workspace.workspaceFile), rather than a strict === equality check against workspaceFolders[0].
  2. Any directory defined within the folders array of an active .code-workspace should be treated as a first-class, matching workspace member without showing mismatch warnings or losing Git root permissions.

Actual Behavior

  • With folders[0] set to the Git repo: The agent can work, but a persistent and misleading “workspace does not match” warning is shown.
  • With folders[0] set to the workspace root: The warning disappears, but the actual codebase is treated as “external”, losing Git root status and causing constant permission prompts for each file change.

Root Cause & Additional Context

This Catch-22 severely degrades developer experience for users with multi-root .code-workspace setups who keep long-term artifacts outside their Git repository. The frontend session validator appears to naively compare conversation.workspaceUri === activeWindow.primaryWorkspaceFolder.uri, while the backend sandbox/Git service (LsClient) only grants first-class workspace/Git permissions to workspaceFolders[0].

(Originally reported at Spurious Multi-Root Workspace Mismatch Warning · Issue #204 · google-antigravity/antigravity-sdk-python · GitHub due to broken IDE issue-reporting links—see companion report on broken reporting channels).

Hi @penguian,

Could you please upgrade to the Latest Antigravity IDE version v2.6.0. And let me know is the issue resolves or the issue still persists after upgraded to the latest version?