Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(providers): add Google Antigravity via the official ACP agent #9348

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 7 commits intomain fromrefs/pull/9348/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Google ships an official Antigravity agent on the ACP registry, but it has no CLI, no npm package, and no login command. Users could not use their Google AI subscription in T3 Code.

This adds Antigravity as a sixth built-in provider, off by default and listed after the others. Everything runs through Google's official ACP executable. Personal Google sign-in is the default. The instance config can also select Gemini Enterprise, a Gemini API key, or Agent Platform (Vertex AI). T3 Code never falls back from the method you pick.

What the user does

  1. Enable Antigravity in Settings.
  2. Click Install. T3 Code downloads the official archive from Google, checks its SHA-256 and size, extracts the executable pair, and validates it with an ACP initialize call. Progress streams to every client.
  3. Click Sign in with Google and complete consent. On the host machine the loopback redirect finishes on its own. From a phone or another computer, paste the failed 127.0.0.1 redirect URL into the setup card.
  4. Pick a Gemini model and chat. Models come from Google per account.

Sign out, cancel, retry, and Remove downloaded runtime are all on the same card. /logout in a thread signs out the instance too.

How it works

  • AntigravityInstallation owns downloads and the immutable tools/antigravity-acp/<platform>-<arch>/versions tree. active.json selects the release for new processes. Running processes hold a lease so updates never replace a live binary.
  • AntigravityAuth owns the sign-in flow per instance. The official agent prints its OAuth URL as one plain stdout line, so the ACP transport gets a stdout filter that catches only that exact prefix. A controlled BROWSER helper stops the agent from opening a browser on the host. Each instance gets its own GEMINI_HOME profile with file token storage, so two accounts never share a keychain entry.
  • The adapter maps T3 permission modes onto the agent's default, auto_edit, and yolo modes, routes the agent's interaction_ permission requests to T3's user input questions, promotes commands that outlive a turn to background tasks, and rejects conversation rewind before the checkpoint reactor touches files.
  • New RPCs: provider.auth.* and provider.install.*. New ServerProvider fields: setup, supportsConversationRollback, supportsTextGeneration. Old clients ignore them.
  • Shared ACP runtime gains session/resume, a wait-for-prompt cancel path, stderr draining, thought chunks, and startup metadata buffering. Other providers keep their existing behavior.

Using the whole ACP surface

The later commits pick up everything the agent exposes:

  • Chat sessions advertise fs.readTextFile and fs.writeTextFile. The agent reads and edits workspace files through T3 with its client_view_file and client_edit_file tools. Each write arrives as a file change approval with the content, so Supervised and Auto-accept edits work the same as other providers. Reads and writes are contained to the workspace and the attachments directory.
  • Audio attachments (wav, mp3, m4a, ogg, flac, webm) are sent as native audio blocks. Images, PDFs, and text were already covered.
  • The attachments directory is passed as an additionalDirectories entry on session/new and session/resume.
  • The agent's agy.security.warning on "allow always" is surfaced on the Allow for this thread option, with a tooltip on web and inline text on mobile.
  • All four ACP auth methods. Sign-in method in the provider settings selects oauth-personal, oauth-business, gemini-api-key, or agent-platform. API keys pass through the agent's environment as GEMINI_API_KEY or GOOGLE_API_KEY. The GCP project and location are written to the profile's settings.json on each launch. The setup card relabels sign-in as Connect for the two methods that never open a browser. Ambient GOOGLE_* variables on the host are still stripped.
  • Generated images were already rendered through imagePath, so no change there.

Not shipped on purpose: the agent's global hooks and MCP config files. T3 Code already refuses text generation helpers when those exist in the profile, and there is no product surface that wants them yet.

Ordering and model list

Provider snapshots used to sort by display name, which put Antigravity first everywhere. They now sort by built-in driver order, so Codex and Claude lead and Antigravity is last in Settings and the picker sidebar.

Google returns every Gemini generation the account can use, 11 models today, and still marks Gemini 3.7 Flash (High) as its current default. The bundled model manifest now names Gemini 3.8 Flash as current for Antigravity with 3.8 Flash (High) as the chat default. The driver classifies through it like Codex does, so the picker shows three entries and folds the other eight under Legacy models, and new threads start on 3.8 Flash (High). Updating the manifest on main changes both without a release.

Verified on the real agent

Linux x64, isolated dev server, real Google account:

  • Install from dl.google.com, hash verified, activated.
  • Sign-in through the remote callback path, 11 models returned.
  • A plain turn replied through Gemini 3.8 Flash.
  • A tool turn created a file, ran cat, and the checkpoint diff shows one changed file.
  • Status survives a server restart. Refresh with model reload flips the card to Authenticated.
  • A supervised turn asked the agent to edit notes.txt. The provider log shows client_edit_file, T3 raised a file change approval, and the file on disk changed. A turn with an attached 440 Hz wav replied "I hear a continuous, clear, single-pitch sine wave tone." Switching the live instance to Gemini API key relabels the card, Connect without a key reports the missing credential without spawning a process, and switching back to Google account keeps the saved token.
  • After the manifest change, a live refresh reports the three Gemini 3.8 Flash models as current and the other eight as legacy. A turn on the provider default alias started on gemini-3.8-flash-high.

