The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
refactor(cua): WSL detection through hermes_platform.host.runtime.is_wsl
alt-glitch724783a67596
diff --git a/tools/computer_use/cua_backend.py b/tools/computer_use/cua_backend.pyindex ff64fd8ea67..b0033f689e9 100644--- a/tools/computer_use/cua_backend.py+++ b/tools/computer_use/cua_backend.py@@ -19,6 +19,7 @@ import uuidfrom typing import Any, Dict, List, Optionalfrom hermes_cli._subprocess_compat import windows_hide_flags+from hermes_platform.host.runtime import is_wslfrom tools.computer_use.backend import ActionResult, ComputerUseBackendfrom tools.computer_use.cua_backend_capture import _CaptureMixinfrom tools.computer_use.cua_backend_daemon import _EmbeddedCuaDaemon@@ -53,9 +54,7 @@ def _cua_no_overlay() -> bool:val = _computer_use_cfg().get("no_overlay")if val is not None or sys.platform != "linux":return bool(val) if val is not None else sys.platform == "darwin"- wsl = False- with contextlib.suppress(Exception), open("/proc/version", encoding="utf-8") as f:- wsl = "microsoft" in f.read().lower()+ wsl = is_wsl()return wsl or not os.environ.get("DISPLAY") or (# Linux/X11: the cursor overlay is a fullscreen, always-on-top, all-workspaces X11 window# (save-unders path). An unclean session end (agent interrupted mid-capture, stale target window)