Skip to content

Prefer Antigravity CLI for Gemini agent#730

Merged
wesm merged 1 commit into
mainfrom
codex/gemini-antigravity-cli
May 23, 2026
Merged

Prefer Antigravity CLI for Gemini agent#730
wesm merged 1 commit into
mainfrom
codex/gemini-antigravity-cli

Conversation

@mariusvniekerk
Copy link
Copy Markdown
Collaborator

@mariusvniekerk mariusvniekerk commented May 20, 2026

Due to google deprecating the gemini cli we need this one. The antigravity CLI lacks a LOT of the functionality that we currently rely on (like --model) so we are forced to make some compromises :(

Summary

  • prefer the Antigravity agy CLI for the existing Gemini agent while falling back to legacy gemini
  • invoke Antigravity in print mode, pipe prompts over stdin, and map review/agentic permissions to --sandbox and --dangerously-skip-permissions
  • keep legacy Gemini stream-json handling and document the preferred Antigravity install path

Validation

  • printf 'Return exactly: ok\\n' | agy --print --print-timeout 30s --sandbox\n- go test ./internal/agent\n- go vet ./...\n- go test ./...

@roborev-ci
Copy link
Copy Markdown

roborev-ci Bot commented May 20, 2026

roborev: Combined Review (d649e44)

Changes support agy, but there are medium-severity compatibility issues to fix before merge.

Medium

  • internal/agent/gemini.go:129 - When Gemini resolves to the preferred agy command, buildArgsWithModel ignores the model parameter. CLI/config model overrides for the Gemini agent are silently dropped on systems with Antigravity installed, even though Gemini previously honored them. Pass the model using Antigravity’s supported model flag if available, or avoid selecting agy/return a clear unsupported-model error when a non-default explicit model is configured.

  • internal/agent/gemini.go:154 - usesAntigravity() does not account for the .exe extension on Windows. If a user configures an explicit command path like agy.exe or C:\path\to\agy.exe, this check returns false and incorrectly falls back to gemini CLI arguments, causing execution to fail. Strip the .exe extension before checking the base name, e.g. compare strings.TrimSuffix(filepath.Base(a.Command), ".exe") to "agy".


Synthesized from 3 reviews (agents: codex, gemini | types: default, security)

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 20, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 79.48718% with 24 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/agent/agent.go 70.58% 6 Missing and 4 partials ⚠️
internal/agent/gemini.go 84.84% 6 Missing and 4 partials ⚠️
internal/agent/acp_resolution.go 77.77% 1 Missing and 1 partial ⚠️
internal/agent/spec.go 75.00% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@roborev-ci
Copy link
Copy Markdown

roborev-ci Bot commented May 20, 2026

roborev: Combined Review (631531b)

Summary verdict: One medium-severity regression should be addressed before merging.

Medium

  • internal/agent/gemini.go:112 - Gemini command resolution now always prefers agy when both agy and legacy gemini are installed, but Review fails for explicit model overrides because Antigravity cannot select models. This regresses existing configs with model set even when the compatible legacy CLI is available as the second candidate.
    • Fix: make Gemini command resolution model-aware. If a model override is explicit, skip agy and select gemini when available; only error when no compatible command is available or when the user explicitly configured gemini_cmd = "agy".

Synthesized from 3 reviews (agents: codex, gemini | types: default, security)

@roborev-ci
Copy link
Copy Markdown

roborev-ci Bot commented May 20, 2026

roborev: Combined Review (f985952)

No Medium, High, or Critical issues found.

All reviewers agree the change is clean.


Synthesized from 3 reviews (agents: codex, gemini | types: default, security)

@roborev-ci
Copy link
Copy Markdown

roborev-ci Bot commented May 21, 2026

roborev: Combined Review (f985952)

Clean overall: no Medium, High, or Critical findings were reported.

The only finding was Low severity, so it is omitted per the requested threshold.


Synthesized from 3 reviews (agents: codex, gemini | types: default, security)

@roborev-ci
Copy link
Copy Markdown

roborev-ci Bot commented May 22, 2026

roborev: Combined Review (7dc7c0e)

Medium issues remain: release version stamping is broken, and the Antigravity explicit-model error points users to an unsupported config key.

Medium

  • .github/workflows/release.yml:48
    The module path changed to go.kenn.io/roborev, but the release workflow still uses the old linker symbol path. Release builds will not stamp internal/version.Version correctly.
    Fix: Update the -X flag to go.kenn.io/roborev/internal/version.Version=v${VERSION}.

  • internal/agent/gemini.go:124
    The Antigravity explicit-model error tells users to configure gemini_cmd, but no such config key or command override exists, so users do not have the documented workaround when agy is selected and legacy gemini is not on PATH.
    Fix: Add and wire a GeminiCmd / gemini_cmd config override through agentSpec, or change the error and selection logic to a supported workaround.


Synthesized from 3 reviews (agents: codex, gemini | types: default, security)

@mariusvniekerk mariusvniekerk force-pushed the codex/gemini-antigravity-cli branch from 7dc7c0e to ea925a1 Compare May 22, 2026 16:13
@roborev-ci
Copy link
Copy Markdown

roborev-ci Bot commented May 22, 2026

roborev: Combined Review (ea925a1)

All reviewed agents found the change clean.

No Medium, High, or Critical findings were reported.


Synthesized from 3 reviews (agents: codex, gemini | types: default, security)

@mariusvniekerk
Copy link
Copy Markdown
Collaborator Author

given that this effectively removes the ability to specify a model / reasoning effort for gemini (other than what it used last) should we make this change now?

Its going to be forced on us regardless soonish.

- Pass Antigravity prompts over stdin
- Handle Antigravity Gemini model constraints
- Select Gemini CLI for explicit models
@wesm wesm force-pushed the codex/gemini-antigravity-cli branch from ea925a1 to e602701 Compare May 23, 2026 12:47
@roborev-ci
Copy link
Copy Markdown

roborev-ci Bot commented May 23, 2026

roborev: Combined Review (e602701)

No actionable Medium, High, or Critical findings were reported.

All agents produced no concrete review findings with file/line references to include.


Synthesized from 3 reviews (agents: codex, gemini | types: default, security)

@wesm wesm merged commit 1287afd into main May 23, 2026
14 of 15 checks passed
@wesm wesm deleted the codex/gemini-antigravity-cli branch May 23, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants