DEV Community

Kosnamos
Kosnamos

Posted on

Antigravity terminal freezing on Windows? Here's the fix (and why it keeps coming back)

I lost a couple of hours to this before figuring it out.

If you're on Windows and your Antigravity terminal keeps sitting on "Running..." after approving a command — even though the output is right there — here's what's actually happening and how to fix it.

The actual problem

It's an EOF issue. When the agent runs a command on Windows, the shell process doesn't close cleanly. Antigravity is waiting for a termination signal that never comes, so it just waits forever.

Restarting the IDE helps temporarily but the problem always comes back because the root cause is still there.

The fix

Add this to your Global Rules — go to Settings → Global Rules, or open .antigravityrules at the root of your project:

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.
Enter fullscreen mode Exit fullscreen mode

cmd /c tells Windows to run the command and immediately exit the shell. That exit event is what Antigravity needs to unlock the UI and mark the task as done.

cmd /k is an alternative if you want the terminal window to stay open to read output — but the process will stay alive in the background. Fine for debugging, not ideal for everyday use.

The part that kept tripping me up

Here's something most posts skip.

Even after setting the Global Rule, the agent will occasionally forget it mid-session and start hanging again. This tends to happen after long conversations when earlier context gets pushed out.

When it happens, just type this in the chat:

Follow global rules: use cmd /c
Enter fullscreen mode Exit fullscreen mode

That's it. One nudge and it's back on track for the rest of the session. No restart needed.

Quick sanity check

After adding the rule, ask the agent to run pip list. It should automatically execute cmd /c pip list without you having to specify it. If the "Running..." spinner disappears and you can type again right away, it's working.

Tested with pip, npm, and file operations on Windows 10 and 11. If you're seeing a variation of this on PowerShell, drop a comment — curious whether the same rule holds there.

Top comments (0)