Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(antigravity): Auto no longer asks before reads that Supervised allows #40303

Opendedelmann(GitHub profile, opens in a new tab)wants to merge 5 commits intomain fromrefs/pull/40303/headopened View on GitHub

dedelmann(GitHub profile, opens in a new tab)commented

Problem

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.ts now expects allow for read and ask for execute. The read row fails on main and passes with the fix; the sandbox-denial test still passes. vp run check:changed passes: 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, project demo/app, prompt: "Use your file viewing tool (not a shell command) to read ../shared/notes.txt and tell me the release codename."
    • main: the Read …/demo/shared/notes.txt row waits for approval ("Waiting for approval · Allow once · Deny · More"), and the thread shows Approval. main: the read waits for approval in Auto
    • This branch: no prompt; the agent reads the file and answers "BLUE HERON". this branch: no prompt, the agent answers (Home path and machine name blacked out.)
  • What agy sends, captured from agy acp 1.5.13 with the same sign-in: session/new offers default, accept-edits, auto, plan; session/set_mode to auto returns {}; a file-tool read outside the cwd then arrives as (trimmed):
    {"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"}]}
    The test's read row 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- or think-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. Pushed21336e8

    2. vojtalicko(GitHub profile, opens in a new tab)commented

      Tested locally on macOS (arm64) with Google account sign-in (oauth-personal), gemini-3.8-flash, and real antigravity acp (1.5.16 and 1.5.17) against main (60375a56) vs this PR (21336e8a):

      • Unit tests (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).
      • Live before/after when antigravityPermissionDisposition receives a read permission request under runtimeMode: "auto" (reproduced live with agy 1.5.17 in default session mode under T3 runtimeMode: "auto", e.g. accounts without native auto or post-restart fallback like #40896; reading ../shared/notes.txt outside cwd):
        • agy 1.5.17 emitted session/request_permission with kind: "read", title: "File ../shared/notes.txt".
        • main (60375a56): antigravityPermissionDisposition returned "ask" (blocks waiting for approval).
        • PR #40303 (21336e8a): antigravityPermissionDisposition returned "allow" — no approval prompt, agent read the file and returned the expected value.
      • Live execute regression check in native auto (agy 1.5.17, availableModes: ["default", "accept-edits", "auto", "plan"], session/set_mode -> "auto"):
        • Destructive outside-workspace shell command (rm .../shared/notes.txt) emitted session/request_permission with kind: "execute".
        • Both main and PR #40303 returned "ask" (still prompts as expected).
      • Additional observation on agy 1.5.16 / 1.5.17: with native auto active on 1.5.16 and 1.5.17 (both readTextFile: false and readTextFile: true), agy itself did not emit session/request_permission for routine outside-workspace read_file calls (../shared/notes.txt, sibling git repo, /etc/hosts) — so newer agy releases appear to have relaxed that upstream, while this PR still fixes the default-under-Auto fallback path and older agy (1.5.12/1.5.13) releases.

      Locally verified and drafted with Gemini 4 Neon (High) on behalf of the user.

Sign in to join this conversation.