Skip to content

Add Google Antigravity CLI as a new executor#543

Open
bborn wants to merge 1 commit into
mainfrom
task/3457-support-antigravity-cli-as-an-executor
Open

Add Google Antigravity CLI as a new executor#543
bborn wants to merge 1 commit into
mainfrom
task/3457-support-antigravity-cli-as-an-executor

Conversation

@bborn
Copy link
Copy Markdown
Owner

@bborn bborn commented May 27, 2026

Summary

  • Adds antigravity as a new executor option alongside claude, codex, gemini, pi, opencode, openclaw — Google's terminal-first coding agent (agy) and the official successor to the Gemini CLI, which Google retires on 2026-06-18.
  • Implements internal/executor/antigravity_executor.go modeled on the Gemini executor for tmux + process management, but adapted for what's actually documented today.
  • Wires the executor into validation lists, completion, factory registration, and UI display name switches in cmd/task/, internal/ui/, and internal/db/.
  • Documents the new executor in README.md, AGENTS.md, and docs/executor_interface.md.

Design notes

The Antigravity CLI is a TUI and does not currently expose documented command-line flags for headless prompting, session resume, or auto-approve ("YOLO") mode — auto-approve is configured in-app via /permissions. The executor reflects that reality:

  • SupportsSessionResume()false (retries replay the full prompt with appended feedback, same as Codex/Gemini fallbacks)
  • SupportsDangerousMode()false (no CLI flag exists; ResumeDangerous/ResumeSafe are no-ops with a log line)
  • Task guidance is appended to the prompt (OpenClaw pattern) since agy has no separate system-prompt mechanism — and avoids clobbering an existing AGENTS.md in the worktree.

To stay resilient while Google stabilizes the CLI surface (this is agy 1.0.0), the invocation is overridable via env vars:

  • ANTIGRAVITY_BIN — binary name/path (default agy)
  • ANTIGRAVITY_PROMPT_FLAG — flag used to pass the initial prompt (default -i , matching the Gemini CLI it replaces)

IsAvailable() falls back to ~/.local/bin/agy since the official installer drops the binary there and that directory is not always on PATH for non-login shells.

Deprecating Gemini

Per the task, the gemini executor stays as-is until Google's Gemini CLI shutdown on 2026-06-18. The constant comment and README now note the planned deprecation.

Test plan

  • `go build ./...`
  • `go test ./internal/executor/...`
  • `go test ./internal/db/...`
  • `go test ./internal/ui/...`
  • `go test ./cmd/task/...`
  • `gofmt -l` (clean) and `go vet ./...` (clean)
  • Manual smoke: install `agy`, create a task with `--executor antigravity`, verify the tmux pane launches `agy` with the prompt
  • Confirm `ty create --executor antigravity` completion works (`completeFlagExecutors` now lists 7 entries)

🤖 Generated with Claude Code

Antigravity is Google's terminal-first coding agent and the official
successor to the Gemini CLI, which Google retires on 2026-06-18.

The Antigravity CLI is a TUI with no documented flags for headless
prompting, session resume, or auto-approve ("YOLO") mode — auto-approve
is configured in-app via /permissions. The executor therefore treats
every run as stateless, reports no dangerous mode, and appends task
guidance to the prompt (the OpenClaw pattern), so retries replay the
full prompt + feedback. The binary and prompt flag are overridable via
ANTIGRAVITY_BIN and ANTIGRAVITY_PROMPT_FLAG so operators can adapt
without a code change as Google stabilizes the CLI surface.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.

1 participant