You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Antigravity: a command still running after the reply is marked completed, and Stop cannot end it #16442
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.terminal status completed, and the command item becomes completed.
interruptTurn with requestRuntimeRestart: true for 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.
isAntigravityOpenCommand still classifies an execute tool that is inProgress after end_turn, and its tests still describe only those commands as background work, but makeAntigravityAcpAdapterFlavor never uses it.
On end_turn, finalizeTurn marks every still-running foreground tool completed and emits turn.terminal with status completed. Antigravity doesn't set deferFinalizeForBackgroundWork, terminateRuntimeProcessGroupOnInterrupt, or a detached process group.
After that, interruptTurn with requestRuntimeRestart: true finds no active turn and returns. Stop during the turn only sends session/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:
Treat an execute tool still inProgress after end_turn as background work that holds the turn until it finishes or the user presses Stop. Pending (not yet approved) tools wouldn't hold the turn.
On Stop, end the turn as interrupted and tear down the agent process group, respawning for the next turn, as Grok does. As you noted, a child that starts its own session would still be out of reach on macOS.
Keep subagent batches going idle when the root prompt ends, since Antigravity never reports them finished. subagentsIdleOnTurnCompletion already 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.
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_turn after 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 an exit_code field. In a separate active-turn attempt, clicking Stop marks the run interrupted but leaves the command alive.
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.py in the installed agy_acp_server.par), model gemini-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 records session/prompt starting.
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 records session/prompt as succeeded.
07:01:24.344: T3 records the run as completed. The scan's command item is also marked completed, 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 captured end_turn on 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.
Additional evidence from a real Windows x64 session using T3 Code Server 0.1.10-nightly.20261112.4580, Antigravity CLI agy 1.5.6, and gemini-4-hydrogen (High). T3 was configured to launch the local CLI with acp --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/prompt as succeeded, and the T3 run became completed at 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/prompt result without exposing its stopReason, so this report does not assert that end_turn was 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.
Activity
juliusmarminge commentedon Oct 6, 2026
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.
juliusmarminge commentedon Oct 22, 2026
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.
Xuanwo commentedon Nov 12, 2026
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:
0.1.9(from the running server's runtime metadata).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.
travelvector commentedon Nov 13, 2026
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
WaitMsBeforeAsync: 10000, then said it was still running and promised to report the result.session/promptassucceeded, and the T3 run becamecompletedat approximately the same time, while the command was still running.Observed in a separate run in the same session
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.