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
fix(antigravity): stop installing agy; point users to Google's installer and prompt for agy updates - #51467
Orca used to download its own copy of Google's agy CLI for Antigravity chats. It doesn't anymore: you install agy yourself with Google's installer, and Orca tells you when an update is out and runs agy update for you.
Files
Added
Deleted
Net
Test
3
$\color{#1a7f37}{\Huge{\mathbf{+}}}$37
$\color{#cf222e}{\Huge{\mathbf{−}}}$10
$\color{#1a7f37}{\Huge{\mathbf{+}}}$27
Prod
70
$\color{#1a7f37}{\Huge{\mathbf{+}}}$481
$\color{#cf222e}{\Huge{\mathbf{−}}}$619
$\color{#cf222e}{\Huge{\mathbf{−}}}$138
What Changed
Before: a host without agy showed "Install Antigravity · 98 MB download". Orca then downloaded Google's build into <userData>/agent-runtimes/agy/<version>/ and kept it updated in the background. Settings → Accounts → Antigravity had a "Runtime" row, and the chat chip said "Orca's agy · v…". An agy older than chats need got a "too old" notice with no way to fix it from Orca.
After:
Missing agy, in chat: the chat's setup notice offers Install. It runs Google's installer in a terminal on that host (curl -fsSL https://antigravity.google/cli/install.sh | bash, or irm https://antigravity.google/cli/install.ps1 | iex on Windows), then Check again. The agent picker marks Antigravity as needing setup, the same way it does for other CLIs Orca doesn't install.
Updates: Antigravity joins Orca's existing "update your own CLI" flow. The latest version comes from the manifest Google's installer and agy update read. The lookup is capped at once an hour, like the other agents. Update runs agy update and appears in four places:
the chat's "too old" notice
Settings → Agents
the status bar
Settings → Accounts → Antigravity
Orca's own launches keep AGY_CLI_DISABLE_AUTO_UPDATE, so agy never replaces itself or steals focus in the middle of a chat.
Settings → Accounts → Antigravity: the Runtime row is gone. In its place is an "agy CLI" row:
when agy isn't found: "Not installed on this host", a link to Google's installer, and Check again
when an update is out: the versions and Update
The host now reports whether agy is installed, looking where chat launches look (PATH, then ~/.local/bin or %LOCALAPPDATA%\agy\bin). Sign-in controls depend on that answer instead of on "Orca's runtime is active".
Removed:
the agy downloader (agy-managed-runtime.ts) and its registry entry
the hidden antigravityManagedAgyEnabled kill switch
the hooks that existed only for it: standsInFor, managedCopyAllowed, installsManagedRuntime, and the install stream's choice-following
the "Orca's agy" wording
The managed-runtime machinery itself stays, because Claude, Codex, OpenCode, Cursor, Copilot, Grok, Kimi and OMP still use it.
Migration:
On launch (desktop, orca serve and orcad), Orca deletes <userData>/agent-runtimes/agy and the retired server's <userData>/agent-runtimes/antigravity. If a Windows file is still held open, it tries again next launch. Nothing else is touched.
Loading settings drops antigravityManagedAgyEnabled. It also drops an Antigravity Command override, but only when the program it runs is inside those folders.
Chat history lives in ~/.gemini and Orca's homes, not in the binary. Chats resume once the user's agy is installed.
Mixed versions:
A newer client never offers Orca's install for agy, even when an older host still advertises it: the shared decoders read that offer as "missing", on desktop and mobile.
An older client that calls managedRuntime.install for Antigravity on a newer host gets "Orca no longer installs agy. Install it with: ".
Older clients lose the sign-in-method rows in Settings on a newer host. They only showed them while the managed runtime was active. The chat's own sign-in strip still works.
Docs: the Antigravity setup page now has the install commands, the update behavior, and Google's current install link. The stale cli-overview link is replaced everywhere.
Why
Keeping a second agy meant Orca:
tracked Google's release manifest
verified and unpacked builds
updated a binary users didn't know they had
had code throughout launch, detection and Settings choosing between "your agy" and "Orca's agy"
Google ships an installer that already handles PATH and updates, so one agy, the user's own, is simpler and matches what they run in the terminal. The alternatives were worse:
Keeping the copy behind the kill switch would have kept all of that machinery.
Running agy's own background updater would let it swap the binary during a chat.
Reusing the existing install/recheck setup and the existing CLI update service meant no new UI patterns and no new polling.
Linked Issue
N/A (product decision; no issue)
Visual Proof
Fixture captures (light theme; dark captured too).
Settings → Accounts → Antigravity. Before: Runtime row. After: agy CLI row, shown only when agy is missing or an update is out.
Before
After
Chat, agy too old. Before: no action. After: Update runs agy update.
Before
After
Sign-in chip. "Orca's agy" is gone.
Before
After
Testing
Typecheck (node, web) and pnpm check:changed on macOS. The one failing check is agent-cli-update-timeout.test.ts "settles soon after the updater exits…", which fails the same way with main's agent-cli-update sources under this machine's load. It is not touched by this change.
terminal-settings-migrations.test.ts, new, covers persisted settings. It checks that Orca-copy Commands are dropped: plain, quoted, with an env prefix, and the PowerShell & form. It also checks that the user's own Commands are kept, including ones that only mention the folder in an argument. It fails without the migration.
Updated the managed-runtime view/installation tests and fixture to use OpenCode as their sample agent.
Read Google's install.sh and install.ps1, without running them, to confirm the install paths.
Confirmed from the agy binary's strings that agy update exists, without running agy.
Rendered fixtures for every changed surface.
Not run: the full app or a live agy (no runs against a real login).
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Performance
None that matters at fleet scale:
Two rm calls per launch for paths that are usually already gone.
One more agent in the existing CLI update check. Its manifest lookup is capped at once an hour per platform, and agy --version runs only when the binary changes, at most three version reads at a time.
Settings' agy check reuses the PATH lookup the accounts list already made.
It removes Orca's background agy downloads and update checks, plus the per-request host resolution in managedRuntime.subscribe and managedRuntime.install.
Risk
Level: Medium
The riskiest part is that users who relied on Orca's copy now see Install until they run Google's installer. Their chats and history come back once agy is installed.
The startup cleanup deletes only agent-runtimes/agy and agent-runtimes/antigravity. The settings migration only removes an Antigravity Command whose program is inside those folders.
A revert brings the downloader back, but it doesn't restore deleted copies; Orca would download them again on demand.
AI Disclosure
Review
Codex and a Claude reviewer checked it against the release-scan bar, with a performance pass. Fixed:
Settings read agy presence from PATH only, and from the WSL context.
Updates were skipped when an Antigravity terminal Command is set (chats ignore it).
The migration matched a path inside an argument.
"Your agy" showed with no agy.
A helper was left dead.
An older host's agent list wasn't refreshed by Check again.
Accepted:
Older clients on a newer host lose Settings' sign-in-method rows.
An Antigravity bot card shows no install step for a missing agy, which is also how bot cards treat other CLIs Orca doesn't install.
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Cross-platform: Windows uses the PowerShell installer and %LOCALAPPDATA%\agy\bin, and the startup removal tolerates files Windows still holds open.
WSL: Antigravity chats never ran in WSL, and Orca's copy was never used there.
Remote: each paired orca serve deletes its own copy and reports its own agy.
Mobile: gets the same shared decoders.
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
I stated the risk: what could break, for whom, and how to back it out
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
No actionable comments were generated in the recent review.
Walkthrough
The changes retire Orca-managed Antigravity runtime support and treat agy as a user-installed CLI. They add host installation detection, platform-specific installation instructions, and CLI update handling. Account and chat interfaces now use the updated installation state and labels. Settings migration removes retired configuration and matching Antigravity command overrides. Documentation links and setup instructions are updated.
Merge Risk: Low · up to f4e8b
Orca stops installing agy and now points users to Google's installer. Three small gaps remain: the settings migration can wrongly delete a user's custom Command or keep one that names a deleted runtime, and the agy CLI row can hide the install controls when the CLI is missing. These affect uncommon cases and have easy workarounds, so the change is mergeable, with the owner aware of these follow-ups.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: Orca stops installing its own agy copy, points users to Google's installer, and prompts for agy updates. The changeset matches this: the managed agy downloader is remo…
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 (before and after with mechanism), Why (with alternatives considered), Linked Issue (marked N/…
Full details: Title check
Explanation
The title names the main change: Orca stops installing its own agy copy, points users to Google's installer, and prompts for agy updates. The changeset matches this: the managed agy downloader is removed, install guidance links to Google's installers, and agy update is added to the CLI update flow. The title is a single sentence, and the 99-character length is acceptable. It omits the removal of the migration and settings, but that is expected for a title.
Full details: Description check
Explanation
The description follows the repository template closely. It has all required sections: ELI5, What Changed (before and after with mechanism), Why (with alternatives considered), Linked Issue (marked N/A as a product decision), Visual Proof (before and after images for each UI surface), Testing (platforms and checks run, with the one failing check named), Performance (one-line rationale with detail), Risk (level Medium, what could break, and how to back it out), Review, Notes covering cross-platform, WSL, remote and mobile, and a Checklist. Gaps: the 'Linked Issue' section is N/A rather than an issue link, which the template says should always exist for outside contributors; the author is presumably a maintainer, so this is acceptable. The AI Disclosure section is empty, and the template asks for it to be filled in unless the author is a StablyAI team member, which the description does not state. The agent skill upstream boundary box is checked, and the 'Testing' boxes are ticked, but the 'pnpm lint, typecheck, test, build' checklist item is unchecked, and the Testing section says only typecheck and check:changed ran. The Testing section does not say that full pnpm test ran. These are non-critical gaps, so the description is mostly complete.
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; 7 remain after this review.
122-122: Minor · Data Integrity & Integration · Poor tradeoff
Limit the retired-Command removal to Orca's own retired runtime folders.
RETIRED_AGY_COPY matches any path that contains an agent-runtimes/agy/ or agent-runtimes/antigravity/ segment. runsRetiredAgyCopy applies this test to the parsed program. A user Command such as /opt/tools/agent-runtimes/agy/1.5.16/agy --flag therefore matches. stripRetiredGlobalSettings then removes the antigravity override on every settings load, update, and save, so the user's executable and arguments are lost.
The check must test whether the program lies inside Orca's retired runtime folders. A directory name alone is not enough. A matching path outside those folders must keep its Command. The function receives only the settings object, and its three callers pass nothing else. Pass Orca's data root into the migration, then compare the parsed program against the retired agent-runtimes folders under that root. Keep removing Commands whose program lies inside those folders.
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: f515a241-4cb8-400b-b7bf-d3f28fbbaf5b
Commits
Reviewing files that changed from the base of the PR and between cdf1773 and 14b3015.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Detect Windows paths after leading environment assignments in the retired Command check.
runsRetiredAgyCopy tests windowsPath against the whole command. A command with a leading environment assignment, such as NO_COLOR=1 "C:\Users\me\AppData\Roaming\orca\agent-runtimes\agy\1.5.16\agy.exe", fails that test. Escape mode then removes the backslashes from the quoted path. RETIRED_AGY_COPY cannot match the resulting string, so the migration keeps the override. The saved Command still names the deleted executable.
Run the Windows-path test on the program that follows the leading environment assignments. Select literal mode for that program when it is a Windows path.
Suggested fix
--- "a/src/main/persistence/applying-settings/terminal-settings-migrations.ts"+++ "b/src/main/persistence/applying-settings/terminal-settings-migrations.ts"@@ -125,8 +125,9 @@
function runsRetiredAgyCopy(command: string): boolean {
// PowerShell needs `&` before a quoted path; the path after it is the program.
const input = command.trim().replace(/^&\s*/, '')
- const windowsPath = /^["']?(?:[A-Za-z]:[\\/]|\\\\)/.test(input)+ const programStart = input.replace(/^(?:[A-Za-z_][A-Za-z0-9_]*=\S*\s+)+/, '')+ const windowsPath = /^["']?(?:[A-Za-z]:[\\/]|\\\\)/.test(programStart)
const parsed = parseAgentCommand('', input, windowsPath ? 'literal' : 'escape')
return parsed.ok && RETIRED_AGY_COPY.test(parsed.binary)
}
Committable suggestion
IMPORTANT
Review the replacement and indentation, then test before committing.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Show installation controls when installed is false.
After a cached update check, remove agy and refresh accounts. The host can report installed=false while the update entry still contains the earlier result. These branches then show stale versions and an Update action instead of the installer link and Check again. If that update is not runnable, the row has no action.
Make installed=false select the installation content and recheck button, regardless of the cached update. Keep the update branch for installed=true.
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.
ELI5
Orca used to download its own copy of Google's
agyCLI for Antigravity chats. It doesn't anymore: you installagyyourself with Google's installer, and Orca tells you when an update is out and runsagy updatefor you.What Changed
Before: a host without
agyshowed "Install Antigravity · 98 MB download". Orca then downloaded Google's build into<userData>/agent-runtimes/agy/<version>/and kept it updated in the background. Settings → Accounts → Antigravity had a "Runtime" row, and the chat chip said "Orca's agy · v…". Anagyolder than chats need got a "too old" notice with no way to fix it from Orca.After:
Missing agy, in chat: the chat's setup notice offers Install. It runs Google's installer in a terminal on that host (
curl -fsSL https://antigravity.google/cli/install.sh | bash, orirm https://antigravity.google/cli/install.ps1 | iexon Windows), then Check again. The agent picker marks Antigravity as needing setup, the same way it does for other CLIs Orca doesn't install.Updates: Antigravity joins Orca's existing "update your own CLI" flow. The latest version comes from the manifest Google's installer and
agy updateread. The lookup is capped at once an hour, like the other agents. Update runsagy updateand appears in four places:Orca's own launches keep
AGY_CLI_DISABLE_AUTO_UPDATE, so agy never replaces itself or steals focus in the middle of a chat.Settings → Accounts → Antigravity: the Runtime row is gone. In its place is an "agy CLI" row:
The host now reports whether agy is installed, looking where chat launches look (PATH, then
~/.local/binor%LOCALAPPDATA%\agy\bin). Sign-in controls depend on that answer instead of on "Orca's runtime is active".Removed:
agy-managed-runtime.ts) and its registry entryantigravityManagedAgyEnabledkill switchstandsInFor,managedCopyAllowed,installsManagedRuntime, and the install stream's choice-followingThe managed-runtime machinery itself stays, because Claude, Codex, OpenCode, Cursor, Copilot, Grok, Kimi and OMP still use it.
Migration:
orca serveand orcad), Orca deletes<userData>/agent-runtimes/agyand the retired server's<userData>/agent-runtimes/antigravity. If a Windows file is still held open, it tries again next launch. Nothing else is touched.antigravityManagedAgyEnabled. It also drops an Antigravity Command override, but only when the program it runs is inside those folders.~/.geminiand Orca's homes, not in the binary. Chats resume once the user's agy is installed.Mixed versions:
managedRuntime.installfor Antigravity on a newer host gets "Orca no longer installs agy. Install it with: ".Docs: the Antigravity setup page now has the install commands, the update behavior, and Google's current install link. The stale
cli-overviewlink is replaced everywhere.Why
Keeping a second agy meant Orca:
Google ships an installer that already handles PATH and updates, so one agy, the user's own, is simpler and matches what they run in the terminal. The alternatives were worse:
Reusing the existing install/recheck setup and the existing CLI update service meant no new UI patterns and no new polling.
Linked Issue
N/A (product decision; no issue)
Visual Proof
Fixture captures (light theme; dark captured too).
Chat, agy missing. Before: Orca's download strip. After: Install runs Google's installer, then Check again.
Settings → Accounts → Antigravity. Before: Runtime row. After: agy CLI row, shown only when agy is missing or an update is out.
Chat, agy too old. Before: no action. After: Update runs
agy update.Sign-in chip. "Orca's agy" is gone.
Testing
Typecheck (node, web) and
pnpm check:changedon macOS. The one failing check isagent-cli-update-timeout.test.ts"settles soon after the updater exits…", which fails the same way with main'sagent-cli-updatesources under this machine's load. It is not touched by this change.terminal-settings-migrations.test.ts, new, covers persisted settings. It checks that Orca-copy Commands are dropped: plain, quoted, with an env prefix, and the PowerShell&form. It also checks that the user's own Commands are kept, including ones that only mention the folder in an argument. It fails without the migration.Updated the managed-runtime view/installation tests and fixture to use OpenCode as their sample agent.
Read Google's
install.shandinstall.ps1, without running them, to confirm the install paths.Confirmed from the agy binary's strings that
agy updateexists, without running agy.Rendered fixtures for every changed surface.
Not run: the full app or a live agy (no runs against a real login).
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Performance
None that matters at fleet scale:
rmcalls per launch for paths that are usually already gone.agy --versionruns only when the binary changes, at most three version reads at a time.managedRuntime.subscribeandmanagedRuntime.install.Risk
Level: Medium
The riskiest part is that users who relied on Orca's copy now see Install until they run Google's installer. Their chats and history come back once agy is installed.
The startup cleanup deletes only
agent-runtimes/agyandagent-runtimes/antigravity. The settings migration only removes an Antigravity Command whose program is inside those folders.A revert brings the downloader back, but it doesn't restore deleted copies; Orca would download them again on demand.
AI Disclosure
Review
Codex and a Claude reviewer checked it against the release-scan bar, with a performance pass. Fixed:
Accepted:
Agent skill upstream boundary
Notes
%LOCALAPPDATA%\agy\bin, and the startup removal tolerates files Windows still holds open.orca servedeletes its own copy and reports its own agy.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)