From b854ce2685ce2107d6bd430560e9e5f7b32ecce7 Mon Sep 17 00:00:00 2001 From: abonneth Date: Fri, 2 Oct 2026 19:21:56 +0200 Subject: [PATCH] fix(local): no agent-cursor overlay on the local workstation Co-authored-by: Cursor --- src/hai_agents_local/workstation.py | 1 + tests/test_local.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/hai_agents_local/workstation.py b/src/hai_agents_local/workstation.py index aca6579..2b17e6b 100644 --- a/src/hai_agents_local/workstation.py +++ b/src/hai_agents_local/workstation.py @@ -58,6 +58,7 @@ def create_driver(self) -> ManagedCodeSandboxInterface: str(self.workspace), environment_variables={ "COORDINATE_SYSTEM": "0-1000", + "CUA_CURSOR": os.environ.get("CUA_CURSOR", "off"), "CUA_SESSION": self.session_id, "PATH": os.pathsep.join([os.path.dirname(desk), path]), }, diff --git a/tests/test_local.py b/tests/test_local.py index 6d02de4..9796c68 100644 --- a/tests/test_local.py +++ b/tests/test_local.py @@ -685,16 +685,18 @@ def test_args_decode_by_the_interface_types(self): def test_workstation_serves_a_shell_in_its_session_folder_with_the_cli_commands(self, tmp_path, monkeypatch): pytest.importorskip("hai_drivers.code_sandbox.local.driver") monkeypatch.setenv("HOME", str(tmp_path)) + monkeypatch.delenv("CUA_CURSOR", raising=False) bridge = WorkstationBridge(api_key="k") bridge._driver = bridge.create_driver() try: result, error = bridge._dispatch( - "execute", {"command": "pwd -P; echo $COORDINATE_SYSTEM $CUA_SESSION; command -v desk web cua click"} + "execute", + {"command": "pwd -P; echo $COORDINATE_SYSTEM $CUA_SESSION $CUA_CURSOR; command -v desk web cua click"}, ) assert error is None and result["exit_code"] == 0 out = result["stdout"].split() assert out[0] == str((tmp_path / "hai" / bridge.session_id).resolve()) - assert out[1:3] == ["0-1000", bridge.session_id] and len(out) == 7 + assert out[1:4] == ["0-1000", bridge.session_id, "off"] and len(out) == 8 finally: bridge._driver.close()