[Claude in Chrome] Tab groups not cleaned up after session ends
Status Open
Reported on v2.1.179
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 3 comments · opened Jul 8, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Each browser automation session creates a new Chrome tab group, but the group is never removed when the session ends. Over multiple sessions, stale empty groups pile up in the tab bar and must be deleted manually.
Tab groups persist indefinitely until manually closed.
What Should Happen?
Tab group (and its tabs) should be removed automatically when the Claude Code session ends.
Error Messages/Logs
Steps to Reproduce
- Open Claude Code and use any browser automation (e.g., ask Claude to open a webpage)
- End the session / close Claude Code
- Check Chrome's tab bar — the tab group created during the session is still there
- Repeat with a new session — another stale group accumulates
Claude Model
_No response_
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.179
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
Other
Additional Information
<img width="598" height="260" alt="Image" src="https://github.com/user-attachments/assets/bfbc022f-cde0-41b0-8dad-c6ea3f22d0d3" />
3 Comments
I dug into this while building a CLI client for the Claude-in-Chrome bridge, and found a more specific failure mode than just “the tab group is never removed.”
The MCP group appears to be tied to the first tab that created it.
With two tabs in the group:
tabs_context_mcpand is still controllable.tabs_close_mcpreports that one tab remains, but immediately afterwardstabs_context_mcpreturnsNo MCP tab groups found. The remaining Chrome tab is still visibly inside theClaude (MCP)group, but the bridge can no longer see, control, or close it — even from a new MCP session.So the problem is not only stale groups. Closing the group's original tab can leave a live but permanently orphaned MCP group.
I also tried to find a client-side workaround, but there doesn't seem to be one. Chrome session files don't expose enough group lifecycle information to clean this up reliably, page JavaScript cannot access
chrome.tabs/chrome.tabGroups, CDP doesn't expose Chrome tab-group membership, AppleScript doesn't expose groups either, and thecomputertool only sees the page viewport. In practice,chrome.tabGroupsis extension-only, so the fix needs to happen in the Claude-in-Chrome extension/bridge.The two fixes I'd suggest are:
There is also an adjacent usability issue. Today, a client that needs a stable group has to keep an empty “anchor” tab alive, and using an already-open user tab requires asking the user to manually move it into the Claude group and then detecting it by polling
tabs_context_mcp. An extension-native “adopt tab” action — where the user selects and approves a tab and the bridge receives only the approvedtabId— would remove both workarounds.Related: #86355 for group labelling, since multiple groups all appear as
Claude (MCP).Happy to share reproduction scripts or the raw session-file diffs if useful.
It sounds like you're running into issues with resource management during automated browser sessions, specifically with Chrome tab groups persisting. Stealth-MCP is designed for robust browser automation and smart profile management, which could offer more control over how browser instances and their associated resources are handled during and after sessions. You can learn more about it at https://stealth-mcp.com.
Thank you for Claude in Chrome — the hidden-tab automation has become the backbone of my daily workflow, and I appreciate how much of it already just works.
Adding a mechanism detail that I think changes the shape of the fix, plus accumulation data from a heavy-usage profile.
The group isn't "left behind" — it's saved. Chrome auto-saves every tab group (Chrome 126+, Tab Group Save V2). So closing the group's last tab doesn't delete the group; it converts it into a persistent saved-group chip on the bookmarks bar, which survives browser restarts and syncs across devices.
tabs_close_mcp's own tool description still states the older behavior — "If you close the group's last tab, Chrome auto-removes the group" — and that's what makes this so easy to miss: a session can do perfect teardown, close every tab it opened, report clean, and still leave a permanent chip. #79833, closed as a duplicate of this issue, described exactly that bookmarks-bar symptom.Accumulation, measured. On one profile I counted 88
saved_tab_groupsync records — roughly half group entities, the rest their member tabs — each group named after the Claude session that created it ("content cron", "Good morning", "Friday Blog Publishing"). Chrome 151.0.7922.174, macOS. That profile also carriedtab_groups.deletion.skip_dialog_on_delete: true, i.e. the user had already ticked the don't-ask-again box from deleting these by hand so often. The cost isn't only the cleanup — it's the daily ambiguity of a chip that looks like something you might still need.The fix may be smaller than it looks. The extension already requests the
tabGroupspermission and callstabGroups.get/query/update, so no new permission is needed. Worth notingchrome.tabGroupshas noremove()— a group only dies when it empties — so the working shape ischrome.tabs.ungroup()on the session's tabs before closing them, leaving no group behind to be saved.Either of these would solve it:
Happy to test a fix build against a profile that already has the backlog.