Convika

Русской версии пока нет — показана английская.

Is agy -p in Claude Code or Codex against Antigravity terms?

Convika Team14 min read

  • ai-agents
  • claude-code
  • codex
  • ci
On this page

As of November 16, 2026, 16:40 JST (07:40 UTC). Google's terms, FAQ, and docs, the Google AI Developers Forum threads, and the GitHub issues were read between 16:27 and 16:40 JST. Neither the terms nor the FAQ carries a date.

Google's Antigravity FAQ answers it directly: "Antigravity CLI headless mode (agy -p) is intended for direct scripting and CI workflows. Wrapping agy inside third-party coding agents or applications, or automating account rotation, is not supported under consumer plans." Antigravity's terms call third-party access "a breach of this Agreement" that "may be grounds for suspension or termination of your Antigravity and/or Gemini CLI accounts." Running agy -p yourself, in your own scripts, and in CI is the use Google describes, and for Gemini inside Claude Code or Codex, Google recommends a Google AI Studio API key or Gemini Enterprise.

  • Allowed: agy -p in your terminal, your own scripts, and your CI.
  • Not allowed on consumer plans: Claude Code, Codex, OpenClaw, or OpenCode calling agy -p; an MCP server that wraps agy -p for other agents; automated account rotation; OpenClaw signed in with Antigravity OAuth.
  • Suspended: submit the appeal form once. A reply on Google's AI Developers Forum says it takes about 48 to 72 hours and sends no confirmation email.
  • Keep automating: a Gemini API key. Set "modelProvider": "gemini" in settings.json and pass the key as GEMINI_API_KEY. The variable alone does nothing.

What's happening: the 403 and the threads

Antigravity CLI is the terminal version of Google Antigravity, and its command is agy. agy -p "…" runs one prompt, prints the answer, and exits. That headless mode is easy to call from another program, so developers wired it into Claude Code, Codex, MCP servers, and multi-agent apps, and asked Google's forum whether that was fine.

Accounts that Google stops get this from agy, as a user on the Google AI Developers Forum reported it on October 22:

HTTP 403 PERMISSION_DENIED
This service has been disabled in this account for violation of Terms of Service.
Please submit an appeal to continue using this product.

Another user posted the same 403 on November 16, and a reply at 07:09 UTC that day laid out the appeal (steps below). Apps are reacting too. Craft Anything, an open-source app that runs several coding agents, got an issue on November 5 saying its Antigravity adapter wraps agy -p against the terms. On November 9 a contributor answered that PR #1295 stops it from running Antigravity. At 16:32 JST the PR was still open.

What Google's terms and FAQ say

The terms (Google Antigravity Additional Terms of Service). The rule sits in an unheaded paragraph that forum posts call "Section 6":

"You must not abuse, harm, interfere with, or disrupt the Service. This includes, but is not limited to, using the Service in connection with products not provided by us. Using third party software, tools, or services to access the Service (e.g. using OpenClaw with Antigravity OAuth) is a breach of this Agreement. Such actions may be grounds for suspension or termination of your Antigravity and/or Gemini CLI accounts."

The same terms open by saying that access through Gemini Enterprise, Google Workspace, or an API key in Gemini for business falls under the terms your administrator accepted. On this page, "consumer plans" means signing in with a personal Google Account, which Antigravity's sign-in docs list with the "Free, Pro, or Ultra plan."

The FAQ answers two questions on this:

"Why can’t I use third-party software (such as Claude Code, OpenClaw, or OpenCode) with my Antigravity login?"

"Using third-party software, tools, or services to access Antigravity is a violation of our Terms of Service and severely degrades the experience for legitimate product users. Such actions can result in suspension or termination of your account. To use a third-party coding agent with Gemini, we recommend using a Gemini Enterprise or Google AI Studio API key."

"Can I use Antigravity CLI headless mode in third-party coding agents or automate account switching?"

"Antigravity CLI headless mode (agy -p) is intended for direct scripting and CI workflows. Wrapping agy inside third-party coding agents or applications, or automating account rotation, is not supported under consumer plans."

The headless docs describe -p (also --print and --prompt) as "Run a single prompt non-interactively and print the response," and add: "Headless mode uses your cached credentials. Authenticate once with an interactive agy session first." The page says nothing about who may call it. The rule lives in the terms and the FAQ.

Allowed, not allowed, and what Google doesn't say

Each verdict comes from Google's terms, FAQ, or docs. A reply on Google's AI Developers Forum is labeled as one.

UseAllowed?Source
agy -p in your own terminalYesHeadless docs: "Run a single prompt non-interactively." FAQ: "intended for direct scripting"
agy -p from your own scripts and CIYesFAQ: "intended for direct scripting and CI workflows." A forum reply (Sep 25) calls it "standard CLI usage"
Claude Code, Codex, OpenClaw, or OpenCode calling agy -p, helper script includedNoFAQ: "Wrapping agy inside third-party coding agents or applications … is not supported under consumer plans." Terms: "a breach of this Agreement." For Codex through a helper script, a forum reply (Nov 9): "not permitted under consumer plans"
An MCP server that wraps agy -p for other agentsNoFAQ, as above. A forum reply (Sep 25): "is not permitted"
Automated account rotationNoFAQ: "automating account rotation, is not supported under consumer plans"
OpenClaw signed in with Antigravity OAuthNoTerms: "(e.g. using OpenClaw with Antigravity OAuth) is a breach of this Agreement"
agy acp in Zed, JetBrains IDEs, Android Studio, or XcodeGoogle doesn't sayThe ACP docs list these editors, and the editor guide lists personal Google Account sign-in. The FAQ and terms don't address ACP on consumer plans. A forum reply (Oct 26) calls the official antigravity-acp from the ACP Registry, used by one person interactively, "permitted"
An agy agent calling agy -p through its own shell or hooksGoogle doesn't sayAsked in GitHub issue #1392 on Nov 2; no answer at 16:29 JST
agy with GEMINI_API_KEY in CIYesSign-in docs: "This suits headless and CI runs"
A third-party agent on an AI Studio API key, Vertex AI, or Gemini EnterpriseYesFAQ: "we recommend using a Gemini Enterprise or Google AI Studio API key." Vertex AI is named in forum replies on Sep 25 and Nov 9

Agents calling agents is how Claude Code and Codex subagents work, and MCP is how agents reach tools. With Antigravity, what lands you in the "No" rows is putting agy, signed in to a consumer plan, behind either one.

Suspended with a 403: how to appeal

The forum doesn't review suspensions, and the error itself says "Please submit an appeal to continue using this product." These steps come from a reply on Google's AI Developers Forum posted at 07:09 UTC on November 16. It also says: "Each account is eligible for only a single appeal remediation, and repeat violations result in permanent suspension."

1. Stop whatever called agy

Shut down and remove the agent, wrapper, or MCP server that called agy -p. If it runs again after you're back, that's a second violation.

2. Revoke third-party OAuth access

At myaccount.google.com/permissions, revoke the access you gave other tools. The reply says to do it before you sign back in, "so background traffic cannot trigger a second permanent suspension."

3. Submit the form once, signed in to the suspended account

Open the appeal form signed in to the affected Google Account and submit it. Per the reply, the form covers Antigravity, Gemini CLI, and Gemini Code Assist. Don't send a duplicate.

4. Wait about 48 to 72 hours

Processing is automated, takes about 48 to 72 hours, and sends no confirmation email. An approved account works again the next time you sign in.

5. Enterprise accounts: Google Cloud Support

For Gemini Enterprise or Google Cloud accounts, contact Google Cloud Support instead of using the form.

Keep automating: a Gemini API key or ADC

Antigravity CLI runs on your own Gemini API key instead of a signed-in Google Account. Google's sign-in docs: "This suits headless and CI runs, where no browser is available to complete a sign-in." Requests go straight to the Gemini API, with no account session.

