The owner (11-15): "正在使用的继续正常,加个提示,新用户不让下载".
0.2.0 answered every request with a 410. 0.2.1 restores the plugin as
0.1.18 had it (git checkout df7d7ae0 -- packages/antigravity), so a user
who has it keeps working. It stays out of registry.json, and magpie's
plugin.Add turns it away for anyone who doesn't have it listed, with a
line on the Providers page telling its users that Google suspends accounts
it sees used this way and pointing to agy-cli. The READMEs say so.
Run on mote at this tree, HOME a temp dir: bun scripts/check.mjs all, and
bun test packages/antigravity packages/agy-cli scripts: 195 pass, 0 fail.
Google bans accounts it sees calling Code Assist the way this plugin did
(Antigravity's own OAuth client, straight to cloudcode-pa), and as the
plugin magpie offered for Antigravity it was the one everyone installed
(the owner, 11-15: 全部下线,改推 agy-cli). Antigravity is served by
@magpie-community/opencode-agy-cli-auth now, which drives the user's own
agy over ACP.
From 0.2.0 the package makes no request at all. Every request gets a 410
{"error":{"status":"ModelDeprecated","message":"Antigravity: this model
has been retired. …"}} naming Antigravity (local agy CLI) and its magpie
plugin add command; magpie's modelRetired reads that as a retired model,
so a routing group asks its next member. Signing in throws the same
words; there are no models, usage, options or web search. The provider id
stays, so magpie's mover (raised to 0.2.0 there) lands moved users here
and their account rows show the message.
registry.json drops the antigravity entry, so Discover no longer offers
it. agy-cli's cloak.mjs was a copy kept equal to antigravity's by
cloak.test.mjs; it is the only copy now, and the parity tests become
tests of cloak.mjs alone (the invisible-character and REWORDED cases are
kept). agy-cli's version is unchanged (comments and tests only).
What users lose: multi-account rotation, the in-plugin Google sign-in and
account import, AI-credit spending, Antigravity web search, and a
provider that works without agy installed.
Run (mote, temp HOME): bun scripts/check.mjs all ✓; bun test
packages/antigravity packages/agy-cli scripts: 79 pass, 0 fail.
retired.test.mjs replaces fetch with one that throws and checks nothing
was asked on any path. Not tried: a magpie with a moved account on 0.2.0
(done on the magpie side's commit).
feikeer27 asked gemini-4-hydrogen at xhigh. sentID picked the
gemini-4-hydrogen-xhigh variant, but shape() set the inner
thinkingConfig.thinkingLevel to "high": its level chain had no xhigh
case and fell through to high, a rule from Gemini 3, which took
nothing above high. Google lists LOW, MEDIUM, HIGH and XHIGH for
Gemini 4 Hydrogen (magpie 15500d437). A variant whose own level is
xhigh is now asked at "xhigh", lowercase like every other level this
plugin sends. A model with no xhigh variant stays at high, so an
xhigh asked of gemini-3.7-flash or gemini-4-hydrogen-high still goes
at high.
complete() also read a thinkingLevel from the body only in lowercase.
Gemini's own clients write "XHIGH"/"LOW", so with no X-Magpie-Effort
header the level was dropped. It is lowercased first now.
Run: bun test packages/antigravity on mote (temp HOME): 133 pass, 0
fail; bun scripts/check.mjs antigravity ok.
Broken by hand: both changes reverted, 3 of the new tests red (the two
hydrogen-xhigh shape cases and the capitals request test).
Not tried: a real gemini-4-hydrogen-xhigh request. No account here is
served Gemini 4, so Code Assist taking "xhigh" is from Google's model
page, not a reply; the reporter is asked to confirm.
With Use AI credits off, an account holding credits got the credits note
on every 429: "turn on the Use AI credits switch ... when the plan's
quota is used up". The reporter's Gemini quota wasn't used up, and the
note read as if it were. The plugin now reads fetchAvailableModels again
on such a 429: when the model still has quota left, the note says so and
that credits would not change it; when none is left, or the read fails
or doesn't list the model, the credits note stays as before.
Run (mote): packages/antigravity bun test, 102 pass; bun
scripts/check.mjs antigravity ok. Broken by hand: always the credits
note, and the quota-left test goes red (1 fail).
Not tried: a real account's 429 with quota left (the reporter's case).
Since about 18:43 on 11-14 Google's Antigravity backend answers 429
RESOURCE_EXHAUSTED to requests whose system instruction holds certain
agents' identity lines, though the account has quota and the same
request with another prompt passes. Tried on a real account
(gemini-3-flash), each line alone in the system instruction:
- refused now: "You are Hermes Agent", Hermes' earlier persona
"…an intelligent AI assistant created by Nous Research" (also as
"You're …"), "You are OpenCode" / "You are opencode", Codex CLI's
"You are a coding agent running in the Codex CLI", and pi's "You are
a coding assistant running inside pi".
- pass as written: Codex GPT-6's prompt, Claude Code, Gemini CLI, Qwen
Code, Cline, Kilo, goose, Amp, Droid, Kimi, Aider, Cursor.
The cloak in antigravity and agy-cli (and the antigravity-cloak
middleware) now rewords each refused line the smallest way that passes:
"You are" -> "You're" for Hermes, OpenCode and Codex CLI, "created by"
-> "built by" for Hermes' earlier persona, "running inside pi" ->
"running within pi". The hint shown with a refusal names the agent
(new pi, OpenCode and Codex CLI hints; Hermes' hint covers both
personas).
agy-cli (@Lmohn39, pi 1.5.0 via agy 1.5.9, hydrogen): when agy prints
its retry banner for a refused 429, agy-cli waited while agy retried
the same refused prompt without end, so pi hung. The turn now fails at
once with the 429 and the existing "this is not a quota" explanation,
the agy process is stopped and dropped from the pool. A 503 banner
still waits as before.
Run:
- root `bun test` with HOME=$(mktemp -d) on mica (mote was over its 18
cores): 8820 pass, 20 skip, 0 fail, exit 0.
- real account through the patched loader, gemini-3-flash 5/5 each:
pi 1.5.0's full default prompt (built from its dist/core/system-prompt.js),
Hermes current and earlier personas, both OpenCode first lines, Codex
CLI's prompt, Codex GPT-6's prompt. claude-sonnet-4-6: pi 5/5.
Broken by hand:
- the old agy-cli index.mjs makes the new Lmohn39 test red ("still
waiting after 5s").
- dropping the pi line from TURNED_AWAY turns 6 cloak tests red.
Not tried: a real agy 1.5.9 turn on hydrogen showing the banner (the
banner's wording is the one agy-cli already matched); pi itself end to
end through agy-cli.
Antigravity 2.32.1 (manifest, 2026-11-13) was run in a sandbox HOME behind
a recording proxy, and every Code Assist request it sent was diffed against
the plugin's. Stale in 0.1.14, now as the app sends them:
- User-Agent: `antigravity/hub/<v> <os>/<arch>` is now the language
server's `antigravity/hub/<v> (aidev_client; os_type=<os>; arch=<arch>;
cl=<changelist>)`. The changelist comes from a table (2.32.1 is
1021296516); a newer manifest version uses the newest known one.
- Envelope keys go in the app's order (project, requestId, request, model,
userAgent, requestType). requestId is
`agent/<cascade>/<ms>/<trajectory>/<step>` instead of `agent-<12 hex>`.
- request.labels is added as the app sends it: cascade and trajectory ids
(stable per conversation, from its session), the step, the model's enum
from fetchAvailableModels, and used_claude / used_non_gemini_model.
- onboardUser sends `{tierId, metadata: {ideType}}` with the plain UA. The
google-api-nodejs-client UA suffix, X-Goog-Api-Client, snake_case keys,
ide_version and ide_name are gone; the app sends none of them.
- No `Accept: text/event-stream`; the app sends no Accept.
- The sign-in asks the aicode scope too, as the app does.
- DEFAULT_VERSION is 2.32.1.
Already matching: loadCodeAssist's body and endpoint order, the
fetchAvailableModels body, the client id and the sessionId form.
Run:
- Root `bun test` with HOME=$(mktemp -d) on mote at a60667b5 plus this
change: 8818 pass, 20 skip, 0 fail. origin/main has since gained
3db6dcfa (agy-cli only, no file shared with this change).
- Real account, sandbox HOME, through the plugin's loader fetch:
loadCodeAssist 200, fetchAvailableModels 200, streamGenerateContent 200
for gemini-3-flash, claude-sonnet-4-6 and gemini-3.8-flash with the new
UA, key order, requestId and labels.
- The updated tests fail on 0.1.14's code by construction: they assert
the new UA form, the key order, the requestId form, labels, and the
onboardUser body and headers, all of which 0.1.14 sent differently.
Not tried: the changelist of releases after 2.32.1 (needs their binary);
last_step_index and the request_id suffix past the first turn are
approximations (contents count, model turn count), since only a first
turn was captured; onboardUser against the real service (the account
already has a project).
Lawson0112 (magpie 0.1.4152, Windows, Codex) saw every request to
gemini-4-hydrogen end "400 · failed" after 20-38s and asked whether it
was a region block. A region refusal is a fast 400 FAILED_PRECONDITION
"User location is not supported..."; a 400 after 20s+ is Gemini 4's late
INVALID_ARGUMENT, which Code Assist writes after the thinking events as
a bare line with no "data:" (zRain's capture, magpie's sse_bare.go):
{"error":{"code":400,"message":"Request contains an invalid argument.","status":"INVALID_ARGUMENT"}}
holdThoughts read only "data:" lines, so it never saw that line: the
quiet retry 0.1.6 added never ran for the real reply, and the error went
to the client on the first ask. Its tests used an invented "data:" error
chunk. Now a bare JSON value (one line or pretty-printed over several)
is read too, and the stream is asked again as for a data event.
A Gemini 4 INVALID_ARGUMENT that still comes after the model ran (a
slow 400, or in the stream) is told as "<model> turned down a call it
built while thinking, asked N times (Google: ...). Not a region or
account refusal: Google names those". The words keep clear of what
magpie's gateway reads as another fault ("model ... invalid" reads as a
model not served). A fast 400 and other models keep Google's words.
Run: packages/antigravity bun test in WSL (magpie-desktop), 97 pass;
bun scripts/check.mjs exit 0. mote was at load ~150 and mica's disk
full, so the runs went to the Linux box.
Broken by hand: the old index.mjs with the new tests, 3 of the 4 new
tests red (the bare-line retry, the pretty-printed line, the wording);
"a fast 400 keeps Google's words" passes on both, as it should.
Real account (kumw95ya25, sandbox HOME): the real Codex 0.165 request
through magpie's buildGemini answers 200 on gemini-3.8-flash at high
with the new code.
Not tried: Gemini 4 itself. The account here has Gemini 4 only as
gemini-4-*-disabled (404), as does every other sign-in found, so
whether Hydrogen passes Codex's request on a second ask is not known.
A late 400 after the 10s hold has released the thinking still reaches
the client as before.
Since 11-14 Antigravity also answers a bare 429 "Resource has been
exhausted (e.g. check quota)" to Codex's GPT-5 lines ("You are Codex, an
agent / a coding agent based on GPT-5") in a user's turn: a pasted
AGENTS.md, or a developer message magpie tells after a reply as a
<system-reminder> in the user's turn. Both the plugin and the cloak only
reworded the system prompt, so such a conversation 429s on every turn
whatever quota is left (daoche_wuzui on X, magpie 0.1.4131 with Cloak
0.1.7).
On the owner's real Antigravity account, gemini-3.8-flash, 11-14:
- each line in the first user turn: Codex's two lines 429 3/3 each; the
billing line, the Agent SDK line, Hermes' persona and omp's RFC line
200 3/3 each, so only Codex's two are reworded there.
- Codex's line in the model's turn and in a functionResponse: 200 2/2.
- "built on GPT-5" in the user's turn: 200.
antigravity: shape() rewords USER_TURNED_AWAY (Codex's two lines) in
every non-model part's text; cloak() takes an optional list of lines.
antigravity-cloak: onProvider rewords those two lines in user messages
(anthropic messages, chat messages, responses input, gemini contents);
tool results, the model's turns and the user's own saidAs/extraWords are
left as they were in messages. The old case that kept a user's Codex line
as written now expects it reworded.
Run, at this tree, on mica:
- root `bun test` with a temp HOME: 8781 pass, 0 fail (8801 tests, 613 files)
- packages/antigravity `bun test`: 93 pass; packages/antigravity-cloak:
25 pass.
Broken by hand: with the user-turn cloak taken out, shape.test's new
test fails, and 5 of the cloak's cases fail.
Real account through a sandbox magpie (gateway 3476, plugin host
restarted on these files): an Anthropic /v1/messages request whose user
turn carries Codex's line, 429 3/3 on 0.1.12 + cloak 0.1.7, 200 3/3 on
these. The plugin alone on the same account: 429 3/3 -> 200 3/3 for both
lines. Claude Code's 23-tool capture and a Codex capture still 200 2/2.
Not tried: agy-cli (it doesn't cloak), other models than
gemini-3.8-flash for the user-turn case.
Since 11-14 Google's check reads past invisible characters: a system
prompt with Claude Code's billing line and Agent SDK line, broken up with
two U+200B in every word as the cloak sent them, was turned away 5 of 5
with the bare 429 "Resource has been exhausted". Claude Desktop's Code
tab through magpie to Antigravity failed every turn (hc295971796 and
daoche_wuzui on X, 11-14).
Each line Google turns away now goes reworded instead, as plain words:
- the x-anthropic-billing-header line is left out (to its line's end);
a system part or message holding only it is dropped;
- "built on Anthropic's Claude Agent SDK" -> "built on the Claude Agent
SDK by Anthropic";
- Codex's "based on GPT-5" -> "built on GPT-5";
- Hermes' "created by Nous Research" -> "built by Nous Research";
- omp's RFC "keywords" -> "key words" (as before).
A copy an older magpie or cloak broke up (U+200B, U+2060, soft hyphen,
in or between words) is matched and reworded as the line. The Code tab's
main line ("You are Claude Code, Anthropic's official CLI for Claude,
running within the Claude Agent SDK.") passes as written and is kept.
antigravity-cloak gains a saidAs {phrase: replacement} option; extraWords
still breaks words up and the README says it no longer gets past
Google.
Run:
- real Antigravity account, sandbox HOME, gemini-3.8-flash, 10
sequential requests each through packages/antigravity at this head:
Code tab main prompt as Claude Desktop sends it (billing + main line +
rest) 10/10 200; Agent SDK subagent line 10/10; an old two-U+200B
copy 10/10; Codex GPT-5 10/10; Hermes' earlier persona 10/10; omp's
RFC line 10/10. Each rewording alone was first tried 5/5 against the
zero-width break, which went 0/5.
- wsl-run, HOME=$(mktemp -d) bun test (whole repo) before the last test
fixes: 8735 pass, 19 skip, 3 fail, all three in these packages' own
tests still expecting zero-width; after fixing them,
bun test packages/antigravity packages/agy-cli packages/antigravity-cloak:
133 pass, 0 fail.
Broken by hand: the three packages' source files from origin/main with
these tests: 19 fail (shape, cloak parity, smoke, every cases.json case).
Not tried: agy-cli against the real agy binary (smoke runs a fake agy);
models other than gemini-3.8-flash.
eric_li8983 (X, 11-14): oh-my-pi on Windows with an Antigravity account got
"Antigravity answered 429 to this system prompt" for omp's first line,
"RFC 2119 keywords: MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL."
Two causes, both seen on a real account on 11-14:
- Google's check reads the line in any case with any white space between
its words: wrapped with LF or CRLF, indented, a tab, two spaces or a
no-break space were all turned away, while the cloak matched only the
literal line, so those copies went out whole. Each turned-away line is
now matched with any run of white space (JavaScript's \s) between its
words, the same in antigravity, agy-cli's cloak.mjs and the
antigravity-cloak middleware; Codex's and Hermes' lines too.
- A zero-width-broken copy of omp's line was itself turned away now and
then (10 sequential requests each: two U+200B a word 3 bare 429s, one
after every character 3, U+2060 2, soft hyphen 1). omp's line now goes
as "RFC 2119 key words: …", RFC 2119's own term, with its white space
as it was. The hint says so.
Real account (sandbox HOME, copy of the live Antigravity account,
gemini-3.8-flash, sequential): the reworded plugin answered omp 18.20.0's
literal prompt 10/10, the full template 10/10, and the line wrapped after
"REQUIRED," 10/10. The zero-width version before it: lit 3, tmpl 1, w1 5
bare 429s in 12 each.
Run at 24c75a16's tree (rebased on 76cfb7fe): the whole bun test (temp
HOME) on WSL magpie-desktop, 8720 pass, 0 fail, 19 skip. Broken by hand: the new tests against the old index.mjs,
cloak.mjs and middleware: 6 fail.
Not tried: omp itself end to end on Windows. Also seen in the same probe:
Claude Code's, Codex's and Hermes' broken-up lines were each refused 1-2
times in 10; filed as #1118.
Adds a magpie `search` hook (`search.antigravity`, auth: antigravity) that runs
a query through Google Search grounding (`tools: [{googleSearch: {}}]`) on a
Flash model from the signed-in account's live catalog, with thinking off, and
returns the grounded pages (title, URL, snippets), deduplicated and trimmed to
`count`. A refusal carries numeric `status` and `retryAfter` so magpie rests
the account for search only. Grounding redirect URLs are returned as Google
sends them; no extra request is made per result. By Invis1ble-2.
Run at the reviewed head f0465e41b on mote, HOME=$(mktemp -d):
- bun test ./packages/antigravity/: 90 pass, 0 fail (294 expect calls)
- bun scripts/check.mjs antigravity: ok
Broken by hand: turning off the per-URL dedup in pagesFromGrounding turns
search.test.mjs red (5 pass, 1 fail); restored.
The author ran it through a real magpie with a real Antigravity account
(`magpie tool web_search`, 10 pages for "latest Bun runtime release version")
and checked the SEARCH_MODELS names against a real fetchAvailableModels.
Not tried by the reviewer: a real Antigravity account.
holdThoughts held a Gemini 4 stream until its first non-thinking part,
so a late 400 INVALID_ARGUMENT could be asked again without sending
thinking twice. On a long-thinking turn (gemini-4-hydrogen at high:
60-140 s) the client got nothing until the answer began, and harnesses
with a 60-120 s idle timeout gave up. Now the hold ends after
retry400.holdMs (10 s): what was held goes out and the rest streams
live. A read still out when the time runs out is taken by the body
first, so no chunk is lost. A 400 within the first 10 s is still asked
again; one after that reaches the client as it is. No switch: the cap
covers the timeout without a setting.
Run (WSL, Bun 1.4.2, temp HOME): packages/antigravity bun test 84
pass; bun scripts/check.mjs antigravity ok. Broken by hand: with the
timer replaced by a promise that never settles, the new test fails at
its 3 s timeout. Not tried: a real Gemini 4 account.
Reported-by: hardfist
The User-Agent's version comes from Antigravity's update manifest. A
read that failed (5s timeout, often hit on a cold plugin host) left the
2.9.1 default in place for the full six hours. Google lists and serves
Gemini 4 only to newer releases, so under 2.9.1 the Argon and Carbon
models fell out of the list and a request for them got 404.
- The default is the manifest's version today, 2.31.2.
- The read waits 15s, and one that fails is tried again after a minute.
- A version that changes drops the model lists read under the old one,
so the newer list arrives at once, not up to ten minutes later.
magpie puts delisted picks back when the list has them again.
Run on a separate test Mac (Bun 1.4.2, temp HOME):
- bun test packages/antigravity: 99 pass, 0 fail (4 new in
version.test.mjs).
- bun scripts/check.mjs antigravity: ok.
- The manifest answered "version: 2.31.2" today.
Broken by hand, each red then restored:
- no retry after a failed read: 1 fail.
- no list drop on a new version: 1 fail.
Not tried: a real Antigravity account. The reporter's own test of
2.9.1 vs 2.31.2 on one token is what shows the version gates Gemini 4.
Reported-by: floodsource
DSH desktop puts a paragraph on @ paths ("Tokens prefixed with @ are paths the user explicitly referenced…") in every system prompt. xueyinmei-dot replayed a recorded DSH request against gemini-4-argon: with the paragraph word for word, most answers came in ~3s at ~300 tok/s with no thinking and ended after one shallow step; with only that paragraph removed, or reworded, the request was answered normally (20 of 20 replays with the rewording, and a 12-step real DSH session).
shape() now sends that exact paragraph as their rewording, which says the same thing, after the zero-width breaks. Any other text, including a prompt that only mentions @ paths, goes as written. The match is the whole paragraph, so another app's prompt is not touched.
Run on mica (Bun 1.4.2, temp HOME): bun test packages/antigravity 95 pass 0 fail; bun scripts/check.mjs exit 0.
Broken by hand: outgoing() without reword() turns the new test red (shape.test.mjs 21 pass 1 fail).
Not tried: a real Antigravity account (the rewording's effect rests on the reporter's replays). magpie's built-in Antigravity path (internal/gateway/codeassist.go) gets the same rewording in its own commit.
Reported-by: xueyinmei-dot
Gemini 4 now and then builds a call Google's validator rejects; the same
request passes on a resend. A 400 INVALID_ARGUMENT that took 3s or more, or
an error chunk in the stream before any non-thinking part, is sent again for
gemini-4 models only. Thinking-only chunks are held back until the first
answer part, so a retry never repeats thinking to the client; once an answer
has begun the stream goes through as it is (a reply can't be taken back). A
fast 400 and other models are returned as before.
Run: bun test in packages/antigravity on mica, 78 pass. Broken by hand:
RETRY_BAD_CALL=0 turns 4 new tests red.
Not tried: a real Antigravity account (the 400 is intermittent).
Cost: thinking shows once the first answer part (or the end) arrives, not live.
sessionOf took the first text of the first user message only, so every
Codex thread (and anything else opening with AGENTS.md or
<environment_context>) sent Antigravity one constant sessionId. It now
hashes the x-magpie-session header magpie's gateway sends plugins
(sessionOf: X-Magpie-Session, else the agent's own session header), with
x-magpie-subagent (Claude Code's agent id) and the first real prompt
added when a subagent is named. With no header it hashes the first user
text that isn't an injected preamble (AGENTS.md, environment_context,
permissions instructions, system-reminder, and the rest of
INJECTED_USER_TEXT). A synthetic magpie-<24hex> id is ignored. A
chat.headers hook passes OpenCode's sessionID on as x-magpie-session.
The header never goes upstream: the plugin builds its own request
headers, and host.js's unsaid strips it too. Version 0.1.5 (dist has
0.1.4).
Run at 7709ff67 on mica (mote was at load 24), temp HOME:
bun test packages/antigravity: 88 pass, 0 fail. bun scripts/check.mjs:
exit 0. Merges cleanly with origin/main edc6dbcd (it is the merge base).
Broken by hand, each red: header ignored (2 tests), preamble skip
removed (1), subagent ignored (1), chat.headers not setting the header
(1), synthetic magpie-<hex> id not filtered (1).
Not tried: a real Antigravity request (fake fetch only); whether Google
treats sessionId as more than cache affinity. Known edges, not
blocking: a first turn whose user messages are all preamble hashes the
preamble, and the next turn with a real prompt gets a new id; inside
magpie, chat.headers sets x-magpie-session to the conversation id (the
agent's own session header first), so a caller's own X-Magpie-Session
loses to the agent's header, as in magpie's affinityID.
Co-authored-by: JJERRYY <17349077+JJERRYY@users.noreply.github.com>
eric_li8983's 429 RESOURCE_EXHAUSTED after 0.1.3 was not quota. On the
owner's real Antigravity account (plenty of quota; "hi" with no system
prompt gives 200 on gemini-3.8-flash, claude-sonnet-4-6, gemini-3-flash),
oh-my-pi's real system prompt (captured from omp 's request to a local
server, 10.5KB) got 429 on all three. Bisected by hand: the sentence
"RFC 2119 keywords: MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, OPTIONAL."
alone gets 429; its halves, the list without the final period, or "2120"
for "2119" get 200; the prompt without that line gets 200. Broken with a
zero-width space after the first and second character of each word, the
whole prompt gets 200 on the same three models.
The line is added to antigravity's TURNED_AWAY (with its own hint when the
cloak missed a reworded copy) and to antigravity-cloak's words.
Run: bun test packages/antigravity packages/antigravity-cloak on
magpie-desktop (wsl-run, HOME temp): 86 pass. Broken by hand (the TURNED_AWAY
entry removed): the new shape test and the 429 hint test go red, 2 fail.
Real account: omp's full prompt 200 on 3 models after, 429 before.
Not tried: omp's own run through magpie end to end (the user's AGENTS.md
and tools were not in the captured prompt); other omp prompt lines after
the cloak. Real quota 429s and the credits path are unchanged.
With Use AI credits on, a 429 from the plan's quota was cancelled before the
second ask with credits; when that ask was refused too, the code read the
cancelled body and threw, so every retry came back as a 502 "Body already
used" and the quota's 429 was never told. The refusal is read first and told
when the credits ask fails or throws.
Run: bun test packages/antigravity (84 pass); the new test is red on the old
index.mjs (TypeError: Body already used), green on the new. Other packages that
cancel a body before a retry reassign the reply (read: kiro, minimax, nous,
atomcode, joycode, gcp-ai, factory); none read the cancelled one.
Google turns Claude Code's billing line and "built on Anthropic's Claude
Agent SDK" away again when only the first letter is broken (checked on a
real Antigravity account with Claude Code 2.1.316's prompt); a break after
the first and the second character of each word goes through, 3 of 3.
Both packages break every run of three or more letters or digits that way.
antigravity's error for a turned-away prompt said "400 ... as from an
unapproved channel" about what Antigravity answered as a 429; it now says
"Antigravity answered 429 to this system prompt".
bun test packages/antigravity packages/antigravity-cloak on mote: pass.
cases.json expectations regenerated for the new breaks.
Signs in with Google (Antigravity's client, PKCE, loopback) or imports a
refresh token / account-manager export, sets up the Code Assist project
(loadCodeAssist, onboardUser on the default tier), lists the account's
models with level variants, and sends every request through
v1internal:streamGenerateContent in the app's envelope, with the
built-in's request shaping (system-prompt cloak, tool ids and results,
schema flattening, Claude and Gemini rules), its error mapping (turned-away
429 -> 400 unapproved channel, 404 model, refused refresh -> 401 expired)
and its usage windows and pools.
A stream's last chunk is an empty text part; sent back in the next turn,
Claude refuses it ("text: Field required"). Both the whole-reply reader and
the request shaper drop it.
Run:
- bun test packages/antigravity on mote: 78 pass, 0 fail.
- bun scripts/check.mjs antigravity: registry.json ok, antigravity ok.
- Real account (the built-in's saved Google account, read only, sandbox
HOME): model list; stream and generateContent on gemini-3.8-flash; the
effort header picking -low; claude-sonnet-4-6, claude-opus-4-6-thinking,
gpt-oss-120b-medium all answer; a Claude Code system prompt to Gemini
answers 200 (cloak); an unknown model 404; usage gives plan, model
windows and the Gemini and Claude & GPT 7-day pools; a tool call round
trip on Claude Sonnet, Opus thinking, Gemini and GPT-OSS.
- Broken by hand: without the empty-text drop the new shape test and the
generateContent test go red, and the real Claude round trip answered 400.
Not carried over (README): the 6h rest of a turned-away account, Google
Search grounding and image models, countTokens (404, magpie estimates),
sending the system prompt uncloaked, multi-account import, models.dev
names. Not tried: the browser sign-in end to end (the import path was).