Repository navigation
fix(antigravity): read the hub daemon descriptor for the local language server - #141
Merged
Merged
Conversation
…ge server Antigravity 2.34+ no longer passes --csrf_token on the language server's command line. The hub daemon writes its pid, ports and token to ~/.gemini/antigravity/daemon/hub_<port>.json instead, so local discovery found no token and every account silently fell back to the cloud endpoint, losing pools only the running app reports. Read those descriptors first, only for a daemon that is still running, and send the token only to loopback ports that process owns, trying the descriptor's httpsPort first. The command-line path stays for older builds. An account already answered by one server (the app and the agy CLI hub can share one) is not summarized again. Closes #140 Signed-off-by: Bernardo Pinto Gomes <[email protected]>
This was referenced Nov 24, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #140.
Problem
Antigravity 2.34+ runs its language server as a hub daemon and no longer passes
--csrf_tokenon the command line. The token, pid and ports are written to~/.gemini/antigravity/daemon/hub_<httpPort>.json. Local discovery found no token, so every account silently fell back to the cloud endpoint and lost pools only the running app reports.Fix
hub_*.jsondescriptors first (ANTIGRAVITY_DAEMON_DIRoverrides the directory). A descriptor is used only when it is a regular file owned by the user and its pid is still running, so stale descriptors from crashed daemons are ignored.httpsPortfirst. A descriptor naming a port another process owns never receives the token.--csrf_tokencommand-line path for older builds.agyCLI hub are signed in to the same account, summarize that account once.Verification
Antigravity app (local language server)(onmain:IDE session OAuth (refreshed)). The other account keeps its cloud numbers, andaccountErrorsis empty. A stalehub_*.jsonfrom a dead 2.29.0 daemon was skipped.tests/test-cov-b-antigravity.shadds descriptor cases: stale pid, preferred port order, a foreign port, a daemon with no listener, deduplication with theagyhub, and no token in argv or output. The new cases fail onmainand pass here.check-metadata,check-changelog,check-dco, shellcheck, the fulltests/test-*.shsuite, gitleaks andgit diff --check. Every new statement is covered by kcov.