Skip to content

[Bug]: Antigravity ACP drops delegate_task, t3_thread_launch, and schedule_task over ~40 KB MCP schema budget and lacks T3_ACP_MCP_NODE fallback #36088

Closed as not planned

Description

@chrisjian

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. Start T3 Code (v0.1.10-nightly.20261113.4616) with Antigravity (Antigravity ACP Server v1.5.8, e.g. gemini-4-carbon, full-access) and at least one other enabled provider instance (e.g. Claude or Codex).
  2. Open a thread on the Antigravity provider and ask the agent to delegate a subtask to another provider/model via delegate_task (or launch a worktree thread via t3_thread_launch, or create a schedule via schedule_task).
  3. Inspect:
    • the schema files written to <T3CODE_HOME>/userdata/providers/antigravity/<id>/antigravity-acp/mcp/t3-code/*.json,
    • the <mcp_servers> block and native tool declarations exposed to the Antigravity model, and
    • the shell environment inside Antigravity's run_command tool (T3_ACP_MCP_NODE).

Expected behavior

delegate_task, t3_thread_launch, and schedule_task are callable from Antigravity threads — either as native eager MCP tools (mcp_t3-code_delegate_task, etc.) or via the documented T3_ACP_MCP_NODE ... acp-mcp-call terminal fallback.

Actual behavior

Antigravity threads can call mcp_t3-code_orchestrator_capabilities, mcp_t3-code_task_status, mcp_t3-code_task_cancel, and mcp_t3-code_create_threads (63 out of 66 t3-code MCP tools), but the exact 3 largest MCP tools — delegate_task, t3_thread_launch, and schedule_task — are completely missing and uncallable, and the T3_ACP_MCP_NODE terminal fallback is also absent:

  1. Antigravity ACP ~40 KB eager MCP budget drops the 3 largest schemas, and call_mcp_tool lazy loading is absent in ACP mode:

    • All 66 tool schemas (47,956 minified bytes total) are received from T3's MCP server and written to <appDataDir>/mcp/t3-code/*.json on session/new and session/resume.
    • Complex nested anyOf / additionalProperties schemas are not rejected on structure (create_threads.json at depth 13 with anyOf + additionalProperties is 1,242 B minified and does load eagerly as mcp_t3-code_create_threads).
    • Instead, sorting all 66 t3-code tool schemas by minified byte size shows a sharp cutoff right at 40,052 bytes:
      • The 63 smallest tools (<= 1,668 B each, up through html_render.json at 1,668 B) sum to 40,052 minified bytes and are all registered under Eager: as mcp_t3-code_<name>.
      • The 3 largest tools spill past that ~40 KB eager budget:
        • delegate_task.json (1,938 B minified)
        • t3_thread_launch.json (2,611 B minified)
        • schedule_task.json (3,355 B minified)
    • Although Antigravity's <mcp_servers> prompt preamble mentions Lazy: tools and call_mcp_tool, Antigravity ACP Server v1.5.8 neither emits a Lazy: section nor registers call_mcp_tool in tool declarations, so any tool exceeding the ~40 KB eager budget silently disappears.
  2. T3_ACP_MCP_NODE terminal fallback is never injected into Antigravity's shell:

    • T3_CODE_ACP_MCP_FALLBACK_INSTRUCTIONS (packages/provider-core/src/server/orchestrationInstructions.ts) instructs ACP agents to fall back to ELECTRON_RUN_AS_NODE=1 "$T3_ACP_MCP_NODE" ... acp-mcp-call delegate_task ... when T3 tools are absent.
    • However, environmentForSession in packages/provider-acp/src/server/clientTerminals.ts only injects T3_ACP_MCP_NODE when the ACP agent delegates shell execution back to the client via ACP terminal/create.
    • Antigravity ACP executes its built-in run_command tool directly inside its own Go language-server process rather than calling ACP terminal/create, so T3_ACP_MCP_NODE / T3_ACP_MCP_ENTRYPOINT are unset in the shell.

As a result, an Antigravity thread can inspect cross-provider models via orchestrator_capabilities, yet has no mechanism to call delegate_task, t3_thread_launch, or schedule_task (and its native invoke_subagent only accepts inherit | flash_lite | flash | pro).

Impact

Major degradation or frequent failure

Version or commit

t3 v0.1.10-nightly.20261113.4616

Environment

Windows (pwsh), T3 Code Nightly v0.1.10-nightly.20261113.4616 Desktop, Antigravity ACP Server v1.5.8 (gemini-4-carbon, full-access)

Logs or stack traces

Minified JSON schema byte sizes in <T3CODE_HOME>/userdata/providers/antigravity/<id>/antigravity-acp/mcp/t3-code/*.json (all 66 written on session start, only 63 registered in <mcp_servers> Eager:):

create_threads               minified=1242B  missing=False
preview_navigate             minified=1296B  missing=False
preview_open                 minified=1521B  missing=False
t3_project_update            minified=1541B  missing=False
preview_act                  minified=1599B  missing=False
html_render                  minified=1668B  missing=False
delegate_task                minified=1938B  missing=True
t3_thread_launch             minified=2611B  missing=True
schedule_task                minified=3355B  missing=True

Total 63 eager minified bytes: 40052
Total all 66 minified bytes:   47956

Shell environment check inside Antigravity run_command (T3_ACP_MCP_* absent, only T3CODE_CLI_PATH from desktop launcher is present):

AGY_ACP_FORCE_FILE_STORAGE
PLAYWRIGHT_MCP_EXECUTABLE_PATH
...
T3CODE_CLI_PATH

Suggested fix direction / Workaround

  • Potential server-side fix: Compacting the t3-code MCP tool schemas / descriptions by ~8 KB total (or omitting/compacting verbose parameter descriptions when serving tools/list to Antigravity ACP) would keep all 66 tools under Antigravity's ~40 KB eager MCP cap so delegate_task, t3_thread_launch, and schedule_task register natively. Alternatively/additionally, expose the ACP MCP fallback env/bridge in a way reachable by ACP providers that run their own shell tools instead of terminal/create.
  • Current workaround: Switch the orchestrating thread's provider to Claude or Codex before calling delegate_task, t3_thread_launch, or schedule_task.

Activity

  1. juliusmarminge commented on Nov 13, 2026

    @juliusmarminge
    Member

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

    Commit 5f69cac (origin/main). Antigravity cannot run on the VM, so I could not reproduce in the real app. Instead I added a test to apps/server/src/provider/Drivers/AntigravityDriver.test.ts that registers an MCP provider session for a thread, opens a session through AntigravityDriver's orchestrationAdapter against the ACP mock agent, and inspects the spawned agent process env. On main the env has no T3CODE_THREAD_ID, T3_ACP_MCP_ENDPOINT or T3_ACP_MCP_NODE (fails: expected undefined to be 'thread-antigravity-thread-env'). Merging input.processEnvironment into the driver's baseEnv makes all 7 driver tests pass; that change was reverted and not committed. The ~40 KB eager-schema cap is inside Antigravity ACP v1.5.8 and could not be measured here.

    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.

  2. chrisjian commented on Nov 13, 2026

    @chrisjian
    Author

    Thanks — your AntigravityDriver.test.ts check in #36088 (comment) actually reproduced Bug 1 directly on main (5f69cac5c9), and checking main shows both parts map to exact 1-line omissions in apps/server that can be asserted in unit tests without the proprietary Antigravity binary:

    1. Missing input.processEnvironment merge in apps/server/src/provider/Drivers/AntigravityDriver.ts:280-287 (reproduced by your test above):
      In AntigravityDriver.makeRuntime(input):

      spawn: buildAntigravityAcpSpawnInput({
        installation: executable,
        profile,
        cwd: input.cwd,
        baseEnv: processEnvironment, // <-- drops `input.processEnvironment` (`T3_ACP_MCP_NODE`, `T3_ACP_MCP_ENDPOINT`, `T3_ACP_MCP_AUTHORIZATION`, `T3CODE_THREAD_ID`)
        auth,
        runtimeTempDirectory,
      }),

      Because Antigravity executes its own run_command tool inside that spawned Go process (instead of ACP terminal/create), dropping input.processEnvironment here completely breaks the T3_ACP_MCP_NODE ... acp-mcp-call fallback documented in T3_CODE_ACP_MCP_FALLBACK_INSTRUCTIONS. Merging { ...processEnvironment, ...input.processEnvironment } fixes it directly and is 100% unit-testable in AntigravityDriver.test.ts.

    2. Missing deferMcpTools: true in apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.ts:199:
      AcpAdapterV2Flavor already has deferMcpTools: true (used for Copilot CLI in packages/provider-acp-registry/src/server/adapter.ts alongside mcpOverHttp: true), which sends { name: "t3-tool-exposure", value: "deferred" } so tools/list advertises the 4 core tools (orchestrator_capabilities, delegate_task, task_status, tool_search, < 3 KB total) upfront instead of all 66 tools (47,956 B minified, where Antigravity ACP v1.5.8 cuts off Eager: at 40,052 B and drops delegate_task, t3_thread_launch, and schedule_task with no call_mcp_tool registered).
      AntigravityAdapterV2.ts:199 currently sets mcpOverHttp: true without deferMcpTools: true.

    Exact version & repro steps (still happening live)

    • T3 Code version: t3 v0.1.10-nightly.20261113.4616 Desktop on Windows 11 (pwsh)
    • Antigravity version: Antigravity ACP Server v1.5.8 (gemini-4-carbon, full-access)
    • Unit-testable repro on main (5f69cac5c9) without Antigravity binary:
      1. Open a session through AntigravityDriver's orchestrationAdapter against the ACP mock agent with a registered MCP provider session (as in your AntigravityDriver.test.ts test).
      2. Inspect the spawned process environment → T3CODE_THREAD_ID, T3_ACP_MCP_ENDPOINT, T3_ACP_MCP_AUTHORIZATION, and T3_ACP_MCP_NODE are all undefined because AntigravityDriver.ts:284 passes baseEnv: processEnvironment without input.processEnvironment.
      3. Inspect the HTTP mcpServers entry passed to ACP session/new by AntigravityAdapterV2 → t3-tool-exposure: deferred header is absent because AntigravityAdapterV2.ts:199 omits deferMcpTools: true.
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