openclaw - 💡(How to fix) Fix Browser Relay: tab attachment not persistent across Chrome restarts / sessions [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#43842Fetched 2026-04-08 00:18:44
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

Fix Action

Fix / Workaround

Workaround needed

RAW_BUFFERClick to expand / collapse

Problem

The Browser Relay Chrome extension requires manual re-attachment every time Chrome restarts or the attached tab is closed. This makes it completely unusable for automated workflows (cron jobs, Scout agents, etc.).

Expected behavior

Browser Relay tab attachment should either:

  1. Persist across Chrome restarts (re-attach automatically on browser open), or
  2. Provide a way to programmatically trigger attachment without user interaction, or
  3. Allow attaching by URL pattern so any tab matching linkedin.com auto-attaches

Actual behavior

Every Chrome restart or tab close drops the attachment silently. The next automated job finds zero tabs attached and fails. Users have to manually click the extension icon again before each run.

Impact

Makes Browser Relay effectively unusable for:

  • Cron-triggered browser automation
  • Scout agents that run at 7:30am before the user is at their computer
  • Any automated task that needs browser access on a schedule

Workaround needed

Until fixed, automated agents cannot rely on Browser Relay. Need either persistent attachment or a headless/puppeteer fallback path.

Environment

  • OpenClaw version: 2026.3.8
  • Chrome extension: installed
  • macOS: Darwin 25.3.0 (arm64)
  • Pattern: tab detaches every session, requires manual re-click each time

extent analysis

Fix: Make the Browser‑Relay attachment persistent and auto‑re‑attach on Chrome start / matching URL

The extension currently stores the attached tab only in memory, so a browser restart or tab close drops the connection.
Persist the tab ID (or URL) in chrome.storage, and on every start‑up or tab‑update reconnect automatically.
Below are the concrete changes you need to push to the extension.


1. Manifest changes (Manifest V3)

{
  "manifest_version": 3,
  "name": "Browser Relay",
  "version": "2026.3.8",
  "permissions": [
    "tabs",
    "storage",
    "scripting",
    "activeTab"
  ],
  "background": {
    "service_worker": "background.js"
  },
  "action": {
    "default_title": "Attach Relay"
  },
  "host_permissions": [
    "*://*.linkedin.com/*"
  ]
}
  • Add storage (to remember the tab) and tabs (to query/re‑connect).
  • Use a service worker (background.js) – it survives restarts and can run code on chrome.runtime.onStartup.

2. Background script – background.js

// ==== constants ====
const ATTACH_KEY = 'relayAttachedTabId';
const URL_PATTERN = '*://*.linkedin.com/*';

// ==== helpers ====
async function storeTabId(tabId) {
  await chrome.storage.local.set({ [ATTACH_KEY]: tabId });
}
async function getStoredTab

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

Browser Relay tab attachment should either:

  1. Persist across Chrome restarts (re-attach automatically on browser open), or
  2. Provide a way to programmatically trigger attachment without user interaction, or
  3. Allow attaching by URL pattern so any tab matching linkedin.com auto-attaches

Still need to ship something?

×6

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

Back to top recommendations

TRENDING