Skip to content

fix(antigravity): background task completion notification clobbers assistant turn response #635

Description

@rynfar

Summary

When an asynchronous background task (e.g. run_command launched in the background) completes, the Antigravity ACP harness delivers a reactive wake-up <SYSTEM_MESSAGE> containing the task completion status.

Symptoms & Observed Behavior

  1. The assistant finishes researching and prepares/emits the substantive response answering the user's prompt.
  2. In the background, the task finishes, causing the system to inject a <SYSTEM_MESSAGE> [Message] ... task-X finished with result: ....
  3. This wake-up triggers an automatic follow-up turn in the session.
  4. When the model emits an acknowledgment for the wake-up (e.g., "Everything is clear..."), this subsequent message binds to the thread/turn or clobbers the primary answer in the UI.
  5. In the UI transcript, the user never sees the substantive answer to their prompt—only the subsequent acknowledgment of the background task completion, leading the user to believe the agent completely ignored their question.

Steps to Reproduce

  1. In an Antigravity thread, ask a question where the assistant runs a command that gets pushed to a background task (e.g. via run_command or long-running command).
  2. Assistant completes its local work and outputs the answer to the user.
  3. Background task finishes shortly thereafter, triggering a reactive <SYSTEM_MESSAGE> wake-up turn.
  4. Observe the message stream in the client: the original response is obscured or replaced by the follow-up wake-up turn message.

Expected Behavior

  • Background task completions should either update task/tool status silently without clobbering prior assistant messages, or ensure assistant turn messages remain distinct and fully preserved in the conversation view.
  • A background task finishing should not overwrite or suppress the user-facing text generated in the turn answering the user's question.

Activity

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions