openclaw - ✅(Solved) Fix [Bug]: browser act hangs on macOS while open/status/snapshot still work, then browser tool becomes poisoned until restart [1 pull requests, 1 comments, 2 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#69847Fetched 2026-04-22 07:47:30
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Timeline (top)
closed ×1commented ×1cross-referenced ×1

On this macOS host, browser inspection calls work, but browser action calls hang and then poison the browser tool until the gateway is restarted.

This reproduces on:

  • OpenClaw-managed browser profile (profile: "openclaw")
  • Existing-session Chrome attach (driver: "existing-session", profile aliases including user / chrome-live)
  • ChatGPT (https://chatgpt.com/)
  • Plain https://example.com/

So this does not look site-specific, auth-specific, or ChatGPT-specific.

Error Message

Error returned:

  • no useful low-level browser exception emitted alongside the hang
  • fail with an actionable internal browser error

Root Cause

On this macOS host, browser inspection calls work, but browser action calls hang and then poison the browser tool until the gateway is restarted.

This reproduces on:

  • OpenClaw-managed browser profile (profile: "openclaw")
  • Existing-session Chrome attach (driver: "existing-session", profile aliases including user / chrome-live)
  • ChatGPT (https://chatgpt.com/)
  • Plain https://example.com/

So this does not look site-specific, auth-specific, or ChatGPT-specific.

Fix Action

Fix / Workaround

Relevant code paths

  • Browser client timeout wrapping:
    • /opt/homebrew/lib/node_modules/openclaw/dist/session-tab-registry-C-F_cimS.js
  • Local browser dispatch runtime:
    • /opt/homebrew/lib/node_modules/openclaw/dist/local-dispatch.runtime-DFCUCw4c.js
  • Browser route dispatcher and service bootstrap:
    • /opt/homebrew/lib/node_modules/openclaw/dist/control-service-C6DCgn50.js
  • /act route handling:
    • /opt/homebrew/lib/node_modules/openclaw/dist/server-context-qgfDaRbE.js

That suggests the problem may be in a shared layer, likely one of:

  • route/tab context setup
  • browser runtime state / request dispatch
  • request cancellation / signal handling
  • navigation guard / tab resolution around action execution
  • some host-specific deadlock in the browser control service

Current practical workaround

  • Use browser snapshots/read-only inspection only
  • Avoid browser act calls on this host/build
  • Restart gateway if browser tool gets poisoned
  • For actual work, use manual browser interaction with the agent guiding/reviewing

PR fix notes

PR #69924: fix(browser): reject ax<N> refs in act path instead of timing out

Description (problem / solution / changelog)

Partial fix for #69847.

Problem

format=aria snapshots mint ax<N> refs that nothing on the server can resolve. When the agent feeds one to act, refLocator hands it to Playwright's aria-ref= engine — which only knows refs Playwright itself minted — and the click waits the full 30s before failing with a raw Playwright error.

Fix

  • refLocator rejects ax<N> refs immediately with a message telling the agent to re-snapshot with format=ai.
  • Broadened toAIFriendlyError to catch bare waiting for locator(...) timeouts as a safety net.
  • Extracted AX_REF_PREFIX / AX_REF_PATTERN so producer and validator share one source of truth.

Scope

Fixes the managed Playwright path only. Does not address the existing-session backend or the "poisoned until restart" symptom from the original report.

Test plan

  • pnpm test extensions/browser/src/browser/pw-session.test.ts extensions/browser/src/browser/pw-tools-core.clamps-timeoutms-scrollintoview.test.ts — 14/14 passing
  • Manual: snapshot with format=aria, act click ax1, expect immediate actionable error

Changed files

  • extensions/browser/src/browser/cdp.ts (modified, +4/-1)
  • extensions/browser/src/browser/pw-session.test.ts (modified, +7/-0)
  • extensions/browser/src/browser/pw-session.ts (modified, +8/-1)
  • extensions/browser/src/browser/pw-tools-core.clamps-timeoutms-scrollintoview.test.ts (modified, +6/-0)
  • extensions/browser/src/browser/pw-tools-core.shared.ts (modified, +3/-1)

Code Example

{
  "action": "act",
  "target": "host",
  "profile": "openclaw",
  "targetId": "802856F24F36CE8DB2B7BD1ED64890F6",
  "ref": "ax12",
  "kind": "click",
  "timeoutMs": 30000
}

---

timed out. Restart the OpenClaw gateway (OpenClaw.app menubar, or `openclaw gateway`). Do NOT retry the browser tool — it will keep failing. Use an alternative approach or inform the user that the browser is currently unavailable.

---

[tools] browser failed: timed out. Restart the OpenClaw gateway (OpenClaw.app menubar, or `openclaw gateway`). Do NOT retry the browser tool — it will keep failing. Use an alternative approach or inform the user that the browser is currently unavailable.
RAW_BUFFERClick to expand / collapse

OpenClaw browser action bug repro, 2026-04-21

Summary

On this macOS host, browser inspection calls work, but browser action calls hang and then poison the browser tool until the gateway is restarted.

This reproduces on:

  • OpenClaw-managed browser profile (profile: "openclaw")
  • Existing-session Chrome attach (driver: "existing-session", profile aliases including user / chrome-live)
  • ChatGPT (https://chatgpt.com/)
  • Plain https://example.com/

So this does not look site-specific, auth-specific, or ChatGPT-specific.

Environment

  • Host: Kimi’s Mac mini
  • OS: Darwin 24.6.0 arm64
  • Node: v25.8.1
  • OpenClaw runtime in session metadata: agent=main | host=Kimi’s Mac mini | repo=/Users/kimi/.openclaw/workspace
  • Browser executable detected: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
  • OpenClaw managed browser CDP: http://127.0.0.1:18800

Repro steps

Case A, OpenClaw-managed browser

  1. Restart gateway.
  2. Run browser status for profile: "openclaw".
  3. Open https://example.com/ in profile: "openclaw".
  4. Take a snapshot.
  5. Attempt a single click action on the Learn more link.

Observed

  • status succeeds
  • open succeeds
  • snapshot succeeds
  • act(kind="click") times out
  • after that, browser calls often continue failing until gateway restart

Concrete example

Snapshot on https://example.com/ returned a normal tree including:

  • RootWebArea: Example Domain
  • link ref ax12, name Learn more

Then this action failed:

{
  "action": "act",
  "target": "host",
  "profile": "openclaw",
  "targetId": "802856F24F36CE8DB2B7BD1ED64890F6",
  "ref": "ax12",
  "kind": "click",
  "timeoutMs": 30000
}

Error returned:

timed out. Restart the OpenClaw gateway (OpenClaw.app menubar, or `openclaw gateway`). Do NOT retry the browser tool — it will keep failing. Use an alternative approach or inform the user that the browser is currently unavailable.

Case B, ChatGPT page

After clean restart, the same pattern occurred on https://chatgpt.com/:

  • page load ok
  • snapshot ok
  • single click into the prompt box timed out immediately

So the failure is not specific to ChatGPT image generation.

Why this seems like an OpenClaw browser-action-path bug

I checked the local compiled code paths.

Relevant code paths

  • Browser client timeout wrapping:
    • /opt/homebrew/lib/node_modules/openclaw/dist/session-tab-registry-C-F_cimS.js
  • Local browser dispatch runtime:
    • /opt/homebrew/lib/node_modules/openclaw/dist/local-dispatch.runtime-DFCUCw4c.js
  • Browser route dispatcher and service bootstrap:
    • /opt/homebrew/lib/node_modules/openclaw/dist/control-service-C6DCgn50.js
  • /act route handling:
    • /opt/homebrew/lib/node_modules/openclaw/dist/server-context-qgfDaRbE.js

Important observation

The two action backends appear different:

  • existing-session path uses Chrome MCP element actions
  • managed openclaw path uses Playwright action execution

But both hang in practice.

That suggests the problem may be in a shared layer, likely one of:

  • route/tab context setup
  • browser runtime state / request dispatch
  • request cancellation / signal handling
  • navigation guard / tab resolution around action execution
  • some host-specific deadlock in the browser control service

Log evidence

Useful log locations on this host:

  • /Users/kimi/.openclaw/logs/gateway.log
  • /Users/kimi/.openclaw/logs/gateway.err.log
  • /tmp/openclaw/openclaw-2026-04-21.log

Observed behavior in logs:

  • repeated top-level browser tool timeout messages
  • no useful low-level browser exception emitted alongside the hang
  • browser service starts cleanly
  • reads/snapshots work before first action failure

Example top-level failure text in tmp log:

[tools] browser failed: timed out. Restart the OpenClaw gateway (OpenClaw.app menubar, or `openclaw gateway`). Do NOT retry the browser tool — it will keep failing. Use an alternative approach or inform the user that the browser is currently unavailable.

Current practical workaround

  • Use browser snapshots/read-only inspection only
  • Avoid browser act calls on this host/build
  • Restart gateway if browser tool gets poisoned
  • For actual work, use manual browser interaction with the agent guiding/reviewing

Minimal expected result

A single click on example.com should either:

  • succeed, or
  • fail with an actionable internal browser error

It should not silently hang for 30s and then poison subsequent browser usage.

One-line repro

Fresh gateway restart -> open example.com in profile=openclaw -> snapshot ok -> single act(kind=click, ref=ax12) hangs for 30s -> browser tool becomes unreliable until restart.

extent analysis

TL;DR

The most likely fix or workaround is to investigate and resolve the issue in the shared layer of the OpenClaw browser action path, potentially related to route/tab context setup, browser runtime state, or request dispatch.

Guidance

  • Review the code paths mentioned, particularly /opt/homebrew/lib/node_modules/openclaw/dist/session-tab-registry-C-F_cimS.js, /opt/homebrew/lib/node_modules/openclaw/dist/local-dispatch.runtime-DFCUCw4c.js, and /opt/homebrew/lib/node_modules/openclaw/dist/control-service-C6DCgn50.js, to identify potential issues in the shared layer.
  • Check the log files, such as /Users/kimi/.openclaw/logs/gateway.log and /tmp/openclaw/openclaw-2026-04-21.log, for any clues or error messages that may indicate the cause of the problem.
  • Consider testing the act calls with different parameters, such as changing the timeoutMs value or using a different kind of action, to see if the issue is specific to certain types of actions.
  • Investigate the difference in behavior between the existing-session path and the managed openclaw path, as this may provide insight into the root cause of the problem.

Example

No code snippet is provided as the issue is more related to the overall architecture and debugging rather than a specific code fix.

Notes

The issue seems to be specific to the OpenClaw browser action path and may be related to the shared layer of the code. Further investigation and debugging are needed to identify the root cause and provide a definitive fix.

Recommendation

Apply a workaround by avoiding browser act calls on the affected host/build and using manual browser interaction with the agent guiding/reviewing until the issue is resolved. This will prevent the browser tool from becoming unreliable and allow for continued use of the system.

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…

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 - ✅(Solved) Fix [Bug]: browser act hangs on macOS while open/status/snapshot still work, then browser tool becomes poisoned until restart [1 pull requests, 1 comments, 2 participants]