[Bug]: Steering Antigravity mid-reasoning places the first reply after the steer bubble and folds it under "Continued for" (not fixed by #47146) #48620
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 (ACP,
gemini-4-neon). - Send a prompt that requires tool calls and produces a substantive answer.
- While the agent is still in tool calls or its final reasoning pass (before
assistant:0starts streaming), send an unrelated Steer message that requires tool calls of its own (e.g., file edits or a shell command). - Antigravity finishes answering the first prompt (
assistant:0), then runs the steer's tool calls in the same run and emits a short reply (assistant:1) to the steer. - Wait for the run to settle and inspect the timeline.
Expected behavior#
- The completed answer to the first prompt (
assistant:0) remains visible in the timeline (not folded intoContinued for ...or hidden in Zen mode). - Because Antigravity queued the steer until after
assistant:0completed,assistant:0should appear before the Steer bubble (as the reply to prompt 1), rather than after it.
Actual behavior#
Two things go wrong in the settled timeline:
- Wrong position: The Steer bubble is placed before
assistant:0, so the first reply sits below the steer instead of above it. - Hidden reply (still broken after #47146): Once
assistant:1finishes, the entire first reply (assistant:0) is folded insideContinued for ... >below the Steer bubble, leaving only the short reply to the steer (assistant:1) visible.
Observed single-run item sequence (run:ordinal:9, timestamps sanitized):
05:46:51 pos 209 user_message (prompt 1)
05:46:58 pos 210–220 reasoning + tool calls (commands, file reads, searches)
05:48:06 pos 221 reasoning (final reasoning for prompt 1; still streaming at 05:48:02)
05:48:02 pos 222 user_message (Steer — assigned position on submit)
05:48:24 pos 223 assistant_message (full ~3.8k-char answer to prompt 1, phase: null)
05:48:46 pos 224 reasoning (reasoning for the steer)
05:48:47 pos 225–229 file_change + command_execution (work for the steer)
05:49:24 pos 230 assistant_message (short ~240-char reply to the steer, phase: null)
Diagnosis (verified on main @ 8cda315079)#
#41320 (which described this exact Antigravity case) was closed as fixed by #47146 (c89933c0f5), but #47146 only covers steers that arrive after assistant:0 has already been created:
- Client fold selector (
packages/client-runtime/src/turnFoldReplies.ts):- The steer rule in
selectRetainedTurnFoldAssistantIdswalks backward from eachsteerviareplyBefore(entries, index, ...). When the steer (pos 222) arrives during reasoning/work, walking backward seesreasoning(pos 221) andwork(pos 220) and returnsnull, never seeingassistant:0atpos 223. - The trailing sign-off rule walks backward from
assistant:1(pos 230), immediately hits non-housekeeping work (file_change/command_executionatpos 225–229), and returnsnull.
- The steer rule in
- ACP adapter (
packages/provider-acp/src/server/adapter.ts):AntigravityAdapterV2usessteersWithPrompt, sosteerWithPrompt(lines 11552–11680) sends a secondsession/promptwhile the first turn is still active; Antigravity completesassistant:0before processing the steer, all in one run.markClosingAssistantSegments(lines 4135–4153) only runs when the run completes (line 10225), andcloseTextStreamsForNewTool(line 4172) clearscontext.closingAssistantSegments.length = 0as soon as the steer runs its first tool call. As a result,assistant:0never receivesphase: "final_answer".
- Steer ordering:
- The steer
user_messageis assigned its timeline position (pos 222) when submitted, even though Antigravity does not consume it until afterassistant:0(pos 223) finishes. Moving or anchoring the steer after the pre-steer answer (similar in spirit to #36855 for missed steers) would both fix the visual order and allow the existing backward-looking steer rule inturnFoldReplies.tsto findassistant:0.
- The steer
Related#
- #41320 (closed as fixed by #47146, though #47146's backward-looking steer rule does not cover the mid-reasoning/mid-work Antigravity repro in #41320)
- #43150 (open PR proposing
phase: "final_answer"inpackages/provider-acp/src/server/adapter.tsfor this steer path) - #42838, #40108, #45585
Impact#
Major degradation or frequent failure
Version or commit#
Verified on main @ 8cda315079 (after #47146 / c89933c0f5)
Environment#
Linux x64, T3 Code web, Antigravity ACP (gemini-4-neon)
Workaround#
Expand the Continued for ... > fold below the Steer bubble to read the first reply, or wait for the current turn to complete before sending a follow-up instead of steering.
tanstack-source added labelsbug
electrum(GitHub profile, opens in a new tab) linked this to #48657
electrum(GitHub profile, opens in a new tab) linked this to #49064
juliusmarminge closed this
Sign in to join this conversation.
Additional context from comparing against Codex steering in T3:
With Codex, a mid-turn steer is absorbed into the active turn before the final reply, so Codex emits one combined
final_answerat the end covering both requests (and tags earlier progress notes ascommentary). T3's single-run folding matches that model.With Antigravity (
steersWithPrompt), a steer sent during reasoning or generation is not absorbed into the in-flight response — Antigravity finishes its full answer to prompt 1 (assistant:0), then handles the steer in a separate response (assistant:1) that assumes the user already readassistant:0and does not repeat it. Because T3 still keeps both inside one run with the steer bubble positioned ahead ofassistant:0, Antigravity behaves like a queued follow-up on the model side while T3 renders and folds it like a single-reply steer.If T3 either splits a queued mid-reply Antigravity steer into its own run boundary or anchors the steer bubble after the completed pre-steer reply (
assistant:0), both the timeline ordering and#47146's backward-looking steer fold rule would work naturally.