Workaround for Antigravity terminal hang bug where commands complete but remain listed as "running".
There is a known Antigravity platform bug: run_command finishes successfully, but Antigravity does not register the completion. As a result:
command_statusreports the command as "running" indefinitely.- The command stays in the background process list as a zombie.
- Accumulated zombie processes may prevent new commands from starting.
This is not an issue with the user's environment; it is a platform‑side state synchronization problem.
We provide a simple script that automatically detects when Antigravity is stuck (window title contains Running command for more than 30 seconds) and runs fix.bat to kill stray processes (python.exe, powershell.exe, conhost.exe).
- watchdog.ps1 – a PowerShell script that checks the Antigravity window title every 5 seconds. If the title remains Running command for over 30 seconds, the script automatically executes
fix.bat. - fix.bat – a Windows batch file that force‑kills interpreter processes that may be left hanging.
# Navigate to the repository root
cd <path_to_repository>
# Start the watchdog (you can keep this window open)
powershell -ExecutionPolicy Bypass -File .\watchdog.ps1The watchdog runs in the background and will automatically clean up hangs.
If command_status is stuck, you can bypass it by reading the terminal buffer directly.
- Ask the user for the terminal PID (e.g.,
echo $$inside the terminal). - Run:
This returns the full scroll‑back buffer, including the completed command output.
read_terminal(Name="terminal-<PID>", ProcessID="<PID>") - Parse the output and continue without waiting for
command_status.
After closing stuck background tasks (the ✕ button in the UI), subsequent commands work normally. Restart the watchdog if needed.
MIT © 2026 Antigravity‑Terminal‑Fix contributors
Обходной путь для проблемы зависания терминала Antigravity, когда команды завершаются, но остаются в списке «running».
Существует известный баг платформы Antigravity: run_command успешно завершается, однако Antigravity не фиксирует завершение. В результате:
command_statusбесконечно сообщает, что команда «running».- Команда остаётся в списке фоновых процессов как зомби.
- При накоплении зомби‑процессов новые команды могут не запускаться.
Это не ошибка пользовательского окружения, а проблема синхронизации состояния на стороне платформы.
Мы предоставляем простой скрипт, который автоматически обнаруживает, что Antigravity «застрял» (заголовок окна содержит Running command более 30 сек) и запускает fix.bat, убивая зависшие процессы (python.exe, powershell.exe, conhost.exe).
- watchdog.ps1 – PowerShell‑скрипт, проверяющий заголовок окна Antigravity каждые 5 сек. Если заголовок остаётся Running command более 30 сек, скрипт автоматически вызывает
fix.bat. - fix.bat – Windows‑батник, принудительно завершающий процессы‑интерпретаторы, оставшиеся висящими после сбоя.
# Перейдите в корень репозитория
cd <путь_к_репозиторию>
# Запустите наблюдатель (можно оставить открытым в отдельном окне)
powershell -ExecutionPolicy Bypass -File .\watchdog.ps1Скрипт будет работать в фоне и автоматически исправлять зависания.
Если command_status застревает, можно обойти его, читая буфер терминала напрямую.
- Попросите пользователя указать PID терминала (например,
echo $$внутри терминала). - Выполните:
Это вернёт полный скролл‑бэк терминала, включая вывод завершившейся команды.
read_terminal(Name="terminal-<PID>", ProcessID="<PID>") - Обработайте полученный вывод и продолжайте работу, не ожидая
command_status.
После закрытия зависших фоновых задач (кнопка ✕ в UI) последующие команды работают нормально. При необходимости просто запустите watchdog.ps1 снова.
MIT © 2026 Antigravity‑Terminal‑Fix contributors