codex icon indicating copy to clipboard operation
codex copied to clipboard

Browser automation unavailable: “The browser access host is unavailable”

Open nje1218-sudo opened this issue 1 month ago • 22 comments

What version of the Codex App are you using (From “About Codex” dialog)?

macOS/26.1021.31345(Build 21828)

What subscription do you have?

pro

What platform is your computer?

No response

What issue are you seeing?

Browser automation fails with “The browser access host is unavailable”. The tool returns an empty browsers list and cannot inspect or interact with open tabs.

What steps can reproduce the bug?

The browser tool returns “The browser access host is unavailable” and an empty browsers list despite an open, manually accessible tab.

What is the expected behavior?

No response

Additional information

No response

nje1218-sudo avatar Oct 25 '26 17:10 nje1218-sudo

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #56822
  • #56873
  • #55814

Powered by Codex Action

github-actions[bot] avatar Oct 25 '26 17:10 github-actions[bot]

up for this. this is annoying

nylla8444 avatar Oct 29 '26 11:10 nylla8444

Additional report on Windows:

Chrome browser access works from a chat started in the desktop app, but fails from Codex chats started in VS Code, with:

The browser access host is unavailable

The affected chat reported failures for both:

  • cua.listTabs({browser:"chrome"})
  • cua.getTab({url: ...}, {browser:"chrome"})

Chrome is running and the target page is accessible manually. GitHub Copilot can also access the browser on the same computer.

Switching the affected Codex chat from Luna to Sol did not resolve the error. Opening the VS Code-created chat in the desktop app did not resolve it either.

Is direct Chrome extension access supported from the VS Code Codex extension? If so, what diagnostics would help identify why the browser access host is unavailable?

This concerns the external Chrome browser, not the built-in browser.

union-shoji avatar Oct 30 '26 04:10 union-shoji

Reproduced on macOS 27.0.1 (Apple Silicon) with external Chrome. Browser control previously worked in the same local chat; it stopped around a desktop-app upgrade. Native Computer Use still works.

Versions read from installed package metadata:

  • ChatGPT/Codex desktop: 26.1027.30824, build 22943
  • Bundled Codex CLI: 0.166.0-alpha.5.1
  • Chrome: 156.0.8078.79

The supported tool call await cua.getState() lists native apps but returns:

{
  "browsers": [],
  "errors": ["Browsers: Error: The browser access host is unavailable"]
}

await cua.getBrowser({id: "chrome"}) fails with the same error before browser or tab selection.

These steps did not restore access:

  • Reinstalling the Chrome extension.
  • Fully restarting Chrome and the desktop app.
  • Resetting the computer-use REPL and retrying discovery.
  • Explicitly mentioning @Chrome.

Desktop logs initially showed EPERM scanning ~/Library/Application Support/Google/Chrome, followed by extension detection skip_unknown. The macOS Files & Folders permission for ChatGPT to access Google Chrome was off. It was enabled and visually verified ON, but browser discovery still failed after another fresh REPL. That permission error is therefore not established as the root cause.

The bundled codex doctor reports a consistent installation, successful desktop app-server initialization, and working provider HTTP/WebSocket connectivity. Some security checks were unavailable in the command sandbox. No raw logs, credentials, page content or session transcript are attached.

Could you check whether the browser host is correctly reattached to existing chats after an upgrade, and expose an actionable reason when it is unavailable?

alea-cai avatar Oct 30 '26 11:10 alea-cai

Sharing an experimental macOS CLI workaround, with source, tests, installation and rollback instructions: codex-chrome-bridge (MIT).

This is for the case where the standalone CLI reports The browser access host is unavailable while the desktop browser integration is available. It is not a confirmed fix for every desktop-only or Windows report in this thread.

On our installation, the cached plugin bootstrap defaulted an absent BROWSER_USE_ACCESS_EXECUTOR_ID to an empty string, and the CLI-launched MCP lacked the desktop access pipe and verifying identity. Supplying those values alone still failed: the native host also checked that the connecting process descended from the desktop app.

The workaround uses a wrapper loaded through the desktop's normal MCP configuration to host a private local relay and separate official CUA processes for CLI connections. It authenticates local peers, binds requests to the connecting CLI daemon and its active account/workspace, and forwards MCP metadata and approval exchanges. Native host ancestry/signature authorization remains in place. The relay adds a new local authorization boundary and should be reviewed as such.

Verified on 2026-10-30, with desktop 26.1027.30824 and standalone CLI 0.166.0 on macOS:

  • A real CLI session successfully called cua.listTabs({browser: "chrome", emit: false}).
  • 75 local automated tests passed; macOS/Linux CI passed. CI does not test a live authenticated browser.

Limitations: the desktop app and hosting local chat must stay open; desktop and CLI must use the same account/workspace; updates may replace the configuration; bulk reloads of multiple CLI sessions can still fail during relay handshaking. Windows and other runtime/version combinations are unsupported, and other browser operations have not yet been validated.

This is an independent workaround, not an official fix or evidence that all reports here share the same cause.

FredrickUnderwood avatar Oct 30 '26 11:10 FredrickUnderwood

Additional reproduction on Windows with JetBrains PhpStorm 2026.2.3 and Codex via @agentclientprotocol/codex-acp 2.5.0.

Environment observed locally:

  • ChatGPT/Codex desktop browser runtime: 26.1027.30824
  • Desktop Codex: 0.166.0-alpha.5.1; PhpStorm Codex sessions: 0.165.0
  • Chrome: 156.0.8078.79

On the same computer and Chrome profile, a chat started in the desktop app successfully lists the existing Chrome tabs through the ChatGPT Chrome extension. A PhpStorm-originated session returns an empty browser list with:

Browsers: Error: The browser access host is unavailable

The configuration parses correctly and the Chrome/browser plugins are enabled. The PhpStorm launch log does not list BROWSER_USE_ACCESS_PIPE_PATH, BROWSER_USE_ACCESS_EXECUTOR_ID or BROWSER_USE_ACCESS_VERIFYING_IDENTITY in its available environment; all three are present in the working desktop environment. The MCP config forwards these names via env_vars, but that cannot supply values absent from the parent process. This suggests a missing desktop browser-host connection in the IDE-launched process, rather than a Chrome site permission problem.

Browser access from PhpStorm reportedly worked previously; we have not isolated the exact update that changed it.

A separate workaround is confirmed working: Chrome DevTools MCP 1.12.0 with --autoConnect, Chrome remote debugging enabled, and explicit Chrome connection consent. This does not restore the original ChatGPT extension integration.

Could you clarify whether direct ChatGPT Chrome-extension access is supported for JetBrains/ACP sessions, and whether the missing browser-host handoff is an expected limitation or a regression? No credentials, private URLs or raw logs are included.

eschiendorfer avatar Oct 30 '26 13:10 eschiendorfer

same issue here. ThreadID 01a1939f-47a3-7103-8db0-04b1613273ea

dohuul avatar Oct 31 '26 20:10 dohuul

Additional Windows CLI/app-server reproduction. OpenAI AI-assisted support directed me here after collecting debug logs and checking effective requirements.

I use Codex through a custom harness app I created, which launches the official Codex app-server. Browser-extension access to my existing signed-in Chrome profile fails from these sessions, while a fresh desktop Codex chat can open a Chrome about:blank tab on the same machine. I previously used nondisruptive signed-in Chrome workflows for months and noticed the failure roughly one week before November 1. The exact last-working version and cause are not established.

Environment checked November 1, 2026:

  • Windows 11 Pro x64, build 26300
  • Standalone Codex CLI: 0.166.0
  • Desktop package: OpenAI.Codex 26.1027.3384.0
  • Desktop-bundled Codex: 0.166.0-alpha.5.1
  • Google Chrome: 156.0.8078.74

Both setup checks passed: Chrome side chat loads for the exact profile after a browser restart, and Chrome shows Manage in desktop Computer Use settings.

The diagnostic used a fresh interactive CLI with process-local RUST_LOG=debug and an explicit log_dir. Only log_dir was overridden. One browser call was attempted, with no retry:

await cua.createBrowserTab("chrome", "about:blank", {sessionName: "Support diagnostic"});

It returned The browser access host is unavailable, with no tab or permission prompt.

Correlation:

  • Thread: 01a197c3-c217-7b42-923e-ee7258720864
  • Call: call_83902a609c704282880ea4506de7f258
  • Call started: 2026-11-01T15:39:28.929Z
  • Failure logged: 2026-11-01T15:39:33.663011Z
  • Logged duration: 4726 ms

A separate read-only app-server query used the normal Codex home and my custom harness app's launch arguments. Request:

{"id":2,"method":"configRequirements/read","params":{}}

Response:

{"id":2,"result":{"supportsIndependentSpeedModes":true,"requirements":null}}

The current CLI feature listing also reports:

browser_use                   stable  true
browser_use_external          stable  true
browser_use_full_cdp_access   stable  true
computer_use                  stable  true

The documented Windows requirements.toml and checked user/system managed_config.toml files are absent. No managed requirements were reported for the query run.

A separate unrecognized saved-app setting, computer_use.windows.always_allowed_app_ids, was removed with owner approval earlier. Strict CLI configuration validation passed afterward, but the browser-host error persisted. The setting remains absent. approval_policy remains on-request and sandbox_mode remains danger-full-access. The three relevant configuration files retained identical before/after hashes during the debug reproduction.

The debug CLI exited normally with code 0. Its complete matching tool response was inspected and contained the error plus generated API documentation, with no underlying browser-service runtime stack.

Native Computer Use can control Chrome after attended session approval, but occupies the desktop. A disposable headless browser lacks the existing profile's authentication. Both are fallbacks, not replacements for nondisruptive use of the signed-in profile.

Please clarify whether external Windows CLI/app-server browser-extension access is intentionally unsupported, whether a recent change affected the previously working route, and whether an official integration path or product change is planned. I am not requesting a permission bypass or copying desktop connection identities.

Selected debug-log event follows. The raw log contains JWT-shaped strings and is not included. Full prompts, unrelated tool calls, account/environment details and generated API documentation are omitted from the excerpts.

Sanitized failure excerpt from codex-tui.log
Codex CLI: 0.166.0, interactive TUI
RUST_LOG=debug; explicit process-local log_dir; no permission/sandbox overrides
One Chrome about:blank attempt, no retries
Startup/model/request payloads and generated tool API documentation omitted
No JavaScript stack trace was returned in the full matching tool response

2026-11-01T15:39:33.663011Z  INFO codex_otel.log_only: event.name="codex.tool_result" tool_result_seq=5 tool_name=js tool_namespace=mcp__cua_repl call_id=call_83902a609c704282880ea4506de7f258 duration_ms=4726 success=false output_truncated=true agent_name=/root arguments={"code":"await cua.createBrowserTab(\"chrome\", \"about:blank\", {sessionName: \"Support diagnostic\"});","title":"Support diagnostic"} output=Wall time: 4.7237 seconds
Output:
The browser access host is unavailable

Matching redacted session records:

{"timestamp": "2026-11-01T15:39:14.248Z", "type": "session_meta", "payload": {"id": "01a197c3-c217-7b42-923e-ee7258720864", "cli_version": "0.166.0", "source": "cli"}}
{"timestamp": "2026-11-01T15:39:28.929Z", "type": "response_item", "payload": {"type": "function_call", "name": "js", "namespace": "mcp__cua_repl", "call_id": "call_83902a609c704282880ea4506de7f258", "arguments": "{\"code\":\"await cua.createBrowserTab(\\\"chrome\\\", \\\"about:blank\\\", {sessionName: \\\"Support diagnostic\\\"});\",\"title\":\"Support diagnostic\"}"}}
{"timestamp": "2026-11-01T15:39:33.663Z", "type": "response_item", "payload": {"type": "function_call_output", "call_id": "call_83902a609c704282880ea4506de7f258", "output": [{"type": "input_text", "text": "Wall time: 4.7237 seconds\nOutput:"}, {"type": "input_text", "text": "The browser access host is unavailable"}]}, "redaction_note": "Generated API documentation omitted. Original response contains three input_text parts; no runtime JS stack frames found."}

pd-product avatar Nov 01 '26 16:11 pd-product

Also experiencing this on macOS with Codex CLI. Had to switch to the ChatGPT Mac app as a result. Would love if this was fixed. Thanks!

ilyakamens avatar Nov 03 '26 17:11 ilyakamens

Same issue on Arch Linux.

Codex version 26.1027.51404.

danielvartan avatar Nov 04 '26 02:11 danielvartan

Same issue on Windows with Codex CLI 0.166.0 running inside Orca: cua.listBrowsers() returns “The browser access host is unavailable.” Chrome’s extension is enabled and the native-host checks pass. Chrome DevTools MCP 1.12.0 with --autoConnect works for me—I could list tabs and read a test page.

lumatic2 avatar Nov 04 '26 04:11 lumatic2

The OpenAI Codex extension in VS Code cannot discover or control Chrome. Calling await cua.getState() returns an empty browser list and:

Browsers: Error: The browser access host is unavailable

The same Chrome profile is accessible from the ChatGPT/Codex app on this machine.

Environment:

  • Linux
  • VS Code 1.144.1
  • OpenAI Codex extension 26.51021.22027
  • Codex CLI 0.166.0
  • Chrome 157.0.8103.38
  • ChatGPT Chrome extension 1.26.1102.11740

The Chrome extension is enabled. Updating Chrome and Codex, restarting, and resetting the CUA runtime did not fix the issue.

Please investigate why browser access works from the app but fails from the VS Code extension, and advise on a supported workaround.

HalimHamidov avatar Nov 04 '26 09:11 HalimHamidov

same here.

  • MacOS 27.0.1
  • codex-cli 0.167.0.
  • Chrome 157.0.8103.38

My thoughts are, that all has started with update to codex-cli 0.166.0.

Please provide a fix or workaround. Thank you.

bltzblnk avatar Nov 06 '26 11:11 bltzblnk

i wrote a similar thing: https://github.com/earonesty/codex-cli-browser-bridge ... run 'codex-doctor' from the cli for a diagnosis

earonesty avatar Nov 08 '26 12:11 earonesty

Additional Windows reproduction from a Codex session hosted in Paseo 0.15.3. ChatGPT Desktop is 26.1103.7773.0, the bundled unified-computer-use plugin is 26.1103.60933, and the ChatGPT extension is enabled in Vivaldi.

Before the workaround, cua.getState() listed native apps but returned browsers: [] and The browser access host is unavailable. The extension and native-host diagnostics passed. Paseo’s separate built-in browser tools worked.

I backed up the plugin’s [.mcp.json](https://github.com/openai/codex/issues/.mcp.json), then removed only the --import and [require-browser-access.mjs](https://github.com/openai/codex/issues/require-browser-access.mjs) arguments from mcpServers.cua_repl.args. A fresh Paseo/Codex chat could then use Vivaldi. Resetting the JavaScript kernel in the original chat did not restart its MCP server.

This is a local workaround that skips browser access verification, not an upstream fix. I did not inspect the affected tool process’s private environment, so the missing authorization context remains an inference. Please provide a supported authenticated way for third-party Codex hosts to connect.

abpiv avatar Nov 10 '26 13:11 abpiv

Additional reproduction on macOS, confirmed November 12, 2026.

Environment (non-identifying version information only):

  • macOS 26.7.1, build 25G241
  • Architecture: x86_64 (Intel)
  • Installed Codex CLI: 0.167.1
  • Installed ChatGPT desktop package: 26.1106.51428, build 26605
  • Google Chrome: 157.0.8103.51

In the affected coding session, Chrome is running, but the supported browser discovery call await cua.getState() repeatedly returns:

{
  "browsers": [],
  "errors": ["Browsers: Error: The browser access host is unavailable"]
}

An attempt to create an in-app browser tab with cua.createBrowserTab("iab", <test URL>, { visible: true }) also returned the same error without opening a tab. Repeating discovery across subsequent turns has not restored access. Native application discovery succeeds and confirms Chrome is running, but no browser connection is available.

This blocks interactive validation of a web application. We have not established the underlying cause or verified whether a fresh desktop-originated chat would work on this installation. We intend to try Chrome DevTools MCP as a separate integration; it has not yet been tested here. No authorization checks have been disabled.

Could you clarify the supported browser-host connection path for CLI/IDE sessions and provide a diagnostic that distinguishes an unavailable host from missing connection/authorization context?

No usernames, hostnames, device identifiers, private URLs, account information, raw logs, or credentials are included.

rmartins0 avatar Nov 12 '26 13:11 rmartins0

Same issue on Linux Mint.

Environment:

  • Linux Mint 22.3, Cinnamon 6.6.9, X11, x86_64
  • Kernel: 7.0.0-42-generic
  • Active Codex backend: 0.167.2
  • ChatGPT desktop / Computer Use plugin: 26.1106.51428
  • Chrome: 157.0.8103.78
  • ChatGPT Chrome extension: 1.26.1102.11740

Chrome is open and usable manually, but:

await cua.listTabs({ browser: "chrome", emit: false });

returns:

The browser access host is unavailable

cua.getState() also returns an empty browser list with the same error. All four browser_use* / computer_use feature flags are enabled.

Restarting Chrome, explicitly mentioning @Chrome, and trying a fresh CLI chat did not help. The extension reports its checks are OK.

kordax avatar Nov 12 '26 15:11 kordax

+1

martinezdylan avatar Nov 16 '26 20:11 martinezdylan

+1

timocouckuyt avatar Nov 18 '26 19:11 timocouckuyt

I reproduced this on macOS with Codex CLI 0.171.0. Desktop could access Chrome, but the CLI’s bundled cua_repl returned “The browser access host is unavailable”. I got the CLI connected to my existing Chrome profile using Google’s Chrome DevTools MCP.

  1. With Node.js and npx installed, register the MCP server in Codex. This pins the version I tested and disables usage statistics and CrUX lookups.

    codex mcp add chrome-devtools -- npx -y [email protected] --autoConnect --no-usage-statistics --no-performance-crux
    
  2. In the running Chrome instance, open chrome://inspect/#remote-debugging and tick Allow remote debugging for this browser instance. This lets an approved debugger control the browser and access data in the selected profile.

  3. Start a fresh Codex CLI session and ask: “Use chrome-devtools to open https://example.com in a new tab, report its title, then close that tab.” Click Allow when Chrome asks about the debugging connection.

The CLI opened the tab, read the title Example Domain and closed it. This is a workaround for external Chrome. The bundled cua_repl error remains unresolved.

Google’s instructions for connecting to a running Chrome instance

samcambridge avatar Nov 22 '26 12:11 samcambridge