[macOS] Chrome plugin bootstrap fails with "Cannot redefine property: process" in node_repl
Summary
The bundled Chrome plugin cannot initialize in Codex Desktop on macOS. Browser-client bootstrap fails immediately inside the bundled node_repl with:
Cannot redefine property: process
This happens before Chrome backend discovery or listing open tabs. Reinstalling the Chrome extension/plugin does not fix it.
Environment
- macOS 26.2 (25C56), arm64
- Codex Desktop / ChatGPT app: 26.707.71524, build 5263
- Bundled codex-cli: 0.144.2
- Bundled Node used by Browser Use: v24.14.0
- Chrome plugin: 26.707.71524
- Google Chrome: 150.0.7871.115
- ChatGPT Chrome Extension: 1.2.27203.26575_0
- Selected Chrome profile: Default
Steps to reproduce
- Install and enable the bundled Chrome plugin in Codex Desktop.
- Install and enable the official ChatGPT Chrome Extension in the active Chrome profile.
- Open Chrome.
- Start a Codex task and ask it to use Chrome.
- The Chrome skill initializes browser-client with:
const { setupBrowserRuntime } = await import("<chrome-plugin>/scripts/browser-client.mjs");
await setupBrowserRuntime({ globals: globalThis });
Expected behavior
Browser-client initializes successfully and agent.browsers.get("extension") can list open Chrome tabs.
Actual behavior
The dynamic import fails immediately:
Cannot redefine property: process
Resetting the JavaScript kernel, waiting, retrying, opening a new Chrome window, and fully reinstalling the Chrome extension/plugin do not change the result.
Diagnostics
The Chrome-side checks all pass:
- Chrome is installed and running.
- The extension is installed and enabled in the selected Default profile.
- The native messaging host manifest exists and allows the expected extension origin.
- The same
browser-client.mjsimports successfully under the app-bundled ordinary Node executable and exportssetupBrowserRuntime.
The failure is specific to importing the bundle inside the managed node_repl. The generated bundle begins by assigning a process shim:
globalThis.process = processShim;
globalThis.global = globalThis.global ?? globalThis;
globalThis.global.process = processShim;
In the managed node_repl, process appears to be a protected/reserved global, so this assignment throws before setupBrowserRuntime can run.
This looks like a compatibility issue between the bundled Chrome plugin artifact and the managed Node REPL runtime rather than an extension or native-host installation problem.
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Local cache-only workaround verified on macOS for app/plugin version
26.707.71524.The workaround described in #32941 (adding
globalThis.processShim, wrapping the global assignments intry/catch, and rewritingglobal.process.<field>reads) got past the original exception on this machine, but then failed during module evaluation with:A module-scoped shim worked instead.
Patch
The Browser and Chrome copies of
browser-client.mjswere byte-identical before patching (original SHA-256:57ee77a283eb230c6c6d47353af13a25cec4c331b511868c8fbf7ccd3dd1b2f6).Affected cached files:
Back up both files first. Then replace:
with:
This keeps the complete
processShimavailable to bareprocess.*andglobal.process.*references inside the generated bundle without attempting to overwrite the managed Node REPL's protectedglobalThis.process.Verification performed
--check.setupBrowserRuntime({ globals: globalThis })completed.Patched SHA-256 in this environment:
838cbc8b921e97bc24d0fc81986cae5889e77dca97325f60be43c8454185f329.This is an unsupported local workaround. A ChatGPT/Codex or bundled-plugin update may overwrite the cached files. After an update, test the unmodified upstream bundle first and do not blindly reapply this patch unless the same source pattern and failure are still present.
Additional macOS reproduction, with a potentially relevant multi-user setup.
Environment:
26.707.72221(build5307)15.7.7 (24G720), Apple Silicon150.0.7871.115openai-bundled/chrome/26.707.51957019f63c5-f437-7063-9fac-07be96611a53Setup:
Reproduction:
@chrome.browser-client.mjs.Diagnostics:
Expected:
process.Actual:
@chromeis completely blocked before it can discover or control any tab.This appears to confirm the same protected-
processcollision on another macOS/app/plugin version. The two-user/two-Chrome topology is included as additional context only, not as a confirmed root cause.