You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docs(agents): second opinions through the Gemini API, no agy from Claude - #12226
Google's Antigravity FAQ ("Wrapping agy inside third-party coding agents or applications … is not supported under consumer plans") and a staff reply on 2026-10-16 (forum topic 189905: "No under consumer plans", even for the unmodified binary as a local subprocess) rule out the read-only agy -p second opinions docs(agents): delegation lanes and Gemini tasks through issues #12223 introduced. Claude stopped running agy on 2026-10-21.
Second opinions and first PR reviews go through the new zweitmeinung project skill: .claude/skills/zweitmeinung/gemini_review.py calls Gemini through Vertex AI in project anyplot, location global (the site's agents stay on eu), with read-only tools over tracked repository files, prefetched data, and the public API; no shell, no credentials. The owner's split (2026-10-21/22): Gemini 3.8 Flash on Flex PayGo (half price) for routine first reviews, on probation against Copilot's findings; Gemini 4 Argon, thinking high, for plans and second opinions.
Flex gets 5 minutes per run (and per request); after that, or after a timeout or a 429/5xx, the run goes online (flex_fallback, per_turn_seconds). The SDK retries timeouts too: the first Flash review of this PR waited over an hour on 15-minute attempts, and with a 5-minute cap per request the next one still ran for over 25 minutes.
Hardening after Copilot's reviews: a symlink is visible only when its target is itself a visible entry (a tracked review.txt -> .env exposed the untracked .env before), secret-name patterns apply to every path component of --data files, lock files stay out of the inlined diff and the diff is capped at 120,000 characters, a backtracking search pattern is stopped after 10 seconds, a line longer than the tool limit is cut instead of looping, and an unencoded URL is refused instead of crashing the run.
gemini-task: Gemini pushes its gemini/* branch and opens a draft PR labelled gemini. CI runs on drafts, Copilot does not (review_draft_pull_requests: false in the ruleset), and Claude marks the draft ready after its own review. The owner may let Gemini run tests and builds unattended in his own agy session; only he starts agy.
CLAUDE.md and .claude/guardrails.md describe the lanes and costs; the guardrail test anchors pin the obligations (Flash/Argon split, draft PRs only, Claude never runs agy).
Plan
N/A. The owner chose the Vertex route on 2026-10-21 after reading a research report on the policy, then the Flash/Argon split, the draft-PR hand-over, and moving the skill into the repository on 2026-10-22.
Test plan
uv run pytest tests/unit tests/integration -n 8 (new tests/unit/test_gemini_review.py: confinement, http_get refusals, inlining caps, and the tool loop against a fake Vertex client)
uv run ruff check . && uv run ruff format --check .
uv run python -m tools.changelog check --base origin/main
Flash smoke run with --max-turns 1 on Vertex: forced last turn answers (exit 0), traffic_typeON_DEMAND_FLEX
Gemini 3.8 Flash first review of this PR through the repository script: 3 of 5 findings applied (owner-only PR comments for Gemini, git diff -z, *api_key*); 2 skipped (callers already resolve check_attachment's root, and the SDK returns finish_reason as an enum). Flex gave no answer on the first turn, so the run went online: 9 turns, $0.86.
Copilot: three rounds on the rework, 9 findings, all applied
…ns agy
Google's Antigravity FAQ says wrapping agy inside third-party coding
agents is not supported under consumer plans, and a staff reply of
2026-10-16 (Google AI Developers Forum, topic 189905) answered a setup
like ours with "No under consumer plans", even for the unmodified binary
run read-only as a local subprocess. Google recommends an AI Studio or
Gemini Enterprise API key instead.
- CLAUDE.md: first reviews and second opinions go to Gemini 4 Argon
through the Gemini API with the owner's AI Studio key; Claude never
runs agy itself.
- guardrails.md: the lanes table and a dated paragraph with the reason.
- gemini-task skill: only the owner starts agy; Claude's second opinions
use the API.
- Instruction tests anchor the two new rules.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GdMSqLR5ww4ji74EUSmk9M
…io key
The owner chose Vertex AI (project anyplot, location global) over an AI
Studio key: it runs on the existing Google Cloud login, bills to the same
account and its Ultra credit, and needs no new key. The site's agents
stay on eu. Gemini gets read-only tools over tracked repository files,
prefetched data and the public API.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GdMSqLR5ww4ji74EUSmk9M
…opinion skill in the repo
The owner found the first Argon review ($1.01) too expensive at about eight
merged PRs a day and decided on 2026-10-21 and 2026-10-22:
- Routine first reviews run on Gemini 3.8 Flash with Flex PayGo (half price,
global only); plans and second opinions stay on Gemini 4 Argon with
thinking high. Flash is on probation, measured against Copilot's findings
on real PRs.
- Gemini hands its work over as a draft PR labelled `gemini`: CI runs on the
draft, Copilot does not (the ruleset skips drafts), and Claude marks it
ready after its review. The owner may let Gemini run tests and builds
unattended in his own agy session.
- The `zweitmeinung` skill and its `gemini_review.py` move from the user's
home into the repository, with unit tests.
The script changes come from a comparison run on three merged PRs: every tool
turn re-sends the whole conversation, so the diff and the changed files are
inlined (`--diff-base`) and `read_files` reads several files per call. A text
part next to the last function responses made Vertex answer 400, and a last
turn without tools lost the implicit cache while Flash kept calling tools, so
the tool configuration now stays the same and the budget is enforced through
the tool responses, with at most two refused calls before the run ends.
The changelog bullet no longer says the gemini-task skill sends reviews to
Vertex, and the guardrail test anchors now pin the obligations rather than
the "Vertex AI in project anyplot" subject (both found by the Flash review).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GdMSqLR5ww4ji74EUSmk9M
The first Flash review of this PR waited over an hour on one open request.
The SDK retries timeouts as well as 429 and 5xx, so five 15-minute attempts
per turn could pile up. A Flex request is now tried once with a five-minute
timeout; after a timeout or a 429/500/503 the turn and the rest of the run
use the online client, and the summary reports `flex_fallback`. Token
counting always goes online.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GdMSqLR5ww4ji74EUSmk9M
From the Copilot review of the reworked PR:
- A tracked symlink such as `review.txt -> .env` resolved to a regular file
inside the root and exposed the untracked `.env`; a data link
`notes.txt -> server.pem` passed the name filter on its own name. A link
is now visible only when its target is itself a visible entry: a tracked
file, or a data file that passes the filter.
- The inlined diff had no size limit. Lock files are left out of it, and
it stops at 120,000 characters with a note to read the files instead.
- A last response that held text beside pending tool calls after the nudge
limit counted as a review; it now exits 3.
- gemini-task: a later hand-over updates the existing worktree with
`pull --ff-only` instead of repeating the fetch into a checked-out
branch, and a clone set up with the old `no-push` URL gets a one-line
restore for the owner.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GdMSqLR5ww4ji74EUSmk9M
The search tool compiles a pattern the model supplies, and Python's matcher
can backtrack for a very long time on a short line, for example `(a+)+$`
against forty `a` and a `!`. The review could then never reach its turn or
token limits. A SIGALRM timer now interrupts the search after ten seconds,
and the tool returns the hits so far with a note to simplify the pattern.
Found by the Copilot review.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GdMSqLR5ww4ji74EUSmk9M
[P2] Apply the secret-name patterns to directory components too. credentials/service-account.json and secrets/payload.json both pass this check, so files under those paths in --data become visible to Gemini; check_attachment accepts them as well. This bypasses the filename safeguard when sensitive material is accidentally included in a clearly named directory. Match every relative path component and add regression cases for nested directories.
Prevent non-advancing continuation on oversized lines
[P2] Avoid returning a continuation that cannot advance. If a line exceeds MAX_TOOL_CHARS, such as a single-line JSON file in prefetched data, this branch returns none of that line and tells Gemini to retry at the same start_line. Retrying produces the identical response and can waste the remaining tool budget; search also skips these lines. Return a clearly marked truncated excerpt and advance past that line, or support character-offset pagination. Add a regression case for an oversized first line followed by a normal line.
[P2] Return a tool error for malformed HTTP URLs instead of aborting the review. A call with https://api.anyplot.ai/specs?search=bar plot passes the host/path checks but raises http.client.InvalidURL before connecting. Neither this handler nor run_tool catches it, so the paid review exits without writing its output file or usage summary. Catch HTTPException and add a regression case for an unescaped query.
- Flex gets five minutes per run, not only per request: with the per-request
cap alone, a Flash review still ran for over 25 minutes because each turn
can queue again. Once the Flex turns add up to five minutes, the rest of
the run goes online. The summary now reports `per_turn_seconds`.
- read_file cuts a line longer than the tool limit and moves on; before, a
one-line JSON file returned nothing and the same start_line forever.
- The secret-name patterns apply to every path component of a --data file
or attachment, so secrets/payload.json is filtered as well.
- http_get refuses a URL with spaces or control characters, and an
http.client error becomes a tool error instead of ending the paid run.
The last three come from Copilot's "previously missed" list.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GdMSqLR5ww4ji74EUSmk9M
From the Gemini 3.8 Flash first review of this PR:
- gemini-task: when Gemini continues a task, it reads only the owner's PR
comments (Claude comments through his account). On a public repository,
anyone else's text is data, never an instruction.
- inline_changes lists the changed files with `git diff -z`, so a path with
spaces or umlauts is inlined instead of skipped as a C-quoted name.
- The secret-name patterns catch `*api-key*` and `*api_key*`, not only a
file named exactly `api-key`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GdMSqLR5ww4ji74EUSmk9M
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
agyinside third-party coding agents or applications … is not supported under consumer plans") and a staff reply on 2026-10-16 (forum topic 189905: "No under consumer plans", even for the unmodified binary as a local subprocess) rule out the read-onlyagy -psecond opinions docs(agents): delegation lanes and Gemini tasks through issues #12223 introduced. Claude stopped running agy on 2026-10-21.zweitmeinungproject skill:.claude/skills/zweitmeinung/gemini_review.pycalls Gemini through Vertex AI in projectanyplot, locationglobal(the site's agents stay oneu), with read-only tools over tracked repository files, prefetched data, and the public API; no shell, no credentials. The owner's split (2026-10-21/22): Gemini 3.8 Flash on Flex PayGo (half price) for routine first reviews, on probation against Copilot's findings; Gemini 4 Argon, thinking high, for plans and second opinions.--diff-baseinlines the diff and changed files andread_filesreads several files per call. Two loop bugs found there are fixed and pinned by tests: a text part beside the last function responses made Vertex answer 400, and a last turn without tools lost the implicit cache while Flash kept calling tools. The budget is now enforced through the tool responses with one tool configuration for all turns. Measured: Flash $0.07–0.28 per review, Argon $0.57–1.16.flex_fallback,per_turn_seconds). The SDK retries timeouts too: the first Flash review of this PR waited over an hour on 15-minute attempts, and with a 5-minute cap per request the next one still ran for over 25 minutes.review.txt -> .envexposed the untracked.envbefore), secret-name patterns apply to every path component of--datafiles, lock files stay out of the inlined diff and the diff is capped at 120,000 characters, a backtracking search pattern is stopped after 10 seconds, a line longer than the tool limit is cut instead of looping, and an unencoded URL is refused instead of crashing the run.gemini-task: Gemini pushes itsgemini/*branch and opens a draft PR labelledgemini. CI runs on drafts, Copilot does not (review_draft_pull_requests: falsein the ruleset), and Claude marks the draft ready after its own review. The owner may let Gemini run tests and builds unattended in his own agy session; only he starts agy.CLAUDE.mdand.claude/guardrails.mddescribe the lanes and costs; the guardrail test anchors pin the obligations (Flash/Argon split, draft PRs only, Claude never runs agy).Plan
N/A. The owner chose the Vertex route on 2026-10-21 after reading a research report on the policy, then the Flash/Argon split, the draft-PR hand-over, and moving the skill into the repository on 2026-10-22.
Test plan
uv run pytest tests/unit tests/integration -n 8(newtests/unit/test_gemini_review.py: confinement, http_get refusals, inlining caps, and the tool loop against a fake Vertex client)uv run ruff check . && uv run ruff format --check .uv run python -m tools.changelog check --base origin/main--max-turns 1on Vertex: forced last turn answers (exit 0),traffic_typeON_DEMAND_FLEXgit diff -z,*api_key*); 2 skipped (callers already resolvecheck_attachment's root, and the SDK returnsfinish_reasonas an enum). Flex gave no answer on the first turn, so the run went online: 9 turns, $0.86.🤖 Generated with Claude Code
https://claude.ai/code/session_01GdMSqLR5ww4ji74EUSmk9M