Skip to content

Antigravity swarm workers are killed when a delegated task's turn ends, because swarm calls don't count as work that outlives the prompt #39886

Open

Description

@MrPancakes39

What happened

From a Claude thread, I delegated an investigation to an Antigravity thread (model gemini-pro-orchestrator-neon, thought level high) and asked it to use Antigravity's swarm feature. The orchestrator created a swarm board, added four workers, posted "Run /swarm board (default shortcut alt+s) to open the live board", and ended its turn. T3 marked the delegated task finished right away. The workers never produced anything: their output directory stayed empty, no report came back, and the swarm no longer existed. In the user's words: swarm "doesn't work in t3code".

Diagnosis

The swarm was working. T3 killed it by closing the Antigravity session as soon as the orchestrator's turn ended.

  1. Each swarm call (board setup, plus one per added worker) returns as soon as it is done, while the workers keep running inside agy as separate cascades. T3 records them as dynamic_tool items titled Run swarm, already completed.
  2. The orchestrator ended its turn to wait for the workers, and session/prompt resolved. The adapter only keeps a run open for tools that antigravityCommandOutlivesPrompt (v0.1.11, apps/server/src/provider/acp/AntigravityProtocol.ts:52) reports as outliving the prompt. That is only execute tools that are not daemons. On main and v0.1.12-nightly.20261120.5009 it is antigravityToolOutlivesPrompt, which also counts Run schedule. Swarm counts in neither version, so the run finalized as completed at 18:29:36.331Z.
  3. Completing the run completes the delegated task, and the child thread's ACP session is torn down. The adapter finalizer (v0.1.11, packages/provider-acp/src/server/adapter.ts:9683) sends session/close because agy advertises sessionCapabilities.close.
  4. agy handles session/close with ForceStopCascadeTree and kill_background_tasks=true. That cancels the orchestrator's cascade and all four worker cascades. T3 then sends SIGTERM to the agy process.

The unsupported_tool: swarm lines in the agy log are not the cause. agy_tool_safety flags every swarm call, but the second monitor (sir_flash_lite) allows each one, and the board and all four workers were created.

This differs from #36475, a swarm started in a normal thread. There the swarm kept running after the turn settled, and only the coordinator's report was lost. In a delegated task the settle also closes the session, so the workers themselves are killed.

Possible directions (not tested):

Steps to reproduce

Seen once with a real four-worker investigation. The sleep prompt below is a smaller version that I haven't run separately.

  1. Configure the built-in Antigravity provider (managed agy 1.5.13).
  2. From any thread whose agent can use T3's orchestrator MCP delegate_task tool (I used Claude), delegate a task to Antigravity with model gemini-pro-orchestrator-neon (Neon), for example: "Use /swarm to start two workers that each run sleep 120 and then write a file; wait for both and report."
  3. Watch the delegated thread. Once the orchestrator adds its workers and ends its turn, the task shows Finished.
  4. About 1 s later, agy's acp-server-*.log shows session/close, then ForceStopCascadeTree and Cancel requested … (kill_background_tasks=true) for every worker cascade, then Got signal terminated. The workers' files are never written, and no report reaches the parent.

Version

0.1.11 (desktop app, stable/beta AppImage; server reports 0.1.11). Code paths unchanged in v0.1.12-nightly.20261120.5009.

Environment

Linux x64 (Pop!_OS, kernel 7.2.15), Node v24.22.1, T3 Code desktop AppImage 0.1.11 with local server, Antigravity agy 1.5.13 (managed ACP server), parent thread on Claude Code (claude-opus-5-5). Triage CLI 0.1.11.

Evidence

# T3 provider event log, delegated child thread (UTC)
18:22:01.545Z  session/prompt  started
18:29:36.216Z  session/prompt  succeeded
18:29:37.202Z  session/close   started
18:29:37.224Z  session/close   succeeded

# statev2.sqlite, child run 1: status=completed, completed_at=2026-11-20T18:29:36.331Z
# Turn items in that run:
dynamic_tool completed  title="Run swarm"                       (board)
dynamic_tool completed  title="Run swarm"  name=pixels
dynamic_tool completed  title="Run swarm"  name=cache
dynamic_tool completed  title="Run swarm"  name=agent_decompile
dynamic_tool completed  title="Run swarm"  name=sb_display

# agy acp-server log (local time, UTC+2), same session
20:29:20 Monitor agy_tool_safety FINISHED: triggered=true, reason="unsupported_tool: swarm"
20:29:22 Monitor sir_flash_lite FINISHED: triggered=false, reason="...setting a title for an investigation workspace using the swarm tool..."
20:29:24 Monitor sir_flash_lite FINISHED: triggered=false, reason="...assign an analytical task to another agent (`@pixels`)..."
   (same allow for @cache, @agent_decompile, @sb_display)
20:29:37.204 ACP Request received: session/close
20:29:37.204 Stream goroutine exited for b7274ceb-…, sending completion signal
20:29:37.204 ForceStopCascadeTree requested: cascade_id="b7274ceb-…"
20:29:37.206 Cancel requested for cascade 7145a9c2-… (kill_background_tasks=true)
20:29:37.206 Cancel requested for cascade 65be3681-… (kill_background_tasks=true)
20:29:37.206 Cancel requested for cascade 2125d14f-… (kill_background_tasks=true)
20:29:37.206 Cancel requested for cascade 0cb32676-… (kill_background_tasks=true)
20:29:37.214 Run: attempt 1 failed (stream reading error: context canceled by user), retrying in 4s
20:29:37.232 Got signal terminated, shutting down
20:29:40.229 Shutdown timed out after 3s, forcing exit.

Related issues

#36475 (swarm in a normal thread loses the coordinator's report). It was closed as a duplicate of #30082, which was closed as a duplicate of #36105. The fixes there (#38864, #38916) cover background shell commands, and #39806 covers schedule. None of them covers swarm. The maintainer's last note on #30082 says resuming after native subagent or delegate_task work is still not verified. This issue is the delegated-task case, where the workers are killed, not just unreported.

Fix applied or workaround

Nothing changed on the machine. Untested workarounds: run swarms in agy directly, or start the orchestrator in an ordinary Antigravity thread instead of delegating to it.

Filed by

Claude Code (claude-opus-5-5) via t3 triage

Activity

  1. MrPancakes39 commented on Nov 20, 2026

    @MrPancakes39
    Author

    Screenshot of the delegated Antigravity task: T3 shows it Finished at 20:29, right after the orchestrator started its four swarm workers and ended its turn. One second later T3's session/close stopped all of them (see the Evidence section).

    t3_report png
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

    via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions