Google Antigravity CLI 1.5.17 使用自訂 AI 助理時,Gemini 配額消耗變成 4 倍
Google Antigravity ACP using "custom-agent" consumes 4x quota per token
有使用者回報,Antigravity CLI 1.5.17 搭配自訂 AI 助理時,Gemini 配額消耗比 1.5.16 多出 4 倍。
- 回報者用相同模型和提示詞測試,並比對模型實際使用的 token 數。
- 結果顯示,差異只出現在加上自訂 AI 助理的用法,預設 AI 助理在兩個版本的配額消耗率相同。測試沒有使用工具,也沒有觸發安全檢查或載入其他對話。這是 GitHub 上的使用者回報,內容未確認官方是否認定為錯誤,也沒有提供修補版本或暫時處理方式。
AI 伴隨問答
針對這篇報導有疑問?可直接點選快捷問題或向 AI 追問背景脈絡與技術細節:
Description
Antigravity CLI Version
1.5.17 (regressed vs 1.5.16)
Environment Context
- OS: Linux x86_64 (Fedora 45)
- Shell: bash
- Terminal Emulator: not applicable (reproduced via headless
agy acpstdio client) - Runtime Version: Antigravity CLI 1.5.16 vs 1.5.17 (consumer OAuth plan, Gemini Models)
- Hardware Details: x86_64 desktop, single isolated process per run (no concurrent sessions)
Steps to Reproduce
Summary
Starting in agy 1.5.17, running agy acp --agent <custom-agent> consumes exactly 4.00× Gemini weekly and 5-hour quota per token compared to 1.5.16 on the exact same custom agent, model, and prompt. On the default agent (agy acp without --agent), 1.5.16 and 1.5.17 consume the exact same quota per token. Nothing in the 1.5.17 release notes mentions a 4× multiplier for custom agents.
Minimal reproduction
- Create an empty directory with a
.git/folder and a minimal custom agent (no tools, minimal 1-line prompt) at.agents/agents/notools-custom.md:--- name: notools-custom description: Minimal custom agent with no tools mainAgent: true subagent: false tools: [] inheritCustomizations: false excludeDefaultComponents: true --- You are a terse assistant. Answer directly.
- Check baseline quota until two consecutive reads agree:
AGY_CLI_DISABLE_AUTO_UPDATE=1 agy -p "/usage" --output-format jsonRecordremaining_fractionforgemini-weeklyandgemini-5hunderGemini Models. - Run one turn against
agy acp --agent notools-customwithGemini 4 Neon (XHigh)using a minimal stdio ACP client (initialize→authenticate→session/newwithmcpServers: []and no_meta→session/set_model→session/prompt, then exit):import json, os, subprocess, sys, threading binary, work, prompt = sys.argv[1], sys.argv[2], sys.argv[3] extra = sys.argv[4:] # e.g. ["--agent", "notools-custom"] proc = subprocess.Popen( [binary, "acp", *extra], cwd=work, env={**os.environ, "AGY_CLI_DISABLE_AUTO_UPDATE": "1"}, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, text=True, bufsize=1, ) results, lock, nid = {}, threading.Condition(), [0] def send(obj): proc.stdin.write(json.dumps(obj) + "\n") proc.stdin.flush() def req(method, params): nid[0] += 1 rid = nid[0] send({"jsonrpc": "2.0", "id": rid, "method": method, "params": params}) with lock: while rid not in results: lock.wait(timeout=300) return results.pop(rid) def reader(): for line in proc.stdout: msg = json.loads(line) if "method" in msg and "id" in msg: send({"jsonrpc": "2.0", "id": msg["id"], "error": {"code": -32601, "message": "unsupported"}}) elif "id" in msg: with lock: results[msg["id"]] = msg lock.notify_all() threading.Thread(target=reader, daemon=True).start() try: init = req("initialize", {"protocolVersion": 1, "clientCapabilities": {"fs": {"readTextFile": False, "writeTextFile": False}, "terminal": False}}) methods = (init.get("result") or {}).get("authMethods") or [] if methods: req("authenticate", {"methodId": methods[0]["id"]}) res = req("session/new", {"cwd": work, "mcpServers": []})["result"] sid = res["sessionId"] pick = next(m["modelId"] for m in res["models"]["availableModels"] if "Neon (XHigh)" in m["name"]) req("session/set_model", {"sessionId": sid, "modelId": pick}) req("session/prompt", {"sessionId": sid, "prompt": [{"type": "text", "text": prompt}]}) print("session:", sid) finally: proc.terminate() proc.wait(timeout=10)
Prompt used (with a fresh UUID nonce per run to avoid caching):Nonce <uuid>. List the first 25 prime numbers, give their sum, and state in one sentence why 1 is not prime. Then stop. - Re-read
AGY_CLI_DISABLE_AUTO_UPDATE=1 agy -p "/usage" --output-format jsonuntil two consecutive reads agree, and compare the quota delta against the token usage recorded in~/.gemini/antigravity-cli/conversations/<session>.db(gen_metadata). - Repeat step 2–4 with
agy1.5.16 vs 1.5.17, and as a control without--agent(default agent).
Expected Behavior
A custom agent with no tools and a minimal prompt should draw Gemini quota at the same per-token rate in 1.5.17 as in 1.5.16 and as the default agent (~$6.00 API-equivalent per weekly percentage point on Gemini 4 Neon).
Actual Behavior / Error Screenshots
In 1.5.17, --agent notools-custom draws exactly 4.00× the Gemini weekly and 5-hour quota per token compared to 1.5.16 and compared to the default agent in 1.5.17.
Normalizing each run by native Neon token usage at API rates ($3/M uncached input, $15/M output; 0 cached tokens on fresh sessions):
| Run | agy version |
agentScript |
streamGenerateContent calls |
Native Neon tokens (in / out) | API equiv. ($) | Weekly Δ (pp) | 5h Δ (pp) | $/weekly pp | Relative burn |
|---|---|---|---|---|---|---|---|---|---|
agy acp --agent notools-custom |
1.5.16 | true |
2 | 740 / 2,441 (2,307 thinking + 134 resp.) | $0.038835 | 0.006470 pp | 0.025886 pp | $6.0022 | 1.00× |
agy acp --agent notools-custom |
1.5.17 | true |
2 | 737 / 3,066 (2,924 thinking + 142 resp.) | $0.048201 | 0.032133 pp | 0.128532 pp | $1.5001 | 4.001× |
agy acp (default agent, run 1) |
1.5.16 | false |
2 | 12,007 / 2,868 | $0.079041 | 0.013173 pp | 0.052696 pp | $6.0004 | 1.00× |
agy acp (default agent, run 2) |
1.5.16 | false |
2 | 12,009 / 2,741 | $0.077142 | 0.012857 pp | 0.051421 pp | $6.0001 | 1.00× |
agy acp (default agent, run 1) |
1.5.17 | false |
2 | 12,001 / 3,317 | $0.085758 | 0.014293 pp | 0.057173 pp | $5.9999 | 1.00× |
agy acp (default agent, run 2) |
1.5.17 | false |
2 | 12,003 / 3,014 | $0.081219 | 0.013536 pp | 0.054145 pp | $6.0001 | 1.00× |
Notes:
- This is unrelated to [Bug]: agy CLI: when the background safety pre-check hits HTTP 429, every tool call is re-reviewed by a larger model and silently drains the plan's 5-hour and weekly quota (about 2.6x normal burn rate) #1886 (safety monitor 429 escalation) and [Bug]: agy acp 1.5.17 resumes another live process's conversation at startup, and a new session can get that conversation's MCP server #1872/[Bug]: 1.5.17 print-mode / concurrent CLI startup auto-resumes live conversations (server.go:5311), causing exponential fork-bomb and runaway spend #1884 (startup conversation resume): every run used zero tools, made zero safety-monitor calls, logged zero 429s and zero conversation resumes, and made exactly 2
streamGenerateContentcalls (title generation + main turn). - Is this 4× quota weighting for custom agents an unintended regression in 1.5.17, or an intentional (currently undocumented) change?
Logs & Configurations
Relevant lines from ~/.gemini/antigravity-cli/log/acp-server-*.log for the two --agent notools-custom runs:
1.5.16:
Language server version: 1.5.16
Creating new cascade trajectory (agentScript=true)
# Exactly 2 streamGenerateContent calls in the log; 0 monitor calls; 0 resumes.
1.5.17:
Language server version: 1.5.17
Creating new cascade trajectory (agentScript=true)
# Exactly 2 streamGenerateContent calls in the log; 0 monitor calls; 0 resumes.
Agent file (.agents/agents/notools-custom.md):
--- name: notools-custom description: Minimal custom agent with no tools mainAgent: true subagent: false tools: [] inheritCustomizations: false excludeDefaultComponents: true --- You are a terse assistant. Answer directly.
Reacted by Brian Grablin, Frank Vitale, sywd1118, sssysy, Lasse Räty, mary, Ievgen Pyrogov, Matias Iseas and Stanisław Pitucha