Skip to content

Protecting Antigravity accounts via the official agy acp transport #8480

Open

Description

@Tao-Yida

Area

Authentication and account pool

What are you trying to accomplish?

Use a Google AI Pro Antigravity subscription through opencodex from a local, single-user harness (Codex CLI / Claude Code) without re-extracting the OAuth credential and replaying it against cloudcode-pa.googleapis.com, because that pattern is currently being auto-banned.

Concrete evidence from this week: a two-account Antigravity pool lost one account to 403 PERMISSION_DENIED / reason=TOS_VIOLATION / domain=cloudcode-pa.googleapis.com on 2026-11-06 07:12 UTC. The other account still answers 200. The official forum shows a batch of identical reports on 2026-11-05/06:

What prevents this today?

opencodex's Antigravity path is a reverse proxy: it imports the OAuth credential and replays it with a spoofed official client fingerprint. From src/adapters/client-fingerprint.ts:

ANTIGRAVITY_IDE_VERSION = "2.5.5"
ANTIGRAVITY_IDE_PLATFORM = "windows/amd64"      // constant, regardless of host OS
ANTIGRAVITY_CLI_VERSION = "1.3.4"
ANTIGRAVITY_CLI_PLATFORM = "darwin/arm64"

That is exactly the class of traffic Google's gateway classifies as third-party token proxying, and the ban is enforced on request characteristics, not on credential validity (403, not 401).

What should OpenCodex do?

Add an ACP-backed Antigravity transport that never touches the credential.

agy acp (Antigravity CLI >= 1.5.0) is an official ACP v1 server: JSON-RPC over stdin/stdout, identifies as Antigravity ACP Server, exposing a Model picker and a Thinking level picker (Low/Medium/High/Extra/Max). opencodex would be the ACP client: spawn agy acp, drive session/*, stream updates, translate to Responses / Chat Completions for the harness.

This is not a new architecture for this codebase — an ACP transport already existed here and was retired for product reasons, not technical ones. src/providers/devin-cli-authmode-migration.ts:4:

devin-cli used to be a local provider whose adapter spawned devin acp; it later became an
account provider on the shared devin adapter.

The ACP provider must be deliberately constrained, because Google's permission has explicit edges (staff statement, 2026-11-07):

Constraint from Google Consequence for opencodex
Never extract, proxy, or reuse internal OAuth tokens outside the binary ACP provider must not import/store the credential; agy owns auth
No automated account rotation account pool, failover and auto-pause must be disabled for this provider
No multi-user serving must refuse hub / remote exposure on an ACP provider
Outside first-party IDEs, ACP sessions are scoped to Gemini models no Claude/GPT-via-Antigravity through ACP

Example usage or interface

ocx provider add antigravity-acp --adapter acp --command agy --args acp
  • single account, rotation/failover refused by validation
  • model list read from the ACP session/new option set (Gemini only)
  • thinking level mapped from the catalog ladder to the ACP picker values
  • 401/-32000 Authentication required surfaced as an actionable "run agy and sign in" error

Alternatives or workarounds

No response

Additional context

No response

Checks

  • I searched existing issues and documentation.
  • This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
  • I removed secrets and personal data.

Activity

  1. coderabbitai commented on Nov 10, 2026

    @coderabbitai
    Contributor
    🔗 Related PRs

    #7819 - fix(google): honor Retry-After floor and recognize the Cloud Code Assist ToS account ban [merged]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  2. added
    account-poolOAuth, credentials, Codex pool, quota, failover, plans
    catalogModel catalog, slugs, visibility, routed entries
    proxyHTTP proxy, routing, reverse-proxy / management auth
    on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    account-poolOAuth, credentials, Codex pool, quota, failover, planscatalogModel catalog, slugs, visibility, routed entriesenhancementNew feature or requestproxyHTTP proxy, routing, reverse-proxy / management auth

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions