Repository navigation
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- Start a thread using the Antigravity ACP provider (
gemini-4-carbonorgemini-4-neon). - Give a multi-step prompt where the agent invokes
run_commandwithoutIsDaemon: trueon a slow command that exceedsWaitMsBeforeAsyncand backgrounds (e.g. a recursiveglob/scan over a large directory, or a watcher started withoutIsDaemon: true). - Rather than waiting on that backgrounded command, the agent works around it in subsequent steps, writes deliverables, emits its final user-facing summary, and finishes its turn (
session/promptresolves withend_turn,context.promptSettled = true) without callingmanage_task(kill)on the abandoned command. - Observe the thread status in the sidebar, the active Stop button, and follow-up prompt behavior.
Expected behavior
Once session/prompt settles (end_turn) after the agent has moved past the backgrounded command and emitted a complete final assistant reply, the run should finalize promptly (relying on enablePostSettleContinuation: true -> ProviderContinuationService "Background task completed." if the background task ever finishes later) or show a non-blocking background indicator without locking the primary run in running for 30 minutes.
Actual behavior
Even though the native Antigravity session has finished (PLANNER_RESPONSE DONE, tools = [], session/prompt settled) and the full final assistant reply is rendered:
hasDeferredBackgroundWork(context)returnstrue(packages/provider-acp/src/server/adapter.ts:5246-5250) becauseantigravityToolOutlivesPrompt(apps/server/src/provider/acp/AntigravityProtocol.ts:66-77) treats every non-IsDaemonexecutetool call still in"running"as blocking turn finalization.AntigravityAdapterV2(apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.ts:254-264) setsdeferFinalizeForBackgroundWork: true+postSettleCommandHold: { timeout: "30 minutes", isCommand: antigravityCommandOutlivesPrompt }.schedulePostSettleHoldExpiry(packages/provider-acp/src/server/adapter.ts:9778-9808) keeps the settled turn locked instatus = "running"for at least 30 minutes aftercontext.lastProgressAt.- Follow-up user prompts cannot start a normal next turn until the user manually clicks Stop.
Impact
Major degradation or frequent failure
Version or commit
0.1.12 & main (verified on 0.1.13 / main)
Environment
macOS & Linux (t3 serve v0.1.12), Antigravity ACP 1.5.14 (gemini-4-carbon / gemini-4-neon)
Logs or stack traces
Relevant code paths on `main`:
- `apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.ts:254-264` (`enablePostSettleContinuation: true`, `deferFinalizeForBackgroundWork: true`, `postSettleCommandHold: 30 minutes`)
- `packages/provider-acp/src/server/adapter.ts:5244-5257`: `L5256-5257` skips `context.backgroundCommands` (`// Commands are as often a dev server as a wait; only their wake follows up`), yet `L5246-5250` right above it still returns `true` for any `"running"` `execute` tool via `flavor.toolOutlivesPrompt(tool)`, forcing a 30-minute hold via `schedulePostSettleHoldExpiry` (`L9778-9808`, `L10326-10350`) even though `enablePostSettleContinuation: true` is already active.Screenshots, recordings, or supporting files
No response
Workaround
Manually click the red Stop button after confirming the final assistant reply has finished rendering (or kill the orphaned background child process).
Activity
test(server): Antigravity run held 30 minutes by a command the agent …
WangHunter commentedon Dec 2, 2026
I hit the same visible behavior on Windows 10 (build 19045) with T3 Code Nightly and Antigravity. An early repository search stayed open while the agent completed the work and reported the push. Follow-up messages were handled inside the same run. The search was terminated at 15:53:51 local time, and the original run reached
completedat 15:54:04. I couldn't determine what made the search stall.I also reproduced the post-settle hold in an adapter regression test against
mainatf12298a646: a non-daemon command remainsin_progress, a later tool finishes, the agent sends a final reply, andsession/promptreturnsend_turn. The test still sees noturn.terminalafter advancing the test clock one minute.A local patch releases the earlier running command when a successful
end_turnfollows a later completed tool and a reply, unless the command was explicitly marked awaited. It uses the existing detached-command path, keeps the ACP session eligible for idle pinning while the command is still running, and preserves an eventual completion wake. The regression test passes with the patch, including a separate case where explicit waiting keeps the run open. The Antigravity and shared ACP adapter suites pass 233 tests on Windows. This is adapter-level verification with a mock ACP agent. I haven't verified the patched binary against live Antigravity.yeyunwen commentedon Dec 2, 2026
Just hit this exact symptom on T3 Code Nightly
0.1.14-nightly.20261130.5465(macOS 27.0.1 arm64) with bundledantigravity-acp1.5.20, and there is an important protocol difference onagy 1.5.15+worth flagging for any fix here:What happened on
antigravity-acp1.5.2007:46:34Z), a non-daemonrun_commandstalled (broken shell pipeline where the downstream reader exited withSyntaxError, while upstreamzsh->git archive->sshstayed alive) and backgrounded (status: RUNNING).PLANNER_RESPONSE,status: DONE,tools: []) — without killing the abandoned background task.1.5.14: On1.5.20, the originalsession/promptfrom07:46:34Znever resolved withend_turnat all (it stayed open for 36m 45s, past the 30-minutepostSettleCommandHoldwindow).07:53through08:20) sentsession/promptand resolved in 9–106 ms (succeeded), steered into the same unclosed Run 8.SIGTERMto the orphaned child PIDs (08:23:05Z), the original07:46:34Zsession/promptimmediately resolvedsucceeded(08:23:19Z) and the thread transitioned cleanly tocompleted.Implication for T3 Code's fix
postSettleCommandHoldaftersession/promptreturnsend_turn(as in the mock adapter test above) coversagy <= 1.5.14, but will not trigger onagy 1.5.15+ / 1.5.20becauseagy acpitself holdssession/promptopen upstream until every non-daemon background task exits (filed upstream as [Bug]: agy acp 1.5.20 holds session/prompt open indefinitely when an abandoned non-daemon run_command stays alive, collapsing follow-up turns google-antigravity/antigravity-cli#2130, related to [Bug]: agy acp 1.5.15+ holds session/prompt open indefinitely after /swarm finishes when system monitor worker (with recurring cron) stays unkilled google-antigravity/antigravity-cli#1899).postSettleCommandHold, it would be very helpful for T3 Code to surface when a still-running turn has an oldercommand_executionitem stuck inrunningbehind completed assistant replies (e.g., showing a non-ambiguous"Waiting on background command (running XXm)"indicator with a jump-to-item link in the thread/sidebar), so users aren't left thinking the UI is frozen when an upstream ACP session is held open by an orphaned command.WangHunter commentedon Dec 2, 2026
Live follow-up to my adapter test above. On Windows 10 with the real
agy acp1.5.17 andgemini-4-hydrogen, I ran the same smoke test against isolated copies of T3 atf12298a646, with and without the local patch. The agent startedStart-Sleep -Seconds 90withWaitMsBeforeAsync: 100andIsDaemon: false, completed a second command, then emitted its final reply without waiting on the first command.session/promptresponseBoth runs stayed
runninguntil after the background command finished and agy answered the original request. A separate stdio ACP client with no T3 server reproduced the same ordering: final reply at 15.167 s, slow toolcompletedat 97.700 s, andsession/promptreturnedend_turnat 102.241 s.The candidate patch kicks in after
end_turn, so it does not fix the live 1.5.17 reproduction. I have held back the PR. This matches the ACP behavior reported for 1.5.20 in google-antigravity/antigravity-cli#2130.