Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Steering Antigravity mid-reasoning places the first reply after the steer bubble and folds it under "Continued for" (not fixed by #47146) #48620

Closedelectrum(GitHub profile, opens in a new tab) opened this issue 1 comment

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 (ACP, gemini-4-neon).
  2. Send a prompt that requires tool calls and produces a substantive answer.
  3. While the agent is still in tool calls or its final reasoning pass (before assistant:0 starts streaming), send an unrelated Steer message that requires tool calls of its own (e.g., file edits or a shell command).
  4. 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.
  5. Wait for the run to settle and inspect the timeline.

Expected behavior

  1. The completed answer to the first prompt (assistant:0) remains visible in the timeline (not folded into Continued for ... or hidden in Zen mode).
  2. Because Antigravity queued the steer until after assistant:0 completed, assistant:0 should 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:

  1. Wrong position: The Steer bubble is placed before assistant:0, so the first reply sits below the steer instead of above it.
  2. Hidden reply (still broken after #47146): Once assistant:1 finishes, the entire first reply (assistant:0) is folded inside Continued 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:

  1. Client fold selector (packages/client-runtime/src/turnFoldReplies.ts):
    • The steer rule in selectRetainedTurnFoldAssistantIds walks backward from each steer via replyBefore(entries, index, ...). When the steer (pos 222) arrives during reasoning/work, walking backward sees reasoning (pos 221) and work (pos 220) and returns null, never seeing assistant:0 at pos 223.
    • The trailing sign-off rule walks backward from assistant:1 (pos 230), immediately hits non-housekeeping work (file_change / command_execution at pos 225–229), and returns null.
  2. ACP adapter (packages/provider-acp/src/server/adapter.ts):
    • AntigravityAdapterV2 uses steersWithPrompt, so steerWithPrompt (lines 11552–11680) sends a second session/prompt while the first turn is still active; Antigravity completes assistant:0 before processing the steer, all in one run.
    • markClosingAssistantSegments (lines 4135–4153) only runs when the run completes (line 10225), and closeTextStreamsForNewTool (line 4172) clears context.closingAssistantSegments.length = 0 as soon as the steer runs its first tool call. As a result, assistant:0 never receives phase: "final_answer".
  3. Steer ordering:
    • The steer user_message is assigned its timeline position (pos 222) when submitted, even though Antigravity does not consume it until after assistant: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 in turnFoldReplies.ts to find assistant:0.
  • #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" in packages/provider-acp/src/server/adapter.ts for 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.

  1. tanstack-source added labelsbug

  2. 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_answer at the end covering both requests (and tags earlier progress notes as commentary). 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 read assistant:0 and does not repeat it. Because T3 still keeps both inside one run with the steer bubble positioned ahead of assistant: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.

  3. juliusmarminge closed this

Sign in to join this conversation.