CLI cannot acquire Chrome extension backend while Codex app UI works
Summary
The Codex app UI can use the Codex Chrome Extension successfully on this machine, but the terminal-based Codex CLI cannot acquire the Chrome extension browser backend in the same environment.
This does not look like a Chrome profile, extension installation, or native host manifest problem. The extension works from the Codex app UI, while the CLI Node runtime appears to lack the privileged/native browser runtime bridge metadata needed to discover the extension backend.
Expected behavior
When chrome@openai-bundled is installed/enabled and the Codex Chrome Extension/native host checks are healthy, terminal Codex CLI sessions should either:
- expose the Chrome extension backend to the Node/browser runtime, or
- clearly document/report that Chrome extension browser control is app-only and unavailable from terminal CLI sessions.
Actual behavior
In the terminal Codex CLI session:
const { setupBrowserRuntime } = await import('/Users/hunyongkim/.codex/.tmp/bundled-marketplaces/openai-bundled/plugins/chrome/scripts/browser-client.mjs');
await setupBrowserRuntime({ globals: globalThis });
const cliChromeBrowser = await agent.browsers.get('extension');
fails with:
Browser is not available: extension
The same Chrome extension setup works from the Codex app UI for reading web content.
Environment
- Platform: macOS
- Chrome:
149.0.7827.53 - Codex Chrome Extension ID:
hehggadaopoacecdllhhajmbjkdcmajg - Codex Chrome Extension version:
1.1.5_0 - Terminal
codex --version:codex-cli 0.137.0 - Codex app bundled CLI:
/Applications/Codex.app/Contents/Resources/codex --version->codex-cli 0.137.0-alpha.4 - Active terminal thread id:
019e9e6a-e81e-7442-bac0-d3bc42cc1b45
Local diagnostics
Plugin state
Marketplace `openai-bundled`
/Users/hunyongkim/.codex/.tmp/bundled-marketplaces/openai-bundled/.agents/plugins/marketplace.json
browser@openai-bundled installed, enabled 26.602.40724
chrome@openai-bundled installed, enabled 26.602.40724
computer-use@openai-bundled not installed
CLI Node runtime metadata
In the terminal Codex CLI session:
{
"requestMetaKeys": [
"progressToken",
"threadId",
"x-codex-turn-metadata"
],
"hasNativePipe": false,
"turnMetadata": {
"model": "gpt-5.5",
"reasoning_effort": "high",
"sandbox": "none",
"session_id": "019e9e6a-e81e-7442-bac0-d3bc42cc1b45",
"thread_id": "019e9e6a-e81e-7442-bac0-d3bc42cc1b45",
"thread_source": "user"
}
}
This seems to be the key difference from the app UI path: the CLI runtime does not appear to have a native pipe / browser backend metadata injected.
Chrome running check
Google Chrome running: yes
Extension check
{
"extensionId": "hehggadaopoacecdllhhajmbjkdcmajg",
"userDataDirectory": "/Users/hunyongkim/Library/Application Support/Google/Chrome",
"selectedProfileDirectory": "Default",
"installed": true,
"enabled": true,
"profiles": [
{
"profileDirectory": "Default",
"installed": true,
"registered": true,
"enabled": true,
"disabled": false,
"versions": [
"1.1.5_0"
],
"selected": true
}
],
"exitCode": 0
}
Native host manifest check
{
"manifestPath": "/Users/hunyongkim/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.openai.codexextension.json",
"expectedHostName": "com.openai.codexextension",
"actualHostName": "com.openai.codexextension",
"expectedExtensionId": "hehggadaopoacecdllhhajmbjkdcmajg",
"expectedOrigin": "chrome-extension://hehggadaopoacecdllhhajmbjkdcmajg/",
"allowedOrigins": [
"chrome-extension://hehggadaopoacecdllhhajmbjkdcmajg/"
],
"exists": true,
"nameMatches": true,
"hasExpectedOrigin": true,
"registryMatchesManifestPath": true,
"correct": true,
"problem": null
}
Why this looks different from an install/profile issue
- The Codex app UI can access Chrome/web content successfully on the same machine.
- The terminal CLI sees
chrome@openai-bundledas installed and enabled. - The selected Chrome profile has the extension installed and enabled.
- The native host manifest is present and correct.
- The terminal CLI Node runtime reports
hasNativePipe: false, andagent.browsers.get("extension")fails immediately withBrowser is not available: extension.
Related issues
This looks related to the same Chrome extension/backend discovery class as:
- #21851
- #21879
- #24838
- #25247
- #25809
The additional narrowing here is that the Codex app UI path works, while the terminal CLI path fails on the same machine without changing Chrome/extension settings.
11 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I can reproduce this from another terminal Codex CLI session on macOS.
Environment
25.2.0/ arm64codex --version:codex-cli 0.137.0chrome/26.527.60818149.0.7827.54at/Applications/Google Chrome.apphehggadaopoacecdllhhajmbjkdcmajg1.1.5_0DefaultReproduction
In the CLI session, using the bundled Chrome plugin browser client:
Result:
The clean retry also logged native pipe discovery failures:
Local diagnostics
Chrome running check:
Extension check:
Native host manifest check:
The documented recovery step also failed from the CLI session:
This matches the report: the selected Chrome profile, extension install/enabled state, and native host manifest all look healthy, but the CLI cannot discover/acquire the
extensionbrowser backend.I spent a fair amount of time trying to figure this one out, but all I learned was that the Codex app is able to control Chrome just fine. It is only the CLI that breaks. I tried both the hombrew-installed CLI and the app-bundled CLI and both failed.
same failue here.
codex-cli: 0.140.0
Codex app bundled CLI: 0.140.0-alpha.19
Chrome: 149.0.7827.114
Codex Chrome Extension: 1.1.5_0
agent.browsers.list(): []
hasNativePipe: false
extension installed/enabled: true
native host manifest correct: true
I have the same issue on my Mac
Environment:
codex-cli 0.142.026.616.71553149.0.7827.1561.1.5_0Behavior:
agent.browsers.list()returns[].agent.browsers.get("extension")fails with:Local checks:
getInfowith:The key CLI-side difference appears to be that the Node runtime does not expose the privileged native pipe bridge:
So this does not look like a Chrome profile, extension installation, or native host manifest issue. The Chrome extension backend is alive, but terminal Codex CLI cannot acquire it because the trusted/native pipe bridge is missing in the CLI runtime.
Could you confirm whether Chrome extension control is expected to work from terminal CLI sessions? If it is app-only, the CLI should probably report that explicitly. If it is supported, this looks like a CLI/runtime bridge regression.
Same issue here:
Here’s a concise issue writeup you can paste into GitHub.
## Summary
@Chromeworks from the Codex Mac desktop app, but fails from Codex CLI with:```text
Browser is not available: extension
This happens even though Chrome is running, the Codex Chrome Extension is installed/enabled, the native host manifest is valid, and the native host process is running.
## Environment
## Reproduction
From Codex CLI:
use @Chrome to browse www.oracle.com
The Chrome skill loads, then this call fails:
const { setupBrowserRuntime } = await import("/Users/riwagne/.codex/plugins/cache/openai-bundled/chrome/26.616.71553/scripts/browser-client.mjs");
await setupBrowserRuntime({ globals: globalThis });
globalThis.browser = await agent.browsers.get("extension");
nodeRepl.write(await browser.documentation());
Result:
Browser is not available: extension
## Expected Behavior
Codex CLI should connect to the same Codex Chrome Extension / native host path that works from the Codex Mac desktop app, then open or control a Chrome tab.
## Actual Behavior
Codex CLI cannot discover or connect to the Chrome extension backend:
Browser is not available: extension
## Diagnostics Already Checked
Chrome is running:
Google Chrome running: yes
process: Google Chrome
Codex Chrome Extension is installed and enabled in the selected profile:
{
"extensionId": "hehggadaopoacecdllhhajmbjkdcmajg",
"selectedProfileDirectory": "Default",
"installed": true,
"enabled": true,
"exitCode": 0
}
Native host manifest is valid:
{
"manifestPath": "/Users/riwagne/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.openai.codexextension.json",
"expectedHostName": "com.openai.codexextension",
"actualHostName": "com.openai.codexextension",
"expectedOrigin": "chrome-extension://hehggadaopoacecdllhhajmbjkdcmajg/",
"hasExpectedOrigin": true,
"correct": true,
"problem": null
}
Native host process is running:
/Users/riwagne/.codex/plugins/cache/openai-bundled/chrome/latest/extension-host/macos/arm64/extension-host chrome-extension://hehggadaopoacecdllhhajmbjkdcmajg/
Opening Chrome through the plugin helper succeeds:
node scripts/open-chrome-window.js
Google Chrome window open request
status: opened
profile: Default
command: open -n -a "/Applications/Google Chrome.app" --args --profile-directory=Default --new-window about:blank
But retrying agent.browsers.get("extension") still fails with:
Browser is not available: extension
## Sandbox Observation
The CLI launches node_repl through a sandbox with network disabled, even when the main Codex config has network enabled:
/Applications/Codex.app/Contents/Resources/codex sandbox ... default_permissions="node_repl" ... permissions.node_repl={..., network = {enabled = false}} ...
I also tried launching Codex CLI with:
codex -C /Users/riwagne/.codex/plugins/cache --dangerously-bypass-approvals-and-sandbox
The Chrome connection still failed with the same error. A later ps still showed node_repl sandbox processes with network = {enabled = false}.
## Additional Notes
Two bundled helper scripts in the Chrome plugin cache are not executable on disk:
-rw-r--r-- scripts/installed-browsers.js
-rw-r--r-- scripts/check-native-host-manifest.js
Running them through node works:
node scripts/installed-browsers.js --check
node scripts/check-native-host-manifest.js --json
So this may be unrelated, but it made the documented troubleshooting commands fail unless invoked through node.
## Impact
The same Chrome plugin works in Codex Mac desktop, but not in Codex CLI. This blocks using @Chrome from CLI sessions for sites that require the user’s existing Chrome profile/session.
Please fix this this its so annoying!!!
I can reproduce this on the current macOS/CLI/plugin versions. The Codex/ChatGPT app can use Chrome, but a fresh terminal Codex CLI session cannot discover the same Chrome extension backend.
Environment
26.4(25E246), arm64codex-cli 0.144.0codex-cli 0.144.0-alpha.426.707.31123150.0.7871.115Default1.1.5_0,1.2.27203.26575_0CLI result
After loading the bundled
browser-client.mjsand runningsetupBrowserRuntime({ globals: globalThis }):The required delayed retry returns the same result.
Verified healthy
Defaultprofile.Recovery attempts completed
about:blankwindow inDefaultusingscripts/open-chrome-window.js.The fresh post-reinstall CLI still returns an empty browser list and
Browser is not available: extension, while the app continues to work. This rules out a stale CLI process and makes the CLI-to-extension runtime registration/routing path the likely failure point.Same here. MacOS Sequoia 15.6. Codex CLI (codex-cli 0.144.0) just won't connect to Chrome while the Codex Desktop app does it fine. Tried both npm and brew installs, no result. I wish there was an option to spin out a Chrome session from the CLI without needing to run the desktop app. Bumping this in hopes they'll fix it soon.
Same failure on codex-cli 0.144.0 and 0.144.1 (macOS arm64, Chrome 150.0.7871.115, extension 1.2.27203.26575, ChatGPT/Codex app 26.707.31428). I spent a day root-causing it and can add some evidence beyond the (excellent) diagnostics already in this thread — in particular @jbaehova's finding that
nodeRepl.nativePipeisundefinedin CLI sessions while the extension-host socket itself answersgetInfocorrectly. I can confirm that and extend it:1. The pipe-granting side is not present in the standalone CLI binary
Strings analysis of the CLI binaries (both 0.144.0 and 0.144.1, standalone installer):
x-codex-turn-metadata(the CLI is the MCP client that spawnsnode_repland passes turn metadata — that part works);codex-browser-use(the socket rendezvous dir),native_pipe,NODE_REPL_TRUSTED,browser-client.mjs, orchrome-native-hosts.So the privileged native-pipe bridge that
browser-client.mjsneeds (discovery = readdir/tmp/codex-browser-use+ dial each socket throughnodeRepl.nativePipe) has no granting side in the standalone CLI. This is not a per-machine misconfiguration — it isn't shipped.I also reproduced the exact CLI behavior with a minimal MCP harness spawning
node_replwith the same env the CLI uses fromconfig.toml(includingNODE_REPL_TRUSTED_BROWSER_CLIENT_SHA256Smatching the installedbrowser-client.mjssha256, and_meta["x-codex-turn-metadata"]set):setupBrowserRuntime()succeeds,nodeRepl.nativePipestaysnull, every per-pipe dial fails internally, andagent.browsers.list()returns[]with no surfaced error.NODE_REPL_TRUST_ALL_CODE=1doesn't change it, and withRUST_LOG=traceno bridge handshake is even attempted.2. The granting side lives in the desktop app process, gated on peer code signing
The desktop app's logs (
~/Library/Logs/com.openai.codex/...) show the counterpart component,browser-use-native-pipe-server, which verifies the connecting peer's code signature:So the capability appears to be deliberately confined to node_repl instances the app itself spawns. That would be a reasonable security posture — if it were surfaced. Which leads to the actual bug as experienced from the CLI:
3. Every agent-visible signal claims browser use works in the CLI
codex features liston the standalone CLI reportsbrowser_use stable true(alsobrowser_use_external,in_app_browser);control-chromeskill is installed and instructs the model through the full bootstrap + troubleshooting flow;BROWSER_USE_AVAILABLE_BACKENDS="chrome,iab"into the CLI'sconfig.tomlnode_repl env;[]/Browser is not available: extension.The combination is effectively undiagnosable from inside a session: the model re-runs the documented troubleshooting for hours, asks the user to update Chrome / reinstall components that are already healthy, and can never conclude anything. Echoing the question upthread: please confirm whether Chrome extension control is intended to work from terminal CLI sessions. If it is app-only, the minimal fix would be any of: an explicit error from
browsers.list()/get("extension")("browser use requires the Codex/ChatGPT desktop app runtime"), not reportingbrowser_use = truewhere it cannot work, or not installing thecontrol-chromeskill + browser env into standalone CLI configs.4. Related but distinct: the bundled plugin auto-updater can break the app path too
While investigating, the
chrome@openai-bundledplugin auto-updated 3 times in ~24h (26.707.30751 → .31123 → .31428). The update replaces the cache dir but does not re-runinstallManifest.install(): the native-messaging manifest mtime never changed across updates,chrome/latest/was transiently deleted while both the manifest andchrome-native-hosts-v2.jsonstill pointed at it,extension-host-config.jsonwas missing next to the extension-host binary, and the running extension host kept executing from a deleted binary — after which the app's pipe server rejected it (missing-code-signing-identity) and the app itself logged"No ChatGPT browser route is available for browser session …". Browser use was broken in the desktop app as well until a manual Settings → Computer use → Google Chrome → Reinstall extension plus a Chrome restart. Happy to file that separately with full logs if useful.I can reproduce this on the current macOS/CLI/plugin versions. This report adds repeated reinstall evidence and an uninstall-state/UI problem that keeps sending users through the same ineffective recovery loop.
Environment
26.5.1(25F80), arm64codex-cli 0.144.126.707.51957150.0.7871.1151.2.27203.26575_0DefaultActual behavior
From a terminal Codex CLI session, after loading the plugin-provided
browser-client.mjsand initializing the browser runtime:The ChatGPT Chrome sidepanel works in the same Chrome profile and can see/control the active signed-in tab. The failure is isolated to terminal CLI backend discovery.
All local checks pass
Default.com.openai.codexextensioncorrect: trueproblem: null~/.codex/chrome-native-hosts-v2.json.chrome/latestextension host.scripts/open-chrome-window.jssuccessfully opens a newabout:blankwindow inDefault.[].Recovery attempts
The Chrome plugin was uninstalled/reinstalled from the ChatGPT/Codex plugin UI and Codex was restarted five times. Chrome and Codex were also restarted, and the documented selected-profile window reconnect was attempted. None of these changed the CLI result.
Additional uninstall/reinstall UX problem
After clicking uninstall and restarting Codex, the plugin appears again. Local state explains the visible behavior:
The bundled marketplace is registered from the local
openai-bundledsnapshot, so startup rehydrates the plugin while the config still says enabled. This makes an uninstall appear to have succeeded temporarily, then reverses it on restart. More importantly, reinstalling does not repair the missing CLI backend.Please ensure plugin removal updates the durable enabled state, and stop recommending reinstall when extension/native-host checks already pass but the terminal runtime exposes no browser backend.
Possible version/bridge clue
The current native-host registration points to the separate plugin app-server executable:
Local logs show the working Chrome sidepanel connecting as
codex-chrome-extension-sidepanel, while the standalone terminal CLI session still receives no browser backend. This supports the existing hypothesis that the terminal runtime is missing the privileged/native bridge rather than having a broken Chrome install.Expected behavior
Either:
No credentials, cookies, or private browser/session contents are included in this report.