claude-in-chrome: always opens new window for MCP tab group instead of reusing existing window
Open 💬 0 comments Opened Jun 10, 2026 by dpc00
When the extension initializes its MCP tab group (getOrCreateMcpTabContext), it always calls chrome.windows.create(), opening a new browser window even when an existing normal window is already open.
Steps to reproduce
- Have Edge or Chrome open with one or more existing windows
- Connect Claude Code via the claude-in-chrome extension
- A second "Personal" window opens containing the MCP tab group
Expected behavior
MCP tab group is created as a new tab in the existing focused window, not a new window.
Actual behavior
chrome.windows.create() is always called, producing a duplicate browser window.
Suggested fix
In getOrCreateMcpTabContext, call chrome.windows.getLastFocused({windowTypes: ["normal"]}) first and create the tab in that window. Only fall back to chrome.windows.create() if no existing window is available.
Environment
- Extension version: 1.0.75
- Browser: Microsoft Edge (also reproducible in Chrome)
- OS: Windows 11