Skip to content

[Bug]: Antigravity ACP collapses earlier assistant replies into "Worked for ..." when background tasks wake the same run #40108

Open

Description

@moredatarequired

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 (packages/provider-acp)

Steps to reproduce

  1. Start a thread using the Antigravity provider (ACP, e.g. gemini-4-neon).
  2. In a single run, have the agent launch a long-running background shell command (so it continues running asynchronously), write a substantive user-facing reply/update, and end its turn waiting for the reactive wakeup.
  3. Let the background task finish and wake the agent inside the same T3 Code run, causing the agent to emit a follow-up reply (or multiple wakeups producing assistant:0, assistant:1, ..., assistant:N under the same runId).
  4. Inspect the thread timeline in T3 Code once the run finishes.

Expected behavior

Earlier completed assistant replies produced before background-task wakeups should remain visible in the thread timeline (not silently hidden behind the collapsed Worked for ... group), matching how phase: "final_answer" is preserved for OpenCode (packages/provider-opencode/src/server/v2/adapter.ts:1276-1283) and proposed for Claude in #38562.

Actual behavior

Every earlier assistant_message in the run (assistant:0, assistant:1, ...) is collapsed into Worked for <duration> >, leaving only the final assistant_message (assistant:N) visible in the timeline.

If the final wakeup reply is a brief wrap-up referencing an earlier reply from the same run, the user never sees the substantive earlier update unless they manually expand Worked for ....

Root cause

  • Web (apps/web/src/components/chat/MessagesTimeline.logic.ts:796-804) and mobile (apps/mobile/src/lib/threadActivity.ts) keep an earlier assistant_message visible across continuations only when item.phase === "final_answer":
    if (
      entry.kind === "message" &&
      entry.projectedItem?.item.type === "assistant_message" &&
      entry.projectedItem.item.phase === "final_answer"
    )
      replyEntryIds.add(entry.id);
  • packages/provider-acp/src/server/adapter.ts (lines 3222-3244) emits assistant_message turn_item.updated items without ever setting phase: "final_answer" anywhere in the adapter.
  • By contrast:
    • packages/provider-opencode/src/server/v2/adapter.ts:1276-1283 explicitly promotes the closing assistant text to phase: "final_answer" before a background-work report continues the turn (// A report can land right after the answer; the reply to it must not fold the answer away.).
    • fix(claude): preserve final-answer phases across continuations #38562 adds the equivalent phase: "final_answer" tagging for ClaudeAdapterV2.ts.

Impact

Major degradation or frequent failure (any Antigravity run with background-task wakeups hides earlier replies inside Worked for ...).

Version or commit

0.1.12-nightly.20261121.5024

Environment

  • OS: macOS 26.6.2 (darwin/arm64)
  • Provider / Model: Antigravity (antigravity-acp, gemini-4-neon)

Workaround

Instruct the agent to repeat its full, self-contained summary in the final wakeup reply instead of referring to anything written prior to the background task completing.

Related

Activity

  1. rowbradley commented on Nov 21, 2026

    @rowbradley

    Seeing this on 0.1.12-nightly.20261121.5038 with Antigravity 1.5.14 (gemini-4-neon, desktop + iOS mobile): mid-run replies to steers disappear once later background-task wakes emit another message in the same run. Looking forward to #40559.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions