MV3 service worker dormancy makes Chrome MCP unreliable — add SW keepalive

Resolved 💬 3 comments Opened May 22, 2026 by jjongsta Closed Jun 24, 2026

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

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