One bug surfaced during this: Google gzips the archive, so the pinned content-length check rejected every real download. Fixed and covered by a test.

Not covered here

  • macOS Apple Silicon, Linux ARM64, and Windows are wired with pinned hashes but were not launched on real hosts.
  • No Intel Mac build exists on the registry. The card says so instead of failing a download.
  • Mobile setup screen was built and unit tested, not driven on a device.
  • Gemini Enterprise and Agent Platform were exercised through the mock agent and config checks only. I do not have a GCP project with a Gemini Enterprise license.

Screenshots

Provider card after install, before the first authenticated session:

Antigravity provider card

A tool-using turn through Antigravity with the checkpoint diff:

Antigravity thread with tool use

Provider list with Antigravity last, and the card with the sign-in method select:

Antigravity last in the provider list

Sign-in method choices

Gemini API key selected with no key entered, after pressing Connect:

Missing API key message

Model picker with only Gemini 3.8 Flash current and the older generations folded:

Antigravity model picker

Docs: docs/user/providers-antigravity.md, install, permission modes, remote access, and docs/internals/providers.md.

Built with Claude Fable 5.1 in Claude Code, on top of research and implementation from a GPT-5.6 Sol thread in T3 Code.


Note

Medium Risk Touches OAuth sign-in, queued message delivery gating, and user-input answer semantics on mobile; mistakes could block sends or submit wrong interaction answers, but changes are mostly client-side with guards and tests.

Overview Documents Google Antigravity alongside existing providers in README and AGENTS.md, including install/sign-in steps that do not require a CLI.

On mobile, adds end-to-end Antigravity provider setup: a dedicated settings route (enable/disable, managed install progress, Google OAuth with browser + pasted 127.0.0.1 callback), ProviderSetupLink entry points from environments, connections, cloud onboarding, and the thread model picker, plus an Antigravity icon.

Model selection behavior changes for Antigravity: the app keeps the user’s selection when setup or catalog changes make it unusable, surfaces isUnavailable in the picker, blocks send/start until setup completes, and routes explicit catalog refresh through refreshModels: true. Plan/build interaction mode is suppressed when the server sets showInteractionModeToggle: false, while native provider /plan slash commands still insert literal text.

Pending user input now submits option values (not display labels), honors allowCustomAnswer: false, and approval cards can show option warnings. Clipboard / external URL helpers add a provider-auth target and tighten logging so OAuth URLs and secrets do not appear in diagnostics. The thread outbox waits for server config before sending even text-only messages so provider capability checks can run.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 3c5d7037c87f01508b11f11aa0e6c56b968e0963. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Add Google Antigravity provider via the official ACP agent

  • Adds the full Antigravity provider stack: a built-in driver, ACP session adapter, server provider factory, managed installation service with release downloads, owned OAuth authentication controller, text-generation support, and native skill discovery across user and project roots
  • Introduces WebSocket RPC contracts and handlers for provider authentication (start, complete, cancel, logout, subscribe) and installation (start, cancel, subscribe, remove), with authorization scopes enforced in RpcAuthorization.ts
  • Adds provider setup UI across web and mobile: status banners, model picker setup entries, instance-targeted settings panels, and composer send-block reasons for unauthenticated or uninstalled Antigravity instances
  • Refactors pending user input to use native option values instead of display labels and respects allowCustomAnswer to block custom text on choice-only questions
  • Adds conversation rollback capability checks to ProviderService and CheckpointReactor so unsupported providers reject reverts before any file or history changes
  • Risk: ProviderServiceShape gains a required assertConversationRollbackSupported method; all in-tree implementations and test harnesses are updated, but out-of-tree consumers must implement it. Model-list subscription atom family keys now include the refreshModels flag, invalidating any pre-existing cached entries for the same environment/instance.
Macroscope summarized 3c5d703.
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    2. github-actions[bot](GitHub profile, opens in a new tab)commented

      Thread transfer impact

      ✅ Thread transfer remains within every enforced ceiling.

      ProviderMetricMain baselineThis PRImpactPR ceiling
      CodexTotal thread wire13.6 KiB13.6 KiB−2 B (−0.0%)15.1 KiB✅
      CodexThread snapshot wire7.0 KiB7.0 KiB+4 B (+0.1%)7.3 KiB✅
      CodexLive turn WebSocket wire6.6 KiB6.6 KiB−6 B (−0.1%)7.8 KiB✅
      CodexLive turn WebSocket decoded57.1 KiB57.1 KiB0 B (0.0%)66.4 KiB✅
      CodexLive turn messages10100 (0.0%)21✅
      ClaudeTotal thread wire13.5 KiB13.6 KiB+40 B (+0.3%)15.1 KiB✅
      ClaudeThread snapshot wire7.0 KiB7.0 KiB0 B (0.0%)7.3 KiB✅
      ClaudeLive turn WebSocket wire6.5 KiB6.5 KiB+40 B (+0.6%)7.8 KiB✅
      ClaudeLive turn WebSocket decoded57.8 KiB57.8 KiB+44 B (+0.1%)66.4 KiB✅
      ClaudeLive turn messages89+1 (+12.5%)21✅

      Baseline: 4b26132 · PR result: 3c5d703 · Source CI: success

      Scenario and decoded snapshot size

      10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

      • Codex decoded thread snapshot: 113.8 KiB
      • Claude decoded thread snapshot: 114.5 KiB

      Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Macroscope skipped reviewing this pull request. Per-review cost limit exceeded (workspace setting).

      This review would cost an estimated $31.15, which exceeds your per-review limit of $10.00.

      The top 3 files driving up this estimate:

      FileDiff SizeEstimate
      apps/server/src/provider/Layers/AntigravityAdapter.ts44.23KB$2.21
      apps/server/src/provider/AntigravityInstallation.ts37.44KB$1.87
      apps/server/src/provider/acp/AcpSessionRuntime.ts26.32KB$1.32

      Tip

      To get this pull request reviewed, you can:

      1. Comment @macroscope-app on this PR to request a manual review (monthly spend limits still apply).
      2. Exclude the file(s) above from review by adding a pattern to your .macroscope/ignore.md — note that creating this file replaces Macroscope's built-in default ignores rather than extending them.
      3. Raise your cost limit in your workspace billing settings.
      [Turn off this reminder going forward](https://app.macroscope.com/pingdotgg/settings#Personal)
    4. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Not approved

      Macroscope's review found this PR not approvable — This PR introduces a substantial Antigravity runtime, authentication, installation, ACP-session, and web/mobile setup workflow, with changes reaching shared production paths. It also changes product defaults, adds a static-analysis suppression, and has an unresolved sign-in retry race concern requiring human assessment.

      Not approved because:

      • Per-review cost limit exceeded (workspace setting). Approvability relies on correctness review in order to determine eligibility
      Review your spending limits in [Billing settings](https://app.macroscope.com/pingdotgg/settings/billing), or comment `@macroscope-app review this PR` to bypass the limit and review now. You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    5. Please Theo, I have beeeen waiting for this.

    6. Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

      Fix All in Cursor ❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the [Cursor dashboard](https://www.cursor.com/dashboard/bugbot). Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 1ebbaefb0e961b8eb18766d3de68406f8135c4f6. Configure [here](https://www.cursor.com/dashboard/bugbot).
      @@ -0,0 +406,21 @@
      406+ // the deadline.
      407+ const forwarding = yield* (
      408+ options.forwardCallback?.(callback) ??
      409+ forwardAntigravityCallback(options.instanceId, callback)
      410+ ).pipe(
      411+ // stopFlow interrupts this fiber, so it runs from a sibling fiber.
      412+ Effect.tapError(() =>
      413+ stopFlow(flow, "failed", FORWARDING_FAILED_MESSAGE).pipe(
      414+ Effect.forkIn(instanceScope),
      415+ ),
      416+ ),
      417+ Effect.interruptible,
      418+ Effect.forkIn(instanceScope),
      419+ );
      420+ flow.forwarding = forwarding;
      421+ return { flow, forwarding };
      422+ }),
      423+ );
      424+ const forwarded = yield* Fiber.await(pending.forwarding);
      425+ if (Exit.isFailure(forwarded)) {
      426+ return yield* setupError("complete", FORWARDING_FAILED_MESSAGE);

      Sign-in retry races cleanup

      Medium Severity

      When callback delivery fails, complete now returns immediately and only fails the flow from a forked tapError handler. The client can retry while stopFlow is still interrupting the agent, so start sees operation === "cancel" and reports that setup is already in progress. Previously complete awaited stopFlow before returning, so retry was possible as soon as the error appeared.

      Fix in Cursor Fix in Web
      Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 1ebbaefb0e961b8eb18766d3de68406f8135c4f6. Configure [here](https://www.cursor.com/dashboard/bugbot).

      Addressed in #9519. The callback forwarding fiber now awaits stopFlow() after delivery failure without interrupting itself, and the regression test verifies that complete() stays pending until process cleanup finishes before an immediate retry.

    7. t3dotgg(GitHub profile, opens in a new tab) added labelspreview:mac

    8. github-actions[bot](GitHub profile, opens in a new tab)commented

      macOS preview

      The preview download was removed because this PR closed or the preview label was removed.

Sign in to join this conversation.