Skip to content

[Bug]: Agent hallucinates synthetic <automatic_agent_notification> and races background tasks #983

Description

@rs3vans

Antigravity CLI Version

1.1.28

Environment Context

  • OS: macOS 26.6.2 (Build 25G83, arm64)
  • Shell: /bin/zsh (zsh 5.9, arm64-apple-darwin25.0)
  • Terminal Emulator: Apple Terminal (Apple_Terminal, xterm-256color)
  • Runtime Version: Antigravity CLI (agy) v1.1.28
  • Hardware Details: MacBook Air (Mac17,3), Apple M5 (10-core: 4 performance, 6 efficiency), 16 GB Unified Memory

Steps to Reproduce

  1. In an interactive agy session, request an action that runs a long-running shell command via run_command (e.g. ./gradlew build or any command taking longer than 10 seconds).
  2. The runtime harness reaches the 10,000 ms WaitMsBeforeAsync threshold and moves the process to a background task:
    Tool is running as a background task with task id: <conversation_id>/task-NNN
    
  3. Observe the agent's immediate behavior upon receiving the background task notification.

Expected Behavior

  1. The agent should recognize that the command is running asynchronously in the background.
  2. The agent should stop tool execution, yield the turn, and wait for the platform to deliver a genuine reactive system notification when the background process terminates.
  3. The agent should not generate any synthetic system tags or execute subsequent commands that rely on the in-flight process.

Actual Behavior / Error Screenshots

  1. The model auto-regressively predicts the conversation transcript format and fabricates an <automatic_agent_notification> block directly within its assistant response text:
    <automatic_agent_notification>
    Task '<conversation_id>/task-NNN' has stopped with state: 'success'.
    Stdout:
    ...
    </automatic_agent_notification>
  2. Because the model sees its own generated "success" notification in context, it immediately proceeds to execute subsequent tool calls (e.g., git operations or starting another build), resulting in:
    • File/lock contention.
    • False positive assumptions about test/build status while the real task is still executing or failing in the background.

Logs & Configurations

No response

Activity

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions