You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(antigravity): run every Antigravity chat on agy and retire Orca's own server - #45588
Superseded by option B (keep the server); see PR B (#46125) and the server bump (#46101).
Do not merge yet. The one remaining gate is the user's own browser sign-in with Google personal and with Gemini Enterprise through agy (steps under "Proof needed before merge"). Everything else has been reviewed and verified; what is left below is known limits, not open proofs.
ELI5
Orca used to have two programs for Antigravity chats: the real agy, and an old copy of Google's server (1.5.0) with its own Google sign-in run by Orca. Now agy runs every Antigravity chat, the old server is deleted, and Orca no longer signs you in to Google itself:
Google account or Gemini Enterprise: you sign in once in agy, the same way you would in a terminal.
Gemini API key or gcloud: these still work. Orca hands them to agy, kept apart from your own agy setup.
Your old chats keep their history: agy opens the old server's conversations where they already are.
Orca's Google sign-in: the browser link capture, pasting the callback address, its token handling (the old token files stay on disk, unused), and the sign-in methods and their capabilities;
everything only the server needed: proxy workaround, private temp folders, run_workflow switch-off, the client-name workaround, Orca's own rules injection.
Two homes, both agy, chosen per new chat from the saved sign-in method:
Google (personal or Enterprise): agy's own home (~/.gemini) and agy's own login.
API key or gcloud: Orca's chat home, launched as agy acp --gemini-dir <userData>/antigravity-chat --app-data-dir antigravity-acp. Orca writes the method into that home's settings.json and passes the key or gcloud project through the environment, as before.
Chats the old server started stay in Orca's chat home and resume there.
Old Google chats in Orca's chat home use agy's login. Where agy keeps its login in a file (Linux without a keyring, SSH, containers, Windows over SSH), agy run with --gemini-dir looks for it inside Orca's chat home. So for the Google method Orca puts a private copy of ~/.gemini/antigravity-cli/antigravity-oauth-token there at every chat start:
a copy, not a link: agy 1.5.13 refreshes the token in place (open(O_WRONLY|O_CREAT|O_TRUNC), no rename), so through a link a running chat would write its login back into ~/.gemini, undoing a terminal logout or an account switch. With the copy, a chat's refresh lands only in Orca's chat home (shown with a real refresh, below);
mode 0600, written under a unique temp name and renamed in (stale temp files are swept); replaced whenever agy's login differs, so an account switch reaches old chats. An empty or unparseable agy file (mid-rewrite) is skipped, never copied;
kept in line at every chat start, once at launch, on an account switch or removal in Settings, and on a method change;
removed when agy has no login file (signed out), and for a key or gcloud method, which must not find one; nothing is kept aside. An earlier build's link is replaced, never written through;
switching or removing the agy account in Settings now also restarts idle Orca-home chats on the Google method (as for agy's own home), so they pick up the change at their next send. Busy ones keep their turn.
On macOS the keychain item belongs to the OS user, so both homes share it anyway; keyring hosts have no login file.
Install always provides agy. Each agent has one installation again; an older client's program is ignored.
API-key setups of your own agy now work. An agy whose own settings choose an API-key provider gets working chats: launches keep GEMINI_API_KEY. Before, Orca removed the key and sent such machines to the server.
A key or gcloud chat never quietly uses another account. agy's changelog says a method without its credential falls back to the saved login. So Orca refuses such a launch itself:
"Antigravity isn't signed in. Sign in under Settings → Accounts → Antigravity", plus the reason ("No Gemini API key is saved…" or "No gcloud login was found. Run gcloud auth application-default login…");
Sign in… opens Settings, never the agy terminal; a detected key or gcloud login is still offered under the error.
No fallback to the Google login, even with a working Google login present (Linux, agy 1.5.13, a refreshable Google login in place through a local test proxy that answered Google's token endpoint): a rejected API key failed the turn with agy's 401 and never opened the Google login file; a gcloud login with an invalid refresh token answered "Authentication required" and never opened it either; the Google method, as a control, refreshed and used that login. On macOS (file store, empty home) agy's log shows the same: key mode and adc mode, no keyring or login-file use.
Key and gcloud chats made no keyring calls on Linux with a bad, missing or present credential, so they never raise a keyring unlock prompt there. agy has no switch to force a method (checked: AGY_ADC_AUTH, modelProvider, the 1.5.13 strings); the behaviour above is agy's, by mode.
Model lists in Orca's chat home write the same settings a chat does first, so the list right after switching method matches the method.
agy 1.5.5 or newer. 1.5.5 is the oldest build shown to read Orca's chat home and to ignore an inherited GEMINI_API_KEY/GOOGLE_API_KEY (see Verification). An own agy older than that is passed over for Orca's installed copy when the kill switch allows it: at chat admission, launch, command discovery, model listing, Settings' sign-in check, and in what Settings and the chat chip name ("Orca's agy · v1.5.13"). A copy that is missing or itself too old is never used. With no copy installed, Settings reads "Install agy below to use Chat" and offers Install, which fixes it. The version is read once per binary, without holding the first status read; a read that settles nothing (timeout, blocked) is retried after a minute. With the kill switch off it gets the existing "update agy" message.
Errors: agy's "agent executor error" line (for example a rejected API key) now fails the turn instead of showing up as the answer.
Settings:
"Sign in with" offers three choices: agy's Google sign-in, Gemini API key, Google Agent Platform (gcloud).
When agy isn't signed in, Settings has the chat's own Sign in. It runs agy in a terminal of the open workspace, on this computer or on a remote host when the open workspace is on that host; otherwise the text says "Run agy on this host to sign in". Settings re-reads after a method change, and once 8 s after agy is found unanswered (re-renders don't cancel it, it arms again after a later unanswered read such as an account switch, a busy Settings retries a second later, and the re-read leaves a shown Usage reading or error in place), so a slow first answer shows without Refresh.
"No key yet" under the key field when there is none.
With the kill switch off and only Orca's agy, it says "Orca's agy is switched off here. Install agy yourself to use Chat." and shows no Install. The install RPC refuses too.
An older host is recognised by a missing capability, accounts.antigravity-agy-chats.v1, which hosts on this version advertise; not by what it is installing. Settings then shows only "Update Orca on this host so its chats run on agy. Until then, its Antigravity sign-in is only in an Orca as old as the host." — no form, so this client never rewrites that host's saved choice. The chat chip shows nothing for such a host.
A saved Gemini Enterprise choice now reads as agy's Google sign-in. The method chip and recovery offers follow these choices.
Clean-up at launch (in the background, 30 s after start):
keeps the old server's releases and Orca's saved Google tokens (acp_token.json, acp_business_token.json), so going back to an older Orca still works. They can be removed in a later release, once Google sign-in through agy has been proven;
keeps the conversations.
Rules:
agy reads workspace AGENTS.md/GEMINI.md itself, so Orca's copy of those rules is gone;
~/.gemini/GEMINI.md is copied into Orca's chat home, where agy reads user rules.
In Orca's chat home, agy follows the auth.type Orca writes:
a key turns on API-key mode;
gcloud works with ADC;
agy reads the old server's conversations in place.
Nothing is ever written into ~/.gemini; the Google method only copies agy's login file into Orca's chat home.
Rejected
1: in its own home agy ignores GEMINI_API_KEY unless its own settings choose an API-key provider, and a signed-in agy uses its login before gcloud. Making either work would mean editing the user's ~/.gemini/antigravity-cli/settings.json.
Keeping Orca's removal of GEMINI_API_KEY for agy's own home (feat(antigravity): run Chat on the host's agy acp when compatible #39006): agy 1.5.5 and 1.5.13 ignore an inherited key unless agy's own settings choose a key provider (tested with a real key plus gcloud: gcloud was used; key alone: "Authentication required"). Removing it only broke people who set agy up for a key.
Copying old conversations into agy's store: that means merging agy's summaries index and writing into the user's home, for no gain. agy already reads them where they are.
Migration and rollout
Saved methods:
gcloud and API key carry over unchanged;
nothing saved, or Google, reads as agy's Google sign-in;
Gemini Enterprise reads as agy's Google sign-in, and a re-save stores it that way.
Someone whose only login was Orca's own Google token sees "isn't signed in" with Sign in on their first send. On an old chat in Orca's chat home, Sign in… opens Settings, whose Sign in runs agy; that login then reaches the old chat (shared keychain, or the copy above, taken at the next chat start). One path, never a dead end. The old token stays on disk for rollback.
Until the browser sign-in proof exists these are "Refs".
Visual Proof
Real dev Orca (ORCA_BACKGROUND_LAUNCH=1, throwaway profiles; the fresh-computer runs use an empty home and no agy on PATH).
A chat on the old server (1.5.0, built from the previous main), told a secret word:
The same profile on this branch: the chat kept its history and, on agy in Orca's chat home, still answers with the word (asked three times across builds):
A new key chat with no key: refused with the reason, and Sign in… opens Settings:
Right after switching that bot to gcloud, Try again: it answers, and Orchestrator is in the model list:
A rejected Gemini API key fails the turn, with an offer to switch:
A fresh computer: Install agy, then a new bot reports "isn't signed in" with Sign in:
The same in Settings, with the same Sign in; pressing it opens a terminal running Orca's agy (stopped at agy's folder-trust prompt, no login done):
A saved Gemini Enterprise choice after the upgrade:
An old-server chat on the Google method, on a computer with no agy login, where agy uses a login file (empty home, SSH_CONNECTION set). Launch kept the server release and both tokens and removed only the temp and sign-in folders. The chat home got settings.json{} (this round-3 build linked agy's login file; it is now copied). The send answers "isn't signed in" with Sign in…:
Sign in… lands in Settings, which says agy isn't signed in and has Sign in (runs agy). No loop:
Kill switch off, nothing installed: no Install row, and the install RPC answers "Orca's copy of Antigravity is switched off here. Install it yourself.":
An own agy that reports 1.5.4 on PATH, with Orca's 1.5.13 installed: a new bot's chat is admitted and runs on Orca's copy. agy answers "Authentication required" (no login in this home); before the fix the bot got no chat at all. (This screenshot predates the label fix; see the next two.)
Now Settings checks Orca's copy, offers Sign in, and names the runtime "Installed by Orca · 1.5.13"; the chat chip reads "Orca's agy · v1.5.13":
The same old Google chat on this head, with a (fake) agy login file in the empty home: the send replaced round 4's link with a 0600 copy and left agy's own file byte-identical; after deleting agy's login file ("logout"), the next send removed the copy and nothing recreated agy's file. The chat answers "isn't signed in" since the login is fake:
An own agy reporting 1.5.4 and no Orca copy installed: Settings offers Install (after which chats run on Orca's agy):
Verification
Gates: pnpm check:changed --related at head 2bed6f5 (on main 76c039e): 42 of 43 checks pass; the one failure is worktree-rm-cli.integration.test.ts, which fails only inside the ~1,700-file related run and passes with its folder (9/9). check-main-blocking-helper-ratchet.mjs OK (6157), pnpm check:main-sync-fs-ratchet OK (2004).
with no session bus agy uses a login file; run with --gemini-dir <home> --app-data-dir antigravity-acp and the Google method it opens <home>/antigravity-acp/antigravity-oauth-token; in its own home it opens ~/.gemini/antigravity-cli/antigravity-oauth-token;
with agy's login placed there (round 3 used a link; this head copies it) agy logs "loaded token … authenticated via keyring";
with a session bus, key mode (auth.type or modelProvider) and gcloud (good, bad or no ADC) make zero Secret Service calls; the Google method calls Unlock/Get;
a bad gcloud login and a missing key answer "Authentication required", with no keyring call and no login-file read (no fallback);
Refresh write and fallback, Linux, agy 1.5.13, with a local proxy that answered Google's token endpoint (test CA via SSL_CERT_FILE, throwaway home):
Google method with an expired access token, through a link (round 4): agy refreshed it and wrote the new token with open(O_WRONLY|O_CREAT|O_TRUNC) on the link path, i.e. into agy's own file — which is why this head copies instead;
the same with Orca's 0600 copy (this head): the refreshed token landed in the copy (mode kept), and agy's own file stayed byte-identical (sha256 checked);
same login present, key method with a rejected key: the turn failed with the key's 401; the login file was never opened and no Google refresh was made;
same login present, gcloud with an invalid refresh token: the gcloud refresh failed and agy answered "Authentication required"; no Google refresh, no login-file open.
the new chat's home per saved method, including an older Enterprise value;
--gemini-dir/--app-data-dir only for Orca's chat home;
keys kept for agy's own settings;
launch clean-up removes the server leftovers and keeps the conversations;
listing sessions removed from Orca's chat home;
agy 1.5.13's executor-error line fails the turn;
menu items for an older Enterprise value;
install RPC stream, cancel and remove for Orca's copy;
the account files per method, and refusing a key or gcloud chat without its credential;
Settings' agy check: no login found → only the initialize check, started only when someone is using it;
the kill switch for both homes;
the /tmp clean-up only under a private folder this user owns;
the Settings form (method switch, key save and remove, environment key, gcloud project, an older Enterprise value) and its descriptions (older host, kill switch off).
agy 1.5.5 (Google's own build, signed by Google): acp --help has --gemini-dir/--app-data-dir; on a copy of an old Orca chat home it listed the old server's conversations and resumed one with its context on gcloud. With a real key in GEMINI_API_KEY or GOOGLE_API_KEY plus gcloud, agy's own home used gcloud; with only the key it answered "Authentication required". The same on 1.5.13. No build older than 1.5.5 could be obtained (the bucket can't be listed), hence the 1.5.5 floor.
Missing credentials (1.5.13): key method with no key, or gcloud with no ADC, answers "Authentication required". With a key method and no key it does not try gcloud; agy's changelog says it falls back to a saved login instead, which Orca now prevents by refusing first.
Protocol runs against agy 1.5.13 (on copies in a temp folder, AGY_CLI_DISABLE_AUTO_UPDATE=true):
Orca's chat home lists and resumes the old server's conversations;
auth.type gemini-api-key switches agy to key mode, and an invalid key gives "API key not valid";
in its own home agy ignores GEMINI_API_KEY without modelProvider, and works with it once modelProvider is set;
agy reads workspace AGENTS.md and <gemini-dir>/GEMINI.md;
deleting a session's files removes it from session/list;
the chat folder stays empty after prompts.
Real app, before and after rebasing on main, all with screenshots above:
an old-server chat migrated and resumed with context;
gcloud end to end with Orchestrator, and a new gcloud bot replied;
the invalid-key failure;
fresh computer: Install, then Sign in;
Enterprise migration;
round 3: the old Google chat with its link and the Settings Sign in; kill switch off; a too-old own agy falling back to Orca's copy. Settings on a fresh home showed "isn't signed in" with Sign in 2 s after opening, without Refresh;
round 4: with a too-old own agy, Settings checks Orca's copy and names it, and the chip reads "Orca's agy · v1.5.13";
round 5: the old Google chat's link replaced by a 0600 copy with agy's file untouched, and the copy removed after agy's login file was deleted, with nothing recreating it; with an own agy reporting 1.5.4 and no copy installed, Settings read "Install agy below to use Chat" with Install, and after Install "Chats run on Orca's agy (v1.5.13)".
With the kill switch off and only Orca's agy installed, a new bot got no chat; its Home opened a terminal.
Proof needed before merge
The only remaining gate: Google personal and Gemini Enterprise sign-in through agy in a real browser, done by the user with the steps below. Nothing else blocks merging.
Known limits (not merge gates)
Covered by experiments or unit tests rather than a live run, or limits by design:
Real remote hosts (SSH, WSL, Windows over SSH) with a real Google login. The login-file location and the private copy were shown in a Linux container with a local test proxy; remote and mixed-version behaviour is covered by unit tests (capability, description). If the copy ever fails, the old chat says "isn't signed in" and Settings' Sign in is one click away; the old server token stays on disk for rollback.
A valid API key in the real app: shown at protocol level (a real key answered "pong" in Orca's chat home and in agy's own home with modelProvider); the real app showed the invalid-key and missing-key paths.
macOS with a real keychain Google login and a broken key or gcloud login: on Linux no fallback happened even with a working Google login present; on macOS agy's log showed the same modes with no keyring or login-file use.
By choice:
chats on agy's own home get no "use your key/gcloud instead" offer under a failure, since switching can't fix that chat (the chip still lists detected methods);
chats in Orca's chat home are not auto-named (agy keeps every session);
an older Enterprise project/location is not shown anywhere (agy asks for it in its own settings if needed);
Settings' Sign in needs an open workspace on the host Settings shows; otherwise it says to run agy there;
an older host whose server chat is signed out can be signed in only from an Orca as old as that host; the text says to update the host;
a logout or account switch done in a terminal can't be seen by Orca while a chat runs: that chat keeps its login until its next start (it can no longer write it back into ~/.gemini). Orca brings its chat home's copy of agy's login in line at launch, on an account switch or removal in Settings, on a method change, and at every chat start, and drops it when agy is signed out.
Steps to prove Google and Enterprise sign-in (browser)
Use a computer or account where agy is not signed in yet. Otherwise this signs in your real agy, which is agy's own login, the thing #45337 asks for.
Check out this branch, run node config/scripts/workspace-package-build/build-workspace-packages.mjs, then ORCA_DEV_USER_DATA_PATH=/tmp/agy-gproof pnpm dev.
Open Settings › AI Provider Accounts › Antigravity Chat and check that "Sign in with" is agy's Google sign-in. If Runtime says Not installed, press Install.
Create a bot with Antigravity as its agent. The setup card says "Antigravity isn't signed in". Press Sign in; a terminal opens running agy.
In that terminal, sign in:
personal: "Log in with Google";
Enterprise: "Log in with Gemini Enterprise". If agy says no license was found, set gcp.project and gcp.location in ~/.gemini/antigravity-cli/settings.json as agy describes.
Finish in the browser, then quit agy.
In the bot card press Try again. Expected: the bot's first message, and the chip under the composer reads "Your agy · v…" or "Orca's agy · v…".
Enterprise: open the model picker and check that Orchestrator is listed.
If you have an Orca profile from before this change with Google chats: open one, send a message, and expect a reply that remembers the conversation. On an SSH or WSL host, note whether it stays signed out.
…s own server
agy is now the only program Antigravity chats run. Google personal and
Enterprise use agy's own login in agy's home; a Gemini API key or gcloud
saved in Orca runs agy on Orca's chat home (--gemini-dir/--app-data-dir),
where the old server's chats resume in place.
- Delete the pinned agy_acp_server, its install path, Orca's captured Google
sign-in (RPCs, browser helper, token files) and the server-only launch
branches (proxy env, private temp, run_workflow, client-name hack).
- Route: saved key/gcloud -> Orca's home, otherwise agy's home. Install always
provides agy; one installation per agent again.
- agy launches keep GEMINI_API_KEY, so an agy whose own settings pick an
API-key provider works.
- agy's "agent executor error" notice fails the turn.
- Older Gemini Enterprise choices read as agy's Google sign-in.
- At launch, remove the old server's releases, Orca's Google tokens and its
temp folders; conversations stay.
- Hosts stop advertising the Orca sign-in capabilities.
…l; prepare listings; prove the agy floor
- A launch on Orca's chat home with a key or gcloud method but no key or ADC
file is refused as not signed in to Orca's settings, so agy never falls
back to its own Google login for it; such chats point at Settings.
- Model listings on Orca's chat home write the same settings.json a chat does.
- agy 1.5.5 is the floor: the oldest build shown to read Orca's chat home and
to ignore an inherited GEMINI_API_KEY/GOOGLE_API_KEY without a key provider.
- The /tmp temp folder is removed only under a parent this user owns privately.
- Drop the unused managedRuntime contract field and the server-era auth test.
…sts, and says when Orca's agy is off
- Sign in in Settings runs agy in a terminal, as the chat's button does, and
the status re-reads after a method change.
- An older host still on Orca's server gets only "Update Orca on this host".
- Orca's agy switched off says so instead of naming it as the program.
- No-key hint, detection refresh after a key save, a missing key's offer of a
detected method, and tests for the form and the descriptions.
…ile login into Orca's chat home
- Only the server's temp folders are removed, 30s after launch; its releases
and Orca's saved Google tokens stay, so an older Orca still finds them.
- Where agy keeps its login in a file, it reads <home>/antigravity-acp/
antigravity-oauth-token on Orca's chat home (strace, agy 1.5.13 Linux);
Google chats there now link agy's own login file, so signing agy in serves
the chats the old server started.
- A sign-in failure on Orca's chat home names the fix for each method.
- An own agy older than the floor gives way to Orca's copy, where it may run;
Install of a copy that is switched off is refused.
- Hosts advertise accounts.antigravity-agy-chats.v1.
No actionable comments were generated in the recent review.
Walkthrough
The change replaces the Antigravity managed ACP server and chat sign-in flow with separate agy acp launch configurations for agy’s own home and Orca’s chat home. It adds auth-config validation, credential preparation, login-copy synchronization, and revised account settings. ACP launch checks can select a managed copy when the requested program is too old. Managed-runtime operations now track one CLI installation per agent. The renderer removes chat sign-in controls and updates authentication forms, descriptions, and translations.
Merge Risk: Moderate · up to 2bed6
This change moves all Antigravity chats onto agy. Several open issues remain. The login copy can briefly hold an older or unsafe state. A missing managed-copy policy may block the fallback to Orca's copy when the host agy is too old. Cached installation status can go stale after a settings change. These mostly affect edge cases around sign-in and runtime selection, but the login-copy races and the symlink case touch credentials and should be resolved before merge.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "feat(antigravity): run every Antigravity chat on agy and retire Orca's own server" matches the main change in the changeset. The raw summary shows Antigravity chats now launch through agy f…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The description follows the repository template closely. It has all required sections: ELI5, What Changed, Why (a Design decision section with options, choice, and rejected alternatives), Linked Issue…
Full details: Title check
Explanation
The title "feat(antigravity): run every Antigravity chat on agy and retire Orca's own server" matches the main change in the changeset. The raw summary shows Antigravity chats now launch through agy for every chat, the Orca-run Antigravity server and its runtime pin and Google sign-in flow are removed, and chat homes are split by saved sign-in method. The title is concise, single-sentence, and specific enough for a teammate scanning history. It uses a conventional type prefix, which is acceptable.
Full details: Description check
Explanation
The description follows the repository template closely. It has all required sections: ELI5, What Changed, Why (a Design decision section with options, choice, and rejected alternatives), Linked Issue (Refs/Follows references only, with no 'Fixes #' issue link), Visual Proof (many screenshots, before and after), Testing (verification notes, though the template checkboxes are not ticked), Risk (Level is not set; the risk section names the riskiest parts but has no explicit level), and AI Disclosure (left blank, which is allowed for internal contributors). Two gaps remain. First, the Linked Issue section does not contain an actual 'Fixes #' link; it only has 'Refs' and 'Follows' references, and the template says outside contributors must link an actual issue. Second, the Risk section lacks an explicit 'Level: Low/Medium/High' value. The Review, Agent skill upstream boundary, and Checklist sections were not ticked. The description is also explicitly marked 'Do not merge yet' and contains a clear remaining merge gate, which is useful information. Overall the description is mostly complete, so the check passes.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Files skipped from review as they are similar to previous changes: 1
src/renderer/src/i18n/locales/en.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
All four tests check timer behavior through callback counts or callback absence. They do not check an Accounts-section outcome. Remove this suite to avoid maintaining tests that the repository rule excludes.
Based on learnings, the repository rule says: “Never test … timing, or work counts” and directs authors to delete such tests.
Source: Learnings
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: dc0c5ee3-749a-467f-9d14-d842334855ba
Commits
Reviewing files that changed from the base of the PR and between ea871c7 and 83a47bf.
Files ignored due to path filters: 1
src/shared/rpc-contract/rpc-params-catalog.generated.ts is excluded by !**/*.generated.*
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Honor the default managed-copy policy.
When managedCopyAllowed is absent, optional chaining returns undefined. This condition then rejects Orca's copy. The AcpLaunchSpec contract says an absent policy permits the copy.
Compare the result with false. This permits a compatible installed copy for an old own program and still respects explicit denial.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Read the exit verdict after folder cleanup.
If delayed close evidence arrives while rm waits or retries, connection.exited becomes true. The stored exited value stays false, so Lines 58-59 reject a successful probe despite proven exit.
Move this read after the awaited rm. A process whose exit remains unproven will still be rejected.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Do not sweep another invocation's active temporary file.
If one invocation has written its temporary file, another invocation can delete it here before the first invocation calls rename. The first invocation then logs the failure and returns. With no existing copy, its chat launch can continue without the Google login before the second invocation finishes.
Coordinate cleanup with active writers. For example, serialize the complete copy operation per chat home. Keep removal of crash leftovers, but do not treat an active writer's file as a crash leftover.
The reason will be displayed to describe this comment to others. Learn more.
Major · Data Integrity & Integration · Quick win
Remove an earlier link before preserving an unreadable source.
If the destination is an earlier build's symlink and agy is rewriting its source file, wholeLogin returns unreadable. This return leaves the symlink in place. A running chat can still write through the symlink into agy's own login, which the private-copy change must prevent.
Handle symlinks before this return. Preserve an existing regular copy during a partial rewrite, but remove an unsafe symlink and create the private copy when a complete source is available.
The reason will be displayed to describe this comment to others. Learn more.
Major · Data Integrity & Integration · Quick win
Prevent an older sync from publishing after an account or method change.
An earlier Google sync can read account A and pause before this rename. A later sync can publish account B or remove the copy for an API-key method. The earlier sync can then restore A.
restartIdleAgyChats starts synchronization without awaiting it, so these operations can overlap. The final copy can retain a signed-out account or give a concurrent legacy-chat launch the previous account.
Order synchronization per chat home, including the source read and publication. Alternatively, reject obsolete publications with a generation check. Preserve the existing sequential copy and removal behavior.
The reason will be displayed to describe this comment to others. Learn more.
Major · Functional Correctness · Quick win
Use the host platform for this filesystem test.
On Windows, passing 'linux' makes the helper create directory symbolic links instead of junctions. Node 24 treats these as distinct link types. Windows requires symbolic-link privileges or Developer Mode for unprivileged creation. (nodejs.org)
Without that permission, the helper logs the creation failure, then readlinkSync fails the test. Remove the platform override and compare resolved targets so the test also supports Windows junctions.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Stability & Availability · Quick win
Read the installed release from disk when no cached facts exist before an install starts.
factsChanged() clears the cached facts. If an install starts before any status read repopulates them, runInstall() sets previous to null. reclaimOlderThan() then keeps only the new release, and reclaimRuntimeReleases() removes the previously installed release. Running chats may still use that release. The removal runs with no fence, and reclamation has no other protection for a running release.
The required behavior is that previous names the release installed before this install, even when no facts are cached. Obtain that value from the installed-release read at the start of runInstall() before it reads the cache. Preserve the cached value when it exists so the existing previous behavior is unchanged.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Publish fresh installation facts when the managed-copy setting changes.
The stream no longer observes antigravityManagedAgyEnabled. Changing the setting publishes no revision, and status(false) reuses the cached facts while the operation phase is unchanged. The source and updatesAutomatically fields in the stream frame can therefore stay stale. For example, after Orca's managed copy is disabled while an external agent below the version floor is present, the frame can keep source: 'managed' or null instead of 'external'. The stale frame remains until the client resubscribes or the operation phase changes.
Trigger a fresh facts read, or a revision, when the managed-copy setting changes. The stream should emit that state without requiring a new subscription.
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
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.
Superseded by option B (keep the server); see PR B (#46125) and the server bump (#46101).
ELI5
Orca used to have two programs for Antigravity chats: the real
agy, and an old copy of Google's server (1.5.0) with its own Google sign-in run by Orca. Nowagyruns every Antigravity chat, the old server is deleted, and Orca no longer signs you in to Google itself:agy, the same way you would in a terminal.agy, kept apart from your ownagysetup.agyopens the old server's conversations where they already are.Follows #45333. Refs #45337, Refs #44498, Refs #43173, Refs #33188, Refs #44613.
What Changed
agy acp(yours, or Orca's copy from feat(antigravity): Install provides the real agy, like Orca's other agent CLIs #45333). Deleted:run_workflowswitch-off, the client-name workaround, Orca's own rules injection.~/.gemini) and agy's own login.agy acp --gemini-dir <userData>/antigravity-chat --app-data-dir antigravity-acp. Orca writes the method into that home'ssettings.jsonand passes the key or gcloud project through the environment, as before.--gemini-dirlooks for it inside Orca's chat home. So for the Google method Orca puts a private copy of~/.gemini/antigravity-cli/antigravity-oauth-tokenthere at every chat start:open(O_WRONLY|O_CREAT|O_TRUNC), no rename), so through a link a running chat would write its login back into~/.gemini, undoing a terminal logout or an account switch. With the copy, a chat's refresh lands only in Orca's chat home (shown with a real refresh, below);programis ignored.GEMINI_API_KEY. Before, Orca removed the key and sent such machines to the server.gcloud auth application-default login…");AGY_ADC_AUTH,modelProvider, the 1.5.13 strings); the behaviour above is agy's, by mode.GEMINI_API_KEY/GOOGLE_API_KEY(see Verification). An own agy older than that is passed over for Orca's installed copy when the kill switch allows it: at chat admission, launch, command discovery, model listing, Settings' sign-in check, and in what Settings and the chat chip name ("Orca's agy · v1.5.13"). A copy that is missing or itself too old is never used. With no copy installed, Settings reads "Install agy below to use Chat" and offers Install, which fixes it. The version is read once per binary, without holding the first status read; a read that settles nothing (timeout, blocked) is retried after a minute. With the kill switch off it gets the existing "update agy" message.agyin a terminal of the open workspace, on this computer or on a remote host when the open workspace is on that host; otherwise the text says "Run agy on this host to sign in". Settings re-reads after a method change, and once 8 s after agy is found unanswered (re-renders don't cancel it, it arms again after a later unanswered read such as an account switch, a busy Settings retries a second later, and the re-read leaves a shown Usage reading or error in place), so a slow first answer shows without Refresh.accounts.antigravity-agy-chats.v1, which hosts on this version advertise; not by what it is installing. Settings then shows only "Update Orca on this host so its chats run on agy. Until then, its Antigravity sign-in is only in an Orca as old as the host." — no form, so this client never rewrites that host's saved choice. The chat chip shows nothing for such a host.acp_token.json,acp_business_token.json), so going back to an older Orca still works. They can be removed in a later release, once Google sign-in through agy has been proven;AGENTS.md/GEMINI.mditself, so Orca's copy of those rules is gone;~/.gemini/GEMINI.mdis copied into Orca's chat home, where agy reads user rules.antigravityManagedAgyEnabled, from feat(antigravity): Install provides the real agy, like Orca's other agent CLIs #45333): off means Orca's agy is not used, not updated and not listed. Antigravity chats then need your own agy; there is no server to fall back to.Design decision
Options
agy acp --logininto Orca's home).Choice: 2.
auth.typeOrca writes:~/.gemini; the Google method only copies agy's login file into Orca's chat home.Rejected
GEMINI_API_KEYunless its own settings choose an API-key provider, and a signed-in agy uses its login before gcloud. Making either work would mean editing the user's~/.gemini/antigravity-cli/settings.json.GEMINI_API_KEYfor agy's own home (feat(antigravity): run Chat on the host's agy acp when compatible #39006): agy 1.5.5 and 1.5.13 ignore an inherited key unless agy's own settings choose a key provider (tested with a real key plus gcloud: gcloud was used; key alone: "Authentication required"). Removing it only broke people who set agy up for a key.Migration and rollout
agy; that login then reaches the old chat (shared keychain, or the copy above, taken at the next chat start). One path, never a dead end. The old token stays on disk for rollback.Issues
darwin_amd64build.Until the browser sign-in proof exists these are "Refs".
Visual Proof
Real dev Orca (
ORCA_BACKGROUND_LAUNCH=1, throwaway profiles; the fresh-computer runs use an empty home and no agy on PATH).A chat on the old server (1.5.0, built from the previous main), told a secret word:
The same profile on this branch: the chat kept its history and, on agy in Orca's chat home, still answers with the word (asked three times across builds):
A new key chat with no key: refused with the reason, and Sign in… opens Settings:
Right after switching that bot to gcloud, Try again: it answers, and Orchestrator is in the model list:
A rejected Gemini API key fails the turn, with an offer to switch:
A fresh computer: Install agy, then a new bot reports "isn't signed in" with Sign in:
The same in Settings, with the same Sign in; pressing it opens a terminal running Orca's agy (stopped at agy's folder-trust prompt, no login done):
A saved Gemini Enterprise choice after the upgrade:
An old-server chat on the Google method, on a computer with no agy login, where agy uses a login file (empty home,
SSH_CONNECTIONset). Launch kept the server release and both tokens and removed only the temp and sign-in folders. The chat home gotsettings.json{}(this round-3 build linked agy's login file; it is now copied). The send answers "isn't signed in" with Sign in…:Sign in… lands in Settings, which says agy isn't signed in and has Sign in (runs
agy). No loop:Kill switch off, nothing installed: no Install row, and the install RPC answers "Orca's copy of Antigravity is switched off here. Install it yourself.":
An own agy that reports 1.5.4 on PATH, with Orca's 1.5.13 installed: a new bot's chat is admitted and runs on Orca's copy. agy answers "Authentication required" (no login in this home); before the fix the bot got no chat at all. (This screenshot predates the label fix; see the next two.)
Now Settings checks Orca's copy, offers Sign in, and names the runtime "Installed by Orca · 1.5.13"; the chat chip reads "Orca's agy · v1.5.13":
The same old Google chat on this head, with a (fake) agy login file in the empty home: the send replaced round 4's link with a 0600 copy and left agy's own file byte-identical; after deleting agy's login file ("logout"), the next send removed the copy and nothing recreated agy's file. The chat answers "isn't signed in" since the login is fake:
An own agy reporting 1.5.4 and no Orca copy installed: Settings offers Install (after which chats run on Orca's agy):
Verification
pnpm check:changed --relatedat head 2bed6f5 (on main 76c039e): 42 of 43 checks pass; the one failure isworktree-rm-cli.integration.test.ts, which fails only inside the ~1,700-file related run and passes with its folder (9/9).check-main-blocking-helper-ratchet.mjsOK (6157),pnpm check:main-sync-fs-ratchetOK (2004).--gemini-dir <home> --app-data-dir antigravity-acpand the Google method it opens<home>/antigravity-acp/antigravity-oauth-token; in its own home it opens~/.gemini/antigravity-cli/antigravity-oauth-token;auth.typeormodelProvider) and gcloud (good, bad or no ADC) make zero Secret Service calls; the Google method calls Unlock/Get;SSL_CERT_FILE, throwaway home):open(O_WRONLY|O_CREAT|O_TRUNC)on the link path, i.e. into agy's own file — which is why this head copies instead;--gemini-dir/--app-data-dironly for Orca's chat home;/tmpclean-up only under a private folder this user owns;acp --helphas--gemini-dir/--app-data-dir; on a copy of an old Orca chat home it listed the old server's conversations and resumed one with its context on gcloud. With a real key inGEMINI_API_KEYorGOOGLE_API_KEYplus gcloud, agy's own home used gcloud; with only the key it answered "Authentication required". The same on 1.5.13. No build older than 1.5.5 could be obtained (the bucket can't be listed), hence the 1.5.5 floor.AGY_CLI_DISABLE_AUTO_UPDATE=true):auth.typegemini-api-key switches agy to key mode, and an invalid key gives "API key not valid";GEMINI_API_KEYwithoutmodelProvider, and works with it oncemodelProvideris set;AGENTS.mdand<gemini-dir>/GEMINI.md;session/list;Proof needed before merge
The only remaining gate: Google personal and Gemini Enterprise sign-in through agy in a real browser, done by the user with the steps below. Nothing else blocks merging.
Known limits (not merge gates)
Covered by experiments or unit tests rather than a live run, or limits by design:
modelProvider); the real app showed the invalid-key and missing-key paths.agythere;~/.gemini). Orca brings its chat home's copy of agy's login in line at launch, on an account switch or removal in Settings, on a method change, and at every chat start, and drops it when agy is signed out.Steps to prove Google and Enterprise sign-in (browser)
Use a computer or account where agy is not signed in yet. Otherwise this signs in your real agy, which is agy's own login, the thing #45337 asks for.
Check out this branch, run
node config/scripts/workspace-package-build/build-workspace-packages.mjs, thenORCA_DEV_USER_DATA_PATH=/tmp/agy-gproof pnpm dev.Open Settings › AI Provider Accounts › Antigravity Chat and check that "Sign in with" is agy's Google sign-in. If Runtime says Not installed, press Install.
Create a bot with Antigravity as its agent. The setup card says "Antigravity isn't signed in". Press Sign in; a terminal opens running
agy.In that terminal, sign in:
gcp.projectandgcp.locationin~/.gemini/antigravity-cli/settings.jsonas agy describes.Finish in the browser, then quit agy.
In the bot card press Try again. Expected: the bot's first message, and the chip under the composer reads "Your agy · v…" or "Orca's agy · v…".
Enterprise: open the model picker and check that Orchestrator is listed.
If you have an Orca profile from before this change with Google chats: open one, send a message, and expect a reply that remembers the conversation. On an SSH or WSL host, note whether it stays signed out.