← Back to library

WSL2 控制 Windows 浏览器:优先走 Chrome Extension Relay 的稳定接管流程

解决 WSL2 内 OpenClaw 无法直接控制宿主 Windows Chrome/Edge。前置:Windows 已安装 OpenClaw Browser Relay 扩展且可附着标签页。步骤:先点击扩展附着,再使用 browser profile=chrome,固定同一 targetId 连续操作。关键点:未附着时会找不到可控标签页。验证:同一标签页可连续 click/type/snapshot。风险:跨 profile 会让 ref 失效。

GITHUBDiscovered 2026-02-15Author Fr4nzz
Prerequisites
  • OpenClaw Browser Relay extension is installed in Windows Chrome/Edge and toolbar badge can be switched ON.
  • Your automation runs from WSL2 but targets host browser tabs.
Steps
  1. Open target page in Windows browser and click OpenClaw Relay icon to attach the tab.
  2. Use browser profile chrome (not isolated profile) to list/focus attached tabs.
  3. Capture snapshot and persist returned targetId; keep all actions on this target.
  4. Run click/type/snapshot loop to verify refs remain stable in the same tab context.
Commands
openclaw gateway status
openclaw help
Verify

WSL2-issued browser actions operate a host Windows tab continuously without re-attach in every step.

Caveats
  • If badge is OFF, attach the tab first instead of blind retries.
  • Enterprise browser policies may block extension relay capabilities(需验证).
Source attribution

This tip is aggregated from community/public sources and preserved with attribution.

Open original source ↗
Visit original post