Two settings, with a key from Google AI Studio:

  1. Set modelProvider in ~/.gemini/antigravity-cli/settings.json:

    {
      "modelProvider": "gemini"
    }
    
  2. Export the key as GEMINI_API_KEY:

    export GEMINI_API_KEY="your-api-key"
    

The docs are explicit: "Only setting a GEMINI_API_KEY environment variable on its own has no effect." A key in GOOGLE_API_KEY or a .env file is ignored too. Once it works, agy's header shows "Gemini API key" where your account email was.

With a Google Cloud project, Application Default Credentials work as well:

gcloud auth application-default login --project {GCP_PROJECT}
export AGY_ADC_AUTH=true

Editors on ACP can pick the same key: the ACP sign-in methods include Gemini API key (gemini-api-key).

Gemini 4 Hydrogen on the Gemini API (Google AI Studio's pricing page, read 16:29 JST, per 1M tokens):

Free tierPaid tier
InputFree of charge$1.50
Output, thinking tokens includedFree of charge$7.50
Batch and Flex, input / outputNot available$0.75 / $3.75
Used to improve Google's productsYesNo

On the paid tier, Google doesn't use what you send to improve its products, which matters when agy reads company code. How Hydrogen compares with the other models is in the best AI models right now.

Run agy -p on GitHub Actions with the key in a secret

This is the "CI workflows" use the FAQ names. On every pull request, agy reads the change, writes a review, and posts it to the job summary.

  1. Add your AI Studio key to the repository under Settings → Secrets and variables → Actions, named GEMINI_API_KEY.
  2. Save this as .github/workflows/agy-review.yml:
name: agy review
on:
  pull_request:

jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 0
      - name: Install Antigravity CLI
        run: |
          [ -x "$HOME/.local/bin/agy" ] || curl -fsSL https://antigravity.google/cli/install.sh | bash
          echo "$HOME/.local/bin" >> "$GITHUB_PATH"
      - name: Use the Gemini API key
        run: |
          mkdir -p ~/.gemini/antigravity-cli
          cat > ~/.gemini/antigravity-cli/settings.json <<'EOF'
          {
            "modelProvider": "gemini",
            "permissions": { "allow": ["command(git)"] }
          }
          EOF
      - name: Review the pull request
        env:
          GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
        run: |
          agy -p "Run git diff origin/${{ github.base_ref }}...HEAD and review the changes for bugs and missing tests. Answer in Markdown." \
            --print-timeout 10m >> "$GITHUB_STEP_SUMMARY"
  • Install: curl -fsSL https://antigravity.google/cli/install.sh | bash is the macOS and Linux command from Antigravity's quickstart, as written there. It puts agy in ~/.local/bin/agy, so the step adds that folder to GITHUB_PATH for the steps after it. A machine that already has agy skips the download.
  • Key: "modelProvider": "gemini" plus GEMINI_API_KEY switches agy to the key. The key travels from the secret as an environment variable and never lands in a file.
  • Permissions: command(git) lets agy run git diff without asking, the same rule the headless docs use as their example. Headless mode has no prompt to answer, so anything not allowed is "soft-denied" and the run carries on.
  • Failures: a run that produces no answer exits non-zero, which fails the job. --print-timeout caps the wait. To pin a model, pass a name from agy models to --model, such as gemini-4-hydrogen-high.

Run it on Skipbox at a flat price

Change one line:

jobs:
  review:
    runs-on: skipbox

Skipbox runs your jobs on a VM it hosts for your account alone, kept between jobs. The agy your first job installs is still there for the next one, so the install line skips, and Docker layers and package caches stay too. Plans are $39, $79, or $149 a month for 4, 8, or 16 vCPU, flat, with unlimited minutes. An agent can open pull requests all day and the review runs on every one at the same price. It works for organizations and personal accounts, on public and private repositories.

Sign in at skipbox.dev with GitHub, install the Skipbox app, and the line above does the rest. The Skipbox trial runs up to 4 jobs at once, each on its own 4 vCPU VM (how many is based on how many jobs you run at once on GitHub Actions), for 7 days or 3,000 job-minutes from your first job, whichever comes first, and takes no card.

Start a free Skipbox trial on skipbox.dev

What agent-driven pull requests do to a per-minute CI bill is worked out in AI coding agents and your CI bill.

Frequently asked questions

Is agy -p against Antigravity's terms of service?

Not when you run it yourself, from your own scripts, or in CI. Google's FAQ says agy -p "is intended for direct scripting and CI workflows." Calling it from inside Claude Code, Codex, or another agent or app is "not supported under consumer plans," and the terms call third-party access to Antigravity "a breach of this Agreement."

Can I use Antigravity from Claude Code?

Not with your Antigravity login on a consumer plan. The FAQ names Claude Code, OpenClaw, and OpenCode and says third-party access to Antigravity "is a violation of our Terms of Service" that "can result in suspension or termination of your account." To use Gemini in Claude Code, the FAQ recommends a Gemini Enterprise or Google AI Studio API key.

Can Codex call agy -p through a helper script?

No, not on a consumer plan. A reply on Google's AI Developers Forum on November 9 said launching agy -p from OpenAI Codex is "not permitted under consumer plans," even when a local helper script calls the documented headless mode. The same reply lists what works: Codex and agy side by side on one project, and agy invoked by you from your terminal or CI scripts.

Can I wrap agy -p in an MCP server for other agents?

Not on a consumer plan. The FAQ doesn't support wrapping agy inside third-party agents or applications, and a forum reply on September 25 said a local MCP server that wraps agy -p for Claude Code or Codex "is not permitted." For Gemini in another agent, use a Google AI Studio API key or Vertex AI.

My Antigravity account was suspended with a 403. How do I get it back?

Submit the appeal form once, signed in to the suspended account. A reply on Google's AI Developers Forum says processing takes about 48 to 72 hours with no confirmation email, and an approved account works again at the next sign-in. Before signing back in, revoke third-party OAuth access at myaccount.google.com/permissions. Each account gets one appeal remediation. Gemini Enterprise and Google Cloud accounts go to Google Cloud Support.

Does a suspension disable my whole Google Account?

The error says "This service has been disabled in this account for violation of Terms of Service": it names this service. The terms name "your Antigravity and/or Gemini CLI accounts" as what can be suspended or terminated. Per a forum reply, the appeal form covers Antigravity, Gemini CLI, and Gemini Code Assist.

Is agy acp in Zed or JetBrains allowed on a personal plan?

Google's terms and FAQ don't say. The ACP docs list Zed, JetBrains IDEs, Android Studio, and Xcode, and include sign-in with a personal Google Account. A forum reply on October 26 called the official antigravity-acp from the ACP Registry, used by one person interactively, "permitted." ACP also takes a Gemini API key as a sign-in method.

Can I use Gemini in Claude Code or Codex with an API key?

Yes. The FAQ recommends a Gemini Enterprise or Google AI Studio API key for using Gemini in a third-party coding agent. On the Gemini API, Gemini 4 Hydrogen's paid tier is $1.50 per 1M input tokens and $7.50 per 1M output tokens (read November 16, 16:29 JST).

Can I run agy -p on GitHub Actions?

Yes. The FAQ calls agy -p "intended for direct scripting and CI workflows," and the sign-in docs say the API key route "suits headless and CI runs." Set "modelProvider": "gemini" in settings.json and pass the key from a repository secret as GEMINI_API_KEY. On Skipbox, change the job to runs-on: skipbox: from $39 a month, flat, with unlimited minutes.

Sources

All read on November 16, 2026, Japan time (UTC+9); the time in parentheses is when each was read.

Updates to this page

  • November 16, 2026, 16:40 JST: published.