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

Merged
t3dotgg merged 7 commits into
mainfrom
t3code/integrate-antigravity-acp
Sep 3, 2026
Merged

feat(providers): add Google Antigravity via the official ACP agent#9348
t3dotgg merged 7 commits into
mainfrom
t3code/integrate-antigravity-acp

Conversation

@t3dotgg

@t3dotggt3dotgg commented Sep 3, 2026

Copy link
Copy Markdown
Member

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 for commit 3c5d703. Bugbot is set up for automated code reviews on this repo. Configure here.

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.

@github-actionsgithub-actionsBot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL 1,000+ changed lines (additions + deletions). labels Sep 3, 2026
@github-actions

github-actionsBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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.

@macroscopeapp

macroscopeappBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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

Comment threadapps/server/src/provider/antigravityAuthSupport.ts
Comment threadapps/mobile/src/features/threads/use-project-actions.ts
@macroscopeapp

macroscopeappBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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, or comment @macroscope-app review this PR to bypass the limit and review now. You can add or adjust custom eligibility rules. Learn more.

@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from b3533f9 to 549fcbbCompareSeptember 3, 2026 06:12
Comment threadapps/server/src/provider/acp/AntigravityAcpSupport.ts Outdated
Comment threadapps/server/src/provider/antigravityAuthSupport.ts Outdated
Comment threadapps/server/src/provider/Drivers/AntigravitySkills.ts Outdated
Comment threadapps/server/src/provider/Services/ProviderAuthService.ts
Comment threadapps/server/src/provider/antigravityCallback.ts Outdated
@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from 549fcbb to 7bfe6f2CompareSeptember 3, 2026 06:37
@RudolphLamp

Copy link
Copy Markdown

Please Theo, I have beeeen waiting for this.

@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from 7bfe6f2 to ef6c47bCompareSeptember 3, 2026 07:13

@cursorcursorBot 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.

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.

