Browser subagent broken as playwrite missing $HOME directory designation on cloud server

Every since the last update to Antigravity, every time my agent tries to use the browser subagent, the subagent fails. i asked my agent to write up a detailed report: Bug Report: browser_subagent Initialization Failure (Windows) Issue Overview The browser_subagent tool consistently fails to initialize in the Windows Antigravity environment. The failure occurs at the Playwright context creation stage, preventing any browser-based activities (navigation, screenshots, or interaction). Error Details Error Code: CORTEX_STEP_TYPE_OPEN_BROWSER_URL failure. Root Cause Message: failed to create browser context: failed to install playwright: $HOME environment variable is not set Context: This occurs when calling the open_browser_url tool through the subagent. Environment Observations OS: Windows Shell: PowerShell (pwsh) Constraint: The subagent appears to rely on a Unix-style $HOME environment variable to locate or install Playwright binaries. On Windows, this variable is typically not set by default (using $USERPROFILE or ~ instead), which causes the Playwright installer to crash. Steps to Reproduce Invoke the browser_subagent tool with any URL Observe the initialization failure during the open_browser_url step. Check the logs for the specific $HOME environment variable is not set error string. Impact Total loss of visual verification capabilities for the agent. Blocks all GUI testing, DOM scraping, and screenshot-based debugging. Prevents the agent from performing full-cycle verification of web applications.

2 Likes

Found this on Reddit, it’s a fix for this issue:

To fix this, we need to manually tell Windows to create a shortcut named ā€œHOME.ā€

  • Open PowerShell: Click your Start menu, type PowerShell, and click on the app. (You don’t need to run it as Administrator, but you can if you want).

  • Run the Fix Command: Copy the code block below, paste it into the PowerShell window, and press Enter. (This command tells Windows: ā€œFrom now on, whenever a program asks for ā€˜HOME’, send them to my user folder.ā€

    • [System.Environment]::SetEnvironmentVariable('HOME', "$env:USERPROFILE", 'User')
  • Restart Antigravity: This change will not work until you completely close and reopen the IDE. This allows it to ā€œseeā€ the new shortcut you just created.

7 Likes

Muito obrigado, funcionou !

1 Like

Gracias, era lo que necesitaba

1 Like

Thank you for sharing this solution and for your detailed report on the root cause!
It is very helpful to have the specific fix confirmed—manually setting the HOME environment variable to point to the user profile is a great workaround for the Playwright initialization failure on Windows.
We appreciate you taking the time to update the community with these steps!

1 Like