fix(server): distinguish the Antigravity CLI from the missing ACP runtime#10932

closed3
main
GitHub fork: t3code/fix-antigravity-detection
openedSep 9, 2026byMMarve10s
View on GitHubTwo-way sync enabledPR last imported 10d ago

What Changed

When no Antigravity ACP runtime is found, the provider status now checks whether the agy CLI is on PATH. If it is, the status reads:

The Antigravity CLI is installed, but T3 Code runs the separate Antigravity ACP agent. Install it in this environment or set a custom executable path.

The existing "Antigravity is not installed" message is unchanged for machines without the CLI. Resolution order, managed installs, PATH lookup of agy_acp_server.par, and the custom binary path override all behave as before.

Why

The Antigravity provider runs Google's agy_acp_server.par ACP agent, not the agy CLI. Anyone who already uses the CLI sees "Antigravity is not installed" next to a tool they installed and use daily, which reads as a detection bug rather than a setup step. The provider has no way to say "you have the wrong binary", so users go looking for a PATH or permissions problem instead of pressing Install in Settings > Providers.

The message is the only thing that is wrong here. The alternative would be to accept the CLI as a runtime and drive it directly, which is what #3056 originally asked for. That path is far more complex: the CLI has no ACP mode, print mode cannot surface permission prompts, and events would have to come from undocumented transcript files. #9348 deliberately chose the official ACP agent instead, so this change keeps that design and only makes the status honest about which binary is missing.

Summary by CodeRabbit

Bug Fixes

  • Bug Fixes
    • Improved Antigravity installation detection across supported platforms.
    • Added clearer error details when the Antigravity CLI is installed but its required ACP agent is unavailable.
    • Clarified error messaging when Antigravity is not installed.

Added 1 commit

  • fix(server): distinguish the Antigravity CLI from the missing ACP runtime29da082
Synced from GitHub

Bugbot is paused β€” on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

Synced from GitHub

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

ReviewStatusCommitReview trigger
πŸ“ Code Reviewβœ… Completed 2026-09-10T10:56:27.911989Ze059046New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with πŸ‘€ while any review is running, comments if it has suggestions, and reacts with πŸ‘ once all reviews finish with no findings.

