Skip to content

[Bug]: Antigravity ACP still cannot call delegate_task / t3_thread_launch / schedule_task (missing deferMcpTools & dropped processEnvironment) #36172

Closed as not planned

Description

@chrisjian

Before submitting

Area

apps/server

Summary

In an Antigravity ACP session on T3 Code (0.1.10-nightly.20261113.4616), cross-provider subagent delegation (delegate_task), single-thread worktree launch (t3_thread_launch), and scheduled tasks (schedule_task) are completely uncallable:

  1. T3 MCP schemas are dropped by Antigravity ACP's eager schema cap because AntigravityAdapterV2 does not set deferMcpTools: true (no t3-tool-exposure: deferred header), and Antigravity ACP neither exposes a Lazy: section nor registers call_mcp_tool.
  2. The T3_ACP_MCP_NODE ... acp-mcp-call terminal fallback is also broken because AntigravityDriver drops input.processEnvironment when spawning the ACP process, leaving T3_ACP_MCP_NODE, T3_ACP_MCP_ENDPOINT, T3_ACP_MCP_AUTHORIZATION, and T3CODE_THREAD_ID unset in the shell.

Live Reproduction (still happening on 0.1.10-nightly.20261113.4616)

  1. Start T3 Code Desktop (0.1.10-nightly.20261113.4616) on Windows with Antigravity (gemini-4-hydrogen, full-access) and other enabled providers (grok, magpie, magpie-codex, pi).
  2. Verify thread binding & capabilities:
    • mcp_t3-code_t3_thread_configure (no threadId) succeeds and returns the bound threadId.
    • mcp_t3-code_orchestrator_capabilities succeeds and returns features.appOwnedSubagents: true with cross-provider instances available.
  3. Inspect <T3CODE_HOME>/userdata/providers/antigravity/<id>/antigravity-acp/mcp/t3-code/:
    • All 71 .json tool schemas are present on disk, including delegate_task.json, t3_thread_launch.json, and schedule_task.json.
  4. Inspect the <mcp_servers> prompt block and tool declarations exposed to the model:
    • Only 68 mcp_t3-code_* tools are registered under Eager: (e.g. create_threads works).
    • There is no Lazy: section and no call_mcp_tool tool declared.
    • delegate_task, t3_thread_launch, and schedule_task are completely missing from the tool declarations.
  5. Inspect Get-ChildItem Env:T3_* inside Antigravity's run_command tool:
    • Empty output (T3_ACP_MCP_NODE and T3_ACP_MCP_ENTRYPOINT are unset), so the documented acp-mcp-call fallback cannot run either.

Unit-Testable Reproduction on main (no Antigravity binary needed)

As already observed in #36088, both root causes are directly reproducible in apps/server unit tests against the ACP mock agent:

  1. Dropped input.processEnvironment in apps/server/src/provider/Drivers/AntigravityDriver.ts:
    In AntigravityDriver.makeRuntime(input), buildAntigravityAcpSpawnInput is called with baseEnv: processEnvironment, omitting input.processEnvironment (T3CODE_THREAD_ID, T3_ACP_MCP_ENDPOINT, T3_ACP_MCP_AUTHORIZATION, T3_ACP_MCP_NODE).

  2. Missing deferMcpTools: true in apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.ts:
    AntigravityAdapterV2 sets mcpOverHttp: true without deferMcpTools: true (unlike Copilot CLI in packages/provider-acp-registry/src/server/adapter.ts), so t3-tool-exposure: deferred is never sent.

    • Without deferred exposure, T3 sends all 71 schemas upfront, exceeding Antigravity ACP's ~40 KB eager schema cap and silently dropping the 3 largest tools (delegate_task, t3_thread_launch, schedule_task).
    • Fix: Set deferMcpTools: true in AntigravityAdapterV2 so tools/list advertises the compact core orchestration tools + tool_search upfront, well under the ~40 KB cap.

Expected Behavior

  • delegate_task, t3_thread_launch, and schedule_task are callable from Antigravity threads (via deferMcpTools: true / tool_search).
  • T3_ACP_MCP_NODE and related T3_* env vars are present in the spawned Antigravity ACP process so acp-mcp-call fallback also works.

Version & Environment

Activity

  1. juliusmarminge commented on Nov 13, 2026

    @juliusmarminge
    Member

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

    Antigravity cannot run on the VM, so no live run. On origin/main 2d8a843 I added two tests to apps/server/src/provider/Drivers/AntigravityDriver.test.ts that open a thread session through AntigravityDriver's orchestrationAdapter against the ACP mock agent, with an MCP provider session registered for the thread. (1) The spawned agent process's env has T3CODE_THREAD_ID undefined (and no T3_ACP_MCP_NODE): 'expected undefined to be thread-antigravity-thread-env'. (2) With the mock advertising HTTP MCP (T3_ACP_MCP_HTTP=1), the t3-code http server in session/new carries only the Authorization header, with no t3-tool-exposure: deferred. Both fail on main. Temporarily applying baseEnv: { ...processEnvironment, ...input.processEnvironment } in AntigravityDriver.ts and deferMcpTools: true in AntigravityAdapterV2.ts made all 8 tests in the file pass; I reverted those fixes and committed only the tests.

    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. Fonsi479 commented on Nov 14, 2026

    @Fonsi479

    Independent macOS / CLI 1.5.8 live confirmation on 2026-11-14. Please reconsider this issue, or track the report against #30083, which is currently still open / unmerged.

    Environment: macOS arm64 host; T3 Code desktop with an iPhone client; official external agy acp 1.5.8; gemini-pro-orchestrator (Gemini 4 Carbon), thought_level: high. The installed ASAR version is 0.1.9-zh.2, commit 620970e8a23f, a downstream stable-0.1.9 build containing a background-command mitigation. This is not a claim that the current PR head fails.

    Observed in the live session

    1. The parent was asked whether it could use GPT models / delegate work. A successful orchestrator_capabilities tool call was recorded, and the agent reported Codex models gpt-6.1-sol and gpt-6-luna as available for cross-provider child tasks.
    2. The live agent reported 68 tool schemas on disk but 58 eager tools exposed, with delegate_task absent and no call_mcp_tool fallback. The transcript shows the agent stopping to explain that it could not delegate, rather than recording a successful delegate_task call. The eager-list count is the agent's report; I have not independently extracted the full model request.
    3. A recorded shell check inside Antigravity's own run_command shows no T3_ACP_MCP_NODE or other T3_ACP_MCP_* variables. Only the unrelated desktop CLI path variable was present. Thus the documented acp-mcp-call route was unavailable too.
    4. I independently checked the on-disk schemas: 68 files, 46,314 minified UTF-8 bytes in total. The ten largest schemas match exactly the ten names the live agent reported missing:
      t3_project_create, create_threads, preview_navigate, preview_open, t3_project_update, preview_act, html_render, delegate_task, t3_thread_launch, schedule_task.
      Their sizes range from 1,163 B to 3,359 B; delegate_task is 1,939 B. The smallest 58 total 28,375 B. These are measured file sizes, not a measurement of the model's exact schema budget.
    5. Source inspection at the installed build's commit confirms that AntigravityDriver.makeRuntime passes baseEnv: processEnvironment without merging input.processEnvironment, while the Antigravity flavor sets mcpOverHttp: true without deferMcpTools: true.

    The agent's user-facing explanation blamed anyOf / additionalProperties. That explanation is not established by this inspection and should not be treated as the root cause. The size-ranked omission pattern is consistent with #36088, and the missing process environment is directly visible in the recorded shell output and the driver source.

    Steps / expected behavior

    Enable Antigravity and Codex in the project, start the Antigravity model above, and request a child task using a Codex model. The parent should be able to invoke delegate_task through the T3 MCP route (including deferred tool discovery if needed), or through T3's documented authenticated ACP fallback. Listing the model successfully while leaving both invocation paths unavailable blocks the requested delegation.

    No local repair or fresh synthetic delegation attempt was made for this report. Please distinguish this existing released-build failure from validation of the proposed PR fix. Private account data, workspace paths, and raw screenshots/transcripts are omitted.

  3. JendrikLutz commented on Nov 17, 2026

    @JendrikLutz

    Confirming this still reproduces on T3 Code v0.1.10 (2026-11-17T01:44:04Z, macOS arm64, Antigravity ACP gemini-4-hydrogen / full-access):

    1. After updating to v0.1.10 (and also in brand-new Antigravity threads), delegate_task.json is present on disk under antigravity-acp/mcp/t3-code/delegate_task.json, and orchestrator_capabilities succeeds (features.appOwnedSubagents: true).
    2. However, delegate_task is missing from # t3-code Eager: tool declarations (no Lazy: section exists), and calling it via call_mcp_tool fails with:
      tool delegate_task is not enabled for server t3-code
    3. env | grep -E 'T3_ACP|T3_' in run_command returns empty (T3_ACP_MCP_NODE and T3_ACP_MCP_ENDPOINT are unset), so the documented acp-mcp-call fallback is also unavailable.

    Could this be reopened/revisited for v0.1.10+?

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