Skip to content

feat(antigravity): Install provides the real agy, like Orca's other agent CLIs - #45333

Merged
nwparker merged 13 commits into
mainfrom
nwparker/agy-managed-cli
Nov 20, 2026
Merged

nwparker merged 13 commits into
mainfrom
nwparker/agy-managed-cli

Conversation

@nwparker

@nwparker nwparker commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

When a computer has no Antigravity, Orca's Install used to download a separate, old Antigravity server (1.5.0) that Google no longer updates and that lacks the Orchestrator models. Now Install downloads the real, current agy (1.5.13 today) into Orca's own folder, the same way Orca already installs Claude, Codex, Grok and the others. Your own agy still wins when you have one, and nobody who already uses Orca's old server is moved.

Third step of the sequence in #45246 (design decision there). Refs #45337, #44613.

Files Added Deleted Net
Test 16 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1245 $\color{#cf222e}{\Huge{\mathbf{−}}}$​77 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1168
Prod 54 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1493 $\color{#cf222e}{\Huge{\mathbf{−}}}$​328 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1165

What Changed

  • Orca's copy is the real agy (agy-managed-runtime.ts, registered in the managed-agent-CLI registry).
    • Orca reads Google's own release manifest (the one Google's installer reads), downloads the file from Google's bucket, checks its sha512 before anything runs, and keeps it under <userData>/agent-runtimes/agy.
    • Orca does not run Google's install script: that script is unpinned, and runs agy install, which edits shell profiles and PATH.
    • Orca's copy never updates itself (AGY_CLI_DISABLE_AUTO_UPDATE=true); Orca updates it like its other copies.
    • It only ever stands in for the command agy, never for the old server.
  • One rule per computer decides both where a new chat runs and what Install provides (antigravity-chat-route.ts), so Install can't offer a program the chat won't start.
    • The old server stays the answer when: the saved sign-in is an API key, gcloud or Enterprise; the old server is installed (or its folder can't be read, or one is on PATH); a Google sign-in saved in Orca exists; agy's own settings use an API-key provider; or your own agy is too old.
    • Otherwise agy is: yours if you have one, else Orca's copy.
  • New chats are tied to agy before it is installed. A chat's record is created when it opens, so on a computer with nothing installed the first chat is tied to agy at once and its Install provides agy. Menus still report Antigravity as installable, not available, until it is there.
  • A signed-out agy is no longer a dead end. It takes the chat (where the rule allows), which shows agy's own "isn't signed in" notice with a Sign in button that runs agy in a terminal. Before, the chat asked you to install a runtime.
  • Bot setup card: when a new bot's agent isn't signed in, the card shows Sign in beside Try again (the same button the chat's notice has, for every agent that has one). Install in the card now also provides agy.
  • Settings and chats know which program the install is about (new optional program on the install state).
    • Orca's own Google sign-in rows show only for the old server.
    • Labels name three things: "Your agy · v1.5.13", "Orca's agy · v1.5.13", and "Orca's copy · v1.5.0" for the old server.
    • Install, Remove and Cancel act on the program the client displayed.
  • Kill switch. A setting, antigravityManagedAgyEnabled (on by default, no UI), turns the new behavior off: Orca's agy then plays no part in new chats, Install, Settings, menus or launches, and is not updated, so new chats follow the rule from before this PR. A chat already tied to agy then runs your own agy (same history, same ~/.gemini) or says agy wasn't found.
  • A copy Orca installed counts as installed. Agent detection looked only at the shell PATH, so after Install the new-tab menu, bot picker and Settings › Agents still said "not installed". Detection now also counts Orca's installed copy, for every agent Orca installs (Claude, Codex, Grok and the rest), and the lists refresh when an install or remove finishes.
  • Nothing starts agy unasked. Only a chat start or an open Antigravity install surface may start agy acp to check an agy that has no login. Menus, health checks, the model list and startup read the cached answer. A signed-in agy is checked as before.
  • No release lookups for a copy that isn't installed. Orca's background update check for a managed CLI now returns before any network request when that CLI isn't installed. This applies to every managed CLI.
  • A signed-out agy is started once, not every five minutes. Orca asks it only whether it is compatible, and keeps that answer until the binary changes.
  • Orca never probes agy where that could prompt. Before starting agy acp to check it, Orca looks for agy's login without reading the secret: macOS keychain attributes, the Linux collection's Locked flag, Windows Credential Manager, or the token file where agy keeps one (SSH, WSL, containers, no session bus). A locked Linux keyring means no sign-in probe. The check is fully async (agy-credential-presence.ts).
  • chatUsesAgy keeps meaning "new chats run on agy and it is signed in"; a new chatAgySignedOut covers the other case, so Settings never claims a sign-in that isn't there.
  • Generic: a single-file download can be vouched for by sha512 alone (Windows agy.exe); the version check can pass an environment.

Visual Proof

Real dev Orca on macOS started with an empty home folder and no agy on PATH (ORCA_BACKGROUND_LAUNCH=1, throwaway profile). The user's own ~/.local/bin/agy and ~/.gemini were never touched.

Settings with nothing installed, then after Install:

(screenshot removed: contained real product data)

(screenshot removed: contained real product data)

A new bot created before anything is installed: the card's Install provides agy (86 MB; the old server was 101 MB).

(screenshot removed: contained real product data)

After that Install the card retried by itself, reached Orca's agy, and now offers Sign in. The chip names the program.

(screenshot removed: contained real product data)

Pressing Sign in opens a terminal running Orca's agy:

(screenshot removed: contained real product data)

Verification

  • macOS arm64, real app, isolated home: the flow in the screenshots above, end to end.
  • Windows 11 x64 (two machines, one with Smart App Control enforced) and Linux x64 glibc (Ubuntu 24.04, Arch), on commit b0eab569561, through the branch's own install code in a throwaway data folder:
    • the pin came from the right manifest (bare .exe on Windows, .tar.gz on Linux, no _musl on glibc);
    • sha512 matched; the installed Windows file is Authenticode-valid, signed by Google, and Smart App Control allowed it;
    • agy --version printed 1.5.13 and agy acp passed the compatibility check on all four;
    • a never-signed-in agy answered "Authentication required" and launched no browser (three machines; the fourth is signed in);
    • the user's own agy won wherever one resolved (PATH, %LOCALAPPDATA%\agy\bin, a mise shim), and Orca's copy stood in only when none did.
  • The login check on the same four machines (commit 02cd5d2c90a): Windows signed in → present in 1–4 ms; Windows never signed in → absent; Linux over SSH → token file; Linux desktop with an unlocked keyring and no item → absent; Linux with a locked login keyring → locked. No prompt or helper dialog on any of them.
  • Locked Linux keyring, real host: an agy acp that is only sent initialize opens no D-Bus connection at all; one that is also sent session/list calls the Secret Service's Unlock and Prompt. So Orca asks a locked-keyring agy only initialize (is it compatible?) and leaves the sign-in question to the chat's own start.
  • Fresh-home Mac through the real UI, on 3b51af7cbec: the bot picker listed no Antigravity; after Install in Settings it listed Antigravity with no manual refresh; a bot created through the dialog reached Sign in and Try again with the chip "Orca's agy · v1.5.13".
  • This branch's server on an SSH Linux host (a second, isolated instance; the installed production server was byte-identical before and after), on c6d85f56122: the remote state offered agy 1.5.13, Install downloaded and verified it there, Settings read "Chats run on Orca's agy (v1.5.13)", agy's log showed only initialize, and nothing prompted. A chat could not be started there because menus did not yet count Orca's copy; that is the detection fix above, verified locally but not re-run on the remote.
  • Real app on Ubuntu (xvfb): Install through managedRuntime.install ended at program: cli, 1.5.13. Real app on Windows: Install provided the old server, as the rule says for that machine (its agy settings use an API-key provider).
  • Unit tests: manifest-to-pin mapping (platform names, a URL outside Google's bucket, .. escapes, unknown formats), the stand-in guard, the route table, the probe's answers, the presence check per platform, install target and stream, sign-in policy, the bot card's sign-in.
  • pnpm check:changed and both main-thread ratchets pass.

Known limits

  • Not run: a musl Linux host, an arm64 Windows or Linux host, WSL, and a chat on a remote host with this branch's server.
  • The first check of agy writes agy's normal state into ~/.gemini (antigravity-cli/, config/) even for someone who never ran agy, because Orca's copy uses agy's own home and sign-in. Seen on the Ubuntu test machine right after Install.
  • On Windows agy keeps its login in Credential Manager, so Orca's copy and the user's own agy always share one sign-in there.
  • A chat tied to Orca's old server on a computer that has since moved to agy (the server was removed after switching sign-in method) gets no Install in the chat; it keeps the "isn't installed" refusal. Deliberately not built: it needed per-chat install state that produced more bugs than it fixed.
  • Sign-in on a remote computer runs agy there; agy's login needs a browser.
  • After signing in through the terminal, Settings can say "isn't signed in yet" for up to five minutes; the chat itself is unaffected.
  • Menus: with default settings the new-tab and bot agent menus list only CLIs found on the shell PATH, so a copy Orca installed (agy, and equally Claude, Grok and the rest) isn't offered there until chat is the default surface. Predates this PR.
  • Both copies installed: Settings can remove only the one in use. Removing Orca's agy stops every Antigravity chat, as removing any managed CLI does.
  • agy typed by hand in an Orca terminal runs Orca's copy with its updater on. If it replaces the file, Orca's size check marks the copy damaged and Install repairs it.
  • With the kill switch off: the switch covers chats, menus and updates; agy typed in terminals and commit-message generation still resolve Orca's copy from the terminal PATH.
  • Other agents Orca installs: the environment doctor runs claude / codex from PATH, so a computer whose only copy is Orca's reads "installed but not signed in" there; Claude agent teams still need claude on PATH.
  • An older Orca client paired with a newer host still shows the old server's sign-in rows for Orca's agy.
  • Next step, separate PR: make agy the only program for all four sign-in methods and delete the old server.

Review

Ten adversarial review rounds by fresh reviewers, each on the commits since the last. Download integrity and the effect on other managed CLIs were found sound in every round that read them. Rounds one to three found routing, sign-in UI and install-targeting bugs; round three showed that a per-chat install subscription broke the first chat on a fresh computer, so it was removed in favor of one rule per computer. Round four read the whole simplified PR. Rounds five to ten read each later fix, including the kill switch, the "nothing starts agy unasked" rule and the detection change; each found at most one medium, fixed in the next commit. The final commit (two small follow-ups to round ten) has not been re-reviewed.

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • Resume reviews
  • Trigger review
Walkthrough

The changes add Antigravity as a managed CLI and add platform-aware credential detection and ACP status checks. Host routing selects between Antigravity and Orca’s server using authentication, command availability, credentials, and ACP results. Managed runtime installation distinguishes CLI and server programs and streams status across installation choices. Renderer updates expose runtime and sign-in status, add kickoff sign-in guidance, and pass sign-in environment settings to terminals.

Merge Risk: Moderate · previous review ad3d0

This change makes Orca's own agy the default Antigravity install and routes chats between the user's agy and Orca's server. A compatible agy that crashes once at startup can be treated as permanently incompatible. The managed-agy kill switch behaves differently for existing chats than the PR description says. Several smaller issues remain: credential presence checks read the stored secret, status views can start agy, and an explicit CLI install bypasses the kill switch. Resolve the major items before merging.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: Install now provides Google's real agy CLI, as Orca already does for its other agent CLIs. The changeset adds a managed agy runtime (agy-managed-runtime.ts), a managed…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description follows the required template closely. It has all main sections: ELI5, What Changed, Why (the rationale is folded into the ELI5 and What Changed sections), Linked Issue, Visual Proof, …
Full details: Title check

Explanation

The title names the main change: Install now provides Google's real agy CLI, as Orca already does for its other agent CLIs. The changeset adds a managed agy runtime (agy-managed-runtime.ts), a managed-agent-CLI registry entry, and install-targeting changes that match this. The title follows the conventional commit style, is a single sentence, and avoids vague terms. It omits the routing rule and kill switch, which is acceptable because the title need not cover every detail.

Full details: Description check

Explanation

The description follows the required template closely. It has all main sections: ELI5, What Changed, Why (the rationale is folded into the ELI5 and What Changed sections), Linked Issue, Visual Proof, Testing, Risk, AI Disclosure, Review, and Notes. The What Changed section is detailed and covers the before and after, plus the mechanism. Visual Proof includes screenshots and a clear description of the platforms tested. Testing lists the platforms (macOS, Windows, Linux) and the unit tests. The Risk section gives a level and a rollback path via the kill switch setting. Gaps: the 'Linked Issue' section links 'Refs #45337, #44613' and a design decision in #45246, but it contains no 'Fixes #' issue link, which the template says must always be present for outside contributors. The template's 'Why' heading is not separate. The checklist items are not ticked. The Risk level is stated in the template structure but the 'Level' field is not filled in explicitly (no Low/Medium/High chosen). The AI Disclosure section is empty; it is only required for outside contributors. The 'Agent skill upstream boundary' checkbox is not ticked. These are mostly minor, 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.

Share

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Nitpick comments: 1

src/main/antigravity/antigravity-host-backend-select.test.ts: 1

231-232: Trivial · Maintainability & Code Quality · Quick win

Assert that locked-keyring routing never calls the session probe.

The routing assertions check outcomes only. They fail if the route uses the session probe's answer, but they pass if the route calls checkAntigravityHostAcp and discards the result. Because the test is meant to prevent the unlock dialog, an extra session-probe call should fail it too.

Record calls to both ACP mocks, and clear the recorded calls between tests. In the locked-keyring cases, assert that checkAntigravityHostAcp is not called.

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: 2b734038-f201-42a8-997c-bd7c2d90049d
Commits

Reviewing files that changed from the base of the PR and between 5b4cc74 and 34e7887.

Files selected for processing: 59

  • config/main-blocking-helper-baseline.txt
  • config/main-sync-fs-baseline.txt
  • src/main/acp/launch/acp-launch-command.ts
  • src/main/acp/launch/acp-launch-contract.ts
  • src/main/antigravity/agy-credential-presence.test.ts
  • src/main/antigravity/agy-credential-presence.ts
  • src/main/antigravity/agy-managed-runtime.test.ts
  • src/main/antigravity/agy-managed-runtime.ts
  • src/main/antigravity/antigravity-acp-launch-spec.ts
  • src/main/antigravity/antigravity-chat-route.ts
  • src/main/antigravity/antigravity-host-acp-answer.test.ts
  • src/main/antigravity/antigravity-host-acp.test.ts
  • src/main/antigravity/antigravity-host-acp.ts
  • src/main/antigravity/antigravity-host-backend-select.test.ts
  • src/main/antigravity/native-file-credentials-store.test.ts
  • src/main/antigravity/native-file-credentials.ts
  • src/main/antigravity/native-linux-credentials.ts
  • src/main/antigravity/native-windows-credentials.ts
  • src/main/managed-agent-cli/managed-agent-cli-registry.ts
  • src/main/native-chat/agent-launch/structured-agent-command-resolution.test.ts
  • src/main/native-chat/agent-launch/structured-agent-command-resolution.ts
  • src/main/node-runtime/managed-runtime-installation.test.ts
  • src/main/node-runtime/managed-runtime-installation.ts
  • src/main/node-runtime/managed-runtime-release-install.ts
  • src/main/node-runtime/managed-runtime-release.ts
  • src/main/node-runtime/managed-runtime-version-check.ts
  • src/main/runtime/agent-session/installation/structured-agent-runtime-metadata.ts
  • src/main/runtime/events/revisioned-state.ts
  • src/main/runtime/rpc/methods/accounts/antigravity-chat-backend.ts
  • src/main/runtime/rpc/methods/host-management/managed-runtime-install-stream.ts
  • src/main/runtime/rpc/methods/host-management/managed-runtime-install.test.ts
  • src/main/runtime/rpc/methods/host-management/managed-runtime-install.ts
  • src/main/runtime/session-tabs/structured-session-account-home-bot.test.ts
  • src/renderer/src/components/bots/BotFirstScreen.tsx
  • src/renderer/src/components/bots/BotSetupInstall.tsx
  • src/renderer/src/components/native-chat/NativeChatBotHomeScope.tsx
  • src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx
  • src/renderer/src/components/native-chat/antigravity-auth/NativeChatAntigravityAuth.fixture.tsx
  • src/renderer/src/components/native-chat/antigravity-auth/NativeChatAntigravityAuthChip.tsx
  • src/renderer/src/components/native-chat/antigravity-auth/antigravity-auth-words.ts
  • src/renderer/src/components/native-chat/antigravity-auth/native-chat-antigravity-auth.tsx
  • src/renderer/src/components/native-chat/host-access/NativeChatInstallSlot.tsx
  • src/renderer/src/components/native-chat/host-access/native-chat-host-command-terminal.ts
  • src/renderer/src/components/native-chat/host-access/native-chat-host-setup.ts
  • src/renderer/src/components/native-chat/host-access/native-chat-install-slot.test.ts
  • src/renderer/src/components/native-chat/messages/notices/use-native-chat-structured-pane-notices.ts
  • src/renderer/src/components/native-chat/native-chat-bot-kickoff-view.test.tsx
  • src/renderer/src/components/native-chat/native-chat-bot-kickoff-view.ts
  • src/renderer/src/components/native-chat/native-chat-kickoff-reply.test.ts
  • src/renderer/src/components/provider-accounts/antigravity-chat-runtime-sign-in-policy.test.ts
  • src/renderer/src/components/provider-accounts/antigravity-chat-runtime-sign-in-policy.ts
  • src/renderer/src/components/settings/accounts/providers/AntigravityAccountsSection.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/runtime/hosts/installation/managed-runtime-install-status.ts
  • src/shared/agent-accounts/antigravity/antigravity-account-types.ts
  • src/shared/agent-launch/installation/managed-runtime-install.ts
  • src/shared/agent-session/lifecycle/launch/agent-session-setup-commands.ts
  • src/shared/bots/bot-setup-steps.ts
  • src/shared/rpc-contract/host-management/managed-runtime-install-params.ts
Files with no reviewable changes: 1

  • config/main-sync-fs-baseline.txt

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

backend.spec.installDirectories({ env, homePath })
)
// The user's own program wins; Orca's copy serves hosts that have none.
const program = found ?? managedAgentCommandFor(spec.agent, command, { use: false }) ?? command

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Major · Functional Correctness · Heavy lift

Launch the same agy copy that routing and sign-in checks evaluate.

When a managed agy release is installed, resolveAcpLaunchCommand returns that release and does not search the user's PATH copy. acpHostBackendInput selects the user's copy first, and the chat route and sign-in state are derived from that selection. When both copies exist, a chat can start Orca's managed copy while its sign-in and compatibility state describe the user's copy. The PR states that chats use the user's agy when available.

Make the spawn path use the same program that acpHostBackendInput selects. The resolver is synchronous and findHostProgram is async, so the selection must be computed once upstream and passed to the launch path.

// The read refuses a locked collection rather than unlocking it. Without gdbus Orca can't tell
// whether it is locked, so it stays `locked`; secret-tool is only needed after gdbus found the
// collection unlocked, where asking agy can't prompt.
const keyring = await readAntigravityLinuxCredential().then(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Security & Privacy · Quick win

Check Linux credential metadata instead of reading the token.

On an unlocked keyring, this calls secret-tool lookup, captures the secret, and parses it only to decide whether a credential exists. The inspected libsecret implementation confirms that lookup retrieves the secret value. This violates the stated no-secret-read requirement. (raw.githubusercontent.com)

Add a metadata-only presence query. Preserve the conservative locked result when Orca cannot determine the keyring state.

if ('error' in loaded) {
throw new Error('The Antigravity Windows credential store is unavailable.')
}
return readNativeBytesWith(loaded.addon, target) !== null

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Security & Privacy · Heavy lift

Use a metadata-only Windows presence check.

This call retrieves the credential bytes and then tests only whether they are null. The same reader supplies the bytes used to decode the saved token. This does not satisfy the stated requirement to check credential presence without reading the secret.

Add a metadata-only presence operation to the native addon. Keep the full credential reader for account operations.

if ((switched || next.revision !== shown) && !stream.isClosed()) {
installation = current
shown = next.revision
emit(switched ? { ...next, revision: choice.revisions.next() } : next)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Major · Data Integrity & Integration · Quick win

Do not publish a switched snapshot that was read before a later change.

On a switch, current.status(true) can return an operation snapshot captured before its asynchronous reads finish. If the installation completes during that read, line 61 emits the stale snapshot with a fresh revision from choice.revisions.next(). The next loop pass then emits the completed state with its stored, lower revision. The revisions contract at line 15 requires clients to order revisions after the last one. A client that drops lower revisions can keep the stale downloading state.

Skip the stale switched read when a change arrived during it. The loop then reads the state again. An idle switch with no concurrent change still uses the fresh revision.

Suggested fix

         const next = switched ? await current.status(true) : shownState
+        // A change during the switch read makes `next` stale. Read again instead of publishing it.
+        if (switched && again) {
+          continue
+        }
         if ((switched || next.revision !== shown) && !stream.isClosed()) {

'Signs in through your browser, so Chat works without agy installed.'
)
}
description={chatDescriptions[antigravityChatDescription(state, chatRuntime)]}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Functional Correctness · Quick win

Show installation guidance when Orca's agy is not installed.

After Orca removes its managed agy, the Chat description can still show the saved signed-out text. state loads only on mount, on owner or runtime change, and after account actions. Removing the runtime does not refresh it. antigravityChatDescription checks chatAgySignedOut first, so the user is told to run agy even though it is no longer installed.

Check the current installation state before chatAgySignedOut when agy is not installed, so installAgy is returned. Keep the sign-in guidance when agy is installed.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

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: 534a3209-d360-4d30-bf74-e554181a8e99
Commits

Reviewing files that changed from the base of the PR and between 6bec681 and d670bfe.

Files selected for processing: 15

  • src/main/acp/launch/acp-launch-command.ts
  • src/main/acp/launch/acp-launch-contract.ts
  • src/main/antigravity/agy-credential-presence.test.ts
  • src/main/antigravity/agy-credential-presence.ts
  • src/main/antigravity/antigravity-acp-launch-spec.ts
  • src/main/antigravity/antigravity-chat-route.ts
  • src/main/antigravity/antigravity-host-backend-select.test.ts
  • src/main/node-runtime/managed-runtime-installation.test.ts
  • src/main/node-runtime/managed-runtime-installation.ts
  • src/main/runtime/rpc/methods/host-management/managed-runtime-install.ts
  • src/renderer/src/components/native-chat/antigravity-auth/NativeChatAntigravityAuth.fixture.tsx
  • src/renderer/src/components/native-chat/antigravity-auth/NativeChatAntigravityAuthChip.tsx
  • src/renderer/src/components/native-chat/antigravity-auth/native-chat-antigravity-auth.tsx
  • src/renderer/src/components/native-chat/host-access/NativeChatInstallSlot.tsx
  • src/shared/settings/global-settings-types.ts
Files skipped from review as they are similar to previous changes: 2

  • src/main/antigravity/antigravity-chat-route.ts
  • src/shared/settings/global-settings-types.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

/** Bring Orca's own copy to the latest release; never installs one nobody asked for or touches a user's own. */
async updateIfBehind(): Promise<void> {
if (!this.runtime.refreshPin || this.running) {
if (!this.runtime.refreshPin || this.running || this.deps.updatesEnabled?.() === false) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Functional Correctness · Quick win

Recheck the update policy after the asynchronous checks.

If the user disables managed agy while status() waits for refreshPin(), this entry check has already passed. updateIfBehind() then calls install() while updatesEnabled() is false.

Check updatesEnabled() again immediately before setting lastAutoUpdate and calling install(). Keep the entry check to avoid release lookups when updates are already disabled.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (3)

Major · Installed signed-out agy must count as the chat program for launches… · acp-launch-command.ts:188

src/main/acp/launch/acp-launch-command.ts:188
Major · Functional Correctness · Heavy lift

Installed signed-out agy must count as the chat program for launches that require it.

The predicate acpHostProgramTakesNewChats passes no start permission. The Antigravity selector then returns null for an installed but signed-out agy. As a result, observation reports the program as installable rather than available. Launches that pass requireInstalledChatProgram are refused with chat-program, even though an explicit chat start selects this agy and the Sign in path is designed to follow.

The required behavior is that an installed signed-out agy counts as the chat program here. Observation must still not start agy. Passing startsProgram: true in this predicate would start it, so that change is not the correction. Choose a non-starting check that recognizes an installed signed-out agy, and keep it separate from the start permission.

Minor · Apply startsProgram to session checks too. · antigravity-chat-route.ts:91

src/main/antigravity/antigravity-chat-route.ts:91
Minor · Functional Correctness · Quick win

Apply startsProgram to session checks too.

If credentials are present and the ACP cache is empty or expired, these calls start agy even when input.startsProgram is false. The account-state caller uses that default, and catalog selection can use the same path.

Forward the start permission through checkAntigravityHostAcp. Reuse cached answers without launching. Permit a fresh probe only for an explicit chat start or Install.

The AcpHostBackendInput contract makes other questions observation-only.

Also applies to: 114-114

Minor · Reject an explicit cli install when managed agy is… · managed-runtime-install.ts:87-88

src/main/runtime/rpc/methods/host-management/managed-runtime-install.ts:87-88
Minor · Functional Correctness · Quick win

Reject an explicit cli install when managed agy is disabled.

When antigravityManagedAgyEnabled is false, managedRuntime.install still accepts an explicit program: 'cli'. selectedInstallation returns the CLI installation without checking the policy, and the handler calls install() directly. The updatesEnabled callback only stops automatic updates. An explicit install can still download and install Orca's managed agy after the user turns the switch off.

Check the managed-copy policy in the install handler before calling install() for the CLI program. Reject the request when the policy is disabled, so the handler does not download or install managed agy. The server program is not affected by this check.

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: a0f6fbad-696b-4893-a93f-1838cdaca88f
Commits

Reviewing files that changed from the base of the PR and between d670bfe and c6d85f5.

Files selected for processing: 12

  • src/main/acp/launch/acp-launch-command.ts
  • src/main/acp/launch/acp-launch-contract.ts
  • src/main/antigravity/antigravity-acp-launch-spec.ts
  • src/main/antigravity/antigravity-chat-route.ts
  • src/main/antigravity/antigravity-host-acp-answer.test.ts
  • src/main/antigravity/antigravity-host-acp.ts
  • src/main/antigravity/antigravity-host-backend-select.test.ts
  • src/main/native-chat/agent-launch/structured-agent-command-resolution.ts
  • src/main/node-runtime/managed-runtime-installation.ts
  • src/main/runtime/agent-session/installation/structured-agent-runtime-metadata.ts
  • src/main/runtime/rpc/methods/host-management/managed-runtime-install.ts
  • src/shared/settings/global-settings-types.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.

const managed =
isManagedAgentCli(agent) && (resolved === null || !isAbsolute(resolved))
? managedAgentCommand(agent)
stock.managedCopy !== false && (resolved === null || !isAbsolute(resolved))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Major · Functional Correctness · Quick win

Reject Orca's PATH copy when managed agy is disabled.

If PATH contains Orca's agy, resolved is its absolute executable path. managedCopy: false disables only the fallback. Line 101 still returns Orca's executable for a pinned chat.

Exclude Orca's executable from command discovery when managed copies are disabled. Continue searching for the user's agy. If no user copy exists, preserve the cliMissing refusal.

This violates the later kill-switch requirement for inherited PATH copies.

Comment on lines +97 to +99
const input = await acpHostBackendInput(spec, env, getProfileUserDataPath(), settings, {
startsProgram: true
})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Functional Correctness · Heavy lift

Status subscriptions can start agy for a user without a present login.

The subscribe path calls selectedInstallation with startsProgram: true. For an agy without a present login, the Antigravity route then passes start: true to the compatibility probe. This can start the user's agy from a status view. The PR objective allows only chat starts and Install to start it for absent or locked logins.

Status reads must stay passive for these logins. The status stream must still show the same installation that Install acts on, so do not change the start flag without keeping that answer consistent.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (2)

Major · Keep managed agy available to existing pinned chats. · antigravity-acp-launch-spec.ts:136

src/main/antigravity/antigravity-acp-launch-spec.ts:136
Major · Functional Correctness · Quick win

Keep managed agy available to existing pinned chats.

If the kill switch is off and the host has only Orca's agy, this predicate also disables that executable for existing chats. Their host launch spec reaches the managed-copy refusal instead of launching the installed release.

Apply the switch to new-chat selection and updates. Preserve managed-executable resolution for existing pinned chats. The PR objectives explicitly require those chats to continue launching.

Major · Do not cache an early unexpected exit as permanent… · antigravity-host-acp.ts:203-205

src/main/antigravity/antigravity-host-acp.ts:203-205
Major · Stability & Availability · Quick win

Do not cache an early unexpected exit as permanent incompatibility.

When an agy process exits unexpectedly before it answers initialize, the probe rejects with AcpAgentExitedError. That error is an AcpConnectionClosedError, so the branch at lines 203-205 returns incompatible and clears retryAt. The answer then persists for the unchanged binary. A transient startup crash of a compatible agy therefore keeps the user's copy excluded from routing and Install until the binary changes.

Limit the permanent incompatible answer to proven incompatibility, such as IncompatibleHostAcp. An early unexpected exit needs a retryable answer, so the probe rechecks it on the normal interval. The comment's suggested "retryable error classification" does not exist in the current error mapping, so that path cannot refute the concern.

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: 8d06358f-1cd0-44b9-98d5-5658a46fbb92
Commits

Reviewing files that changed from the base of the PR and between c6d85f5 and ad3d0f7.

Files selected for processing: 7

  • src/main/acp/launch/acp-launch-command.ts
  • src/main/antigravity/antigravity-acp-launch-spec.ts
  • src/main/antigravity/antigravity-host-acp.ts
  • src/main/antigravity/antigravity-host-backend-select.test.ts
  • src/main/managed-agent-cli/managed-agent-cli-registry.ts
  • src/main/native-chat/agent-launch/structured-agent-command-resolution.ts
  • src/main/node-runtime/managed-runtime-installation.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.

… CLI

Hosts without their own agy get Google's current agy (manifest-pinned,
sha512-verified, never self-updating) in Orca's folder, and new Antigravity
chats run it through the host launch spec. Orca's legacy ACP server stays for
hosts that use it and for account types agy lacks; one host-level route
decides both where new chats run and what Install puts here.
… on the bot setup card

- chip and Settings say "Orca's agy · v…" when the host program is Orca's
  copy, "Your agy · v…" for the person's own, "Orca's copy · v…" for the server
- the bot setup card follows the route for bots on the host program, and
  offers the chat's own Sign in beside Try again when the kickoff was
  refused or failed signed out; the composer drops its duplicate
… chip before agy is here

The kickoff view rebuilt the refusal from its words and dropped notSignedIn,
so the setup card never offered Sign in. A chat on agy shows no program chip
while its Install says agy is missing.
…latform

- presence mirrors the credential backends: file-store, bus-less and
  container Linux read the token file; a missing gdbus/secret-tool falls to
  the token file instead of reading as locked; Windows reads Credential
  Manager without blocking
- a locked keyring still learns whether agy is compatible (initialize only)
- route reads of Orca's agy no longer count as use for its update checks
- the bot card shows a sign-in's step line (Pi, OMP) beside its button
…ip before the host answers

- agy reaches the Secret Service itself: without gdbus Orca can't tell
  whether the keyring is locked, so agy isn't asked; a missing secret-tool
  comes after gdbus found it unlocked, so the probe decides
- the locked-keyring gate says why initialize alone is safe
- parity table for the async file-store detection
…talled copy; one start per signed-out agy

- antigravityManagedAgyEnabled (default on, no UI): off restores the old
  rule, where only a signed-in agy takes new chats and Install puts Orca's
  server; Orca's agy stays registered, so chats pinned to it still launch
- updateIfBehind returns before looking up the latest release when no copy
  is installed
- without a login to find, agy is asked only whether it can serve chats,
  cached for the binary, so a signed-out agy starts once, not every 5 min
…pdates; keep agy chats' auth context

- off, the host backend input never offers Orca's copy, so new chats and
  Install go by the user's own agy or Orca's server, and the copy isn't
  updated; chats already on it still launch it, and one on a host with no
  agy keeps launch's cliMissing refusal
- a chat on agy keeps its auth context while its program isn't known; only
  the chip waits
- a macOS or Windows store that can't be read reads as locked, not absent
…ing starts agy unasked

- off, launch no longer falls back to Orca's agy: chats pinned to agy run
  the user's own agy (same history) or refuse as agy not found; an inherited
  PATH copy of Orca's agy never counts as the user's own; a copy Orca isn't
  updating offers its own Update
- host-backend questions say whether someone is using the agent: only chat
  starts and Install may start agy; menus, health and catalogs name agy only
  when signed in, and never start it for an absent or locked login
- a timed-out agy leaves new chats on an installed Orca server, as on main
…Orca's agy on PATH never counts as the user's own

- select no longer narrows unasked readers to a signed-in agy: they read
  earlier answers and never start agy, so an installed but signed-out or
  locked agy stays the host program for menus and catalogs
- a first probe answer also retires remembered choices
- a path inside Orca's agy folder is never the user's own, for new chats or
  (while off) launches, which then refuse as agy not found
… host

Agent detection searched PATH only, so after Orca installed a CLI (agy on a
fresh host) menus, Settings › Agents and bot choices still said it wasn't
installed. Detection now adds the agents whose Orca copy is installed and may
run (Antigravity's kill switch off: not counted), on the host itself, not a
WSL guest; terminals already get those folders on PATH. A settled install or
removal reads the host's agent list again.
…; detection waits for the first release read

- a settled install or removal clears all of that host's detected-agent lists
  (local contexts, or every key of a paired host), so Settings › Agents,
  launch menus and native lists read again; a surface opened later catches an
  unobserved settle
- detection waits (bounded) for launch reclaim's first read of Orca's
  releases instead of caching a list without them
- a host program's changed answer re-derives agent availability
…h the detection hold

Settings, Source control and the status bar read the host's own list outside
the hooks that re-ensure, so it is asked for again after an install settles.
Once the startup hold is waited out, later detections don't wait again.
@nwparker
nwparker force-pushed the nwparker/agy-managed-cli branch from ec3a279 to be1a08a Compare November 20, 2026 12:41
…mand until launch has

Detection waited (up to 15 s) for the first-window fence before launch reclaim
registered Orca's copies, so the first agent lists of every desktop start
waited on it. The detection provider is now registered at runtime start and,
until reclaim has read the releases, looks for them itself with an async
receipt check; afterwards the remembered releases answer. Nothing waits.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant