Browser: Bootstrap fails due to Node REPL process shim conflict
What version of the Codex App are you using (From “About Codex” dialog)?
26.707.71524 (5263)
What subscription do you have?
ChatGPT Pro
What platform is your computer?
Darwin 25.0.0 arm64 arm
What issue are you seeing?
The bundled Browser plugin does not bootstrap on Codex Desktop 26.707.71524. It fails immediately with:
Cannot redefine property: process
The in-app browser itself works and the tabs stay open. Codex just cannot attach to or control them.
The installed browser-client.mjs contains these assignments:
globalThis.process = processShim;
globalThis.global = globalThis.global ?? globalThis;
globalThis.global.process = processShim;
The Node REPL runtime already has its own protected process object, so the plugin fails when it tries to overwrite it.
I first changed the assignments to only run when those properties were undefined. That got past the original error, but bootstrap then failed with:
Cannot read properties of undefined (reading 'node')
The stack pointed to:
process.versions.node
I then bound the plugin's own processShim locally. That fixed the versions.node error, but the next failure was:
global.process.on is not a function
The Browser plugin expects the full process shim defined in its bundle, while the process object supplied by the Node REPL runtime has a different and more limited API.
What steps can reproduce the bug?
- Run Codex Desktop
26.707.71524. - Install or enable the bundled Browser plugin
26.707.71524. - Open the Codex in-app browser and leave at least one tab open.
- Start a fresh task or reset the Node REPL kernel.
- Ask Codex:
Use the Browser plugin to inspect the currently open Codex in-app browser tabs. Do not create or close tabs.
- Bootstrap the installed Browser runtime:
const { setupBrowserRuntime } = await import(
"/Users/<user>/.codex/plugins/cache/openai-bundled/browser/26.707.71524/scripts/browser-client.mjs"
);
await setupBrowserRuntime({ globals: globalThis });
- Bootstrap fails with:
Cannot redefine property: process
I also tried the following:
- Removed the Browser plugin.
- Deleted the entire cached Browser plugin directory.
- Reinstalled the Browser plugin.
- Reset the Node REPL kernel.
- Retried with the newly installed, unmodified bundle.
The same error came back after a clean reinstall.
What is the expected behavior?
The Browser plugin and Node REPL runtime are shipped with the same Codex Desktop build, so the plugin should bootstrap without conflicting with the runtime's global objects.
Codex should then be able to get the iab browser binding and connect to tabs that are already open.
Additional information
Environment:
- Codex Desktop:
26.707.71524 - App build:
5263 - Bundle identifier:
com.openai.codex - Browser plugin:
openai-bundled/browser/26.707.71524 - Codex CLI:
0.144.2 - macOS:
26.0.1(25A362) - Architecture: Apple Silicon /
arm64
I first noticed this after updating Codex and using “Open in New Window.” I do not know whether the new-window flow is related, but the problem reproduces consistently in a fresh Node REPL kernel.
This is the local patch I used to get Browser control working again:
};
+ const process = processShim;
+ const global = {
+ eval: globalThis.eval,
+ process: processShim,
+ };
+
- globalThis.process = processShim;
+ if (typeof globalThis.process === "undefined") {
+ globalThis.process = processShim;
+ }
+
globalThis.global = globalThis.global ?? globalThis;
- globalThis.global.process = processShim;
+ if (typeof globalThis.global.process === "undefined") {
+ globalThis.global.process = processShim;
+ }
After applying the patch and resetting the Node REPL kernel:
setupBrowserRuntime({ globals: globalThis })worked.agent.browsers.get("iab")worked.- Codex listed and claimed the two Browser tabs that were already open.
- I did not need to reload or recreate the tabs.
With this change, the plugin uses its own process shim locally and leaves the Node REPL process object alone.
If this is the right direction and the relevant source is available for contribution, I can send a focused PR with a regression test.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