MCP tab groups not cleaned up after session ends (Chrome extension)
Description
When Claude Code uses the Chrome extension (Claude in Chrome MCP) for browser automation tasks, it creates MCP tab groups via tabs_context_mcp. However, when the session/task completes, these tab groups are never closed automatically — they remain as orphaned groups in Chrome.
Over multiple conversations, this leads to dozens of stale MCP tab groups accumulating in the browser.
Impact
- Memory consumption: Each open Chrome tab uses ~50-150 MB of RAM. Accumulated orphaned groups add up significantly.
- Browser clutter: Multiple empty/stale tab groups make Chrome harder to navigate.
- No auto-recovery: Groups persist until the user manually closes them.
Expected behavior
When a Claude Code session disconnects or ends, the MCP tab group created for that session should be automatically cleaned up (closed). Alternatively, stale groups from previous sessions should be detected and cleaned when a new session starts.
Current workaround
Manually calling tabs_close_mcp for each tab in the group before ending a task. This works but depends on the model remembering to do it — there's no enforcement at the extension level.
Suggested solutions
- Auto-cleanup on disconnect: When the MCP WebSocket/connection closes, the extension should close the associated tab group.
- Stale group detection: When
tabs_context_mcpis called, detect and offer to close groups from previous (disconnected) sessions. - Session TTL: Auto-close tab groups that have been idle for a configurable period (e.g., 30 minutes).
Environment
- Chrome extension: Claude in Chrome (MCP)
- OS: Windows 11 Pro
- Claude Code: CLI
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