Skip to content
Source
Sign inSign up
pingdotgg/t3code

[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

ClosedNeonsy(GitHub profile, opens in a new tab) opened this issue 2 comments

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

  1. Start a thread using the Antigravity provider (antigravity-acp >= 1.5.0, tested on 1.5.25 with gemini-4-neon).
  2. Send an initial prompt that triggers a multi-step tool-calling loop (several reasoning and tool rounds before any assistant_message text is emitted).
  3. While tool calls are running before assistant:0 starts, send Steer #1 asking the agent to run another tool action (such as delegating a task or calling an MCP tool).
  4. Watch the agent read Steer #1 live and execute its requested tool calls while checking Steer #1's badge in the UI.
  5. (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 for assistant:0 so agy acp finishes assistant:0 and runs a follow-up reply (assistant:1) for Steer #3.

Expected behavior

  1. Once Antigravity reads and acts on an absorbed mid-turn steer during a tool loop, the steer updates to completed and the badge changes from Steer · waiting to be read to Steer.
  2. Earlier steers already absorbed and answered before assistant:0 keep their original positions before assistant:0 (only a steer that genuinely waited until after assistant:0 should sit between assistant:0 and assistant:1).
  3. 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):

  1. Stuck "Steer · waiting to be read" during tool loops: Every mid-turn Antigravity steer transitions to status: "pending" immediately on dispatch and stays stuck at Steer · waiting to be read for minutes even while Antigravity visibly reads it and runs the requested tool calls.
  2. 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) after assistant:0, all accumulated pendingPromptSteers (including Steer #1 and Steer #2, submitted minutes earlier and already answered in assistant:0) flush in an 11 ms burst after assistant:0 via atPromptStart: 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"}) renders Steer · waiting to be read whenever the steer user_message has status === "pending".
  • Unconditional deferral: createAntigravityPromptSteerBoundary().onSteerQueued (apps/server/src/provider/acp/AntigravityProtocol.ts:1150-1197) returns "defer" whenever replyOpen || hasPendingSteers || !previousPromptSettled. steerWithPrompt (packages/provider-acp/src/server/adapter.ts:11999-12023, 12186-12188) pushes every mid-turn steer into context.pendingPromptSteers and immediately emits steer.updated with status: "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-4384 never clears a deferred steer during a tool loop. releaseDeferredPromptSteers requires completedPreSteerReply !== null, which is only set on usage_update when lastAssistantReply(context) has non-empty text. While Antigravity is still in tool calls before assistant:0, lastAssistantReply(context) stays null, so steers remain pending for the entire tool loop.
  • Indiscriminate batch flush: Once assistant:0 finishes with usage_update and a later steer triggers a follow-up step (pos 67), releaseDeferredPromptSteers (adapter.ts:4338-4357) drains the entire context.pendingPromptSteers array and emits steer.updated(status: "completed", atPromptStart: true) for every entry, relocating already-answered Steer #1 and #2 after assistant:0 via ProviderEventIngestor.ts:809-814 (moveTurnItemToEnd).
  • Stop/error side effect: Because absorbed steers stay pending until turn completion, settlePendingPromptSteers (adapter.ts:4332-4334) leaves them pending on Stop or error, causing Orchestrator.requeueUnreadSteers (Orchestrator.ts:3773-3810) to treat already-executed steers as unread.

Suggested fix direction

  1. Settle mid-turn absorbed steers in place (status: "completed", atPromptStart: false) and remove them from pendingPromptSteers when agy acp consumes them (via native trajectory/read signal if available, or across post-steer tool-loop step boundaries before assistant:0).
  2. Ensure releaseDeferredPromptSteers only repositions steers that actually waited past assistant:0, not earlier absorbed steers.
  3. 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

  1. tanstack-source added labelsbug

  2. 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-step sleep 10 && echo stepN tool loop. I could not get past the first model call. gemini-4-neon and gemini-4-hydrogen both failed with hub 429 model_cooldown ("Individual quota reached… Resets in 72h"). gemini-3.8-flash failed with model_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.

  3. juliusmarminge closed this

  4. Neonsy(GitHub profile, opens in a new tab)commented

    This looks like a false factory:no-repro auto-close: the live check could not get past the first model call because the hub returned 72h 429 model_cooldown (gemini-4-neon, gemini-4-hydrogen) and model_not_found (gemini-3.8-flash).

    The triage comment itself already reproduced the bug on main (a0f03a6ed6) in AntigravityAdapterV2.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 stayed pending across the tool call and final reply (38s total) until settlePendingPromptSteers settled it 2 ms after the assistant message finished. AntigravityProtocol.ts:1150-1197 and packages/provider-acp/src/server/adapter.ts:4317-4384 remain unchanged on main (4ec6dbaef1).

    Could you reopen this @juliusmarminge?

    Note

    Approved by the author, posted by Gemini 4 Neon

Sign in to join this conversation.