Chrome/browser-use setupAtlasRuntime can hang when ambient /backend-api/me probe does not complete
Environment
- Codex Desktop App: 26.506.21252 (build 2575)
- Bundled codex-cli: 0.129.0-alpha.15
- Platform: macOS 26.3.1, Darwin 25.3.0, Apple Silicon
- Chrome: 148.0.7778.97
- Plugin: openai-bundled Chrome plugin 0.1.7; Chrome extension installed/enabled, extension package version 1.1.4_0
Summary
The openai-bundled Chrome/browser-use plugin cannot initialize in Codex Desktop. Calling the official setupAtlasRuntime() from browser-client.mjs hangs until the JavaScript execution environment times out with:
js execution timed out; kernel reset, rerun your request
In this reproduction, the failure appears to occur during browser-use bootstrap before any browser tab work. The local extension and native messaging host appear installed correctly, and the bundled browser client file matches the packaged marketplace hash. Local code inspection indicates that setupAtlasRuntime() starts an ambient account/network initialization branch that performs a non-browser nodeRepl.fetch() to https://chatgpt.com/backend-api/me. In this environment, that request remains pending/hangs in the Node REPL path.
Minimal reproduction
In a Codex Desktop thread with the Chrome/browser-use plugin available:
const { setupAtlasRuntime } = await import("<bundled-chrome-plugin>/scripts/browser-client.mjs");
await setupAtlasRuntime({ globals: globalThis });
Observed result:
js execution timed out; kernel reset, rerun your request
Additional local probes:
- Importing
browser-client.mjsalone returns quickly. - Calling
setupAtlasRuntime({ globals: globalThis })hangs before browser tab operations. - Direct
nodeRepl.fetch("https://chatgpt.com/backend-api/me")shows the same timeout behavior in this environment. - A disallowed URL such as
https://example.comfails quickly with an allowlist error, sonodeRepl.fetchcan return quickly on other paths.
Local code path evidence
In the bundled browser-client.mjs:
Snresolves toglobalThis.nodeRepl.fetchwhen available.- The exported
setupAtlasRuntimefunction is minified aszseand executesvc(), Dy()during setup. Dy()starts ambient network initialization unlessPs()returns true.- The ambient branch calls
ep()without awaiting it. ep()callsRy().Ry()calls:
Sn("https://chatgpt.com/backend-api/me")
So the precise claim is: setup starts a pending ambient non-browser fetch to /backend-api/me; it is not a user-authored JS call, and it appears before the browser client becomes usable in this reproduction.
Network observation
In this network environment, requests to both of the following URLs return a Cloudflare challenge page instead of the expected application/API response:
https://chatgpt.com/
https://chatgpt.com/backend-api/me
Relevant headers observed from command-line HTTP probes:
HTTP/2 403
cf-mitigated: challenge
server: cloudflare
content-type: text/html; charset=UTF-8
I do not want to overstate causality: the Cloudflare challenge is an observed external symptom and a plausible trigger for the non-browser nodeRepl.fetch path to fail or hang, but the timeout alone does not prove Cloudflare is the only root cause. The user-visible bug is that browser-use setup hangs instead of failing fast or degrading when this ambient probe cannot complete normally.
Diagnostics already checked
- The
browser_usefeature is enabled. - Chrome extension check reports installed, registered, enabled.
- Native messaging manifest exists and points to the expected host origin.
- Native host binary exists and is executable.
browser-client.mjsSHA-256 matches the bundled marketplace copies:
166098b9d347eab529245458a72c84f666c56a9d357a0e8c86cb72ae70f0e9c8
- Restarting Codex Desktop and Chrome did not fix the issue.
- Reinstalling the Chrome plugin did not fix the issue.
Internal switch observation
The bundled client appears to have a code-level request metadata switch:
x-codex-browser-use-disable-ambient-network
The ambient branch is skipped only when:
globalThis.nodeRepl?.requestMeta?.["x-codex-browser-use-disable-ambient-network"] === true
In the packaged app, nodeRepl.requestMeta is not user-mutatable from JS, and I could not find evidence of a supported user config/UI path to inject this request metadata key.
Expected behavior
setupAtlasRuntime() should not be able to hang indefinitely because an optional ambient account/telemetry/user probe cannot complete. It should do one of the following:
- fail fast with a clear browser-use initialization diagnostic,
- put a short timeout around the ambient
nodeRepl.fetchcalls, - treat non-JSON/403/HTML challenge responses as a recoverable ambient probe failure,
- skip/degrade optional ambient initialization and still allow browser backend discovery where safe, or
- expose a supported way for the host/user configuration to set
x-codex-browser-use-disable-ambient-network.
Why this matters
The current failure mode looks like a generic JavaScript execution timeout even though the Chrome extension and native host are installed correctly. This makes the issue hard to distinguish from a broken Chrome plugin install, while in this reproduction the failure appears to occur during browser-use bootstrap before any browser tab work.
8 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Follow-up after testing the suggested duplicate workarounds:
I do not think this issue should be closed as a duplicate of the current suggestions yet.
What I tested:
/tmp/codex-browser-use/*.sockcandidates plus one extension-host socket. I removed all non-extension socket pathnames so that only the extension-host candidate remained, then retried Chrome setup.setupAtlasRuntime()still timed out after cleanup. So the #21672 workaround does not resolve this case.getInfohypothesis: I connected directly to the remaining extension-host socket using the same framed JSON-RPC protocol.pingreturned"pong", andgetInforeturnedname: "Chrome"/type: "extension"promptly. So this case does not match “extension-host socket does not respond to getInfo”.codex app-server --helpworks, andnodeRepl.homeDiris a string rather thannull.Additional checks:
https://chatgpt.com/backend-api/meconsistently returned HTTP 403 HTML instead of the expected JSON; most modes includedcf-mitigated: challenge, and one mode returned plain 403 HTML. In that plain-403 mode, directnodeRepl.fetch("https://chatgpt.com/backend-api/me")still timed out, and Chrome setup still timed out.Current state:
This suggests a narrower failure mode than the duplicate candidates:
setupAtlasRuntime()starts or depends on ambient network work that calls ChatGPT backend endpoints, and when those endpoints return challenge/HTML or otherwise do not complete throughnodeRepl.fetch, setup can hang instead of fast-failing and continuing with the reachable Chrome extension backend.A fix that would likely address this case would be one of:
/backend-api/meprobe during extension backend discovery unless it is strictly required.I am seeing a closely related Windows reproduction.
Feedback / correlation ID from Codex
/feedback:Environment:
Initial failure:
Calling the Chrome browser backend to list open tabs timed out repeatedly.
browser.user.openTabs()never returned; the Node REPL eventually reported:Initial local diagnostics showed that the Chrome extension itself was installed and enabled in the Default Chrome profile, but the Windows native messaging registry key was missing:
The manifest already existed at:
Manual repair performed:
I manually added the HKCU native messaging host registry key pointing to the manifest path. After that, the bundled plugin check passed:
Current state after repair and restarts:
Even after this, Chrome/browser-use still hangs during browser-client setup / openTabs. The visible failure remains a JS execution timeout before any useful browser tab operation completes.
Additional observation:
There were multiple
codex-browser-use*named pipes present. I also tried a diagnostic run that only allowed the current Chrome host pipe to be seen bybrowser-client.mjs; setup still timed out. I also tried a run that only allowed non-Chrome browser-use pipes; setup still timed out. This makes the remaining issue look less like a Chrome profile / extension install / registry problem, and more like a browser-use native pipe bridge or setup handshake hang.Expected:
Once the Chrome extension is installed/enabled, the native messaging manifest is correct, and Chrome is able to start
extension-host.exe,setupAtlasRuntime()/browser.user.openTabs()should either work or fail fast with a clear diagnostic.Actual:
The call hangs until the JS execution timeout resets the kernel.
For visibility, I think this new Windows reproduction is pointing to the same solution direction I proposed earlier here:
https://github.com/openai/codex/issues/21704#issuecomment-4405214603
And the new reproduction is here:
https://github.com/openai/codex/issues/21704#issuecomment-4406906316
The important point is that this should probably not be treated as only another user-side Chrome profile / extension / registry repair issue. In the Windows reproduction, the native messaging manifest is already correct after repair, the extension is installed/enabled, and Chrome is able to start
extension-host.exe, butsetupAtlasRuntime()/browser.user.openTabs()still hangs until the JS execution timeout.So I think the fix should focus on making the browser setup path resilient to the ambient ChatGPT backend probe / setup handshake path:
/backend-api/meprobe during extension backend discovery unless it is strictly required.In other words, once the extension backend is reachable, browser setup should continue or fail fast with a clear diagnostic instead of being blocked by unrelated ambient backend/network work. Please refer to the proposed solution direction in my earlier comment above.
I can reproduce what looks like the same failure mode on Windows.
Environment
0.130.0-alpha.526.506.31421chrome@openai-bundled0.1.71.1.4_0147.0.7727.139hehggadaopoacecdllhhajmbjkdcmajg127.0.0.1:10808What I observed
The official Chrome plugin initialization hangs at:
It eventually times out with the Node REPL kernel reset.
The Chrome-side diagnostics pass:
chrome-is-running.js --json: Chrome is runningcheck-extension-installed.js --json: extension installed, registered, enabledcheck-native-host-manifest.js --json: manifest is correct\\.\pipe\codex-browser-use...pipe returnsgetInfosuccessfully with Chrome extension infoSo the Chrome extension/native-host/pipe path itself appears healthy.
Important diagnostic
nodeRepl.fetch("https://chatgpt.com/backend-api/me")hangs in the same environment, while normal browser access to ChatGPT works. Command-line probes to ChatGPT/backend API endpoints can hit Cloudflare challenge behavior, which seems consistent with this issue's ambient network hypothesis.When I inject the existing metadata flag before loading
browser-client.mjs:then run the normal initialization path again,
setupAtlasRuntime({ globals: globalThis })completes quickly,agent.browsers.get('extension')works, and Chrome can be controlled normally.I did not need to modify
browser-client.mjs. In fact, modifying that file breaks trust and causes:Expected fix
I agree with the suggested direction here: ambient network/account/telemetry initialization should not be able to block Chrome backend discovery indefinitely. It should fail open, have a short timeout, or expose a supported setting for
x-codex-browser-use-disable-ambient-network.For anyone affected, here is the short-term prompt I send to Codex before using
@chromein my environment.This is only a local diagnostic/workaround prompt, not an official fix:
In my case, this lets
setupAtlasRuntime({ globals: globalThis })complete and allowsagent.browsers.get("extension")to control the real Chrome backend.Again, I think the product fix should be to make the ambient backend / site-status network probes fail fast or degrade safely, rather than requiring users to inject request metadata manually.
One additional data point from local verification: the bundled
Chromeskill now appears to carry this workaround in its bootstrap template by settingx-codex-browser-use-disable-ambient-networkbeforesetupAtlasRuntime().That is useful as a call-site mitigation, but I do not think it closes the underlying issue.
Why:
browser-client.mjswithout injecting that metadata can still reproduce the same hang;So from my side, this issue still looks valid even if the bundled skill now includes a mitigation. The durable fix still seems to be one of:
/backend-api/meprobe with a short timeout;One follow-up that may be useful for others hitting this issue: I published a small local wrapper skill example here:
https://github.com/JaisingZ/chrome-local-skill
This is not an upstream fix and it does not replace the official
chrome@openai-bundledplugin.What it does:
~/.codex/skillsx-codex-browser-use-disable-ambient-networkbefore Chrome bootstrapWhy this is useful:
Chromeskill or marketplace/cache copies is fragile and gets overwritten by Codex / plugin upgradesbrowser-client.mjs, which would break trustSo this repo is mainly a persistence / operability workaround for affected users, not a substitute for the product fix discussed above.
I still think the real fix should be in the product/runtime layer:
/backend-api/meprobe with a short timeoutPossibly related diagnostic from Chromebook / Crostini Linux:
For
chatgpt.com/backend-api/*requests from the same environment and network, I observed User-Agent-dependent Cloudflare behavior:cf-mitigated: challengecf-mitigated: challengeSo in my environment, non-browser HTTP requests to
backend-apican be challenged by Cloudflare, but a browser-like User-Agent changes the result enough to reach the application layer.This may be relevant to the ambient
/backend-api/meprobe described here, although I am not specifically reproducing the browser-use setupAtlasRuntime hang.