Bug Report: Language Server crashes (500 Error) when encountering Git worktreeConfig extension
Description When opening a workspace containing a Git repository with extensions.worktreeConfig = true and core.repositoryformatversion = 1, the Antigravity Language Server fails to initialize its core data fetching mechanisms (GetAllRules and GetAllWorkflows). This results in silent environment failures and repeated 500 errors in the extension host console.
Error Logs (workbench.desktop.main.js)
text
POST https://127.0.0.1:53581/exa.language_server_pb.LanguageServerService/GetAllRules 500 (Internal Server Error)
POST https://127.0.0.1:53581/exa.language_server_pb.LanguageServerService/GetAllWorkflows 500 (Internal Server Error)
ERR [unknown] core.repositoryformatversion does not support extension: worktreeconfig: ConnectError: [unknown] core.repositoryformatversion does not support extension: worktreeconfig
Root Cause Analysis The underlying issue stems from a strict compliance check in the Language Server’s internal Git parsing library (likely isomorphic-git or similar).
To support worktreeConfig natively, Git requires core.repositoryformatversion to be set to 1.
When the internal Git library reads repositoryformatversion = 1, it strictly checks the [extensions] block.
Because the internal library does not natively recognize or support the worktreeConfig extension, it follows the Git spec by fatally aborting, assuming it cannot safely interact with the repository.
This fatal abort propagates up and crashes the Language Server’s ability to fetch rules and workflows.
Current Workaround The only way to recover the Language Server is to manually remove the extension from the repository config by running: git config --local --unset extensions.worktreeConfig After unsetting it, a window reload (Cmd + R) brings the Language Server back to life.
Suggested Fix The Antigravity Language Server’s internal Git implementation needs to be updated to gracefully handle or safely ignore the worktreeConfig extension (and potentially other non-critical Git extensions) without throwing a fatal crash during workspace initialization.