openclaw - 💡(How to fix) Fix [Bug]: attach-only external CDP profile returns targetId from browser.open, but browser.tabs stays empty and snapshot fails with tab not found [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#59424Fetched 2026-04-08 02:24:01
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
subscribed ×1

When OpenClaw is configured to use an attach-only external CDP profile (Browserless-style endpoint on localhost), the browser tool can return a targetId from browser.open, but subsequent browser-tool state is inconsistent:

  • browser.tabs returns an empty list
  • browser.snapshot(targetId=...) fails with tab not found
  • the external CDP endpoint itself is healthy and /json/list shows page targets

This makes multi-step browser workflows impossible even though the underlying CDP service is reachable and can create/list pages.

Error Message

{"status":"error","tool":"browser","error":"tab not found"} => {"status":"error","tool":"browser","error":"tab not found"}

Root Cause

  • openclaw doctor --non-interactive also reported a gateway service entrypoint mismatch (dist/entry.js -> dist/index.js)
  • fixing that mismatch improved status reporting (cdpHttp became true) but did not fix the browser-tool inconsistency above
  • so the entrypoint mismatch was noise / a separate issue, not the root cause of this browser bug

Code Example

{
  "browser": {
    "enabled": true,
    "evaluateEnabled": true,
    "headless": true,
    "noSandbox": true,
    "attachOnly": true,
    "defaultProfile": "rsshub-browserless",
    "profiles": {
      "rsshub-browserless": {
        "cdpUrl": "http://127.0.0.1:13000",
        "driver": "openclaw",
        "color": "22AA88"
      }
    }
  }
}

---

curl -fsS http://127.0.0.1:13000/json/version
curl -fsS http://127.0.0.1:13000/json/list

---

openclaw browser status --json

---

{"action":"open","target":"host","url":"https://example.com"}

---

{"action":"tabs","target":"host"}
{"action":"snapshot","target":"host","targetId":"<returned targetId>","snapshotFormat":"ai"}

---

{"status":"error","tool":"browser","error":"tab not found"}

---

curl -fsS http://127.0.0.1:13000/json/list
curl -fsS 'http://127.0.0.1:13000/json/new?https://example.com'

---

[{"description":"","devtoolsFrontendUrl":"/devtools/inspector.html?ws=127.0.0.1:13000/devtools/page/BROWSERLESS4RZSOSIKP4W6TRRW2D1MF","targetId":"/devtools/page/BROWSERLESS4RZSOSIKP4W6TRRW2D1MF","title":"about:blank","type":"page","url":"about:blank","webSocketDebuggerUrl":"ws://127.0.0.1:13000/devtools/page/BROWSERLESS4RZSOSIKP4W6TRRW2D1MF"}]

---

{
  "enabled": true,
  "profile": "rsshub-browserless",
  "driver": "openclaw",
  "transport": "cdp",
  "running": true,
  "cdpReady": true,
  "cdpHttp": true,
  "pid": null,
  "cdpPort": 13000,
  "cdpUrl": "http://127.0.0.1:13000",
  "chosenBrowser": null,
  "detectedBrowser": null,
  "detectedExecutablePath": null,
  "detectError": null,
  "userDataDir": null,
  "color": "22AA88",
  "headless": true,
  "noSandbox": true,
  "executablePath": null,
  "attachOnly": true
}

---

{"action":"open","target":"host","url":"https://example.com"}
=> {"targetId":"1985FEAE139BCE0FD64BA0FDCFC6FFD3","title":"","url":"https://example.com","type":"page"}

{"action":"tabs","target":"host"}
=> {"tabs":[]}

{"action":"snapshot","target":"host","targetId":"1985FEAE139BCE0FD64BA0FDCFC6FFD3","snapshotFormat":"ai","refs":"aria"}
=> {"status":"error","tool":"browser","error":"tab not found"}

---

[tools] browser failed: tab not found raw_params={"action":"snapshot",...}
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Summary

When OpenClaw is configured to use an attach-only external CDP profile (Browserless-style endpoint on localhost), the browser tool can return a targetId from browser.open, but subsequent browser-tool state is inconsistent:

  • browser.tabs returns an empty list
  • browser.snapshot(targetId=...) fails with tab not found
  • the external CDP endpoint itself is healthy and /json/list shows page targets

This makes multi-step browser workflows impossible even though the underlying CDP service is reachable and can create/list pages.

Steps to reproduce

  1. Configure OpenClaw browser with an attach-only external CDP profile on localhost, for example:
{
  "browser": {
    "enabled": true,
    "evaluateEnabled": true,
    "headless": true,
    "noSandbox": true,
    "attachOnly": true,
    "defaultProfile": "rsshub-browserless",
    "profiles": {
      "rsshub-browserless": {
        "cdpUrl": "http://127.0.0.1:13000",
        "driver": "openclaw",
        "color": "22AA88"
      }
    }
  }
}
  1. Confirm the external CDP service is healthy:
curl -fsS http://127.0.0.1:13000/json/version
curl -fsS http://127.0.0.1:13000/json/list
  1. Check OpenClaw browser status:
openclaw browser status --json
  1. Use the browser tool or CLI to open a page:
{"action":"open","target":"host","url":"https://example.com"}
  1. Immediately list tabs and try to snapshot the returned target:
{"action":"tabs","target":"host"}
{"action":"snapshot","target":"host","targetId":"<returned targetId>","snapshotFormat":"ai"}

Expected behavior

If browser.open succeeds and returns a targetId, the browser tool should be able to:

  • list the tab in browser.tabs
  • resolve the returned targetId
  • perform snapshot / screenshot / act on that tab

At minimum, the browser tool state should stay consistent with the underlying CDP target list.

Actual behavior

Observed on latest stable 2026.4.1:

  • browser.status reports healthy after service fixes:
    • running: true
    • cdpReady: true
    • cdpHttp: true
    • attachOnly: true
  • browser.open succeeds and returns a targetId
  • browser.tabs still returns []
  • browser.snapshot on that targetId fails with:
{"status":"error","tool":"browser","error":"tab not found"}

Meanwhile, the external CDP endpoint itself can still list pages:

curl -fsS http://127.0.0.1:13000/json/list
curl -fsS 'http://127.0.0.1:13000/json/new?https://example.com'

Example observed response:

[{"description":"","devtoolsFrontendUrl":"/devtools/inspector.html?ws=127.0.0.1:13000/devtools/page/BROWSERLESS4RZSOSIKP4W6TRRW2D1MF","targetId":"/devtools/page/BROWSERLESS4RZSOSIKP4W6TRRW2D1MF","title":"about:blank","type":"page","url":"about:blank","webSocketDebuggerUrl":"ws://127.0.0.1:13000/devtools/page/BROWSERLESS4RZSOSIKP4W6TRRW2D1MF"}]

So the CDP service can create/list targets, but OpenClaw browser-tool state remains empty/non-resolvable.

OpenClaw version

2026.4.1

Operating system

Linux 6.8.0-106-generic (x64)

Install method

global npm install + systemd user service

Model

cli-codex/gpt-5.4

Provider / routing chain

Telegram -> OpenClaw gateway -> browser tool (target=host) -> attach-only external CDP on 127.0.0.1:13000

Config file / key location

~/.openclaw/openclaw.json -> browser

Additional provider/model setup details

Not model-specific.

Relevant browser config details:

  • attachOnly: true
  • default profile points to an external localhost CDP service
  • cdpUrl: http://127.0.0.1:13000
  • no local Chrome/Chromium installed on the host

Logs, screenshots, and evidence

Browser tool state after fixing unrelated service entrypoint mismatch:

{
  "enabled": true,
  "profile": "rsshub-browserless",
  "driver": "openclaw",
  "transport": "cdp",
  "running": true,
  "cdpReady": true,
  "cdpHttp": true,
  "pid": null,
  "cdpPort": 13000,
  "cdpUrl": "http://127.0.0.1:13000",
  "chosenBrowser": null,
  "detectedBrowser": null,
  "detectedExecutablePath": null,
  "detectError": null,
  "userDataDir": null,
  "color": "22AA88",
  "headless": true,
  "noSandbox": true,
  "executablePath": null,
  "attachOnly": true
}

Observed browser tool behavior:

{"action":"open","target":"host","url":"https://example.com"}
=> {"targetId":"1985FEAE139BCE0FD64BA0FDCFC6FFD3","title":"","url":"https://example.com","type":"page"}

{"action":"tabs","target":"host"}
=> {"tabs":[]}

{"action":"snapshot","target":"host","targetId":"1985FEAE139BCE0FD64BA0FDCFC6FFD3","snapshotFormat":"ai","refs":"aria"}
=> {"status":"error","tool":"browser","error":"tab not found"}

Gateway log excerpts before/after diagnosis:

[tools] browser failed: tab not found raw_params={"action":"snapshot",...}

Additional diagnostic observation:

  • openclaw doctor --non-interactive also reported a gateway service entrypoint mismatch (dist/entry.js -> dist/index.js)
  • fixing that mismatch improved status reporting (cdpHttp became true) but did not fix the browser-tool inconsistency above
  • so the entrypoint mismatch was noise / a separate issue, not the root cause of this browser bug

Impact and severity

Affected users/systems:

  • users relying on attach-only external CDP / Browserless-style localhost profiles

Severity:

  • Medium to high

Frequency:

  • Reproduced consistently in this environment

Consequence:

  • browser automation is effectively unusable for multi-step flows
  • the tool reports a target exists, but cannot list or resolve it afterward
  • diagnosis is confusing because the underlying CDP service looks healthy

Additional information

This looks related to existing browser state-sync / remote-CDP issues, but does not seem identical to the current open reports:

  • #50321 — chat/browser tool returns no tabs in a Chrome relay + Docker/node setup
  • #33093 — /json/list shows target but action layer gets tab not found after navigation in extension relay
  • #58646 — remote CDP profiles lose session between commands (Browserbase)
  • #49815 — Browserless topology/endpoint classification issues

What seems distinct here is:

  • attach-only localhost external CDP is healthy
  • OpenClaw browser.open can create/return a target
  • OpenClaw browser.tabs remains empty immediately afterward
  • OpenClaw snapshot cannot resolve the same returned target
  • external /json/list still shows targets

That suggests a browser-tool state tracking / target-resolution bug in the attach-only external CDP path, rather than simple CDP reachability failure.

extent analysis

TL;DR

The most likely fix for the inconsistent browser tool state is to investigate and resolve the target resolution issue in the attach-only external CDP path.

Guidance

  1. Verify CDP service health: Confirm that the external CDP endpoint is healthy and can list pages using curl -fsS http://127.0.0.1:13000/json/list.
  2. Check browser tool configuration: Review the OpenClaw browser configuration to ensure that the attach-only external CDP profile is correctly set up and points to the healthy CDP service.
  3. Investigate target resolution: Look into the target resolution mechanism in the attach-only external CDP path to identify why the browser tool cannot resolve the target returned by browser.open.
  4. Compare with similar issues: Research similar issues, such as #50321, #33093, #58646, and #49815, to see if there are any common patterns or solutions that can be applied to this case.

Example

No specific code snippet can be provided without more information about the implementation details of the OpenClaw browser tool and the attach-only external CDP profile.

Notes

The root cause of the issue is unclear, and more investigation is needed to determine the exact cause of the inconsistent browser tool state. The provided information suggests that the issue is related to the target resolution mechanism in the attach-only external CDP path.

Recommendation

Apply a workaround by modifying the browser tool to use a different target resolution mechanism or by updating the attach-only external CDP profile to use a different CDP service. The reason for this recommendation is that the current implementation seems to have a bug that prevents the browser tool from resolving the target correctly.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

If browser.open succeeds and returns a targetId, the browser tool should be able to:

  • list the tab in browser.tabs
  • resolve the returned targetId
  • perform snapshot / screenshot / act on that tab

At minimum, the browser tool state should stay consistent with the underlying CDP target list.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: attach-only external CDP profile returns targetId from browser.open, but browser.tabs stays empty and snapshot fails with tab not found [1 participants]