Skip to content

CLI cannot acquire Chrome extension backend while Codex app UI works #26820

Description

@khudt01

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-bundled as 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, and agent.browsers.get("extension") fails immediately with Browser is not available: extension.

Related issues

This looks related to the same Chrome extension/backend discovery class as:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLIbrowserbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions