Skip to content

[Bug]: Antigravity ACP drops the 8 T3 MCP tools >1,280B (incl. delegate_task & t3_thread_launch) without call_mcp_tool or T3_ACP_MCP_NODE fallback #38123

Open

Description

@DylanLIiii

Before submitting

Area

apps/server

Steps to reproduce

A. Server-only reproduction on main (runs in Vitest with no antigravity binary required)

  1. Query tools/list on T3's McpHttpServer and compute the minified JSON byte length of { name, description, parameters: inputSchema } for each of the 73 t3-code MCP tools (the exact payload antigravity-acp writes to <appDataDir>/mcp/t3-code/<tool>.json):
    • 65 tools serialize to <= 1,242 B (largest: create_threads at 1,242 B, because its target.options uses {} instead of a verbose anyOf union).
    • 8 tools serialize to >= 1,296 B:
      • schedule_task: 3,318 B
      • t3_thread_launch: 2,611 B
      • delegate_task: 1,937 B
      • html_render: 1,668 B (flat 4-property schema; pushed over 1,280 B solely by its 1.2 KB description)
      • preview_act: 1,629 B
      • t3_project_update: 1,541 B
      • preview_open: 1,521 B
      • preview_navigate: 1,296 B
  2. In apps/server/src/provider/Drivers/AntigravityDriver.ts, call instance.orchestrationAdapter.openSession + ensureThread after registering an MCP provider session (as in factory/repro-37911 f752c5e1d7):
    • AntigravityDriver.makeRuntime(input) passes baseEnv: processEnvironment (provider-level env only) to prepareAntigravityProfile(...), dropping input.processEnvironment (T3CODE_THREAD_ID, T3_ACP_MCP_NODE, T3_ACP_MCP_ENTRYPOINT, T3_ACP_MCP_ENDPOINT, T3_ACP_MCP_AUTHORIZATION).

B. Live session verification (t3 v0.1.10-nightly.20261116.4761 + managed antigravity 1.5.9, Linux x64)

  1. Start a full-access thread on the Antigravity provider (gemini-4-carbon or gemini-4-hydrogen).
  2. Inspect <T3CODE_HOME>/userdata/providers/antigravity/<id>/antigravity-acp/mcp/t3-code/*.json vs the model's <mcp_servers> prompt block and default_api function declarations.

Expected behavior

  1. Core orchestration and UI tools — especially delegate_task, t3_thread_launch, html_render, preview_open, preview_navigate, preview_act, t3_project_update, and schedule_task — are callable from an Antigravity ACP thread (either directly as native mcp_t3-code_* eager tools by keeping their serialized MCP schemas under Antigravity's ~1,280 B eager threshold, and/or via the documented acp-mcp-call fallback with input.processEnvironment preserved).

Actual behavior

  1. All 73 <tool>.json files are written to <appDataDir>/mcp/t3-code/, proving T3's /mcp server advertised all 73 tools — there is NO 50- or 60-tool count cap (65 tools load eagerly in a single session).
  2. Exact ~1,280 B per-tool cutoff inside antigravity-acp (1.5.9):
    • 100% of the 65 tools <= 1,242 B (create_threads.json = 1,242 B and below) are registered as native mcp_t3-code_* tools under # t3-code -> Eager:.
    • 100% of the 8 tools >= 1,296 B (preview_navigate 1,296 B through schedule_task 3,318 B, including delegate_task 1,937 B and t3_thread_launch 2,611 B) are excluded from Eager:.
    • Inside antigravity (third_party/jetski/cortex/core/tools/call_mcp_tool.go + McpToolConfig.enable_lazy_load), when t3-code is injected dynamically via ACP session/new mcpServers (acp.NewSessionParams.mcpServers, which only supports { name, type, url, headers } and cannot carry mcp_config.json's tools.eager), enable_lazy_load is not active: neither a Lazy: list under # t3-code nor call_mcp_tool in default_api is registered (even though Antigravity's static <mcp_servers> prompt preamble still tells the model to use call_mcp_tool for lazy tools).
    • Note: writing a user config/mcp_config.json with tools.eager is also blocked by T3 itself (AntigravityTextGeneration rejects profiles with non-empty mcp_config.json).
    • Note on deferMcpTools: true: simply enabling t3-tool-exposure: deferred is not sufficient to expose delegate_task as a native tool in Antigravity ACP, because delegate_task (1,937 B) still exceeds Antigravity's ~1,280 B per-tool eager schema limit when listed.
  3. Simultaneously, the documented acp-mcp-call CLI fallback fails because AntigravityDriver.makeRuntime drops input.processEnvironment, leaving T3CODE_THREAD_ID and T3_ACP_MCP_NODE unset in the Antigravity shell.

Proposed fix in apps/server

  1. Compact the MCP tools/list schemas (globally or when serving antigravity-acp) so core tools stay <= 1,200 B:
    • For delegate_task (1,937 B): type target.options as {} (matching create_threads, which is why create_threads is 1,242 B and already loads eagerly!) and trim parameter descriptions -> drops well below 1,200 B and makes mcp_t3-code_delegate_task natively eager in Antigravity ACP with zero functionality loss.
    • Similarly trim verbose descriptions on html_render (1,668 B, move CSS theme instructions to <t3_code_instructions>), preview_navigate (1,296 B, only 54 B over 1,242 B), preview_open (1,521 B), preview_act (1,629 B), t3_project_update (1,541 B), and t3_thread_launch (2,611 B).
    • Add a lightweight unit assertion in apps/server/src/mcp/ guarding serialized { name, description, parameters } byte length (<= 1,200 B) for tools that must remain eager in Antigravity ACP.
  2. Preserve per-session input.processEnvironment in AntigravityDriver.makeRuntime:
    • Merge baseEnv: { ...processEnvironment, ...input.processEnvironment } when calling prepareAntigravityProfile / buildAntigravityAcpSpawnInput so T3CODE_THREAD_ID and T3_ACP_MCP_NODE are present for acp-mcp-call (covering schedule_task or any future large tool).

Impact

Major degradation or frequent failure

Version or commit

t3 v0.1.10-nightly.20261116.4761

Environment

Linux x64, T3-managed Antigravity ACP v1.5.9 (Yazi / gemini-4-carbon & gemini-4-hydrogen, full-access)

Logs or stack traces

Top 15 `<appDataDir>/mcp/t3-code/<tool>.json` sizes vs Antigravity Eager registration (73 total):
  3318 B  eager=False  schedule_task
  2611 B  eager=False  t3_thread_launch
  1937 B  eager=False  delegate_task
  1668 B  eager=False  html_render
  1629 B  eager=False  preview_act
  1541 B  eager=False  t3_project_update
  1521 B  eager=False  preview_open
  1296 B  eager=False  preview_navigate
  ---- ~1,280 B per-tool eager cutoff in antigravity-acp 1.5.9 ----
  1242 B  eager=True   create_threads
  1171 B  eager=True   t3_environment_link
  1163 B  eager=True   t3_project_create
   975 B  eager=True   request_secret
   942 B  eager=True   t3_thread_read
   938 B  eager=True   t3_theme_set
   932 B  eager=True   preview_resize
  (...all remaining 58 tools <= 902 B are eager=True; `call_mcp_tool` is absent from default_api)

Workaround

Only mcp_t3-code_create_threads (1,242 B, which barely fits under the ~1,280 B cutoff because its target.options schema is {}) is callable, which spawns top-level threads inheriting the parent worktree instead of isolated delegate_task child tasks.

Activity

  1. travelvector commented on Nov 18, 2026

    @travelvector
    Contributor

    Data point from 0.1.11-nightly.20261117.4851 + Antigravity ACP Server 1.5.10 (acpRegistry_google_antigravity, Windows x64): the per-tool eager schema cutoff appears to have tightened from ~1,280 B (8 tools dropped in 1.5.9) to ~830 B, now dropping 19 of 82 t3-code MCP tools (still writing all 82 .json files under .gemini/antigravity-cli/mcp/t3-code/, with call_mcp_tool rejecting the missing 19 as tool <name> is not enabled for server t3-code).

    Exact boundary observed across all 82 schemas (sorted strictly by size, independent of tools/list order — e.g. preview_open at #3 is dropped while html_preview at #82 is loaded):

    • 63 loaded (<= 819 B, total 25,698 B): largest is t3_thread_send (819 B), t3_worktree_handoff (810 B), t3_thread_transfer (802 B).
    • 19 dropped (>= 847 B):
      • 847 B t3_environment_preferences_update
      • 851 B t3_queue
      • 877 B t3_thread_send_attachments
      • 902 B preview_snapshot
      • 932 B preview_resize
      • 939 B t3_theme_set
      • 942 B t3_thread_read
      • 975 B request_secret
      • 1,163 B t3_project_create
      • 1,171 B t3_environment_link
      • 1,242 B create_threads
      • plus the 8 >= 1,296 B tools already listed above (preview_navigate, preview_open, t3_project_update, preview_act, html_render, delegate_task, t3_thread_launch, schedule_task).

    So compacting schemas only to <= 1,200 B would still leave 10+ core tools (t3_thread_read, t3_project_create, preview_snapshot, t3_queue, request_secret, etc.) dropped on 1.5.10.

  2. juliusmarminge commented on Nov 19, 2026

    @juliusmarminge
    Member

    I tried to reproduce this on the current build and could not.

    Commit origin/main 66235c7. Started an isolated dev server with T3CODE_DEV_SEED=0 and GOOGLE_GEMINI_BASE_URL set to the hub. In Settings > Providers > Add provider, added Antigravity with sign-in method 'Gemini API key' and a placeholder key; it picked up agy 1.5.12 and showed 'Authenticated · Gemini API key' with 8 models. Added a scratch git project and started a thread with t3 thread start --provider <antigravity instance> --model gemini-4-hydrogen --wait. Results: (1) /antigravity-acp/mcp/t3-code/ held 79 tool JSON files with the same sizes the reporter measured (schedule_task 3318 B, t3_thread_launch 2611 B, delegate_task 1937 B, html_render 1668 B, preview_act 1629 B, t3_project_update 1541 B, preview_open 1521 B, preview_navigate 1296 B, create_threads 1242 B). (2) The model listed all 80 mcp_t3-code_* functions, including delegate_task, t3_thread_launch, schedule_task, html_render, preview_open/navigate/act, t3_project_update, and the 1.5.10 comment's smaller ones (t3_thread_read, request_secret, t3_queue, preview_snapshot, t3_project_create, t3_environment_preferences_update); call_mcp_tool was absent, as expected when nothing is lazy. (3) A follow-up turn had the model call mcp_t3-code_html_render (1668 B, above both reported cutoffs) as a native function; the server returned a real htmlRender attachment id. (4) env in the agent's shell showed T3CODE_THREAD_ID, T3_ACP_MCP_NODE and T3_ACP_MCP_ENDPOINT set (fixed on main by #36495, c67deb1, merged 2026-11-18). Antigravity 1.5.9 and 1.5.10 were not tested: their download URLs include a build number not derivable from the version.

    Closing as not planned. If it still happens for you, reply with the exact steps and the version you are on and it will be looked at again.

  3. juliusmarminge commented on Nov 19, 2026

    @juliusmarminge
    Member

    Reopening. The check above ran in a different setup from the report (an API key instead of a Google account, and Antigravity 1.5.12), so not seeing the bug there does not show it is gone.

  4. wuyouchao commented on Nov 19, 2026

    @wuyouchao

    Additional data point on Windows x64 with Antigravity (Google account sign-in), measured right before and right after updating T3 Code on the same thread:

    1. Native eager mcp_t3-code_* tools still drop — and the cutoff tightened as tool count grew

    • **Before update (
  5. EliBlauBalto commented on Nov 19, 2026

    @EliBlauBalto

    Root cause + why the clean-profile repro didn't trigger it

    This is not a fixed per-tool byte limit — it's Antigravity's shared customization context budget truncating skills + MCP tools together, largest items first.

    Per Antigravity's built-in agy-customizations/docs/rules.md:

    Always-on and global rules share a dedicated 20,000-token rules budget (defaultRulesBudget), separate from the customization budget for skills, workflows, subagents, and MCP tools.

    When total skills + MCP tools exceeds that shared customization budget, Antigravity's customizations.TruncateFromBreakdown / sortTruncatableItems sorts all skills and MCP tools in one combined pool by size (largest first) and drops the biggest items completely (rather than moving them to Lazy: + call_mcp_tool):

    • Why the isolated clean-profile test didn't repro: With 0 user skills, all ~74–80 t3-code MCP tool schemas (~50 KB / ~12.4k tokens) fit comfortably inside the customization budget.
    • Why real users hit it — and why the "cutoff" shifts across versions/machines: Every user skill in ~/.gemini/config/skills/ (including its ~150-char full profile path + YAML frontmatter description) shares the same budget as t3-code's MCP tools.
      • Observed on T3 Code 0.1.10 / agy cli-1.5.11 (Windows x64, Google account) with 70 user skills (~47.1 KB) + 74 t3-code MCP tools (~49.7 KB) = ~97 KB combined:
      • Both categories hit the exact same monotonic size boundary (~910 bytes):
        • Kept: 60 user skills (largest ~884 B) + 59 MCP tools (<= 902 B, largest html_preview at 902 B)
        • Dropped: the 10 largest user skills (>= 912 B) and the 15 largest t3-code MCP tools (>= 932 B: preview_resize 932 B, t3_theme_set 938 B, t3_thread_read 942 B, request_secret 975 B, t3_project_create 1,163 B, t3_environment_link 1,171 B, create_threads 1,242 B, preview_navigate 1,296 B, preview_open 1,521 B, t3_project_update 1,541 B, preview_act 1,629 B, html_render 1,668 B, delegate_task 1,937 B, t3_thread_launch 2,611 B, schedule_task 3,318 B).
      • Adding more skills or adding more T3 MCP tools simply pushes that shared cutoff lower (which explains why 1.5.9 dropped at ~1,280 B, 1.5.10 at ~830 B, and 1.5.11 here at ~910 B).

    Easy repro

    1. Start from the isolated repro above (Antigravity 1.5.11/1.5.12, t3-code MCP enabled).
    2. Add ~40–70 skills (~30–45 KB of frontmatter) to <gemini-dir>/config/skills/<name>/SKILL.md.
    3. Start a thread — both the largest skills and the largest t3-code MCP tools (schedule_task, t3_thread_launch, delegate_task, html_render, etc.) vanish from the model's declared tools without call_mcp_tool being registered.

    Suggested fix in T3 Code

    Set deferMcpTools: true in makeAntigravityAcpAdapterFlavor (just like Copilot already does), so T3 sends t3-tool-exposure: deferred and only lists core tools + tool_search instead of consuming ~50 KB (~12.4k tokens) of Antigravity's shared customization budget on every session.

  6. EliBlauBalto commented on Nov 19, 2026

    @EliBlauBalto

    Quick follow-up after live-testing deferMcpTools: true against agy.exe 1.5.11 (empty --gemini-dir, 0 skills) with a mock stdio MCP server:

    Plain deferMcpTools: true (including #37886) breaks single-turn optional T3 tools on Antigravity.

    1. agy.exe advertises no mcpCapabilities, so it always uses the stdio acp-mcp-bridge (not HTTP MCP).
    2. When tool_search emits notifications/tools/list_changed, agy.exe does re-call tools/list within 1 ms and writes the new .json file to disk.
    3. However, agy.exe builds its oneharness.Toolbox once per session/prompt turn (MCPLoader.Load) and never reloads it mid-turn. Even when the mock MCP server waited 300 ms after agy.exe finished the refreshed tools/list before returning the tool_search result, the newly listed tool was still absent for the rest of Turn 1 and only became callable on Turn 2 (the next session/prompt).

    So simply setting deferMcpTools: true (as I initially suggested above and as #37886 does) would break Turn-1 calls to html_render, preview_*, t3_thread_read, request_secret, schedule_task, etc. for every Antigravity user — including clean profiles with 0 skills.

    Working on a minimal PR using a "deferred-proxy" exposure mode (tool_search returning bounded inputSchemas + a tool_call proxy tool, unwrapped in extractMcpToolCallIdentity, fixed 5-tool / ~3.5 KB surface so Turn 1 works and Copilot's "deferred" mode stays untouched). Will link it here once verified live against agy.exe.

  7. EliBlauBalto commented on Nov 19, 2026

    @EliBlauBalto

    Opened #39362 with the \deferred-proxy\ fix (\ ool_search\ with bounded \inputSchema\ + \ ool_call\ proxy) and live \�gy.exe 1.5.11\ before/after verification.

  8. hh36000 commented on Nov 20, 2026

    @hh36000
    Contributor

    Reproduced on macOS (arm64) with agy 1.5.12 and Agent Platform sign-in. It depends on the agy profile's skills, which would explain why the clean-profile check above found nothing.

    Check: a small ACP client drives agy acp directly. Its one MCP server is a stdio server that advertises the 82 t3-code tool schemas agy had cached under antigravity-acp/mcp/t3-code/ (52,060 bytes in total) and answers every call with ok <tool>. Same prompt both times, gemini-3.8-flash: call each of 8 tools directly, with no call_mcp_tool and no shell, then report how many mcp_t3-code_ tools are declared.

    agy profile mcp_t3-code_* declared Tools that were actually called (from tool_call titles)
    empty --gemini-dir (0 skills) 82 all 8: comment_on_issue, t3_thread_send, t3_queue, t3_thread_read, html_render, preview_open, delegate_task, schedule_task
    my normal profile (82 skills in ~/.gemini/config/skills) 61 only comment_on_issue. The model reported the other 7 as "Not declared in tool declarations".

    My real T3 sessions match. Of 33 Antigravity sessions with t3-code attached, 26 recorded delegate_task, preview_open, preview_snapshot, html_render, schedule_task, t3_thread_read and request_secret as excluded. The same records list my skills as "excluded due to context budget limits". So skills and MCP tools share one budget, as EliBlauBalto described. In practice the agent can't reach delegate_task or the preview_* browser tools directly. In sessions that excluded t3_thread_read, the agent's transcript has no direct mcp_t3-code_t3_thread_read call: it got there only through acp-mcp-call in the shell. One session that kept t3_thread_read called it directly.

    To reproduce: put about 80 skills in the agy profile (or point --gemini-dir at a profile that has them), then ask for any large T3 tool directly.

    Investigated with Claude Opus 5.5 in Claude Code.

  9. bsebb commented on Nov 20, 2026

    @bsebb

    Additional data point on T3 Code (Beta) 0.1.11, Windows 11 x64, Antigravity ACP (Google account, gemini-4-neon), with 34 user skills installed:

    • All 77 t3-code MCP schemas were written to antigravity-acp/mcp/t3-code/.
    • 74 loaded eagerly (largest loaded: html_render at 1,668 B).
    • The 3 largest tools were dropped without call_mcp_tool:
      • schedule_task (3,318 B)
      • t3_thread_launch (2,611 B)
      • delegate_task (1,937 B)

    This matches the shared skills + MCP customization budget explanation above (T3_ACP_MCP_NODE and T3_ACP_MCP_ENTRYPOINT were present, so the fallback was reachable once Windows PowerShell quoting/stdout redirection was worked around).

  10. Blind-Striker commented on Nov 20, 2026

    @Blind-Striker

    Additional controlled 4-point A/B data point on Windows 11 x64 using a custom Antigravity provider (Binary path: agy, agy 1.5.13 via agy acp, Google account, gemini-4-neon) with native plugins installed under ~/.gemini/config/plugins/ and t3-code exposing 71 tools (48,154 B) total schema JSON:

    Enabled native plugins Model-visible estate skills (approx. prompt lines) t3-code MCP schemas Skills excluded (context budget limits) t3-code Eager / Lazy call_mcp_tool delegate_task & t3_thread_read
    0 0 (~1 KB built-ins only) 48.2 KB 0 71 / 0 No Present & working
    2 28 (~9.1 KB) 48.2 KB 0 71 / 0 No Present & working (verified live cross-provider dispatch)
    3 86 (~42.2 KB) 48.2 KB 8 56 / 0 (25,236 B) No Dropped (unknown tool)
    5 100 (~51.7 KB) 48.2 KB 17 55 / 0 (24,359 B) No Dropped (unknown tool)

    Two observations that may help alongside #39362:

    1. Dynamic eviction scales up to 15–16 dropped tools as installed skill descriptions grow (evicting largest schemas first: schedule_task 3,359 B, t3_thread_launch 2,611 B, delegate_task 1,939 B, html_render 1,668 B, preview_*, t3_thread_read 969 B, down to t3_thread_send_attachments 877 B at 5 plugins). Keeping total enabled skill prompt footprint under ~10–15 KB immediately restores all 71/71 eager tools.
    2. In this custom Binary path: agy (1.5.13) profile, T3_ACP_MCP_NODE (and T3_ACP_MCP_ENTRYPOINT) were unset in the session environment (Get-ChildItem Env:T3_ACP_MCP* returned empty), so even the acp-mcp-call shell fallback advertised in <t3_code_instructions> was unavailable when delegate_task was evicted.
  11. fcakyon commented on Nov 22, 2026

    @fcakyon
    Contributor

    Reproduced on Linux with Antigravity ACP 1.5.14 and fork nightly 0.1.12-nightly.20261121.94. In a resumed session, Antigravity cached 88 T3 schemas and advertised 58. The 30 omitted schemas were the 30 largest on disk, including delegate_task and t3_thread_list.

    Three Codex targets and one Claude target all failed with tool delegate_task is not enabled for server t3-code. The same session could call orchestrator_capabilities. Claude created eight Codex child threads on the same server that morning.

    The ACP initialize reply omitted mcpCapabilities, so T3 selected stdio. This fork already enabled deferMcpTools, but only the HTTP path transmitted that setting. This confirms the tool exposure failure independently of the fallback environment issue. Testing #39362 against the fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions