Skip to content

Extension disconnects after inactivity, requires manual reload #7

@durapensa

Description

@durapensa

Problem Description

The Chrome extension frequently disconnects after periods of inactivity and requires manual reload to restore functionality. This impacts operational reliability and user experience.

Evidence & Patterns

Current Incident (2025-06-07)

  • Gap detected: 40-minute gap in daemon logs (21:28→22:08)
  • Extension restart: Automatic recovery at 22:09:24
  • Symptom: mcp chrome_reload_extension timed out, system_health showed extension unavailable
  • Recovery: Extension eventually recovered automatically (likely manual reload)

Expected vs Actual Behavior

  • Expected: Extension maintains persistent connection during inactivity
  • Actual: Extension disconnects, requiring manual reload at chrome://extensions/

Investigation Status

Completed Checks

  • Extension logs show clean startup sequence after restart
  • No errors in daemon exception/rejection logs
  • Relay server remains healthy during disconnection
  • Full functionality restored after recovery

Needs Investigation

  • Chrome extension service worker lifecycle behavior during inactivity
  • WebSocket connection handling during browser idle states
  • Offscreen document persistence during extended inactivity
  • Chrome's extension suspension policies and timers

Impact

  • Frequency: "Many times after inactivity" (recurring operational issue)
  • User Impact: Manual intervention required for recovery
  • System Impact: Loss of automation capabilities during disconnection

Related Components

  • Extension service worker lifecycle (background.js)
  • WebSocket connection management (offscreen.js)
  • Relay client connection handling (relay-client.js)
  • Chrome extension suspension behavior

Instructions: Update this issue with new findings using the investigation template in CLAUDE.md when disconnections are observed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreliabilityIssues affecting system reliability and stability

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions