Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Antigravity asks for approval on T3's own MCP tools in Auto-accept edits #38806

Closedseankoji(GitHub profile, opens in a new tab) opened this issue 5 comments

Note

Written by DeepSeek V4.1 Flash on behalf of @seankoji

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area: apps/server

Steps to reproduce

  1. Open a thread on the Antigravity provider and set its permission mode to Auto-accept edits.
  2. Ask the agent to do browser work so it calls T3's own preview MCP tools.
  3. T3 opens an approval card for t3-code_preview_status even though that tool is read-only. Other T3 preview calls prompt too.

Expected behavior

T3 injects and authenticates its own t3-code MCP server for the thread. Its calls should be pre-approved in Auto and Auto-accept edits, like T3's own MCP tools on the other providers. At minimum, a T3-owned read-only tool such as preview_status should not ask in a mode that already auto-approves non-mutating work. Supervised should keep asking, and third-party MCP servers should keep their current policy.

Actual behavior

Every T3 MCP call in the Antigravity thread produced an approval card. In one Auto-accept edits thread, the queued prompts were:

t3-code_preview_status
t3-code_preview_open
t3-code_preview_resize
t3-code_preview_snapshot
t3-code_preview_snapshot
t3-code_t3_preview_close

T3 recorded each as request kind command. preview_status is annotated Tool.Readonly in apps/server/src/mcp/toolkits/preview/tools.ts; preview_snapshot is deliberately not read-only because save=true writes a file.

Diagnosis

Antigravity sends the T3 MCP calls through its generic ACP permission request, so they are classified by tool kind. acpOperationDisposition in packages/provider-acp/src/server/clientPolicy.ts asks for every non-read kind in Auto-accept edits; clientPolicy.test.ts explicitly expects execute, fetch and other to ask. The T3 MCP server is not exempted on this path.

That differs from the other adapters:

  • Claude pre-approves mcp__t3-code__* through allowedTools (restricted to read-only T3 tools in a read-only sandbox).
  • OpenCode 2 appends a deny for other threads' t3-code-* servers and an allow for this thread's server.

extractMcpToolCallIdentity in packages/provider-acp/src/server/runtimeModel.ts already resolves a T3 MCP call from ACP metadata/titles (including Antigravity's bare "Running " titles), so the permission path can identify the server instead of relying on the ACP kind alone.

Impact

Major degradation or frequent failure: browser work on Antigravity stalls on an approval for every T3 tool call, including the read-only status call. The workaround is switching the thread to Full access or approving each request.

Version or commit

0.1.11-nightly.20261118.4890 (commit 8cf97b5f06f30a872ce30ab8a888f2ff012365a2). The behavior is still present on main at 3ce2145864f1e8b822cc8dff9c8cfdf39d9e450b.

Environment

macOS 27.2.1; T3 Code Nightly (desktop); Antigravity provider; Auto-accept edits.

Workaround

Switch the Antigravity thread to Full access, or answer each card. "Allow for this thread" covers an individual tool for the session.

#11458 (OpenCode Auto mode asks for every bash, MCP and webfetch call) and #38123 (Antigravity T3 MCP tool catalog) are related, but neither covers this Antigravity approval path.

  1. tanstack-source added labelsbug

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

    Environment — T3 Code server 0.1.11-nightly.20261120.4979 on Linux x64, using the Antigravity provider with Gemini and Auto permissions.

    Anonymized live observation: In one Gemini session using Antigravity with Auto selected, T3 showed roughly 20 approval cards for its own server-qualified t3-code MCP calls. Replaying the recorded tool titles as synthetic execute requests returned ask for every sampled call on main (068332c6) and allow for every sampled call at the #39822 head (9cf4042).

    I also checked both Auto and Auto-accept edits with synthetic requests based on the public examples here and in #39822. All six server-qualified t3-code cases changed from ask to allow. All 12 control cases still asked or denied as expected. They covered a shell command, a third-party MCP server, a bare tool title, Supervised, an explicit approval policy, and a read-only sandbox denial.

    These checks ran the permission function with the shared ACP policy. The PR build still needs a live-provider test.

  3. Same on T3 Code 0.1.11 (desktop) with Antigravity ACP 1.5.13, Google sign-in, Gemini 4 Neon, thread in Auto. Every call to t3_project_list, t3_thread_list, t3_thread_search and t3_thread_read stopped on a card. The card offers Allow once, Deny and Cancel, with no per-thread allow. A delegated Antigravity child blocks until someone clicks.

    From agy's log:

    agy_tool_safety FINISHED: triggered=true, reason="unsupported_tool: mcp_t3-code_t3_project_list"
    sir_flash_lite FINISHED: triggered=false, reason="... a routine read-only query."
    Tool confirmation ... (approved=true)    <- 142 s later, a manual click

    agy's second monitor clears the call and the confirmation is still raised, so #39822 looks like the right fix.

    One case #39822 leaves asking: a delegated child in Auto stopped on a plain Read of the brief file its parent handed it. agy logged agy_tool_safety FINISHED: triggered=false, reason="allowed_tool" and raised a confirmation anyway (about 110 s wait). The file was outside the thread folder and the backend started with workspaceDirs=[]. Seen once; the log does not give the cause.

    Written by Claude Fable 5.2 in Claude Code, from the local agy logs.

  4. fcakyon(GitHub profile, opens in a new tab)commented

    +1 confirmed on Linux x64 (T3 Code 0.1.12-nightly, agy 1.5.12, Google sign-in, thread in Auto).

    Live observation

    Calling pull_request_read twice in an Antigravity Auto thread stopped on two blocking command approval cards with prompt:

    Run mcp_t3-code_pull_request_read

    (Note: no trailing ?, offering Allow once / Deny / Cancel only.)

    Verification of #39822

    Reproduced the failure in apps/server/src/provider/acp/AntigravityAcpSupport.test.ts on origin/main (97e7834f4b): antigravityPermissionDisposition returned "ask" for Run mcp_t3-code_pull_request_read in both auto and auto-accept-edits.

    Applying #39822's ANTIGRAVITY_T3_MCP_TITLE (/^Run mcp_t3-code_(?<tool>[A-Za-z0-9_]+)\??$/) check resolves both Run mcp_t3-code_pull_request_read and Run mcp_t3-code_t3_thread_list? as well as { ServerName: "t3-code", ToolName: "delegate_task" } to "allow" in auto and auto-accept-edits, while preserving "ask" for approvalPolicy: "on-request", bare tool titles, third-party MCP servers, and CommandLine spoofing, and "deny" under readOnly sandbox (AntigravityAcpSupport.test.ts: 60/60 passed).

  5. Same here, Version 0.1.11 (59651c1761f6) macos 27.2.1 (26B131)

  6. +1, same in native Auto on macOS.

    Environment: T3 Code 0.1.12-nightly.20261121.5051 (desktop), macOS 27.0.1 arm64, agy 1.5.13, Google sign-in, Gemini 4 Neon, thread in Auto.

    Observation: a single turn raised an approval card for every T3 MCP call it made, back to back in the first minute: read_issue, link_issue, orchestrator_capabilities, t3_worktree_status. Reads and rg inside the worktree went through without a card.

    agy's log shows its Auto review refusing each one before it reaches T3:

    agy_tool_safety FINISHED: triggered=true, reason="unsupported_tool: mcp_t3-code_read_issue"
    agy_tool_safety FINISHED: triggered=true, reason="unsupported_tool: mcp_t3-code_link_issue"
    agy_tool_safety FINISHED: triggered=true, reason="unsupported_tool: mcp_t3-code_orchestrator_capabilities"

    T3 then answers every non-deny request in Auto with ask (antigravityPermissionDisposition), so each refusal becomes a card. Because that override runs after the shared policy, #38871 alone doesn't change Auto. #39822 covers both modes.

    The same turn also prompted for a file read outside the worktree, which is #40127 / #40303.

  7. juliusmarminge closed this

Sign in to join this conversation.