Antigravity CLI Version
1.1.27
Environment Context
- OS: Windows 11 Enterprise 64-bit (Version 10.0.22000, Build 22000.3260)
- Shell: PowerShell 7.6.5 / Windows PowerShell 5.1 (
pwsh)
- Terminal Emulator: Windows Terminal / ConHost
- Runtime Version: agy prebuilt binary 1.1.27
- Hardware Details: Intel(R) Core(TM) i5-9400 CPU @ 2.90GHz, 8 GB RAM
Describe the Bug
There are two major, interconnected failure modes with background terminal tasks (run_command async tasks) and subagents (invoke_subagent):
1. Silent Completion (Never notifies the user without manual polling)
- This occurs not just on multi-hour tasks, but even on routine, short background tasks (e.g., downloads, builds, subagent queries).
- When a background command is launched, the agent tells the user it is waiting and ends its turn.
- When the task completes in the background, the CLI never proactively notifies the user or resumes the conversation.
- The session sits completely silent and idle indefinitely.
- The user is forced to manually intervene and prompt the agent (e.g. typing "check progress", "status", or "is it done?"). Only after the user's manual message does the agent query the task status and report that the task finished.
2. Ghost/Zombie Background Processes & UI Desync
- In other instances, even after a task has completed and the agent reports it as finished, the background task indicator / process tracker in the UI continues to display the task as actively "running".
- The underlying subprocess or subagent worker is never cleanly reaped, closed, or deregistered, leaving orphaned background processes active on the system and cluttering the active task list.
Steps to Reproduce
- Launch an interactive session:
agy
- Run any command or subagent that executes asynchronously in the background (e.g., package installation, build step, or parallel subagents).
- Wait for the background process to finish.
- Observe:
- The CLI remains completely silent. It does not display the completion output or notify the user that work has concluded.
- Type
"check progress". Only then does the agent inspect the task log and inform the user of the result.
- Check the background task manager / UI indicator: often the task is still listed as
RUNNING or the process handle was never cleanly closed.
Expected Behavior
- Proactive Reactive Wakeup: Once a background terminal command or subagent exits/finishes, the task supervisor should immediately trigger the reactive wakeup, causing the agent to wake up and proactively post an update to the user (e.g., "Task completed with exit code 0...") without requiring the user to manually poll.
- Clean Process Reaping: When a task completes, its OS process handles must be closed, resources freed, and its status in the task tracker transitioned to
DONE / purged from active background processes.
Root Cause Analysis
- Broken Event Dispatch between Task Supervisor and Agent Loop:
The supervisor detects process termination and writes output to the task log, but the reactive wakeup event either fails to break the waiting turn or is treated purely as an internal state update without prompting the model to generate a user-facing completion message.
- Missing Process Handle Cleanup (Windows):
On Windows, child processes spawned via PTY/command runners that don't explicitly close stdin/stdout/stderr pipes or child job objects remain in a zombie state, preventing the UI process counter from clearing.
- Turn-Based Deadlock:
The agent architecture expects "Reactive Wakeup (No Polling Needed)", but in practice, the user is forced into manual polling loops because the completion event fails to synthesize a user-visible response turn.
Antigravity CLI Version
1.1.27
Environment Context
pwsh)Describe the Bug
There are two major, interconnected failure modes with background terminal tasks (
run_commandasync tasks) and subagents (invoke_subagent):1. Silent Completion (Never notifies the user without manual polling)
2. Ghost/Zombie Background Processes & UI Desync
Steps to Reproduce
agy"check progress". Only then does the agent inspect the task log and inform the user of the result.RUNNINGor the process handle was never cleanly closed.Expected Behavior
DONE/ purged from active background processes.Root Cause Analysis
The supervisor detects process termination and writes output to the task log, but the reactive wakeup event either fails to break the waiting turn or is treated purely as an internal state update without prompting the model to generate a user-facing completion message.
On Windows, child processes spawned via PTY/command runners that don't explicitly close stdin/stdout/stderr pipes or child job objects remain in a zombie state, preventing the UI process counter from clearing.
The agent architecture expects "Reactive Wakeup (No Polling Needed)", but in practice, the user is forced into manual polling loops because the completion event fails to synthesize a user-visible response turn.