openclaw - 💡(How to fix) Fix canvas present does not re-navigate to A2UI after WebView URL changes — no recovery without gateway restart (macOS)

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…

On macOS, canvas present only navigates to the A2UI host page on the initial open. If the WKWebView URL changes for any reason (explicit canvas navigate, expired cap token, etc.), subsequent canvas present calls show the panel but do not reset the URL to A2UI. There is no recovery path short of a gateway restart.

Error Message

Cap tokens appear to be time-limited. After a period of inactivity or multiple navigation cycles, the A2UI page returns {"error":{"message":"Unauthorized","type":"unauthorized"}}. Since canvas present does not re-navigate, the canvas is permanently stuck on the 401 error page with no agent-accessible recovery.

Root Cause

On macOS, canvas present only navigates to the A2UI host page on the initial open. If the WKWebView URL changes for any reason (explicit canvas navigate, expired cap token, etc.), subsequent canvas present calls show the panel but do not reset the URL to A2UI. There is no recovery path short of a gateway restart.

Fix Action

Workaround

None available to agents. Requires either:

  • openclaw gateway restart (blocked by commands.restart=false in many configs), or
  • User manually cycling the app
RAW_BUFFERClick to expand / collapse

Summary

On macOS, canvas present only navigates to the A2UI host page on the initial open. If the WKWebView URL changes for any reason (explicit canvas navigate, expired cap token, etc.), subsequent canvas present calls show the panel but do not reset the URL to A2UI. There is no recovery path short of a gateway restart.

Environment

  • Platform: macOS 26.4.1 (Mac Studio, arm64)
  • OpenClaw node version: 2026.5.7
  • Gateway: LaunchAgent, port 18789

Steps to Reproduce

  1. Open canvas with canvas present — loads A2UI correctly at /__openclaw__/cap/<token>/__openclaw__/a2ui/
  2. Call canvas navigate url=<any-url> (or let the cap token expire)
  3. Call canvas present again
  4. Observe: panel shows but stays on the wrong URL — A2UI is not restored

Related: cap token expiry

Cap tokens appear to be time-limited. After a period of inactivity or multiple navigation cycles, the A2UI page returns {"error":{"message":"Unauthorized","type":"unauthorized"}}. Since canvas present does not re-navigate, the canvas is permanently stuck on the 401 error page with no agent-accessible recovery.

Related: canvas navigate bypasses cap-token injection

When canvas navigate is called with an explicit http:// URL, the Mac app navigates directly to that URL without injecting the cap token. This means navigating to http://127.0.0.1:18789/__openclaw__/a2ui/ always returns 401. Only the cap-token URL path works, but agents have no way to construct that URL (the token is internal to the Mac app).

Expected Behaviors

  1. canvas present should always navigate to a fresh, valid A2UI URL (new cap token if needed), not just show the existing panel.
  2. Alternatively: provide a canvas a2ui reset or canvas reset command that forces re-navigation to A2UI with a fresh cap token.
  3. Alternatively: cap tokens should not expire while the gateway is running, or the A2UI page should auto-refresh with a new token when the current one expires.

Impact

Agents currently have no reliable way to recover the canvas to a working A2UI state after any navigation event without a gateway restart. This makes canvas navigate effectively dangerous to call — any use of it permanently breaks A2UI for the session.

Workaround

None available to agents. Requires either:

  • openclaw gateway restart (blocked by commands.restart=false in many configs), or
  • User manually cycling the app

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 - 💡(How to fix) Fix canvas present does not re-navigate to A2UI after WebView URL changes — no recovery without gateway restart (macOS)