fix(antigravity): Auto no longer asks before reads that Supervised allows #40303
main fromrefs/pull/40303/head·opened View on GitHubProblem#
In an Antigravity thread in Auto, every file read outside the thread's working directory shows an approval card, while Supervised and Auto-accept edits allow the same reads. One delegated review subagent, running in an Auto thread whose project wasn't the repo under review, raised 32 cards, all Read <file>; the first held the turn for about 7.5 minutes. Seen on T3 Code 0.1.12-nightly.20261120.4994, agy 1.5.13, macOS arm64, Google sign-in.
Change#
antigravityPermissionDisposition answered every non-denied Auto request with ask, on the premise that agy's Auto has already reviewed what it sends. For file reads it hasn't: in that session each of the 32 reads logs agy_tool_safety FINISHED: triggered=false, reason="allowed_tool" and sir_flash_lite SKIPPED, so agy's Auto review model never looked at them. agy sends the request because the path is outside its workspace (capture below), the same request it sends in every mode. In the same session, git status/git diff and git grep on that repo went through agy's review, and none of them reached T3 as a permission request.
Read kinds (read, search, think, via the shared isAcpReadKind, now exported) now follow the shared policy in Auto, as in every other mode. Every other kind agy sends in Auto still asks (execute, edit/delete/move, fetch, other, missing), and sandbox denials still deny.
Scope#
Fixes #40127. This narrows review finding R1-F3 of #39378 to non-read requests. R1-F3 made read-kind requests ask in Auto, on the premise that anything agy sends in Auto is an escalation its review refused. The log above shows that isn't true for reads, and #13584 already decided that read-kind permission requests follow the sandbox and never ask. Grok and fx keep ask-everything in Auto: their Auto prompts are classifier refusals, and Grok never sends read requests (#13584).
The same change closes the gap CodeRabbit flagged on #39378: an Auto thread on an account without native Auto shows Supervised, but still asked for reads that Supervised allows.
#39822 edits the same return line for T3 MCP tools. The two compose (deny, then T3 MCP allow, then reads follow the shared policy, then ask); I'll rebase on it if it lands first.
This keeps the fix to the existing modes. Whether Auto should also allow non-workspace access more broadly could instead be a per-provider setting: agy already has allowNonWorkspaceAccess in its settings.json, and with it set agy sends no request for these reads at all, but T3 rewrites that file on every launch. That would be a separate change, so it isn't part of this PR.
Verification#
- The Auto table in
AntigravityAcpSupport.test.tsnow expectsallowforreadandaskforexecute. Thereadrow fails onmainand passes with the fix; the sandbox-denial test still passes.vp run check:changedpasses: format, lint, knip, typecheck (14 packages), tests. - Real app, before and after: an isolated dev server (
vp run dev --no-seed) with agy 1.5.13 and a Google sign-in (native Auto offered), Gemini 3.8 Flash, permission mode Auto, projectdemo/app, prompt: "Use your file viewing tool (not a shell command) to read ../shared/notes.txt and tell me the release codename."main: theRead …/demo/shared/notes.txtrow waits for approval ("Waiting for approval · Allow once · Deny · More"), and the thread shows Approval.
- This branch: no prompt; the agent reads the file and answers "BLUE HERON".
(Home path and machine name blacked out.)
- What agy sends, captured from
agy acp1.5.13 with the same sign-in:session/newoffersdefault, accept-edits, auto, plan;session/set_modetoautoreturns{}; a file-tool read outside the cwd then arrives as (trimmed):
The test's{"toolCall": {"name": "read_file", "kind": "read", "status": "pending", "locations": [{"path": "/Users/<me>/<other-repo>/README.md"}]}, "options": [{"optionId": "allow", "kind": "allow_once"}, {"optionId": "deny", "kind": "reject_once"}]}readrow uses a request of the same kind. - An independent comment on #40127 reports the same cards on Linux x64 and the same fix working there.
- Not checked:
search- orthink-kind requests live (I haven't seen agy send them), and a session without native Auto.
Fix designed and first drafted with Gemini 4 Neon (Antigravity in T3 Code); final code and tests written with Claude Opus 5.5 in Claude Code (T3 Code). Reviewed with Claude Fable 5.2, Claude Opus 5.5 and Gemini 4 Neon.
🤖 Generated with Claude Code
- 1
- 2
- 3
Pushed21336e8
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:S
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XS
Sign in to join this conversation.
Tested locally on macOS (arm64) with Google account sign-in (
oauth-personal),gemini-3.8-flash, and realantigravity acp(1.5.16and1.5.17) againstmain(60375a56) vs this PR (21336e8a):21336e8a):vp test run apps/server/src/provider/acp/AntigravityAcpSupport.test.ts— 48/48 passed (answers ask to execute requests in Auto,answers allow to read requests in Auto).antigravityPermissionDispositionreceives areadpermission request underruntimeMode: "auto"(reproduced live withagy 1.5.17indefaultsession mode under T3runtimeMode: "auto", e.g. accounts without nativeautoor post-restart fallback like #40896; reading../shared/notes.txtoutsidecwd):agy 1.5.17emittedsession/request_permissionwithkind: "read",title: "File ../shared/notes.txt".main(60375a56):antigravityPermissionDispositionreturned"ask"(blocks waiting for approval).21336e8a):antigravityPermissionDispositionreturned"allow"— no approval prompt, agent read the file and returned the expected value.executeregression check in nativeauto(agy 1.5.17,availableModes: ["default", "accept-edits", "auto", "plan"],session/set_mode->"auto"):rm .../shared/notes.txt) emittedsession/request_permissionwithkind: "execute".mainand PR #40303 returned"ask"(still prompts as expected).agy 1.5.16/1.5.17: with nativeautoactive on1.5.16and1.5.17(bothreadTextFile: falseandreadTextFile: true),agyitself did not emitsession/request_permissionfor routine outside-workspaceread_filecalls (../shared/notes.txt, sibling git repo,/etc/hosts) — so neweragyreleases appear to have relaxed that upstream, while this PR still fixes thedefault-under-Autofallback path and olderagy(1.5.12/1.5.13) releases.Locally verified and drafted with Gemini 4 Neon (High) on behalf of the user.