Hi everyone,
If you are using Google Antigravity on Windows, you might have noticed the terminal often gets stuck in a permanent “Running…” state after you click “Approve,” even though the command has clearly finished. This happens because the agent fails to send or detect the EOF (End of File) signal, keeping the session “open” in the IDE’s eyes.
I found a solid workaround, but there’s a catch: the AI occasionally “forgets” Global Rules as the conversation gets longer. Here is the complete fix and how to handle it:
1. The Core Fix (Add to Global Rules)
Go to your Settings or your .antigravityrules / .cursorrules file and add this instruction:
ENV: Windows.
Always use ‘cmd /c’ for all shell executions to ensure the process terminates correctly and sends an EOF signal. Example: Use ‘cmd /c pip list’ instead of just ‘pip list’.
Avoid interactive shells. If a persistent session is needed, use ‘cmd /k’ but ensure the command is self-terminating.
2. Handling “AI Memory Drift” (When it forgets)
If the agent starts ignoring the rule mid-conversation and the terminal hangs again, don’t panic. You can “snap” it back with these steps:
-
The “Nudge” Prompt: Simply type “Follow global rules: use cmd /c” or even just “Remember cmd /c” in the chat.
-
Context Reset: If it’s really stuck, you can tell it: “Rerun that using cmd /c so it terminates properly.”
-
Manual Kill: If the background process is still lingering, you can ignore it or manually close the terminal tab—your chat history will remain interactive as long as the agent knows the command is “done.”
Why this works:
cmd /c forces the Windows Command Processor to execute the command and then terminate immediately. This termination is the signal Antigravity needs to unlock the chat UI. Without it, the agent stays in a “listening” loop, waiting for more output that will never come.
Hope this saves you guys some frustration! Let me know if you find any other tweaks for the Windows environment.
I found a reliable workaround by forcing the agent to use a non-interactive shell execution. If you are facing this, add the following to your Global Rules or System Instructions:
ENV: Windows.
Always use ‘cmd /c’ for all shell executions to ensure the process terminates correctly and sends an EOF signal.
Example: Use ‘cmd /c pip list’ instead of just ‘pip list’.
Avoid interactive shells. If a persistent session is needed, use ‘cmd /k’ but ensure the command is self-terminating.
Why this works:
By default, the agent might be trying to run commands in a way that keeps the pipe open. Using cmd /c ensures the process terminates immediately after completion, sending the proper signal back to the IDE to unlock the chat and mark the task as finished.
Note: If you use cmd /k to keep the terminal process visible, the background process might still stay “stuck”—you can just ignore it and close it manually, but your chat history will no longer freeze.
Hope this helps anyone struggling with the Windows terminal integration!
