Repository navigation
Conversation
… reactive wakes When Antigravity (ACP 1.5.10) leaves a background run_command, schedule, run_workflow, or invoke_subagent in_progress at end_turn, AcpAdapterV2 previously force-completed the tool call, left pendingBackgroundTasks empty (marking the thread Completed instead of Waiting), and rejected post-settle session/request_permission calls during Antigravity's spontaneous reactive wake with -32603. Track open Antigravity background tasks across end_turn into pendingBackgroundTasks (non-daemon commands awaited by default; IsDaemon commands non-blocking unless marked via t3_background_wait), wire step-ID resolution for t3_background_wait, keep the session watching for post-settle completions, offer a reactive continuation run on wake, hold post-settle permission requests until the continuation turn attaches, settle reactive wake turns after their trailing usage_update, and clear/quarantine background work on Stop. Done with Antigravity (Gemini 3.1 Pro).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When Antigravity (
antigravity acp 1.5.10) starts a backgroundrun_command,schedule,run_workflow, orinvoke_subagent, the tool call remainsin_progresswhensession/promptreturns{ stopReason: "end_turn" }. Previously:AcpAdapterV2.finalizeTurnforce-completed open foreground tools atend_turn, leavingpendingBackgroundTasksempty so the UI immediately showed Completed instead of Waiting and stopped watching for background completion.session/prompt),AcpAdapterV2hadactiveTurn === nulland rejectedsession/request_permissionwith-32603, causing Antigravity to abort the follow-up step (user denied permission to run command).Fix
AntigravityProtocol.ts,AntigravityAdapterV2.ts,packages/provider-acp/src/server/adapter.ts):run_command,schedule,run_workflow,invoke_subagent) alive acrossend_turninstead of force-completing them, and sync them intoproviderThread.pendingBackgroundTasks/pendingBackgroundWork.run_commanddefaults toawaited: true(holds Waiting automatically);IsDaemon: truecommands stay non-blocking unless explicitly marked viat3_background_wait.<sessionId>/task-<N>/task-<N>) to theirtoolCallIdfrom<sessionId>.db(AntigravityChildWork.ts) sot3_background_waitworks with native Antigravity task IDs as well astoolCallId.rawOutput.outputwhen projecting command outputs on completion.packages/provider-acp/src/server/adapter.ts):pendingBackgroundTasks, and immediately offer a continuation run.session/request_permissionrequests until the reactive continuation turn attaches instead of failing with-32603(auto-approving underfull-accessor surfacing the approval card underapproval-required).usage_updatedebounce rather than prematurely cutting off multi-second thinking gaps.interruptTurnwithrequestRuntimeRestart: true).Verification
vp test run apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.test.ts apps/server/src/provider/acp/AntigravityProtocol.test.ts apps/server/src/provider/acp/AntigravityChildWork.test.ts(3 files, 69 passed)vp test run apps/server/src/orchestration-v2/Adapters/AcpAdapterV2.test.ts apps/server/src/orchestration-v2/Adapters/GrokAdapterV2.test.ts(2 files, 148 passed)vp run check:changed(format, lint, knip, graphql, typecheck across 14 packages, 4 test files / 71 tests — all green)Done with Antigravity (Gemini 3.1 Pro).