#Control Chrome using the bot
1 messages · Page 1 of 1 (latest)
“Losing control” usually means Chrome detached the debugger from that tab (or the bot is controlling the wrong browser/profile).
A few quick things to check (most common → least):
- Make sure the bot is actually using the extension profile
- In OpenClaw, the extension relay is the built-in browser profile named
chrome. - Quick test in a terminal on the same machine as the Gateway:
openclaw browser --browser-profile chrome tabs- If it shows 0 tabs (or can’t connect), the agent can’t see the attached tab → it’s not controlling your real Chrome.
- Gateway location matters (local vs remote/Docker)
- If your Gateway is not running on the same machine as Chrome (or it’s in Docker),
127.0.0.1:18792will point at the wrong machine/container. - Fix: run a node host on the Chrome machine so the Gateway can proxy browser actions there (docs explain this):
https://docs.openclaw.ai/tools/chrome-extension#remote-gateway-use-a-node-host
- Chrome only allows one debugger per tab
If anything else attaches (often DevTools, another automation tool, another extension), Chrome can kick the relay off and you’ll “lose control”.
- Try: close DevTools for that tab, disable other automation, then click the extension icon OFF → ON again (reattach).
- Also try a full Chrome restart (clears stale debugger sessions).
- Sandboxing
If your agent/session is sandboxed, it may default to the sandbox browser instead of host Chrome.
If you paste these, I can tell you exactly which case you’re hitting:
openclaw --version- Where the Gateway runs (same PC as Chrome? Docker? VPS?)
- Output of:
openclaw browser --browser-profile chrome statusopenclaw browser --browser-profile chrome tabs
openclaw --version
2026.2.6-3
openclaw browser --browser-profile chrome status
🦞 OpenClaw 2026.2.6-3 (85ed6c7) — I'm not magic—I'm just extremely persistent with retries and coping strategies.
│
â—‡
profile: chrome
enabled: true
running: true
cdpPort: 18792
cdpUrl: http://127.0.0.1:18792
browser: unknown
detectedBrowser: custom
detectedPath: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
profileColor: #4285F4
openclaw browser --browser-profile chrome tabs
🦞 OpenClaw 2026.2.6-3 (85ed6c7) — I'm not magic—I'm just extremely persistent with retries and coping strategies.
│
â—‡
- DuePilot • Time, Projects & Licensing
https://duepilot.org/
id: XXXXXXXXX
Nice — your output shows the relay is working correctly:
statusâś… running onhttp://127.0.0.1:18792tabsâś… the Gateway can see 1 attached tab (DuePilot)
So the problem is almost always this:
The extension only controls the tab(s) you manually attached
If the bot “opens a website”, it often ends up in a new tab (or a different tab) that is not attached, so control appears to “drop”.
Docs (this is the key line):
https://docs.openclaw.ai/tools/chrome-extension#which-tab-does-it-control
Fix
Option A (simplest):
- Let the bot open the new site
- Click the extension icon on that new tab to attach it (badge
ON)
- Then tell the bot to continue
Option B (more reliable):
- You open the tab you want (or a blank tab)
- Click extension →
ON - Tell the bot: “Use the already-attached Chrome tab; don’t open new tabs. Just navigate in-place.”
Quick diagnostic (to rule out Playwright issues)
Run and paste the output if it errors:
openclaw browser --browser-profile chrome snapshot --interactive --compact --depth 4
If it says something like “Playwright is not available …”, that would explain why it can open pages but can’t reliably click/type/snapshot.
If this fixes it, please mark the solution (right-click my message → Apps → ✅ Mark Solution) so Answer Overflow indexes it.
openclaw browser --browser-profile chrome snapshot --interactive --compact --depth 4
🦞 OpenClaw 2026.2.6-3 (85ed6c7) — No $999 stand required.
│
â—‡
- link [ref=e1]
- link "Pricing" [ref=e2]
- link "How it works" [ref=e3]
- link "Demo" [ref=e4]
- link "Help" [ref=e5]
- link "Log in" [ref=e6]
- link "Get started" [ref=e7]
- link "Get started free" [ref=e8]
- link "Try the demo" [ref=e9]
- link "View our security practices" [ref=e10]
- link [ref=e11] [nth=1]
- link "Pricing" [ref=e12] [nth=1]
- link "How it works" [ref=e13] [nth=1]
- link "Demo" [ref=e14] [nth=1]
- link "Help" [ref=e15] [nth=1]
- link "About" [ref=e16]
- link "Security" [ref=e17]
- link "Privacy" [ref=e18]
- link "Terms" [ref=e19]
- link "Data Deletion" [ref=e20]
- link "Subprocessors" [ref=e21]
{
"status": "error",
"tool": "browser",
"error": "Can't reach the OpenClaw browser control service. Start (or restart) the OpenClaw gateway (OpenClaw.app menubar, or openclaw gateway) and try again. (Error: Error: tab not found)"
}
That output is actually good news: Playwright/snapshots are working (you got the [ref=e1] … list). The problem is the error at the end:
Error: tab not found
In extension-relay mode that almost always means the “current tab” OpenClaw was targeting disappeared / changed (stale targetId). The most common ways this happens:
-
A new tab got opened (via
open, target=_blank, popup, etc.)
The extension can only control tabs you manually attached (clicked the icon → badgeON). A newly opened tab is usually not attached, so control “drops”. -
Chrome detached the debugger (DevTools opened, another automation tool/extension attaches, or the tab crashed/reloaded in a way that swaps the CDP target).
What to do (quick fixes)
- Keep only one attached tab: click the extension icon OFF on any other tabs, leave just the one tab you want controlled =
ON. - When telling the bot what to do, be explicit:
- “Use the already attached Chrome tab. Do not open new tabs. Navigate in the same tab.”
- If you do need a new tab: open it, then click the extension icon on that new tab to attach it.