[Bug]: Antigravity mid-turn steers stay stuck at "Steer · waiting to be read" after being read and acted on, then move after assistant:0 when a follow-up reply runs #49472
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 provider (
antigravity-acp>= 1.5.0, tested on1.5.25withgemini-4-neon). - Send an initial prompt that triggers a multi-step tool-calling loop (several reasoning and tool rounds before any
assistant_messagetext is emitted). - While tool calls are running before
assistant:0starts, send Steer #1 asking the agent to run another tool action (such as delegating a task or calling an MCP tool). - Watch the agent read Steer #1 live and execute its requested tool calls while checking Steer #1's badge in the UI.
- (Optional, triggers timeline reordering too) Send Steer #2 during the tool loop (also executed live before
assistant:0), then send Steer #3 during the final reasoning pass forassistant:0soagy acpfinishesassistant:0and runs a follow-up reply (assistant:1) for Steer #3.
Expected behavior#
- Once Antigravity reads and acts on an absorbed mid-turn steer during a tool loop, the steer updates to
completedand the badge changes fromSteer · waiting to be readtoSteer. - Earlier steers already absorbed and answered before
assistant:0keep their original positions beforeassistant:0(only a steer that genuinely waited until afterassistant:0should sit betweenassistant:0andassistant:1). - Stopping or failing a turn after an absorbed steer has already run should not treat that steer as unread or requeue it.
Actual behavior#
Regression introduced by #49057 (e389f8cbcc):
- Stuck "Steer · waiting to be read" during tool loops: Every mid-turn Antigravity steer transitions to
status: "pending"immediately on dispatch and stays stuck atSteer · waiting to be readfor minutes even while Antigravity visibly reads it and runs the requested tool calls. - Retroactive timeline reordering of already-answered steers: When a later steer (Steer #3) arrives during final generation and triggers a follow-up reply (
assistant:1) afterassistant:0, all accumulatedpendingPromptSteers(including Steer #1 and Steer #2, submitted minutes earlier and already answered inassistant:0) flush in an 11 ms burst afterassistant:0viaatPromptStart: true(moveTurnItemToEnd).
Observed sanitized single-run timeline (elapsed from run start):
00:00 pos 0 user_message Initial prompt
00:25 (sent) user_message Steer #1 -> UI shows "Steer · waiting to be read"
00:58 pos 10 dynamic_tool Agent acts on Steer #1 live
03:48 pos 33 dynamic_tool Agent executes task from Steer #1 live
04:40 (sent) user_message Steer #2 -> UI shows "Steer · waiting to be read"
05:36 pos 48 dynamic_tool Agent acts on Steer #2 live
07:36 pos 59 dynamic_tool Agent executes task from Steer #2 live (Steer #1 & #2 still "waiting to be read")
07:51 (sent) user_message Steer #3 (sent during final reasoning for assistant:0)
08:04.410 pos 63 assistant_message turn:1:assistant:0 (answers Initial prompt + Steer #1 + Steer #2)
08:04.429 pos 64 user_message Steer #1 (retroactively moved after assistant:0)
08:04.436 pos 65 user_message Steer #2 (retroactively moved after assistant:0)
08:04.440 pos 66 user_message Steer #3 (moved after assistant:0)
08:12 pos 67..72 reasoning + tools Work for Steer #3
08:42 pos 73 assistant_message turn:1:assistant:1 (answers Steer #3)
Root cause (verified on 2fe9f93296e and main @ 8b306d5d8fa)#
- UI trigger:
apps/web/src/components/chat/TimelineUserMessageRow.tsx(unread={row.projectedItem?.item.status === "pending"}) rendersSteer · waiting to be readwhenever the steeruser_messagehasstatus === "pending". - Unconditional deferral:
createAntigravityPromptSteerBoundary().onSteerQueued(apps/server/src/provider/acp/AntigravityProtocol.ts:1150-1197) returns"defer"wheneverreplyOpen || hasPendingSteers || !previousPromptSettled.steerWithPrompt(packages/provider-acp/src/server/adapter.ts:11999-12023, 12186-12188) pushes every mid-turn steer intocontext.pendingPromptSteersand immediately emitssteer.updatedwithstatus: "pending". - No mid-turn read signal: Unlike Claude (
ClaudeAdapterV2.ts:10492-10506) and Codex (CodexAdapterV2.ts:2729-2737),packages/provider-acp/src/server/adapter.ts:4317-4384never clears a deferred steer during a tool loop.releaseDeferredPromptSteersrequirescompletedPreSteerReply !== null, which is only set onusage_updatewhenlastAssistantReply(context)has non-empty text. While Antigravity is still in tool calls beforeassistant:0,lastAssistantReply(context)staysnull, so steers remainpendingfor the entire tool loop. - Indiscriminate batch flush: Once
assistant:0finishes withusage_updateand a later steer triggers a follow-up step (pos 67),releaseDeferredPromptSteers(adapter.ts:4338-4357) drains the entirecontext.pendingPromptSteersarray and emitssteer.updated(status: "completed", atPromptStart: true)for every entry, relocating already-answered Steer #1 and #2 afterassistant:0viaProviderEventIngestor.ts:809-814(moveTurnItemToEnd). - Stop/error side effect: Because absorbed steers stay
pendinguntil turn completion,settlePendingPromptSteers(adapter.ts:4332-4334) leaves thempendingon Stop or error, causingOrchestrator.requeueUnreadSteers(Orchestrator.ts:3773-3810) to treat already-executed steers as unread.
Suggested fix direction#
- Settle mid-turn absorbed steers in place (
status: "completed",atPromptStart: false) and remove them frompendingPromptSteerswhenagy acpconsumes them (via native trajectory/read signal if available, or across post-steer tool-loop step boundaries beforeassistant:0). - Ensure
releaseDeferredPromptSteersonly repositions steers that actually waited pastassistant:0, not earlier absorbed steers. - Avoid keeping steers at
status: "pending"across long tool loops when the provider cannot emit a live read receipt.
Impact#
Major degradation or frequent failure
Version or commit#
v0.1.14-nightly.20261205.5766 (2fe9f93296e), verified unchanged on main @ 8b306d5d8fa (regression from #49057 / e389f8cbcc)
Environment#
Linux x86_64 (Ubuntu), T3 Code server v0.1.14-nightly.20261205.5766, Node v26.14.0, Antigravity ACP (antigravity-acp 1.5.25, gemini-4-neon), observed via Windows Desktop client over linked environment (server-side projection issue independent of client or linking)
Logs or stack traces#
# Key code paths on main @ 8b306d5d8fa:
# apps/server/src/provider/acp/AntigravityProtocol.ts:1150-1197 (createAntigravityPromptSteerBoundary)
# packages/provider-acp/src/server/adapter.ts:4308-4384 (emitPendingSteer / settlePendingPromptSteers / releaseDeferredPromptSteers / applySteerBoundaryUpdate)
# packages/provider-acp/src/server/adapter.ts:11999-12023 (steerWithPrompt -> decision === "defer")
# packages/provider-acp/src/server/adapter.ts:12186-12188 (emits steer.updated status:"pending" on dispatch)
# apps/server/src/orchestration-v2/ProviderEventIngestor.ts:655-684, 809-814 (status:"pending" + moveTurnItemToEnd on atPromptStart:true)
# apps/web/src/components/chat/TimelineUserMessageRow.tsx:983-986, 1199-1229 (renders "Steer · waiting to be read" when status === "pending")
Screenshots, recordings, or supporting files#
No response
Workaround#
Wait for the active Antigravity turn to complete before sending follow-up steers, or ignore the Steer · waiting to be read badge during multi-step tool loops and avoid sending another steer while the final reply is generating.
cc @juliusmarminge
Note
Draft reviewed by the author, final version posted by Gemini 4 Neon
tanstack-source added labelsbug
juliusmarminge closed this
This looks like a false
factory:no-reproauto-close: the live check could not get past the first model call because the hub returned 72h429 model_cooldown(gemini-4-neon,gemini-4-hydrogen) andmodel_not_found(gemini-3.8-flash).The triage comment itself already reproduced the bug on
main(a0f03a6ed6) inAntigravityAdapterV2.test.ts:On main the test fails: Steer #1 emits [pending,false] at dispatch and only reaches [completed, atPromptStart:true] after assistant:0. That is the stuck 'waiting to be read' badge followed by the move to after assistant:0 that the reporter describes.
Still reproduces live on
v0.1.14-nightly.20261205.5772(c0eed7328d): a mid-turn steer sent during initial reasoning stayedpendingacross the tool call and final reply (38s total) untilsettlePendingPromptSteerssettled it 2 ms after the assistant message finished.AntigravityProtocol.ts:1150-1197andpackages/provider-acp/src/server/adapter.ts:4317-4384remain unchanged onmain(4ec6dbaef1).Could you reopen this @juliusmarminge?
Note
Approved by the author, posted by Gemini 4 Neon
Sign in to join this conversation.
I tried to reproduce this on the current build and could not.
Commit a0f03a6ed6 (origin/main). Ran
T3CODE_DEV_SEED=0 GOOGLE_GEMINI_BASE_URL=<hub> vp run dev, added the Antigravity provider in Settings with sign-in method "Gemini API key" (it showed agy v1.5.25, Authenticated), added a scratch git project and started threads with an 8-stepsleep 10 && echo stepNtool loop. I could not get past the first model call. gemini-4-neon and gemini-4-hydrogen both failed with hub 429model_cooldown("Individual quota reached… Resets in 72h"). gemini-3.8-flash failed withmodel_not_found("unknown provider for model gemini-3.8-flash"). Other variants are not advertised by the provider. The repository has no recorded real Antigravity run that contains steers. So I did not see this live. Instead I wrote a test in the existing AntigravityAdapterV2.test.ts ('deferred mid-turn prompt steers'). It runs the real adapter against the repo's ACP mock agent with agy 1.5.11 steering semantics. The sequence is: reasoning, then tool step + usage_update, then Steer #1, then two more tool steps (the second one acts on the steer), each followed by usage_update. Next comes reasoning, then Steer #2, then assistant:0 text + usage_update, then a tool step, then assistant:1 + usage_update. On main the test fails: Steer #1 emits [pending,false] at dispatch and only reaches [completed, atPromptStart:true] after assistant:0. That is the stuck 'waiting to be read' badge followed by the move to after assistant:0 that the reporter describes. Steer #2 behaves correctly ([completed,true]).Closing as not planned. If it still happens for you, reply with the exact steps and the version you are on and it will be looked at again.