Use this when the Codex Chrome Extension can list the user's real Chrome tabs with browser.user.openTabs(), but browser.user.claimTab(...) fails with:
Grouping is not supported by tabs in this window.
This is a Chrome control-plane issue, not a login issue. The extension can see the user's profile, but cannot take over the grouped or unsupported window. The reliable recovery is to create a fresh, profile-scoped blank Chrome tab, claim that new tab, and navigate it to the authenticated target site.
Patch the Chrome plugin, not the site-specific automation.
Files to edit inside the Chrome plugin:
<chrome-plugin-root>/scripts/open-chrome-window.js
<chrome-plugin-root>/skills/chrome/SKILL.md
Update scripts/open-chrome-window.js so it supports:
CODEX_CHROME_PROFILE_DIRECTORY
CODEX_CHROME_LAUNCH_FLAGS
Required behavior:
- If
CODEX_CHROME_PROFILE_DIRECTORYis set, verify that<Chrome user data dir>/<profile>/Preferencesexists and use that profile. - On macOS, prefer launching Chrome via the app binary:
/Applications/Google Chrome.app/Contents/MacOS/Google Chrome
- Do not use
open -nfor recovery. It can create a window/profile state the extension still cannot claim. - Open a fresh
about:blanktab with:
--profile-directory=<profile>
--new-window
about:blank
- Insert any
CODEX_CHROME_LAUNCH_FLAGSbefore the URL, for example:
--profile-directory=Default --new-window --disable-features=TabGroups about:blank
- If direct binary launch fails on macOS, fall back to:
open -a "<Chrome app path>" --args ...
Update skills/chrome/SKILL.md so agents follow this recovery sequence:
- Use
agent.browsers.list()and choose the extension target matching the real user profile. - Call
browser.user.openTabs()first. - Try to claim the relevant existing tab.
- If claim fails with grouping, try up to 3 already-open neutral tabs from the same
openTabs()result. - If those fail and recovery is authorized, run
scripts/open-chrome-window.jsfor the selected profile. - Re-bootstrap Chrome, call
openTabs()again, choose the newest helper-createdabout:blankorNew Tab, claim it, then navigate that claimed tab to the authenticated URL. - Only after that fails should the agent report a grouped-window blocker or ask the user to open a disposable ungrouped tab.
Run:
CODEX_CHROME_PROFILE_DIRECTORY=Default \
node <chrome-plugin-root>/scripts/open-chrome-window.js --dry-run --jsonExpected shape:
{
"profileDirectory": "Default",
"command": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
"args": [
"--profile-directory=Default",
"--new-window",
"about:blank"
]
}Then run the real helper:
CODEX_CHROME_PROFILE_DIRECTORY=Default \
node <chrome-plugin-root>/scripts/open-chrome-window.jsAfter Chrome opens the fresh tab, use the Chrome skill runtime:
const tabs = await browser.user.openTabs();
const neutral = tabs.find(t => t.url === "about:blank" || t.url === "chrome://newtab/");
const tab = await browser.user.claimTab(neutral);
await tab.goto("https://www.linkedin.com/feed/");If the fresh blank tab claims and navigates successfully, the fix works.
If the newly opened blank tab is still affected by grouped-window state, launch with:
CODEX_CHROME_PROFILE_DIRECTORY=Default \
CODEX_CHROME_LAUNCH_FLAGS="--disable-features=TabGroups" \
node <chrome-plugin-root>/scripts/open-chrome-window.jsDo not switch to the Codex in-app browser for authenticated tasks. It does not have the user's Chrome cookies or logged-in profile context.