PR #10115 review: Antigravity chat over agy acp
Summary
This PR registers an agy-acp chat harness that runs agy acp (Antigravity's own ACP stdio server), and maps the agy preset to it in both the host catalogue and @superset/chat. New chats start in agy's auto mode ("Approve for me") because agy has no full-access mode ID. fullAccessModeId is renamed to startModeId, a parity test keeps the host and chat-package maps in sync, and the PR adds the sign-in command agy acp --login.
Verdict
Needs changes The design is sound and the host wiring is clean. But CI's Test job fails because of this PR, and the sandbox chat-to-terminal fallback now gives an agy launch more access than the user chose.
Findings
HighCI Test fails: a desktop test still lists agy as terminal-only
apps/desktop/src/renderer/hooks/useResolveOpenAsChat/useResolveOpenAsChat.test.ts:6. CHAT_PRESETS is ["claude", "codex", "opencode", "pi", "pdev"]. Every other built-in agent is expected to stay in the terminal, so opensInChat > agy stays in the terminal and never reads the setting now fails. CI shows this failure (Test job), and it also fails locally at 870bf0b6.
Fix: add "agy" to CHAT_PRESETS. I checked this locally: with that change the file goes from 34 pass / 1 fail to 36 pass / 0 fail. The PR's test plan ran only the AgentComposer folder, so it did not catch this.
MediumTerminal fallback turns agy's auto into --dangerously-skip-permissions
packages/host-service/src/runtime/sandbox-self-seed/utils/terminalFallbackMode/terminalFallbackMode.ts:13. The fallback lets a chat's mode through only when it equals acpStartModes(agent).defaultModeId. Its docstring says this is safe because "the claude and codex presets skip approvals, so only the full-access chat default can drop", and "a narrower mode throws instead of running with more access than was chosen." For agy the default is now auto, which is not full access. When a sandbox launch with surface: "chat" falls back to a terminal (sandbox-self-seed.ts:615), the result is terminalFallbackMode("agy", "auto") === undefined. The terminal preset then runs agy --dangerously-skip-permissions (packages/shared/src/builtin-terminal-agents.ts:244). The desktop's new-workspace screen sends startModes.defaultModeId (= auto) as the mode, so this is the normal path. The PR's own design notes reject --dangerously-skip-permissions for chats for this reason.
Fix: drop only a start mode that really is full access. For example, keep a set of unrestricted mode IDs (bypassPermissions, agent-full-access) or an unrestricted flag on the start-mode entry, and drop only those. Then agy+auto throws like other narrower modes. Add an agy case to terminalFallbackMode.test.ts.
NitDocs sentence leaves out pdev
apps/docs/content/docs/chat.mdx:30: "Claude Code and Codex chats start in Full access". pdev also starts in bypassPermissions. This is harmless because pdev is not in that table, but "Agents with a full-access mode start in it" would stay true as more agents are added.
Looks right: the rename has no leftover fullAccessModeId readers. agentLoginCommand is keyed by entry.binary (agy), so the login entry resolves. The parity test returns early correctly for gemini-acp (no preset). The accept-edits copy reuses existing strings, so it adds no i18n work. No tRPC shapes change.
Evidence
Host / chat package (CLI-level)
A throwaway bun test, run from packages/host-service at 870bf0b6 and then deleted, printed:
acpHarnessForPreset('agy') = agy-acp
catalogue agy-acp = {"binary":"agy","args":["acp"],"minVersion":"1.5.13","upgrade":"agy update","startModeId":"auto"}
cliFloor('agy-acp') = {"minVersion":"1.5.13","upgrade":"agy update"}
acpStartModes('agy') = {"modes":[{"id":"default","label":"Ask for approval"},{"id":"accept-edits","label":"Approve edits"},{"id":"auto","label":"Approve for me"},{"id":"plan","label":"Plan"}],"defaultModeId":"auto"}
agentLoginCommand('agy', {}) = agy acp --login
terminalFallbackMode('agy','auto') = undefined -> terminal preset runs `agy --dangerously-skip-permissions`
terminalFallbackMode('agy','default') throws: agy chat mode "default" has no terminal equivalent, and the chat harness is not live
The last two lines show the medium finding: the narrower default mode is refused, but auto passes through to a fully unattended terminal.
Desktop: not verified
I tried twice to run the desktop via .agents/skills/cdp-verification. The first run (bun run dev:desktop) stopped because an API was already on :3001, and turbo stopped the other tasks too. The retry (turbo run dev --filter=@superset/desktop, CDP port 9333) opened an Electron window, but the renderer stayed black, as in the screenshot below. Then the dev process was killed with exit 137 (out of memory on this 8 GB sandbox), and the Vite server on :3005 never served the page. Also, this sandbox has no agy CLI (~/.paradev/bin/agy is a shim that says "agy not found in PATH"), so a live agy chat could not run here in any case. The author's manual QA list (CDP, agy 1.5.14) is the only end-to-end evidence for the chat flow, mode switch, model picker and resume.
The renderer at localhost:3005/#/ before the dev process was killed; it never painted.
Docs
Not rendered; I reviewed only the source diff of apps/docs/content/docs/chat.mdx and docs/agent-tooling.md. CI's "Deploy Docs" and "Vale prose lint" passed.
Questions for the author
- When a host has the chat runtime but agy is below 1.5.13, does the launch become a chat that shows the upgrade message, or does it fall back to the terminal? If it falls back, the medium finding also applies to desktop launches, not only sandbox self-seed.
- An older remote host (cloud sandbox or another machine) without
agy-acpin its catalogue getsagychat launches from a new desktop. Is the current fallback there (terminal agy with skip-permissions) the behaviour you want, or should an old host refuse the chat surface for agy? accept-editsandplanare offered at launch (acpStartModes) but hidden in the in-chatModePicker. That matches Claude. Is that intended for agy too?
Test / CI notes
All at 870bf0b60bbab4e1de755b882d61db11e1ee18f9.
- CI Test: fail —
@superset/desktop, 1 fail:opensInChat > agy stays in the terminal and never reads the setting. The PR caused it (see the high finding). Typecheck, Lint, Sherif, Vale, Version Sync, Build CLI and Page storage passed; Mobile preview and Deploy Marketing were still pending when I checked. bun test src/core/harness(packages/chat): 5 pass.bun testacpHarnesses, agentLogin, terminalFallbackMode (packages/host-service): 33 pass.bun testAgentComposer (apps/desktop): 26 pass.bun test src/renderer/hooks/useResolveOpenAsChat: 34 pass, 1 fail; with"agy"added toCHAT_PRESETS(local only, reverted): 36 pass.tsc --noEmitfor packages/chat and packages/host-service: clean. A turbo typecheck that includes desktop was killed for memory (exit 137); CI Typecheck passed.