[FIX] Antigravity Terminal Hanging on Windows: How to Stop the "Running" State Loop

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!


Or you may change the default terminal profile in Settings to Git Bash until it’s fixed.

Thank you. You are saving my life!

It’s works. Thanks :slight_smile:

This is useless with current model because it refuses to follow instructions. The current state of Gemini and antigravity is abysmal. Absolutely unacceptable

Thank you @Dialius for sharing the work around with the community.

Our engineering team is currently investigating the matter, and we appreciate your patience as we work toward a resolution.

I have it set to Git Bash for long time, but I am consistently running into this issue. From time to time, it just shows the command but doesn’t execute it or maybe execute it but it doesn’t know it is done. I can’t see the terminal window anywhere in the chat either so that I can see the status of the command or even if it attempted to executed. I have seen that Antigravity has wierd handling of the terminal commands. It shows the command at the end of the discussion, but it picks up the shell a few lines earlier where it actually executes the command. And the command at the end just vanishes. This is the successful execution flow. When it fails, the command at the end just sits there and it doesn’t progress anymore. This has been an issue from day1. It had reduced in occurance, but with the latest update, it is happening very frequently again.

Also it seems there is no way to force it to use the Terminal window for the terminal commands unlike some other coding agents. Maybe that would fix the issue.

But Antigravity team really needs to fix this issue. It has been lingering around from day 1. I suspected that it might be Windows only.

Gemini 3.1 pro works fine with powershell commands on Windows, but Gemini 3 flash keeps asking for permission even when ‘Always Proceed’ is enabled, quite disturbing…