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

**URL:** <https://discuss.ai.google.dev/t/bug-report-spurious-multi-root-workspace-code-workspace-mismatch-warning-folders-0-git-root-catch-22/191479>\
**Category:** Google Antigravity\
**Tags:** bug, gemini\
**Created:** [October 22, 2026, 6:42am UTC](https://discuss.ai.google.dev/t/bug-report-spurious-multi-root-workspace-code-workspace-mismatch-warning-folders-0-git-root-catch-22/191479 "2026-10-22T06:42:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![penguian](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/penguian/32/161321_2.png) [@penguian](https://discuss.ai.google.dev/u/penguian)\
**Post date:** [October 22, 2026, 6:42am UTC](https://discuss.ai.google.dev/t/bug-report-spurious-multi-root-workspace-code-workspace-mismatch-warning-folders-0-git-root-catch-22/191479/1 "2026-10-22T06:42:24Z")

</div>

## 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](https://github.com/google-antigravity/antigravity-sdk-python/issues/204) due to broken IDE issue-reporting links—see companion report on broken reporting channels)._

---

<div class="post-metadata">

**Author:** ![Ambati\_Rajendra](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/ambati_rajendra/32/31584_2.png) [@Ambati\_Rajendra](https://discuss.ai.google.dev/u/Ambati_Rajendra)\
**Post date:** [October 28, 2026, 2:15pm UTC](https://discuss.ai.google.dev/t/bug-report-spurious-multi-root-workspace-code-workspace-mismatch-warning-folders-0-git-root-catch-22/191479/2 "2026-10-28T14:15:49Z")

</div>

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?
