When running the Antigravity CLI (agy) in headless/non-interactive (non-TTY) environments (such as spawning it from a subprocess, redirecting its output via pipes/files, or running it in background automation tasks), the print mode command agy -p "prompt" hangs indefinitely. It produces no output on stdout or stderr and must be orcefully terminated.
This issue persists in version 1.0.6, despite the release notes mentioning:
"Fixed --sandbox flag propagation in headless print mode (-p / --print), ensuring sandbox isolation is
correctly enforced during non-interactive execution."
In contrast, the legacy gemini -p command executes successfully and returns output instantly in the same non-
TTY contexts.
Steps to Reproduce
1. Output Redirection (Windows PowerShell / CMD):
Run the following command to execute a prompt and redirect stdout/stderr:
agy -p "Hello World" > output.txt 2>&1
• Actual Result: The command hangs indefinitely. output.txt remains at 0 bytes (empty), and the process must be
killed.
• Tested with Sandbox flag: Running agy -p "Hello World" --sandbox > output.txt 2>&1 exhibits the exact same
hanging behavior.
2. Comparison with gemini CLI:
Running the equivalent command with the gemini binary works perfectly:
gemini -p "Hello World" > output.txt 2>&1
• Result: Exits cleanly in seconds and writes the model response to output.txt .
──────
### Expected Behavior
The agy -p <prompt> command should detect it is running in a non-TTY environment, execute the prompt non- interactively, write the response directly to stdout , and exit cleanly (similar to gemini -p or other developer CLIs like copilot and claude-code ).
──────
### Environment / Context
• OS: Windows 11 / Windows 10
• Antigravity CLI Version: 1.0.6
• Gemini CLI Version: 0.45.0
• Shells tested: PowerShell, CMD, Node.js child_process.spawn (without ConPTY allocation)
When running the Antigravity CLI (
agy) in headless/non-interactive (non-TTY) environments (such as spawning it from a subprocess, redirecting its output via pipes/files, or running it in background automation tasks), the print mode commandagy -p "prompt"hangs indefinitely. It produces no output onstdoutorstderrand must be orcefully terminated.This issue persists in version 1.0.6, despite the release notes mentioning:
In contrast, the legacy
gemini -pcommand executes successfully and returns output instantly in the same non-TTY contexts.
Steps to Reproduce
1. Output Redirection (Windows PowerShell / CMD):
Run the following command to execute a prompt and redirect stdout/stderr: