In-app Browser bootstrap fails because node_repl rejects node:process import
Open 💬 10 comments Opened Jul 24, 2026 by farzanmrz
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
Summary
The bundled in-app Browser plugin fails during initialization before it can discover or control any browser tabs.
Environment
- Platform: macOS
- Codex CLI: 0.144.0
- Browser plugin versions reproduced:
- 26.721.30844
- 26.721.31836
Error
Importing module "node:process" is not allowed in node_repl
Reproduction steps
- Open any page in Codex's in-app Browser.
- Start a Codex task that needs browser automation.
- Initialize the Browser plugin using its documented
browser-client.mjsbootstrap. - The module import fails immediately, before browser discovery, tab inspection, navigation, or authentication checks.
Expected behavior
setupBrowserRuntime should initialize successfully and allow Codex to discover and control the open in-app Browser tab.
Actual behavior
The generated Browser client fails at module import. The bundle defines a process shim near its beginning but later contains this static import:
import { env as Ub } from "node:process";
The browser-control runtime rejects that import. Because ESM imports are evaluated before runtime initialization, no browser backend or tab can be reached.
Troubleshooting performed
- Fully restarted Codex.
- Confirmed that the bundled Browser plugin refreshed from version
26.721.30844to26.721.31836. - Reproduced the identical error with the refreshed version.
- Confirmed independently that the task's non-browser data source works.
- Confirmed that the failure occurs before any website-specific action.
Impact
All workflows requiring the bundled in-app Browser plugin are blocked, even when a browser tab is visibly open.
Possibly related issues
- #25247 — Browser plugin bootstrap/trust failure
- #32925 — Earlier Browser process-shim compatibility regression
10 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Confirmed on Windows 11 with the current Codex App / bundled Browser version
26.721.81911.Observed error:
Additional validation performed:
browserandchrome.26.721.81911.scripts/browser-client.mjs, beforesetupBrowserRuntime()can initializeglobalThis.agent.agentremains undefined as a downstream consequence.This appears to be the same cross-platform runtime compatibility regression reported for Linux in #36175: the trusted bundled Browser client statically imports
node:process, while the supportednode_replenvironment rejects that module before Browser Runtime initialization.This Windows reproduction helps rule out plugin-cache drift, stale installation, and platform-specific browser discovery as the primary cause.
Confirmed again on Windows with the current 26.803 app/plugin generation. This is still reproducible after the earlier #32925 process-shim fix.
Environment
26200.8973OpenAI.Codex_26.803.10989.0_x6426.803.81509cua-node 0.0.6/20260808024807-83088b37822424.14.0Exact failure
Following the Browser skill's prescribed bootstrap with the installed absolute
scripts/browser-client.mjspath fails during module import:The generated client contains a static import equivalent to:
The failure occurs before
setupBrowserRuntime(), browser discovery, tab enumeration, navigation, DOM inspection, screenshots, authentication, or any website-specific action. The open page and its data were not inspected.A direct runtime-shape check also showed that the task runtime does not expose a normal global
processobject (processabsent; noversionsoron), so the bundle cannot simply rely on the host global instead.Cache/source reconciliation proof
The installed cache and bundled marketplace source are identical:
26.803.8150926.803.81509browser-client.mjsSHA-256:8676FACA28EDDB6424D4B54116FE8305E2DA6A0CA4E5271E8758FC3C55C3B8FCbrowser-client.mjsSHA-256:8676FACA28EDDB6424D4B54116FE8305E2DA6A0CA4E5271E8758FC3C55C3B8FCTherefore, deleting/rebuilding the plugin cache or reinstalling the bundled Browser plugin will currently recreate the same incompatible client. This rules out stale cache drift for this reproduction.
Relationship to #32925
#32925 failed because an earlier generated client attempted to redefine
globalThis.process. The current 26.803 client no longer fails at that assignment; it now fails because the restricted runtime rejects the client's staticnode:processimport. This appears to be a distinct regression at the same generated-client/runtime contract boundary.Suggested fix and regression coverage
node:processdependency from the generated Browser client, consistently use the bundle's safe process/environment shim, or explicitly permit only the required safe export for the trusted bundled client.browser-client.mjsinside the exact shipped restrictednode_replruntime, obtains theiabbinding, enumerates an open tab, and performs one harmless metadata/DOM read.Official Browser documentation says the desktop integration should be able to inspect rendered state and take screenshots, but this bootstrap failure prevents reaching that supported behavior.
Confirmed on Windows with the Chrome extension backend, not only the in-app Browser.
Environment
Microsoft Windows NT 10.0.26200.0 x64OpenAI.Codex_26.803.10989.0_x6426.803.8150926.803.815091.2.27259.19709_0Default019ffc8a-9a63-7aa2-9924-2c835d7f8473Chrome connection checks
The Chrome-side installation and native messaging connection appear healthy:
HKCU\Software\Google\Chrome\NativeMessagingHosts\com.openai.codexextensionexists and points to the expected manifest.correct: true.extension-host.exeis running from the path referenced by the manifest.Exact failure
Following the installed Chrome/Browser skill bootstrap fails during the import of
scripts/browser-client.mjs:The failure occurs before
setupBrowserRuntime(), browser discovery,agent.browsers.get("chrome"), or tab enumeration. The test was retried after two seconds with the same result.Troubleshooting already performed
OpenAI.Codex.This extends the existing reproduction to the external Chrome extension backend on the current Windows 26.803 app/plugin generation. The native host is available and running, but the bundled browser client cannot initialize because its static
node:processimport is rejected by the supportednode_replruntime.Confirmed on macOS with the bundled Chrome plugin version 26.803.61601.
The active Chrome tab can be read through getTabContext, but interactive
browser control fails immediately while importing browser-client.mjs:
Importing module "node:process" is not allowed in node_repl
The installed bundle still contains:
import { env as xm } from "node:process";
Reinstalling/updating Codex, restarting Chrome, and rebooting macOS did
not resolve it. This also affects the external Chrome integration, not
only the in-app Browser.
Confirmed on macOS 27.0 (Apple Silicon) with Codex CLI 0.149.0 and bundled Chrome plugin 26.727.51351.
Following the plugin SKILL.md bootstrap exactly fails immediately with:
Importing module "node:process" is not allowed in node_replThe failure occurs before browser discovery, so it is independent of Chrome login or extension state. The current bundled
browser-client.mjsstill contains a staticnode:processenv import. On macOS, that import is not needed for the macOS code path; replacing it with a safe runtime env lookup or making it platform-conditional should allow the trusted client to load.This blocks the standard Chrome-control workflow despite a connected macOS node with browser, screen-recording, Accessibility, and AppleScript permissions.
Update — still reproducible on Windows 26.818 (2026-08-23)
The failure persists after upgrading from the environment in my previous comment.
Current environment
OpenAI.Codex_26.818.5229.0_x6426.818.41509Fresh reproduction
http://localhost:8501/.HTTP/1.1 200 OK.browser-client.mjsbootstrap.Additional isolation evidence
Using the same bundled runtime in a temporary diagnostic session with the Node sandbox disabled was able to bind to the real Chrome extension backend and enumerate an existing Chrome tab. This shows that Chrome, the extension/native bridge, and the browser binding are reachable outside the failing trusted/sandboxed path.
That diagnostic is not a workaround or a successful end-to-end browser test: navigation then failed closed because the browser security/auto-review check was unavailable. No security control was bypassed, no persistent sandbox change was made, and the normal Codex-integrated Chrome path remains unusable.
Compared with the earlier reproduction, the outward error has changed from the explicit
node:processrejection to a generic trusted-process exit, but the failure is still before any website-specific action. This continues to point to the Codex Desktop trusted execution / sandbox / code-mode-host layer rather than the local website or Chrome installation.macOS update: CLI failed with a stale bundle, then recovered after bundle refresh
I reproduced this on macOS 26.5.2 (arm64) with Codex CLI
0.149.1and ChatGPT/Codex Desktop26.818.61809(build 7019).Two fresh CLI sessions loaded cached Chrome plugin
26.803.61601and failed before browser discovery with:Computer Use in the same CLI runtime also failed before reaching macOS with:
Chrome itself was running; the ChatGPT extension was enabled in the intended profile; and the native-host manifest was present and correct. Restarting the JS kernel and reinstalling the Chrome extension did not resolve the original failure.
The local desktop app had been updated, but the cached
browserandchromebundles were still26.803.61601. I backed up and removed those two stale cache directories, stopped only theChatGPT for Chromehost, fully restarted the desktop app, and let it regenerate both bundles as26.818.61809.After regeneration:
codex execsession using the standalone CLI0.149.1also initialized Chrome control successfully and enumerated existing tabs without modifying them.26.818.61809client no longer contains the rejected staticnode:processimport seen in26.803.61601.This instance is resolved locally. The useful product finding is that current CLI
0.149.1could continue selecting an older cached bundled plugin after the desktop app had updated. Automatic cache reconciliation (or an explicit version-mismatch diagnostic) would prevent the CLI-only failure and avoid unnecessary extension/native-host troubleshooting.This may also help distinguish the current broader Computer Use reports (for example #40394) from the specific static-import/cache-skew failure tracked here.
Follow-up after the cache refresh:
The original
Importing module "node:process" is not allowed in node_replfailure is resolved locally. A full ChatGPT/Codex Desktop restart regenerated the browser and chrome bundles to26.818.41509; the rejected static import is absent from the regenerated Chrome bundle.However, browser bootstrap still fails when Codex is launched through the OpenClaw adapter, with a different error:
The new
browser-client.mjsexplicitly requiresnodeRepl.rpc. In this integration the Node REPL context hascwd,env,homeDir,tmpDir,requestMeta,write, andemitImage, but norpc, so it cannot create a browser service at all. This happens before Chrome tab discovery or extension communication.Environment:
26.818.415090.149.0-alpha.4.12026.7.1-2@openclaw/codex:2026.7.1-1(the latest published adapter version at the time of testing)So the stale-bundle issue is fixed, but this remaining failure appears to need a trusted browser-RPC bridge for the OpenClaw/Codex app-server integration. It is distinct from the cache-skew failure in the original report.
I can independently reproduce this issue on macOS while using Codex in ChatGPT Work Mode with GPT-5.6 Terra.
The Playwright MCP browser fails before creating a browser connection with:
Reproduction notes:
Observed on August 26, 2026 at approximately 1:30 AM IST (UTC+05:30).
This appears to confirm that the failure is in the hosted browser/MCP runtime rather than in the target repository or local Playwright installation.