Skip to content

The agent that grows with you

Merge origin/main: browser env socket-safe TMPDIR composed with the Bot Desktop display

teknium1a5ea71c4096e
diff --cc tools/browser_tool.py
index 9740722cca1,f8b2ea2bbb1..b1b42f1b105
--- a/tools/browser_tool.py
+++ b/tools/browser_tool.py
@@@ -57,11 -57,11 +57,15 @@@ def _build_browser_env() -> dict
env[key] = value
# The Browser Use harness dials the resolved local CDP URL over ``websockets``; without a
# loopback NO_PROXY a macOS system proxy captures that dial (#110565).
- env = add_loopback_no_proxy(env)
+ # Headed Chromium opens on this profile's Bot Desktop when one is running (human can take it over). Pure: this
+ # builder also serves the npx cache warmer, the Chromium auto-installer and the Lightpanda engine, none of which
+ # may bring a screen up — the auto-start hook lives at the headed Chromium spawn sites (browser_tool_session).
+ from tools.bot_desktop.runtime import desktop_env as _bot_desktop_env
- return add_loopback_no_proxy(_bot_desktop_env(env))
++ env = add_loopback_no_proxy(_bot_desktop_env(env))
+ # Chrome puts its SingletonSocket under $TMPDIR; a deep scratch dir overflows the AF_UNIX
+ # path cap and Chrome dies at startup ("Socket path too long"), so browsers get the short root.
+ env["TMPDIR"] = _socket_safe_tmpdir()
+ return env
try: