t3code icon indicating copy to clipboard operation
t3code copied to clipboard

Antigravity native subagent stays "running" after it reports back, so the parent turn never ends and every message becomes a steer

Open kirbysama opened this issue 1 day ago • 2 comments

What happened

In a gemini-4-neon (Antigravity) thread, the parent ran a "council" skill with three members: Opus and Sol as T3-delegated tasks, Neon as an Antigravity native subagent (invoke_subagent). All three finished and reported back. The parent posted its synthesis ("All three council members converged independently…"). The Neon subagent thread still shows "Working" with a trailing "Thinking" row after its last message ("Analysis complete and delivered to the caller via send_message"). The parent turn never completes, so every new message can only be sent as a steer. Asking the parent agent to kill the subagent did not help.

Diagnosis

The native child stays running in T3 even though Antigravity records it as done on disk, and nothing in T3 re-checks it while the parent prompt is open.

  1. The parent run (ordinal 148) launched Neon natively at 19:05:40 UTC. The subagent projection row has origin=provider_native, status=running, completed_at=NULL, childSessionId=NULL.
  2. At 19:08:11 the child posted its report to the root inbox (brain/<root>/.system_generated/messages/*.json, "sender":"<childId>"). By readAntigravityChildrenAtWork rules (AntigravityChildWork.ts:1553-1562), that child is no longer at work. Later, after the user asked the parent to kill it, subagents/<childId>.json changed to "state":"SUBAGENT_STATE_KILLED". That is also a release condition, but T3 never noticed.
  3. T3 only runs idleReportedSubagents (which calls subagentsOutlivingPrompt → readAntigravityChildrenAtWork) when the root session/prompt settles or a reply ends after promptSettled (packages/provider-acp/src/server/adapter.ts:5277, call sites 6696, 10315, 10731). Server traces from 17:46–19:42 UTC contain zero readAntigravityChildrenAtWork spans. During the same window, readAntigravitySubagentTranscript keeps polling every 5 s for the "active" child.
  4. The root prompt never settled. The Sol and Opus results were delivered by T3 as steers (AcpAdapterV2.steerWithPrompt) at 19:09:22 and 19:09:38, each starting a new session/prompt. After the parent's final synthesis, agy kept the 19:09:38 prompt open until the user's first steer at 19:15:54, which started another prompt that also never settled.
  5. The 15-minute inactivity watchdog cannot break the deadlock. promptInactivityPaused returns true while any subagent has a blocking status (adapter.ts:9811-9813), so retireInactivePrompt (fired 18:56:37 and 19:31:10) only re-arms.

Net effect: one stale native subagent status holds the parent run open forever. main has the same promptInactivityPaused logic. I found no commit since v0.1.13 that changes this path; a8f897e64 (#45928) does not help, because the watchdog is paused, not reset.

Possible directions: re-run idleReportedSubagents while the prompt is open (for example from the existing 5 s transcript poll, or when the root inbox/subagents/*.json changes), or stop counting a subagent as activity in promptInactivityPaused once its child has reported or is KILLED.

Steps to reproduce

  1. Antigravity provider, gemini-4-neon, full-access, desktop app on Windows.
  2. In one parent turn, launch one Antigravity native subagent (invoke_subagent) plus two T3 delegated tasks (other providers) so their completions arrive as steers into the running parent turn.
  3. Let the native child finish and send_message its result to the parent before the delegated tasks finish.
  4. Let the parent write its final reply.
  5. Observe: parent run stays running, native subagent stays running, Stop button stays red, new messages are steers. Killing the child via the parent agent does not change it.

Not yet confirmed whether step 2's steers are required. A single native child with no steers may settle normally.

Version

0.1.13 (desktop app, local server; serverSelfUpdate: desktop-managed)

Environment

Windows 10 Education 10.0.19045 x64, Node v26.8.2, Antigravity CLI (agy) 1.5.20, model gemini-4-neon (thought_level medium)

Evidence

# server.trace.ndjson spans (UTC)
17:51:16 → 19:02:39  session/prompt            (run 148)
18:56:37             AcpAdapterV2.promptInactivityPaused / retireInactivePrompt  (re-armed)
19:02:39             AcpAdapterV2.steerWithPrompt
19:02:39 → 19:09:22  session/prompt
19:09:22             steerWithPrompt          (Sol delegated-task delivery)
19:09:22 → 19:09:38  session/prompt
19:09:38             steerWithPrompt          (Opus delegated-task delivery)
19:09:38 → 19:15:54  session/prompt           (parent's final synthesis inside; prompt never returned on its own)
19:15:54 → 19:35:39  session/prompt           (user steer)
19:31:10             promptInactivityPaused / retireInactivePrompt  (re-armed)
# readAntigravityChildrenAtWork spans in all 11 rotated trace files: 0
# readAntigravitySubagentTranscript: every ~5 s, still running at 19:42

# statev2.sqlite orchestration_v2_projection_subagents (parent run ordinal 148)
council-queue-75-opus-1  app_owned        claude  completed delivered 19:09:37
council-queue-75-sol-1   app_owned        codex   completed delivered 19:09:21
call_6531531662267720313 provider_native  antigravity running  (null)   started 19:05:40
# orchestration_v2_projection_runs: ordinal 148 status=running completed_at=NULL

# agy profile, brain/<root>/.system_generated/
messages/66a2b136-….json   "sender":"<neon childId>"   written 19:08:11 UTC
subagents/<neon childId>.json  {"subagentDescriptor":{"typeName":"research","role":"Council Member (Neon)"},"state":"SUBAGENT_STATE_KILLED",...}

Related issues

#45765: same blocking mechanism (native child stuck running holds the parent run), but there the child errored and session/prompt succeeded; here the child reported normally via send_message and the prompt never settles, so the at-work check never runs. #42463: finished native subagents linger in the sidebar.

Fix applied or workaround

None applied by triage. Workaround: press Stop on the parent turn, then resend the queued message.

Filed by

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

kirbysama avatar Nov 30 '26 19:11 kirbysama

This is the same problem as #44083, so I'm closing it in favour of that one. If it is different, say how and it will be reopened.

juliusmarminge avatar Nov 30 '26 20:11 juliusmarminge

Confirmed workaround: pressing Stop on the parent turn ends the run and clears the stuck state, including the native Neon subagent (it no longer shows "Working"). Asking the parent agent to kill the subagent beforehand did not clear it.

kirbysama avatar Nov 30 '26 20:11 kirbysama