claude-code - 💡(How to fix) Fix MV3 service worker dormancy makes Chrome MCP unreliable — add SW keepalive

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…

The claude-in-chrome extension's MV3 service worker goes dormant after ~30 seconds of idle time (Chrome's MV3 lifecycle). Once dormant, the extension stops checking in to the bridge, and mcp__claude-in-chrome__list_connected_browsers from the Claude Code CLI returns [] even though the extension is installed, signed in, and paired.

The error surfaced to the CLI is:

Browser extension is not connected. Please ensure the Claude browser extension is installed and running (https://claude.ai/chrome), and that you are logged into claude.ai with the same account as Claude Code.

This message is misleading — the extension is installed and the account is the same; the service worker is just asleep.

Error Message

The error surfaced to the CLI is:

Root Cause

  • CLI auth is healthy (OAuth via claude.ai, scopes include user:mcp_servers).
  • Extension is paired (LevelDB has bridgeDeviceId, mcpConnected, accessToken, refreshToken).
  • The CLI's bridge call succeeds — it just gets zero registered devices because the extension SW isn't checked in.
  • The SW is registered for webNavigation.onBeforeNavigate / onCommitted, so active browsing keeps it intermittently warm. During focused work in non-Chrome apps (e.g., terminal-driven Claude Code), the SW stays dead until manually woken.
RAW_BUFFERClick to expand / collapse

Summary

The claude-in-chrome extension's MV3 service worker goes dormant after ~30 seconds of idle time (Chrome's MV3 lifecycle). Once dormant, the extension stops checking in to the bridge, and mcp__claude-in-chrome__list_connected_browsers from the Claude Code CLI returns [] even though the extension is installed, signed in, and paired.

The error surfaced to the CLI is:

Browser extension is not connected. Please ensure the Claude browser extension is installed and running (https://claude.ai/chrome), and that you are logged into claude.ai with the same account as Claude Code.

This message is misleading — the extension is installed and the account is the same; the service worker is just asleep.

Repro

  1. Install the extension, sign in to claude.ai, confirm Chrome MCP works from the CLI.
  2. Leave Chrome idle (no tab navigation, no popup interaction) for >30s.
  3. From the CLI: mcp__claude-in-chrome__list_connected_browsers → returns [].
  4. Click the Claude toolbar icon in Chrome to wake the SW.
  5. Re-call list_connected_browsers → now returns the device.

Diagnosis

  • CLI auth is healthy (OAuth via claude.ai, scopes include user:mcp_servers).
  • Extension is paired (LevelDB has bridgeDeviceId, mcpConnected, accessToken, refreshToken).
  • The CLI's bridge call succeeds — it just gets zero registered devices because the extension SW isn't checked in.
  • The SW is registered for webNavigation.onBeforeNavigate / onCommitted, so active browsing keeps it intermittently warm. During focused work in non-Chrome apps (e.g., terminal-driven Claude Code), the SW stays dead until manually woken.

Suggested fix

Add a keepalive in the SW so it doesn't drop off the bridge during idle periods. A chrome.alarms tick under the 30s idle threshold (e.g., periodInMinutes: 0.5) with a no-op handler is the standard MV3 pattern; the alarms permission is already in the manifest.

Environment

  • Chrome 148.0.7778.169 (macOS)
  • Claude Code CLI 2.1.148
  • Extension fcoeoabgfenejglbffodgkkbkcdhcgfn versions 1.0.71 / 1.0.72
  • Claude Max subscription

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

claude-code - 💡(How to fix) Fix MV3 service worker dormancy makes Chrome MCP unreliable — add SW keepalive