apps/server/src/provider/AntigravityInstallation.tsline 407Outdated Β· 29da082Open thread
……@@ -400,6 +400,17 @@ export const makeAntigravityInstallation = Effect.fn("AntigravityInstallation.ma
404+ processEnvironment?: NodeJS.ProcessEnv,
405+ ) {
406+ for (const name of platform === "win32" ? ["agy.exe", "agy.cmd"] : ["agy"]) {
407+ for (const candidate of pathCandidates(name, processEnvironment)) {
MmacroscopeappBoton line 407Sep 9, 2026

🟑 Medium provider/AntigravityInstallation.ts:407

On POSIX, cliOnPath fails to detect ./agy when PATH contains an empty component such as PATH=:/usr/bin, so resolution returns the generic β€œnot installed” error instead of the CLI-specific guidance. pathCandidates filters out empty components even though POSIX treats them as the current directory; preserve them as . when building candidates.

πŸ€– Copy this AI Prompt to have your agent fix this:
text
1In file @apps/server/src/provider/AntigravityInstallation.ts around line 407:
2
3On POSIX, `cliOnPath` fails to detect `./agy` when `PATH` contains an empty component such as `PATH=:/usr/bin`, so resolution returns the generic β€œnot installed” error instead of the CLI-specific guidance. `pathCandidates` filters out empty components even though POSIX treats them as the current directory; preserve them as `.` when building candidates.

Not changing this. The CLI check deliberately reuses pathCandidates, the same helper the provider already uses to find agy_acp_server.par on PATH and to resolve a bare-name Binary path override. Empty PATH components are dropped in every one of those lookups today, so this diagnostic is consistent with how the runtime itself is resolved.

Preserving empty components as . would change executable lookup for the whole provider and make the server search its working directory for binaries, which is outside the scope of a status-message fix. In the edge case described, the user sees the existing generic "not installed" message, which is exactly today's behavior.

Sorry, I'm unable to act on this request because you do not have permissions within this repository.

Synced from GitHub

Approvability

Verdict: Would Approve

Macroscope's review found this PR approvable β€” This is a narrowly scoped server-side diagnostic fix that distinguishes an installed Antigravity CLI from the separate ACP runtime without changing successful resolution or installation paths. A known medium-severity POSIX empty-PATH edge case remains independently blocking under the repository’s correctness policy.

Not approved because:

  • 1 blocking correctness issue found at or above your repo's Minimum Blocking Severity

Adjust the Minimum Blocking Severity for this repo β€” including turning it Off β€” in Settings. You can add or adjust custom eligibility rules. Learn more.

Synced from GitHub

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. πŸŽ‰

ℹ️ Recent review info
βš™οΈ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: c887aa7e-074d-481f-9b97-974bb8451646

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 29da082724a73e96dabfc8c21d50047c8a3203b0 and 70d232fc5a8c3ef056f1f821a21c974df79bc205.

πŸ“’ Files selected for processing (2)
  • apps/server/src/provider/AntigravityInstallation.test.ts
  • apps/server/src/provider/AntigravityInstallation.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


πŸ“ Walkthrough

Walkthrough

The Antigravity installation resolver now uses the shared isCommandAvailable helper for agy detection. It reports separate details when only the CLI is installed or when no Antigravity binary is available. A Windows-skipped test covers both cases.

Changes

Antigravity installation resolution

Layer / File(s)Summary
CLI detection and ACP error handling
apps/server/src/provider/AntigravityInstallation.ts, apps/server/src/provider/AntigravityInstallation.test.ts
The resolver uses injected platform, filesystem, and path services with isCommandAvailable("agy"). When only the CLI is available, it returns the separate ACP-agent installation error. The test verifies distinct details for CLI-only and empty PATH cases.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: juliusmarminge, t3dotgg

Merge Risk: βšͺ Minimal Β· up to e0590

Antigravity status now distinguishes an installed CLI from a missing ACP agent, giving users the correct installation guidance while preserving existing resolution behavior. No current merge-blocking risk remains.

πŸš₯ Pre-merge checks | βœ… 5
βœ… Passed checks (5 passed)
Check nameStatusExplanation
Title checkβœ… PassedThe title clearly and concisely identifies the main change: distinguishing the Antigravity CLI from the missing ACP runtime.
Description checkβœ… PassedThe description includes complete What Changed and Why sections and explains the unchanged behavior and scope. The optional UI Changes section is not applicable. The Checklist section is missing, but …
Docstring Coverageβœ… PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues checkβœ… PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes checkβœ… PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

Cchatgpt-codex-connectorBotreviewed Β· 2 inline threadsSep 9, 2026
Synced from GitHub

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 29da082724

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

apps/server/src/provider/AntigravityInstallation.tsline 406Outdated Β· 29da082Open thread
……@@ -400,6 +400,17 @@ export const makeAntigravityInstallation = Effect.fn("AntigravityInstallation.ma
403+ const cliOnPath = Effect.fn("AntigravityInstallation.cliOnPath")(function* (
404+ processEnvironment?: NodeJS.ProcessEnv,
405+ ) {
406+ for (const name of platform === "win32" ? ["agy.exe", "agy.cmd"] : ["agy"]) {

P2 Badge Resolve agy using Windows PATHEXT

On Windows, when agy is available through agy.bat, a custom PATHEXT extension, or an uppercase extension in a case-sensitive PATH directory, this hardcoded pair returns false even though the shell can resolve the command. The canonical resolver already enumerates PATHEXT and upper/lowercase candidates in packages/shared/src/shell.ts:442-482; use that resolver here so these installations receive the intended CLI-specific message.

Useful? React with πŸ‘Β / πŸ‘Ž.

Addressed in 70d232f. The CLI check now goes through isCommandAvailable from @t3tools/shared/shell, so Windows resolution follows PATHEXT and case variants the same way the rest of the server resolves commands, and the hardcoded extension pair is gone.

apps/server/src/provider/AntigravityInstallation.tsline 441Outdated Β· 29da082Open thread
……@@ -427,6 +438,12 @@ export const makeAntigravityInstallation = Effect.fn("AntigravityInstallation.ma
427438 const selected = yield* fromExternal(candidate, "path");
428439 if (selected) return selected;
429440 }
441+ if (releaseAsset && (yield* cliOnPath(processEnvironment))) {

P1 Badge Add focused coverage for CLI-only resolution

This branch introduces a new observable backend resolution outcome, but the commit adds no test covering CLI-only PATH detection or the resulting error detail. Add focused cases for the CLI-present and CLI-absent paths, including Windows command resolution, so this distinction cannot silently regress.

AGENTS.md reference: AGENTS.md:L109-L109

Useful? React with πŸ‘Β / πŸ‘Ž.

Added in 70d232f: a focused case in AntigravityInstallation.test.ts that resolves with an empty PATH directory and gets the generic message, then with a directory holding only an executable agy and gets the CLI-specific detail. Windows command resolution is covered by the shared resolver's own tests now that this path uses it.

Added 1 commit

  • fix(server): resolve the Antigravity CLI with the shared command resolver70d232f

Added 1 commit

  • Merge branch 'main' into t3code/fix-antigravity-detectione059046
Cchatgpt-codex-connectorBotreviewed Β· 1 inline threadSep 10, 2026
Synced from GitHub

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e059046fef

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

……@@ -427,6 +435,12 @@ export const makeAntigravityInstallation = Effect.fn("AntigravityInstallation.ma
438+ if (releaseAsset && (yield* cliOnPath(processEnvironment))) {
439+ return yield* installationError(
440+ "resolve",
441+ "The Antigravity CLI is installed, but T3 Code runs the separate Antigravity ACP agent. Install it in this environment or set a custom executable path.",

P1 Badge Preserve missing-runtime classification in the new error

When agy is the only Antigravity executable on PATH, this detail becomes a ProviderSetupError, but isMissingInstallation in Layers/AntigravityProvider.ts only recognizes details containing not installed, missing, incomplete, or does not publish. Consequently checkProvider sets installed: true, preserves stale provider metadata, and lets onboarding/chat bypass their missing-runtime guards even though the ACP agent cannot start. Classify this error structurally or retain a recognized missing-runtime marker in the detail.

Useful? React with πŸ‘Β / πŸ‘Ž.

Thanks for the PR. We're not taking changes to the orchestration and provider layers right now: that part of the server is being rewritten for V2, and merging into the current code would either conflict with or be thrown away by that work.

Closing for now. If this is still an issue once V2 lands, please reopen (or open a fresh PR against the new code) and we'll take a proper look.