mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
When Chrome's debugger detaches during page navigation (common in SPAs like Gmail, Google Calendar), the extension now automatically re-attaches instead of permanently losing the connection. Changes: - onDebuggerDetach: detect navigation vs tab close, attempt re-attach with 3 retries and exponential backoff (300ms, 700ms, 1500ms) - Add reattachPending guard to prevent concurrent re-attach races - connectOrToggleForActiveTab: handle pending re-attach state - onRelayClosed: clear reattachPending on relay disconnect - Add chrome.tabs.onRemoved listener for proper cleanup Fixes #19744
OpenClaw Chrome Extension (Browser Relay)
Purpose: attach OpenClaw to an existing Chrome tab so the Gateway can automate it (via the local CDP relay server).
Dev / load unpacked
-
Build/run OpenClaw Gateway with browser control enabled.
-
Ensure the relay server is reachable at
http://127.0.0.1:18792/(default). -
Install the extension to a stable path:
openclaw browser extension install openclaw browser extension path -
Chrome →
chrome://extensions→ enable “Developer mode”. -
“Load unpacked” → select the path printed above.
-
Pin the extension. Click the icon on a tab to attach/detach.
Options
Relay port: defaults to18792.Gateway token: required. Set this togateway.auth.token(orOPENCLAW_GATEWAY_TOKEN).