Antigravity: a command still running after the reply is marked completed, and Stop cannot end it #16442
Observed#
Antigravity can answer end_turn while a command it started (an execute tool such as a watcher or tail -f) is still running. T3 Code finalizes the turn as completed and marks the command item completed, though the process is still running. Pressing Stop afterwards does nothing, because the turn is no longer active, and the command keeps running until the agent process exits. Stop during an active turn only sends session/cancel, which does not end commands the agent has already started.
Reproduction#
With the ACP mock agent in Antigravity mode, have the prompt start a long-running command, report it as an in-progress run_command tool call, and return end_turn. Then:
- The turn ends with
turn.terminalstatuscompleted, and the command item becomescompleted. interruptTurnwithrequestRuntimeRestart: truefor that turn is a no-op.- The command process is still alive.
Expected#
A command that is still running keeps the turn open until the command finishes or the user presses Stop. Stop ends the turn as interrupted and ends the commands the agent started.
Environment#
macOS 26 (Darwin 25.6), Node 24, pingdotgg/t3code main at 9bd1d8009a. Reproduced with the mock agent, not the live Antigravity agent.
Proposed direction#
Use the ACP adapter's existing background-work support for Antigravity, as Grok already does. Treat running execute tools as background work that defers turn finalization, run the agent in its own process group, and tear that group down on Stop. Subagent batches, which Antigravity never reports as finished, should still go idle when the root turn ends.
A fix with a focused test is ready on a branch along these lines. I'll open it as a PR if this direction is agreed. On macOS, process-group teardown would not reach a command that starts its own session (for example a detached child).
Found while porting fixes from a downstream fork (Scient). Investigated with Claude Opus 5.5 in Claude Code.
juliusmarminge added labelsbug
juliusmarminge added labelsvia-triage
Reproduced on Linux with Node 24 and main a12d6ed942, using the real web dev app and an Antigravity-profile ACP mock that launches
sleep 120.Returning
end_turnafter an in-progress execute update marks the run and command completed while the captured child processes remain alive; Stop is no longer offered. This also reproduces without anexit_codefield. In a separate active-turn attempt, clicking Stop marks the run interrupted but leaves the command alive.End-turn recording, runtime transcript, active-Stop recording, active-Stop transcript.
Live Antigravity and macOS were not tested.
juliusmarminge added labelsneeds more info
juliusmarminge removed labelsneeds more info
I encountered the same visible failure with a real authenticated Antigravity session on November 12: T3 showed “Worked for 5m 53s” after the assistant said a background scan was still running and promised to report its results. No automatic follow-up appeared before I manually asked for the results about 23 minutes later.
Environment:
- Linux x86_64; T3 server version
0.1.9(from the running server's runtime metadata). - T3-managed Antigravity ACP
1.4.5(from_version.pyin the installedagy_acp_server.par), modelgemini-4-carbon, full-access mode.
The task was to inspect local JSONL traces for their suitability as encoding test data and identify redaction requirements. The assistant launched a Python scan of approximately 945 MB and identified it as background task
task-104.Observed timeline, all UTC on 2026-11-12:
06:55:31.736: provider log recordssession/promptstarting.07:01:24: the assistant's last reply says, translated: “The background scan is inspecting the field structure and sensitive-information matches in approximately 945 MB of raw JSONL. I will summarize the conclusions when it finishes.”07:01:24.323: provider log recordssession/promptassucceeded.07:01:24.344: T3 records the run ascompleted. The scan's command item is also markedcompleted, but its recorded text contains the launch script without an exit code or scan results.07:24:25.556: my manual “Are the results available?” message starts the next run. There is no intervening automatic run or visible follow-up in T3's timeline.
This is evidence from an actual user session, not an ACP mock. I have not inspected the native Antigravity trajectory to establish whether it continued internally during that gap. The provider log also summarizes the prompt response without exposing its
stopReason, so I cannot claim to have capturedend_turnon the wire. I did not test Stop or process cancellation.The user-facing problem is that T3 presents the work as finished while the last reply explicitly says it is waiting for background work, and no result arrives without another user message. This appears consistent with the missing-background-work/wakeup symptoms discussed in #28415; the native execution and notification-delivery boundary remains unverified in this case.
- Linux x86_64; T3 server version
Additional evidence from a real Windows x64 session using T3 Code Server
0.1.10-nightly.20261112.4580, Antigravity CLIagy 1.5.6, andgemini-4-hydrogen(High). T3 was configured to launch the local CLI withacp --process-per-session.This looks consistent with the background-command and wakeup symptoms described here and in #28415. The following observations are from existing session records; this is not a new controlled reproduction or a protocol-wire capture.
Observed in one run
- The agent launched a command with
WaitMsBeforeAsync: 10000, then said it was still running and promised to report the result. - The T3 provider log recorded
session/promptassucceeded, and the T3 run becamecompletedat approximately the same time, while the command was still running. - A user follow-up started another run about 11 seconds later. The original command exited about 47 seconds after the initial run was marked complete.
Observed in a separate run in the same session
- T3 marked the run completed while a background command was still pending.
- Approximately 76 seconds later, the native Antigravity task completed. Its native trajectory shows the agent waking about 6 seconds later, reading the task result, and issuing another tool call before the next user message.
- The T3 event store contained no events for that thread between the completed run and the next user message, approximately 190 seconds later. When the next prompt started, the earlier native activity appeared in the T3 timeline under the new run.
Expected: T3 should accurately represent the outstanding command and surface the agent's continuation and final result without requiring a user follow-up. A long-lived daemon can have a separate lifecycle from a finite command whose result the agent is waiting for.
Evidence boundary: The local provider log summarizes the
session/promptresult without exposing itsstopReason, so this report does not assert thatend_turnwas captured on the wire. I did not test the Stop button or process cancellation. No raw logs, account identifiers, project details, local paths, network addresses, or attachments are included.- The agent launched a command with
Confirming this also reproduces on both MacOS and Windows with the nightly build and CLI 1.5.9.
Vouching for this on
0.1.11-nightly.20261118.4890withagyCLI1.5.11on Linux.Whenever a unit test or long command moves to the background and the agent stops its message to wait for it, T3 marks the turn finished right away instead of keeping it open. When the test finishes later, T3 never surfaces the result or wakes the agent up until I send another message to check on it.
Also shared this experience on the related issues: #36105, #38478, #38535, and #30082.
Note
🤖 Claude Fable 5.2 responding on behalf of Theo
Not fixed, but changed by #38864 (merge commit 12be92d034f): when the command finishes, the thread now continues by itself and the command row gets its real output. The row is still marked completed when agy ends its prompt, and Stop still does not end the command. #35073 covers both.
t3dotgg(GitHub profile, opens in a new tab) linked this to #38916
t3dotgg(GitHub profile, opens in a new tab) closed this
Note
🤖 Claude Fable 5.2 responding on behalf of Theo
Fixed by #38916 (merge commit f9b9bc742d9) for commands the agent waits for. The run stays open while the command runs, and Stop sends
session/cancel, which ends the command in agy 1.5.11 (also with no prompt open). Verified with real agy 1.5.11 through a dev server: Stop ended a four-minute background command and the run showed interrupted. Not changed: a command agy starts withIsDaemon: truedoes not hold the run, its row is still marked completed when the run ends, and Stop cannot end it after that.
Sign in to join this conversation.
Note
Grok responding on behalf of Julius.
Triage#
Thanks @yaacovcorcos for the clear report and the mock-agent repro, that made this quick to trace.
What I found#
isAntigravityOpenCommandstill classifies anexecutetool that isinProgressafterend_turn, and its tests still describe only those commands as background work, butmakeAntigravityAcpAdapterFlavornever uses it.end_turn,finalizeTurnmarks every still-running foreground tool completed and emitsturn.terminalwith statuscompleted. Antigravity doesn't setdeferFinalizeForBackgroundWork,terminateRuntimeProcessGroupOnInterrupt, or a detached process group.interruptTurnwithrequestRuntimeRestart: truefinds no active turn and returns. Stop during the turn only sendssession/cancel(cancelBehavior: "wait-for-prompt"), which doesn't end commands the agent already started.Likely fix area#
The direction in your report lines up with how Grok is already wired, and would be one option:
executetool stillinProgressafterend_turnas background work that holds the turn until it finishes or the user presses Stop. Pending (not yet approved) tools wouldn't hold the turn.subagentsIdleOnTurnCompletionalready idles them at finalize, so they shouldn't pin deferred finalize.A mock-agent test covering those three cases would fit whichever approach is chosen. A maintainer will decide on the fix direction.