Bug Report: Windows Job Object limits terminate spawned GUI processes on CLI exit
Context
- App: Antigravity CLI (
agy.exe)
- OS: Windows 10/11
- Command Executor: One-shot terminal runner executing
powershell -Command "<command>" or cmd /c "<command>".
Description
When running commands that spawn GUI applications (such as chrome.exe, msedge.exe, or other browsers/GUI programs) through the Antigravity agent, the spawned GUI applications start but are immediately terminated the moment the agent's command execution finishes and the temporary shell process exits.
Root Cause Analysis
- The Antigravity CLI runs commands inside a Windows Job Object (verified via
IsProcessInJob Win32 API).
- The Job Object is configured with process limit flags that terminate all child processes when the parent job handles are closed (
JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE behavior).
- Unlike agents using persistent shells (e.g. OpenCode, Claude CLI), Antigravity runs commands in one-shot, temporary PowerShell/CMD processes.
- When the temporary shell exits, the job handle closes, causing Windows to immediately terminate all child processes (like the browser processes) spawned during that command execution.
- This also causes Chrome/Edge sandboxing to fail, as they require nesting Job Objects which is blocked by the outer Job Object unless breakaway is permitted.
Workaround (Implemented locally)
Using Windows Management Instrumentation (WMI) to bypass the Job Object by launching processes under wmiprvse.exe (outside the terminal's job tree):
powershell -Command "([wmiclass]'win32_process').Create('C:\Program Files\Google\Chrome\Application\chrome.exe')"
Requested Fix
The command runner in the Antigravity CLI (agy.exe) should allow child processes to break away from the job object when running GUI/detached commands, or configure the Job Object with the JOB_OBJECT_LIMIT_BREAKAWAY_OK / JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK limit flags.
Bug Report: Windows Job Object limits terminate spawned GUI processes on CLI exit
Context
agy.exe)powershell -Command "<command>"orcmd /c "<command>".Description
When running commands that spawn GUI applications (such as
chrome.exe,msedge.exe, or other browsers/GUI programs) through the Antigravity agent, the spawned GUI applications start but are immediately terminated the moment the agent's command execution finishes and the temporary shell process exits.Root Cause Analysis
IsProcessInJobWin32 API).JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSEbehavior).Workaround (Implemented locally)
Using Windows Management Instrumentation (WMI) to bypass the Job Object by launching processes under
wmiprvse.exe(outside the terminal's job tree):Requested Fix
The command runner in the Antigravity CLI (
agy.exe) should allow child processes to break away from the job object when running GUI/detached commands, or configure the Job Object with theJOB_OBJECT_LIMIT_BREAKAWAY_OK/JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OKlimit flags.