Reviewed by Cursor Bugbot for commit 1ebbaef. Configure here.

);
const forwarded = yield* Fiber.await(pending.forwarding);
if (Exit.isFailure(forwarded)) {
return yield* setupError("complete", FORWARDING_FAILED_MESSAGE);

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.

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 CursorFix in Web

Reviewed by Cursor Bugbot for commit 1ebbaef. Configure here.

Comment threadapps/server/src/provider/Layers/AntigravityProvider.ts
@t3dotggt3dotgg added the preview:mac Build an Apple Silicon DMG for this PR on every push. label Sep 3, 2026
@github-actions

github-actionsBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

macOS preview

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

t3dotggand others added 7 commits September 3, 2026 02:21
Antigravity only used part of what its ACP agent offers. Chat sessions now
advertise the client file system, so the agent reads and edits workspace files
through T3 and every write becomes a file change approval. Audio files attach
as native audio blocks. The attachments directory is granted as an additional
session directory. The agent's prompt injection warning on "allow always" is
shown next to the "Allow for this thread" choice on web and mobile.
The instance config selects the ACP auth method: Google account (default),
Gemini Enterprise, Gemini API key, or Agent Platform. API keys pass through
the agent's environment and the GCP project and location through the
profile's settings.json. Setup cards on web and mobile relabel sign-in as a
credential check for the non-browser methods. The provider settings form gains
a select control for this.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Drop the platform error text from a wire-facing invalidParams data field,
state the reason next to two node builtin import suppressions, and use
catchTags for the single tagged PlatformError in the skills probe.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Provider lists sorted by display name, which put Antigravity first. Snapshots
now sort by built-in driver order, so Codex and Claude lead and Antigravity
is last on every client. The legacy settings struct matches that order.
Google returns every Gemini generation the account can use. The bundled
model manifest now names Gemini 3.8 Flash as current for Antigravity and the
driver classifies through it like Codex does, so the picker folds the older
models under its legacy section.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…view
Four review findings, each reproduced by a focused test:
- The profile settings.json now records auth.type, so the agent's logout
clears only the active method's token instead of every stored token.
- Callback forwarding failure is handled by an instance-owned fiber. A
client that disconnects after sending the redirect URL no longer leaves the
flow at "verifying" until the deadline.
- Skills discovered on disk survive session and command updates. They were
replaced with an empty list, and the registry never re-read the workspace.
- Web blocks Send when a ready Antigravity catalog no longer lists the saved
model, matching mobile. Provider error states still allow a retry.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The catalog took Google's current model as the default, which is still
Gemini 3.7 Flash (High). The model manifest now names a chat default for
Antigravity and applyModelManifest moves the default flag and its alias to
that model when the account offers it. The default alias resolves to the
same model at session start, turn start, and in text generation helpers,
and falls back to the agent's choice when the account lacks it.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from 1ebbaef to 3c5d703CompareSeptember 3, 2026 09:21
@t3dotgg
t3dotgg merged commit 0633646 into mainSep 3, 2026
27 checks passed
@t3dotgg
t3dotgg deleted the t3code/integrate-antigravity-acp branch September 3, 2026 09:34
github-actionsBot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 3, 2026
## What's Changed
* fix(web): keep trailing tool groups out of "Worked for" accordion by @Yash-Singh1 in pingdotgg/t3code#9384
* feat(marketing): put named-developer quotes on the landing page by @t3dotgg in pingdotgg/t3code#9385
* fix(claude): expand slash commands when a message has attachments by @t3dotgg in pingdotgg/t3code#9122
* fix(web): stop the resting composer layout loop by @t3dotgg in pingdotgg/t3code#9393
* fix(web): render assistant images inline in chat by @t3dotgg in pingdotgg/t3code#9126
* feat(providers): add Google Antigravity via the official ACP agent by @t3dotgg in pingdotgg/t3code#9348
**Full Changelog**: pingdotgg/t3code@v0.0.39-nightly.20260903.1267...v0.0.39-nightly.20260903.1268
Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.39-nightly.20260903.1268
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview:macBuild an Apple Silicon DMG for this PR on every push.size:XXL1,000+ changed lines (additions + deletions).vouch:trustedPR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@t3dotgg@RudolphLamp
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

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

Merged
t3dotgg merged 7 commits into
mainfrom
t3code/integrate-antigravity-acp
Sep 3, 2026
Merged

feat(providers): add Google Antigravity via the official ACP agent#9348
t3dotgg merged 7 commits into
mainfrom
t3code/integrate-antigravity-acp

Conversation

@t3dotgg

@t3dotggt3dotgg commented Sep 3, 2026

Copy link
Copy Markdown
Member

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 for commit 3c5d703. Bugbot is set up for automated code reviews on this repo. Configure here.

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.

@github-actionsgithub-actionsBot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL 1,000+ changed lines (additions + deletions). labels Sep 3, 2026
@github-actions

github-actionsBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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.

@macroscopeapp

macroscopeappBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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

Comment threadapps/server/src/provider/antigravityAuthSupport.ts
Comment threadapps/mobile/src/features/threads/use-project-actions.ts
@macroscopeapp

macroscopeappBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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, or comment @macroscope-app review this PR to bypass the limit and review now. You can add or adjust custom eligibility rules. Learn more.

@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from b3533f9 to 549fcbbCompareSeptember 3, 2026 06:12
Comment threadapps/server/src/provider/acp/AntigravityAcpSupport.ts Outdated
Comment threadapps/server/src/provider/antigravityAuthSupport.ts Outdated
Comment threadapps/server/src/provider/Drivers/AntigravitySkills.ts Outdated
Comment threadapps/server/src/provider/Services/ProviderAuthService.ts
Comment threadapps/server/src/provider/antigravityCallback.ts Outdated
@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from 549fcbb to 7bfe6f2CompareSeptember 3, 2026 06:37
@RudolphLamp

Copy link
Copy Markdown

Please Theo, I have beeeen waiting for this.

@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from 7bfe6f2 to ef6c47bCompareSeptember 3, 2026 07:13

@cursorcursorBot 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.

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.

Reviewed by Cursor Bugbot for commit 1ebbaef. Configure here.

);
const forwarded = yield* Fiber.await(pending.forwarding);
if (Exit.isFailure(forwarded)) {
return yield* setupError("complete", FORWARDING_FAILED_MESSAGE);

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.

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 CursorFix in Web

Reviewed by Cursor Bugbot for commit 1ebbaef. Configure here.

Comment threadapps/server/src/provider/Layers/AntigravityProvider.ts
@t3dotggt3dotgg added the preview:mac Build an Apple Silicon DMG for this PR on every push. label Sep 3, 2026
@github-actions

github-actionsBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

macOS preview

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

t3dotggand others added 7 commits September 3, 2026 02:21
Antigravity only used part of what its ACP agent offers. Chat sessions now
advertise the client file system, so the agent reads and edits workspace files
through T3 and every write becomes a file change approval. Audio files attach
as native audio blocks. The attachments directory is granted as an additional
session directory. The agent's prompt injection warning on "allow always" is
shown next to the "Allow for this thread" choice on web and mobile.
The instance config selects the ACP auth method: Google account (default),
Gemini Enterprise, Gemini API key, or Agent Platform. API keys pass through
the agent's environment and the GCP project and location through the
profile's settings.json. Setup cards on web and mobile relabel sign-in as a
credential check for the non-browser methods. The provider settings form gains
a select control for this.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Drop the platform error text from a wire-facing invalidParams data field,
state the reason next to two node builtin import suppressions, and use
catchTags for the single tagged PlatformError in the skills probe.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Provider lists sorted by display name, which put Antigravity first. Snapshots
now sort by built-in driver order, so Codex and Claude lead and Antigravity
is last on every client. The legacy settings struct matches that order.
Google returns every Gemini generation the account can use. The bundled
model manifest now names Gemini 3.8 Flash as current for Antigravity and the
driver classifies through it like Codex does, so the picker folds the older
models under its legacy section.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…view
Four review findings, each reproduced by a focused test:
- The profile settings.json now records auth.type, so the agent's logout
clears only the active method's token instead of every stored token.
- Callback forwarding failure is handled by an instance-owned fiber. A
client that disconnects after sending the redirect URL no longer leaves the
flow at "verifying" until the deadline.
- Skills discovered on disk survive session and command updates. They were
replaced with an empty list, and the registry never re-read the workspace.
- Web blocks Send when a ready Antigravity catalog no longer lists the saved
model, matching mobile. Provider error states still allow a retry.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The catalog took Google's current model as the default, which is still
Gemini 3.7 Flash (High). The model manifest now names a chat default for
Antigravity and applyModelManifest moves the default flag and its alias to
that model when the account offers it. The default alias resolves to the
same model at session start, turn start, and in text generation helpers,
and falls back to the agent's choice when the account lacks it.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from 1ebbaef to 3c5d703CompareSeptember 3, 2026 09:21
@t3dotgg
t3dotgg merged commit 0633646 into mainSep 3, 2026
27 checks passed
@t3dotgg
t3dotgg deleted the t3code/integrate-antigravity-acp branch September 3, 2026 09:34
github-actionsBot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 3, 2026
## What's Changed
* fix(web): keep trailing tool groups out of "Worked for" accordion by @Yash-Singh1 in pingdotgg/t3code#9384
* feat(marketing): put named-developer quotes on the landing page by @t3dotgg in pingdotgg/t3code#9385
* fix(claude): expand slash commands when a message has attachments by @t3dotgg in pingdotgg/t3code#9122
* fix(web): stop the resting composer layout loop by @t3dotgg in pingdotgg/t3code#9393
* fix(web): render assistant images inline in chat by @t3dotgg in pingdotgg/t3code#9126
* feat(providers): add Google Antigravity via the official ACP agent by @t3dotgg in pingdotgg/t3code#9348
**Full Changelog**: pingdotgg/t3code@v0.0.39-nightly.20260903.1267...v0.0.39-nightly.20260903.1268
Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.39-nightly.20260903.1268
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview:macBuild an Apple Silicon DMG for this PR on every push.size:XXL1,000+ changed lines (additions + deletions).vouch:trustedPR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@t3dotgg@RudolphLamp
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

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

Merged
t3dotgg merged 7 commits into
mainfrom
t3code/integrate-antigravity-acp
Sep 3, 2026
Merged

feat(providers): add Google Antigravity via the official ACP agent#9348
t3dotgg merged 7 commits into
mainfrom
t3code/integrate-antigravity-acp

Conversation

@t3dotgg

@t3dotggt3dotgg commented Sep 3, 2026

Copy link
Copy Markdown
Member

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 for commit 3c5d703. Bugbot is set up for automated code reviews on this repo. Configure here.

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.

@github-actionsgithub-actionsBot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL 1,000+ changed lines (additions + deletions). labels Sep 3, 2026
@github-actions

github-actionsBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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.

@macroscopeapp

macroscopeappBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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

Comment threadapps/server/src/provider/antigravityAuthSupport.ts
Comment threadapps/mobile/src/features/threads/use-project-actions.ts
@macroscopeapp

macroscopeappBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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, or comment @macroscope-app review this PR to bypass the limit and review now. You can add or adjust custom eligibility rules. Learn more.

@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from b3533f9 to 549fcbbCompareSeptember 3, 2026 06:12
Comment threadapps/server/src/provider/acp/AntigravityAcpSupport.ts Outdated
Comment threadapps/server/src/provider/antigravityAuthSupport.ts Outdated
Comment threadapps/server/src/provider/Drivers/AntigravitySkills.ts Outdated
Comment threadapps/server/src/provider/Services/ProviderAuthService.ts
Comment threadapps/server/src/provider/antigravityCallback.ts Outdated
@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from 549fcbb to 7bfe6f2CompareSeptember 3, 2026 06:37
@RudolphLamp

Copy link
Copy Markdown

Please Theo, I have beeeen waiting for this.

@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from 7bfe6f2 to ef6c47bCompareSeptember 3, 2026 07:13

@cursorcursorBot 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.

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.

Reviewed by Cursor Bugbot for commit 1ebbaef. Configure here.

);
const forwarded = yield* Fiber.await(pending.forwarding);
if (Exit.isFailure(forwarded)) {
return yield* setupError("complete", FORWARDING_FAILED_MESSAGE);

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.

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 CursorFix in Web

Reviewed by Cursor Bugbot for commit 1ebbaef. Configure here.

Comment threadapps/server/src/provider/Layers/AntigravityProvider.ts
@t3dotggt3dotgg added the preview:mac Build an Apple Silicon DMG for this PR on every push. label Sep 3, 2026
@github-actions

github-actionsBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

macOS preview

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

t3dotggand others added 7 commits September 3, 2026 02:21
Antigravity only used part of what its ACP agent offers. Chat sessions now
advertise the client file system, so the agent reads and edits workspace files
through T3 and every write becomes a file change approval. Audio files attach
as native audio blocks. The attachments directory is granted as an additional
session directory. The agent's prompt injection warning on "allow always" is
shown next to the "Allow for this thread" choice on web and mobile.
The instance config selects the ACP auth method: Google account (default),
Gemini Enterprise, Gemini API key, or Agent Platform. API keys pass through
the agent's environment and the GCP project and location through the
profile's settings.json. Setup cards on web and mobile relabel sign-in as a
credential check for the non-browser methods. The provider settings form gains
a select control for this.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Drop the platform error text from a wire-facing invalidParams data field,
state the reason next to two node builtin import suppressions, and use
catchTags for the single tagged PlatformError in the skills probe.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Provider lists sorted by display name, which put Antigravity first. Snapshots
now sort by built-in driver order, so Codex and Claude lead and Antigravity
is last on every client. The legacy settings struct matches that order.
Google returns every Gemini generation the account can use. The bundled
model manifest now names Gemini 3.8 Flash as current for Antigravity and the
driver classifies through it like Codex does, so the picker folds the older
models under its legacy section.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…view
Four review findings, each reproduced by a focused test:
- The profile settings.json now records auth.type, so the agent's logout
clears only the active method's token instead of every stored token.
- Callback forwarding failure is handled by an instance-owned fiber. A
client that disconnects after sending the redirect URL no longer leaves the
flow at "verifying" until the deadline.
- Skills discovered on disk survive session and command updates. They were
replaced with an empty list, and the registry never re-read the workspace.
- Web blocks Send when a ready Antigravity catalog no longer lists the saved
model, matching mobile. Provider error states still allow a retry.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The catalog took Google's current model as the default, which is still
Gemini 3.7 Flash (High). The model manifest now names a chat default for
Antigravity and applyModelManifest moves the default flag and its alias to
that model when the account offers it. The default alias resolves to the
same model at session start, turn start, and in text generation helpers,
and falls back to the agent's choice when the account lacks it.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from 1ebbaef to 3c5d703CompareSeptember 3, 2026 09:21
@t3dotgg
t3dotgg merged commit 0633646 into mainSep 3, 2026
27 checks passed
@t3dotgg
t3dotgg deleted the t3code/integrate-antigravity-acp branch September 3, 2026 09:34
github-actionsBot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 3, 2026
## What's Changed
* fix(web): keep trailing tool groups out of "Worked for" accordion by @Yash-Singh1 in pingdotgg/t3code#9384
* feat(marketing): put named-developer quotes on the landing page by @t3dotgg in pingdotgg/t3code#9385
* fix(claude): expand slash commands when a message has attachments by @t3dotgg in pingdotgg/t3code#9122
* fix(web): stop the resting composer layout loop by @t3dotgg in pingdotgg/t3code#9393
* fix(web): render assistant images inline in chat by @t3dotgg in pingdotgg/t3code#9126
* feat(providers): add Google Antigravity via the official ACP agent by @t3dotgg in pingdotgg/t3code#9348
**Full Changelog**: pingdotgg/t3code@v0.0.39-nightly.20260903.1267...v0.0.39-nightly.20260903.1268
Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.39-nightly.20260903.1268
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview:macBuild an Apple Silicon DMG for this PR on every push.size:XXL1,000+ changed lines (additions + deletions).vouch:trustedPR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@t3dotgg@RudolphLamp
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

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

Merged
t3dotgg merged 7 commits into
mainfrom
t3code/integrate-antigravity-acp
Sep 3, 2026
Merged

feat(providers): add Google Antigravity via the official ACP agent#9348
t3dotgg merged 7 commits into
mainfrom
t3code/integrate-antigravity-acp

Conversation

@t3dotgg

@t3dotggt3dotgg commented Sep 3, 2026

Copy link
Copy Markdown
Member

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 for commit 3c5d703. Bugbot is set up for automated code reviews on this repo. Configure here.

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.

@github-actionsgithub-actionsBot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL 1,000+ changed lines (additions + deletions). labels Sep 3, 2026
@github-actions

github-actionsBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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.

@macroscopeapp

macroscopeappBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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

Comment threadapps/server/src/provider/antigravityAuthSupport.ts
Comment threadapps/mobile/src/features/threads/use-project-actions.ts
@macroscopeapp

macroscopeappBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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, or comment @macroscope-app review this PR to bypass the limit and review now. You can add or adjust custom eligibility rules. Learn more.

@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from b3533f9 to 549fcbbCompareSeptember 3, 2026 06:12
Comment threadapps/server/src/provider/acp/AntigravityAcpSupport.ts Outdated
Comment threadapps/server/src/provider/antigravityAuthSupport.ts Outdated
Comment threadapps/server/src/provider/Drivers/AntigravitySkills.ts Outdated
Comment threadapps/server/src/provider/Services/ProviderAuthService.ts
Comment threadapps/server/src/provider/antigravityCallback.ts Outdated
@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from 549fcbb to 7bfe6f2CompareSeptember 3, 2026 06:37
@RudolphLamp

Copy link
Copy Markdown

Please Theo, I have beeeen waiting for this.

@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from 7bfe6f2 to ef6c47bCompareSeptember 3, 2026 07:13

@cursorcursorBot 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.

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.

Reviewed by Cursor Bugbot for commit 1ebbaef. Configure here.

);
const forwarded = yield* Fiber.await(pending.forwarding);
if (Exit.isFailure(forwarded)) {
return yield* setupError("complete", FORWARDING_FAILED_MESSAGE);

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.

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 CursorFix in Web

Reviewed by Cursor Bugbot for commit 1ebbaef. Configure here.

Comment threadapps/server/src/provider/Layers/AntigravityProvider.ts
@t3dotggt3dotgg added the preview:mac Build an Apple Silicon DMG for this PR on every push. label Sep 3, 2026
@github-actions

github-actionsBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

macOS preview

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

t3dotggand others added 7 commits September 3, 2026 02:21
Antigravity only used part of what its ACP agent offers. Chat sessions now
advertise the client file system, so the agent reads and edits workspace files
through T3 and every write becomes a file change approval. Audio files attach
as native audio blocks. The attachments directory is granted as an additional
session directory. The agent's prompt injection warning on "allow always" is
shown next to the "Allow for this thread" choice on web and mobile.
The instance config selects the ACP auth method: Google account (default),
Gemini Enterprise, Gemini API key, or Agent Platform. API keys pass through
the agent's environment and the GCP project and location through the
profile's settings.json. Setup cards on web and mobile relabel sign-in as a
credential check for the non-browser methods. The provider settings form gains
a select control for this.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Drop the platform error text from a wire-facing invalidParams data field,
state the reason next to two node builtin import suppressions, and use
catchTags for the single tagged PlatformError in the skills probe.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Provider lists sorted by display name, which put Antigravity first. Snapshots
now sort by built-in driver order, so Codex and Claude lead and Antigravity
is last on every client. The legacy settings struct matches that order.
Google returns every Gemini generation the account can use. The bundled
model manifest now names Gemini 3.8 Flash as current for Antigravity and the
driver classifies through it like Codex does, so the picker folds the older
models under its legacy section.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…view
Four review findings, each reproduced by a focused test:
- The profile settings.json now records auth.type, so the agent's logout
clears only the active method's token instead of every stored token.
- Callback forwarding failure is handled by an instance-owned fiber. A
client that disconnects after sending the redirect URL no longer leaves the
flow at "verifying" until the deadline.
- Skills discovered on disk survive session and command updates. They were
replaced with an empty list, and the registry never re-read the workspace.
- Web blocks Send when a ready Antigravity catalog no longer lists the saved
model, matching mobile. Provider error states still allow a retry.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The catalog took Google's current model as the default, which is still
Gemini 3.7 Flash (High). The model manifest now names a chat default for
Antigravity and applyModelManifest moves the default flag and its alias to
that model when the account offers it. The default alias resolves to the
same model at session start, turn start, and in text generation helpers,
and falls back to the agent's choice when the account lacks it.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from 1ebbaef to 3c5d703CompareSeptember 3, 2026 09:21
@t3dotgg
t3dotgg merged commit 0633646 into mainSep 3, 2026
27 checks passed
@t3dotgg
t3dotgg deleted the t3code/integrate-antigravity-acp branch September 3, 2026 09:34
github-actionsBot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 3, 2026
## What's Changed
* fix(web): keep trailing tool groups out of "Worked for" accordion by @Yash-Singh1 in pingdotgg/t3code#9384
* feat(marketing): put named-developer quotes on the landing page by @t3dotgg in pingdotgg/t3code#9385
* fix(claude): expand slash commands when a message has attachments by @t3dotgg in pingdotgg/t3code#9122
* fix(web): stop the resting composer layout loop by @t3dotgg in pingdotgg/t3code#9393
* fix(web): render assistant images inline in chat by @t3dotgg in pingdotgg/t3code#9126
* feat(providers): add Google Antigravity via the official ACP agent by @t3dotgg in pingdotgg/t3code#9348
**Full Changelog**: pingdotgg/t3code@v0.0.39-nightly.20260903.1267...v0.0.39-nightly.20260903.1268
Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.39-nightly.20260903.1268
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview:macBuild an Apple Silicon DMG for this PR on every push.size:XXL1,000+ changed lines (additions + deletions).vouch:trustedPR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@t3dotgg@RudolphLamp
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

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

Merged
t3dotgg merged 7 commits into
mainfrom
t3code/integrate-antigravity-acp
Sep 3, 2026
Merged

feat(providers): add Google Antigravity via the official ACP agent#9348
t3dotgg merged 7 commits into
mainfrom
t3code/integrate-antigravity-acp

Conversation

@t3dotgg

@t3dotggt3dotgg commented Sep 3, 2026

Copy link
Copy Markdown
Member

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 for commit 3c5d703. Bugbot is set up for automated code reviews on this repo. Configure here.

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.

@github-actionsgithub-actionsBot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL 1,000+ changed lines (additions + deletions). labels Sep 3, 2026
@github-actions

github-actionsBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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.

@macroscopeapp

macroscopeappBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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

Comment threadapps/server/src/provider/antigravityAuthSupport.ts
Comment threadapps/mobile/src/features/threads/use-project-actions.ts
@macroscopeapp

macroscopeappBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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, or comment @macroscope-app review this PR to bypass the limit and review now. You can add or adjust custom eligibility rules. Learn more.

@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from b3533f9 to 549fcbbCompareSeptember 3, 2026 06:12
Comment threadapps/server/src/provider/acp/AntigravityAcpSupport.ts Outdated
Comment threadapps/server/src/provider/antigravityAuthSupport.ts Outdated
Comment threadapps/server/src/provider/Drivers/AntigravitySkills.ts Outdated
Comment threadapps/server/src/provider/Services/ProviderAuthService.ts
Comment threadapps/server/src/provider/antigravityCallback.ts Outdated
@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from 549fcbb to 7bfe6f2CompareSeptember 3, 2026 06:37
@RudolphLamp

Copy link
Copy Markdown

Please Theo, I have beeeen waiting for this.

@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from 7bfe6f2 to ef6c47bCompareSeptember 3, 2026 07:13

@cursorcursorBot 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.

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.

Reviewed by Cursor Bugbot for commit 1ebbaef. Configure here.

);
const forwarded = yield* Fiber.await(pending.forwarding);
if (Exit.isFailure(forwarded)) {
return yield* setupError("complete", FORWARDING_FAILED_MESSAGE);

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.

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 CursorFix in Web

Reviewed by Cursor Bugbot for commit 1ebbaef. Configure here.

Comment threadapps/server/src/provider/Layers/AntigravityProvider.ts
@t3dotggt3dotgg added the preview:mac Build an Apple Silicon DMG for this PR on every push. label Sep 3, 2026
@github-actions

github-actionsBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

macOS preview

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

t3dotggand others added 7 commits September 3, 2026 02:21
Antigravity only used part of what its ACP agent offers. Chat sessions now
advertise the client file system, so the agent reads and edits workspace files
through T3 and every write becomes a file change approval. Audio files attach
as native audio blocks. The attachments directory is granted as an additional
session directory. The agent's prompt injection warning on "allow always" is
shown next to the "Allow for this thread" choice on web and mobile.
The instance config selects the ACP auth method: Google account (default),
Gemini Enterprise, Gemini API key, or Agent Platform. API keys pass through
the agent's environment and the GCP project and location through the
profile's settings.json. Setup cards on web and mobile relabel sign-in as a
credential check for the non-browser methods. The provider settings form gains
a select control for this.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Drop the platform error text from a wire-facing invalidParams data field,
state the reason next to two node builtin import suppressions, and use
catchTags for the single tagged PlatformError in the skills probe.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Provider lists sorted by display name, which put Antigravity first. Snapshots
now sort by built-in driver order, so Codex and Claude lead and Antigravity
is last on every client. The legacy settings struct matches that order.
Google returns every Gemini generation the account can use. The bundled
model manifest now names Gemini 3.8 Flash as current for Antigravity and the
driver classifies through it like Codex does, so the picker folds the older
models under its legacy section.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…view
Four review findings, each reproduced by a focused test:
- The profile settings.json now records auth.type, so the agent's logout
clears only the active method's token instead of every stored token.
- Callback forwarding failure is handled by an instance-owned fiber. A
client that disconnects after sending the redirect URL no longer leaves the
flow at "verifying" until the deadline.
- Skills discovered on disk survive session and command updates. They were
replaced with an empty list, and the registry never re-read the workspace.
- Web blocks Send when a ready Antigravity catalog no longer lists the saved
model, matching mobile. Provider error states still allow a retry.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The catalog took Google's current model as the default, which is still
Gemini 3.7 Flash (High). The model manifest now names a chat default for
Antigravity and applyModelManifest moves the default flag and its alias to
that model when the account offers it. The default alias resolves to the
same model at session start, turn start, and in text generation helpers,
and falls back to the agent's choice when the account lacks it.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from 1ebbaef to 3c5d703CompareSeptember 3, 2026 09:21
@t3dotgg
t3dotgg merged commit 0633646 into mainSep 3, 2026
27 checks passed
@t3dotgg
t3dotgg deleted the t3code/integrate-antigravity-acp branch September 3, 2026 09:34
github-actionsBot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 3, 2026
## What's Changed
* fix(web): keep trailing tool groups out of "Worked for" accordion by @Yash-Singh1 in pingdotgg/t3code#9384
* feat(marketing): put named-developer quotes on the landing page by @t3dotgg in pingdotgg/t3code#9385
* fix(claude): expand slash commands when a message has attachments by @t3dotgg in pingdotgg/t3code#9122
* fix(web): stop the resting composer layout loop by @t3dotgg in pingdotgg/t3code#9393
* fix(web): render assistant images inline in chat by @t3dotgg in pingdotgg/t3code#9126
* feat(providers): add Google Antigravity via the official ACP agent by @t3dotgg in pingdotgg/t3code#9348
**Full Changelog**: pingdotgg/t3code@v0.0.39-nightly.20260903.1267...v0.0.39-nightly.20260903.1268
Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.39-nightly.20260903.1268
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview:macBuild an Apple Silicon DMG for this PR on every push.size:XXL1,000+ changed lines (additions + deletions).vouch:trustedPR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@t3dotgg@RudolphLamp
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

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

Merged
t3dotgg merged 7 commits into
mainfrom
t3code/integrate-antigravity-acp
Sep 3, 2026
Merged

feat(providers): add Google Antigravity via the official ACP agent#9348
t3dotgg merged 7 commits into
mainfrom
t3code/integrate-antigravity-acp

Conversation

@t3dotgg

@t3dotggt3dotgg commented Sep 3, 2026

Copy link
Copy Markdown
Member

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 for commit 3c5d703. Bugbot is set up for automated code reviews on this repo. Configure here.

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.

@github-actionsgithub-actionsBot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL 1,000+ changed lines (additions + deletions). labels Sep 3, 2026
@github-actions

github-actionsBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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.

@macroscopeapp

macroscopeappBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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

Comment threadapps/server/src/provider/antigravityAuthSupport.ts
Comment threadapps/mobile/src/features/threads/use-project-actions.ts
@macroscopeapp

macroscopeappBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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, or comment @macroscope-app review this PR to bypass the limit and review now. You can add or adjust custom eligibility rules. Learn more.

@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from b3533f9 to 549fcbbCompareSeptember 3, 2026 06:12
Comment threadapps/server/src/provider/acp/AntigravityAcpSupport.ts Outdated
Comment threadapps/server/src/provider/antigravityAuthSupport.ts Outdated
Comment threadapps/server/src/provider/Drivers/AntigravitySkills.ts Outdated
Comment threadapps/server/src/provider/Services/ProviderAuthService.ts
Comment threadapps/server/src/provider/antigravityCallback.ts Outdated
@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from 549fcbb to 7bfe6f2CompareSeptember 3, 2026 06:37
@RudolphLamp

Copy link
Copy Markdown

Please Theo, I have beeeen waiting for this.

@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from 7bfe6f2 to ef6c47bCompareSeptember 3, 2026 07:13

@cursorcursorBot 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.

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.

Reviewed by Cursor Bugbot for commit 1ebbaef. Configure here.

);
const forwarded = yield* Fiber.await(pending.forwarding);
if (Exit.isFailure(forwarded)) {
return yield* setupError("complete", FORWARDING_FAILED_MESSAGE);

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.

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 CursorFix in Web

Reviewed by Cursor Bugbot for commit 1ebbaef. Configure here.

Comment threadapps/server/src/provider/Layers/AntigravityProvider.ts
@t3dotggt3dotgg added the preview:mac Build an Apple Silicon DMG for this PR on every push. label Sep 3, 2026
@github-actions

github-actionsBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

macOS preview

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

t3dotggand others added 7 commits September 3, 2026 02:21
Antigravity only used part of what its ACP agent offers. Chat sessions now
advertise the client file system, so the agent reads and edits workspace files
through T3 and every write becomes a file change approval. Audio files attach
as native audio blocks. The attachments directory is granted as an additional
session directory. The agent's prompt injection warning on "allow always" is
shown next to the "Allow for this thread" choice on web and mobile.
The instance config selects the ACP auth method: Google account (default),
Gemini Enterprise, Gemini API key, or Agent Platform. API keys pass through
the agent's environment and the GCP project and location through the
profile's settings.json. Setup cards on web and mobile relabel sign-in as a
credential check for the non-browser methods. The provider settings form gains
a select control for this.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Drop the platform error text from a wire-facing invalidParams data field,
state the reason next to two node builtin import suppressions, and use
catchTags for the single tagged PlatformError in the skills probe.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Provider lists sorted by display name, which put Antigravity first. Snapshots
now sort by built-in driver order, so Codex and Claude lead and Antigravity
is last on every client. The legacy settings struct matches that order.
Google returns every Gemini generation the account can use. The bundled
model manifest now names Gemini 3.8 Flash as current for Antigravity and the
driver classifies through it like Codex does, so the picker folds the older
models under its legacy section.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…view
Four review findings, each reproduced by a focused test:
- The profile settings.json now records auth.type, so the agent's logout
clears only the active method's token instead of every stored token.
- Callback forwarding failure is handled by an instance-owned fiber. A
client that disconnects after sending the redirect URL no longer leaves the
flow at "verifying" until the deadline.
- Skills discovered on disk survive session and command updates. They were
replaced with an empty list, and the registry never re-read the workspace.
- Web blocks Send when a ready Antigravity catalog no longer lists the saved
model, matching mobile. Provider error states still allow a retry.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The catalog took Google's current model as the default, which is still
Gemini 3.7 Flash (High). The model manifest now names a chat default for
Antigravity and applyModelManifest moves the default flag and its alias to
that model when the account offers it. The default alias resolves to the
same model at session start, turn start, and in text generation helpers,
and falls back to the agent's choice when the account lacks it.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from 1ebbaef to 3c5d703CompareSeptember 3, 2026 09:21
@t3dotgg
t3dotgg merged commit 0633646 into mainSep 3, 2026
27 checks passed
@t3dotgg
t3dotgg deleted the t3code/integrate-antigravity-acp branch September 3, 2026 09:34
github-actionsBot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 3, 2026
## What's Changed
* fix(web): keep trailing tool groups out of "Worked for" accordion by @Yash-Singh1 in pingdotgg/t3code#9384
* feat(marketing): put named-developer quotes on the landing page by @t3dotgg in pingdotgg/t3code#9385
* fix(claude): expand slash commands when a message has attachments by @t3dotgg in pingdotgg/t3code#9122
* fix(web): stop the resting composer layout loop by @t3dotgg in pingdotgg/t3code#9393
* fix(web): render assistant images inline in chat by @t3dotgg in pingdotgg/t3code#9126
* feat(providers): add Google Antigravity via the official ACP agent by @t3dotgg in pingdotgg/t3code#9348
**Full Changelog**: pingdotgg/t3code@v0.0.39-nightly.20260903.1267...v0.0.39-nightly.20260903.1268
Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.39-nightly.20260903.1268
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview:macBuild an Apple Silicon DMG for this PR on every push.size:XXL1,000+ changed lines (additions + deletions).vouch:trustedPR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@t3dotgg@RudolphLamp
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

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

Merged
t3dotgg merged 7 commits into
mainfrom
t3code/integrate-antigravity-acp
Sep 3, 2026
Merged

feat(providers): add Google Antigravity via the official ACP agent#9348
t3dotgg merged 7 commits into
mainfrom
t3code/integrate-antigravity-acp

Conversation

@t3dotgg

@t3dotggt3dotgg commented Sep 3, 2026

Copy link
Copy Markdown
Member

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 for commit 3c5d703. Bugbot is set up for automated code reviews on this repo. Configure here.

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.

@github-actionsgithub-actionsBot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL 1,000+ changed lines (additions + deletions). labels Sep 3, 2026
@github-actions

github-actionsBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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.

@macroscopeapp

macroscopeappBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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

Comment threadapps/server/src/provider/antigravityAuthSupport.ts
Comment threadapps/mobile/src/features/threads/use-project-actions.ts
@macroscopeapp

macroscopeappBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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, or comment @macroscope-app review this PR to bypass the limit and review now. You can add or adjust custom eligibility rules. Learn more.

@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from b3533f9 to 549fcbbCompareSeptember 3, 2026 06:12
Comment threadapps/server/src/provider/acp/AntigravityAcpSupport.ts Outdated
Comment threadapps/server/src/provider/antigravityAuthSupport.ts Outdated
Comment threadapps/server/src/provider/Drivers/AntigravitySkills.ts Outdated
Comment threadapps/server/src/provider/Services/ProviderAuthService.ts
Comment threadapps/server/src/provider/antigravityCallback.ts Outdated
@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from 549fcbb to 7bfe6f2CompareSeptember 3, 2026 06:37
@RudolphLamp

Copy link
Copy Markdown

Please Theo, I have beeeen waiting for this.

@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from 7bfe6f2 to ef6c47bCompareSeptember 3, 2026 07:13

@cursorcursorBot 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.

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.

Reviewed by Cursor Bugbot for commit 1ebbaef. Configure here.

);
const forwarded = yield* Fiber.await(pending.forwarding);
if (Exit.isFailure(forwarded)) {
return yield* setupError("complete", FORWARDING_FAILED_MESSAGE);

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.

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 CursorFix in Web

Reviewed by Cursor Bugbot for commit 1ebbaef. Configure here.

Comment threadapps/server/src/provider/Layers/AntigravityProvider.ts
@t3dotggt3dotgg added the preview:mac Build an Apple Silicon DMG for this PR on every push. label Sep 3, 2026
@github-actions

github-actionsBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

macOS preview

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

t3dotggand others added 7 commits September 3, 2026 02:21
Antigravity only used part of what its ACP agent offers. Chat sessions now
advertise the client file system, so the agent reads and edits workspace files
through T3 and every write becomes a file change approval. Audio files attach
as native audio blocks. The attachments directory is granted as an additional
session directory. The agent's prompt injection warning on "allow always" is
shown next to the "Allow for this thread" choice on web and mobile.
The instance config selects the ACP auth method: Google account (default),
Gemini Enterprise, Gemini API key, or Agent Platform. API keys pass through
the agent's environment and the GCP project and location through the
profile's settings.json. Setup cards on web and mobile relabel sign-in as a
credential check for the non-browser methods. The provider settings form gains
a select control for this.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Drop the platform error text from a wire-facing invalidParams data field,
state the reason next to two node builtin import suppressions, and use
catchTags for the single tagged PlatformError in the skills probe.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Provider lists sorted by display name, which put Antigravity first. Snapshots
now sort by built-in driver order, so Codex and Claude lead and Antigravity
is last on every client. The legacy settings struct matches that order.
Google returns every Gemini generation the account can use. The bundled
model manifest now names Gemini 3.8 Flash as current for Antigravity and the
driver classifies through it like Codex does, so the picker folds the older
models under its legacy section.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…view
Four review findings, each reproduced by a focused test:
- The profile settings.json now records auth.type, so the agent's logout
clears only the active method's token instead of every stored token.
- Callback forwarding failure is handled by an instance-owned fiber. A
client that disconnects after sending the redirect URL no longer leaves the
flow at "verifying" until the deadline.
- Skills discovered on disk survive session and command updates. They were
replaced with an empty list, and the registry never re-read the workspace.
- Web blocks Send when a ready Antigravity catalog no longer lists the saved
model, matching mobile. Provider error states still allow a retry.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The catalog took Google's current model as the default, which is still
Gemini 3.7 Flash (High). The model manifest now names a chat default for
Antigravity and applyModelManifest moves the default flag and its alias to
that model when the account offers it. The default alias resolves to the
same model at session start, turn start, and in text generation helpers,
and falls back to the agent's choice when the account lacks it.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from 1ebbaef to 3c5d703CompareSeptember 3, 2026 09:21
@t3dotgg
t3dotgg merged commit 0633646 into mainSep 3, 2026
27 checks passed
@t3dotgg
t3dotgg deleted the t3code/integrate-antigravity-acp branch September 3, 2026 09:34
github-actionsBot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 3, 2026
## What's Changed
* fix(web): keep trailing tool groups out of "Worked for" accordion by @Yash-Singh1 in pingdotgg/t3code#9384
* feat(marketing): put named-developer quotes on the landing page by @t3dotgg in pingdotgg/t3code#9385
* fix(claude): expand slash commands when a message has attachments by @t3dotgg in pingdotgg/t3code#9122
* fix(web): stop the resting composer layout loop by @t3dotgg in pingdotgg/t3code#9393
* fix(web): render assistant images inline in chat by @t3dotgg in pingdotgg/t3code#9126
* feat(providers): add Google Antigravity via the official ACP agent by @t3dotgg in pingdotgg/t3code#9348
**Full Changelog**: pingdotgg/t3code@v0.0.39-nightly.20260903.1267...v0.0.39-nightly.20260903.1268
Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.39-nightly.20260903.1268
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview:macBuild an Apple Silicon DMG for this PR on every push.size:XXL1,000+ changed lines (additions + deletions).vouch:trustedPR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@t3dotgg@RudolphLamp
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

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

Merged
t3dotgg merged 7 commits into
mainfrom
t3code/integrate-antigravity-acp
Sep 3, 2026
Merged

feat(providers): add Google Antigravity via the official ACP agent#9348
t3dotgg merged 7 commits into
mainfrom
t3code/integrate-antigravity-acp

Conversation

@t3dotgg

@t3dotggt3dotgg commented Sep 3, 2026

Copy link
Copy Markdown
Member

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 for commit 3c5d703. Bugbot is set up for automated code reviews on this repo. Configure here.

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.

@github-actionsgithub-actionsBot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL 1,000+ changed lines (additions + deletions). labels Sep 3, 2026
@github-actions

github-actionsBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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.

@macroscopeapp

macroscopeappBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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

Comment threadapps/server/src/provider/antigravityAuthSupport.ts
Comment threadapps/mobile/src/features/threads/use-project-actions.ts
@macroscopeapp

macroscopeappBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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, or comment @macroscope-app review this PR to bypass the limit and review now. You can add or adjust custom eligibility rules. Learn more.

@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from b3533f9 to 549fcbbCompareSeptember 3, 2026 06:12
Comment threadapps/server/src/provider/acp/AntigravityAcpSupport.ts Outdated
Comment threadapps/server/src/provider/antigravityAuthSupport.ts Outdated
Comment threadapps/server/src/provider/Drivers/AntigravitySkills.ts Outdated
Comment threadapps/server/src/provider/Services/ProviderAuthService.ts
Comment threadapps/server/src/provider/antigravityCallback.ts Outdated
@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from 549fcbb to 7bfe6f2CompareSeptember 3, 2026 06:37
@RudolphLamp

Copy link
Copy Markdown

Please Theo, I have beeeen waiting for this.

@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from 7bfe6f2 to ef6c47bCompareSeptember 3, 2026 07:13

@cursorcursorBot 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.

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.

Reviewed by Cursor Bugbot for commit 1ebbaef. Configure here.

);
const forwarded = yield* Fiber.await(pending.forwarding);
if (Exit.isFailure(forwarded)) {
return yield* setupError("complete", FORWARDING_FAILED_MESSAGE);

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.

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 CursorFix in Web

Reviewed by Cursor Bugbot for commit 1ebbaef. Configure here.

Comment threadapps/server/src/provider/Layers/AntigravityProvider.ts
@t3dotggt3dotgg added the preview:mac Build an Apple Silicon DMG for this PR on every push. label Sep 3, 2026
@github-actions

github-actionsBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

macOS preview

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

t3dotggand others added 7 commits September 3, 2026 02:21
Antigravity only used part of what its ACP agent offers. Chat sessions now
advertise the client file system, so the agent reads and edits workspace files
through T3 and every write becomes a file change approval. Audio files attach
as native audio blocks. The attachments directory is granted as an additional
session directory. The agent's prompt injection warning on "allow always" is
shown next to the "Allow for this thread" choice on web and mobile.
The instance config selects the ACP auth method: Google account (default),
Gemini Enterprise, Gemini API key, or Agent Platform. API keys pass through
the agent's environment and the GCP project and location through the
profile's settings.json. Setup cards on web and mobile relabel sign-in as a
credential check for the non-browser methods. The provider settings form gains
a select control for this.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Drop the platform error text from a wire-facing invalidParams data field,
state the reason next to two node builtin import suppressions, and use
catchTags for the single tagged PlatformError in the skills probe.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Provider lists sorted by display name, which put Antigravity first. Snapshots
now sort by built-in driver order, so Codex and Claude lead and Antigravity
is last on every client. The legacy settings struct matches that order.
Google returns every Gemini generation the account can use. The bundled
model manifest now names Gemini 3.8 Flash as current for Antigravity and the
driver classifies through it like Codex does, so the picker folds the older
models under its legacy section.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…view
Four review findings, each reproduced by a focused test:
- The profile settings.json now records auth.type, so the agent's logout
clears only the active method's token instead of every stored token.
- Callback forwarding failure is handled by an instance-owned fiber. A
client that disconnects after sending the redirect URL no longer leaves the
flow at "verifying" until the deadline.
- Skills discovered on disk survive session and command updates. They were
replaced with an empty list, and the registry never re-read the workspace.
- Web blocks Send when a ready Antigravity catalog no longer lists the saved
model, matching mobile. Provider error states still allow a retry.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The catalog took Google's current model as the default, which is still
Gemini 3.7 Flash (High). The model manifest now names a chat default for
Antigravity and applyModelManifest moves the default flag and its alias to
that model when the account offers it. The default alias resolves to the
same model at session start, turn start, and in text generation helpers,
and falls back to the agent's choice when the account lacks it.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@t3dotgg
t3dotggforce-pushed the t3code/integrate-antigravity-acp branch from 1ebbaef to 3c5d703CompareSeptember 3, 2026 09:21
@t3dotgg
t3dotgg merged commit 0633646 into mainSep 3, 2026
27 checks passed
@t3dotgg
t3dotgg deleted the t3code/integrate-antigravity-acp branch September 3, 2026 09:34
github-actionsBot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 3, 2026
## What's Changed
* fix(web): keep trailing tool groups out of "Worked for" accordion by @Yash-Singh1 in pingdotgg/t3code#9384
* feat(marketing): put named-developer quotes on the landing page by @t3dotgg in pingdotgg/t3code#9385
* fix(claude): expand slash commands when a message has attachments by @t3dotgg in pingdotgg/t3code#9122
* fix(web): stop the resting composer layout loop by @t3dotgg in pingdotgg/t3code#9393
* fix(web): render assistant images inline in chat by @t3dotgg in pingdotgg/t3code#9126
* feat(providers): add Google Antigravity via the official ACP agent by @t3dotgg in pingdotgg/t3code#9348
**Full Changelog**: pingdotgg/t3code@v0.0.39-nightly.20260903.1267...v0.0.39-nightly.20260903.1268
Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.39-nightly.20260903.1268
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview:macBuild an Apple Silicon DMG for this PR on every push.size:XXL1,000+ changed lines (additions + deletions).vouch:trustedPR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@t3dotgg@RudolphLamp