agy (Antigravity) AuthStatus() is hardcoded to Unknown, never reflects real login state
Bug
AuthStatus() for the Agy (Antigravity) adapter always returns Unknown once the binary resolves, regardless of whether the user is actually authenticated. This is a real, live-verified gap distinct from the model-catalog work in #3385/PR #3386 (merged) and PR #3960 (open, fixes an Agy model-discovery pipe-drain bug) — those cover model discovery, not auth detection.
Source: live reproduction on a user's machine via Claude Code session | Analyzed against: main @ current HEAD (fetched directly, confirmed unchanged from the fork checkout) | Reported by: @Hendrixx-RE
Confidence: High
Root Cause
backend/internal/adapters/agent/agy/auth.go:
func (p *Plugin) AuthStatus(ctx context.Context) (ports.AgentAuthStatus, error) {
if _, err := p.ResolveBinary(ctx); err != nil {
return ports.AgentAuthStatusUnknown, err
}
// Antigravity authenticates through its OS keyring and browser sign-in. The
// official CLI does not expose a documented non-interactive credential file
// or status command, so local auth cannot safely be inferred here.
return ports.AgentAuthStatusUnknown, nil
}
The comment's premise is out of date: the real agy CLI (confirmed real binary, agy --version → 1.1.22) has a documented models subcommand that already IS used for model discovery elsewhere in the codebase (backend/internal/adapters/agent/modelcatalog/catalog.go: "agy": {args: []string{"models"}, parser: parseIDLines}). Running it directly:
$ agy models
Fetching available models...
gemini-3.7-flash-high Gemini 3.7 Flash (High)
...
claude-opus-4-6-thinking Claude Opus 4.6 (Thinking)
succeeds non-interactively with no login prompt when the user is authenticated (it fetches live data from a remote service). A successful agy models call (which AO already runs for the model catalog) is a usable, already-computed signal of auth state — but AuthStatus() doesn't consult it, or any other signal, and unconditionally reports Unknown.
Impact
Every Agy/Antigravity user sees an uninformative "unknown" auth indicator in AO's UI regardless of actual login state, with no way to distinguish "not logged in, spawn will fail" from "logged in and ready." This surfaced in the wild as "AO can't detect my Antigravity auth."
Suggested Fix
AuthStatus() could reuse the model-catalog discovery call (or a cheap equivalent) as a proxy signal: a successful agy models call implies authenticated; a failure that looks like an auth/login prompt implies not authenticated. Since the model catalog fetch (modelcatalog package) already runs this exact command and caches results, AuthStatus() may be able to piggyback on that cache instead of shelling out separately, avoiding duplicate CLI invocations.
Related
- #3385 — adapter-aware model selection RFC, merged via PR #3386; covers model discovery for Agy, not auth.
- PR #3960 — open, fixes an Agy-specific model-discovery pipe-drain timeout bug; same subsystem, different bug.
- #4031 — same class of problem for a different adapter ("bug(kimi): OAuth-managed auth is reported unknown or unauthorized").
Thanks for contributing to Agent Orchestrator.
This issue is being picked up by the current external contributor on-call pair:
- @illegalcall
- @somewherelostt
If someone is already working on this, please continue as usual. The on-call pair is added for visibility, tracking, and support, not to take over the work. If you need help with review, direction, reproduction, or next steps, please tag @illegalcall and @somewherelostt here.
For faster context or live questions, you can also join the AO Discord.
Join the session here: https://discord.gg/H6ZDcUXmq
Come by if you want to see what is being built, ask questions, or just hang around with the community.
@Hendrixx-RE it is already fixed and it is haedcoded for a reason you can close the issue and PR both