Chrome/Browser plugin 26.707.71524 fails to import in node_repl: Cannot redefine property: process

Open 💬 3 comments Opened Jul 14, 2026 by FlyingFSR
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

Summary

The bundled Chrome/Browser plugin cannot be imported by the current Codex node_repl trusted-module runtime. Module evaluation fails before setupBrowserRuntime() is reached:

TypeError: Cannot redefine property: process
    at .../chrome/26.707.71524/scripts/browser-client.mjs:33:22
    at SourceTextModule.evaluate (node:internal/vm/module:233:26)
    at importResolved (.../kernel.js:905:27)

This makes both Chrome control and the in-app Browser client unusable in the affected runtime.

Environment

  • ChatGPT desktop app: 26.707.71524 (build 5263)
  • Bundled Codex CLI: codex-cli 0.144.2
  • Chrome plugin: 26.707.71524
  • browser-client.mjs SHA-256: 57ee77a283eb230c6c6d47353af13a25cec4c331b511868c8fbf7ccd3dd1b2f6
  • macOS: 26.5.2 (build 25F84)
  • Codex task ID: 019f5dd8-bc64-7503-bf2b-6e7c79f90437

The bundled Chrome and in-app Browser plugins contain an identical browser-client.mjs with the same hash.

Reproduction

From a fresh node_repl kernel:

await import("/Users/<user>/.codex/plugins/cache/openai-bundled/chrome/26.707.71524/scripts/browser-client.mjs");

The import fails immediately with TypeError: Cannot redefine property: process. It reproduces after:

  • resetting the JavaScript kernel
  • restarting Chrome
  • restarting the desktop app
  • removing and reinstalling the Chrome plugin
  • restarting both Chrome and the desktop app after reinstall

The reinstall restores the same plugin version and file hash.

Root cause

The current node_repl kernel intentionally installs a safe ambient process facade in its trusted context:

defineLockedGlobal(trustedContext, "process", trustedProcess);

function defineLockedGlobal(runtimeContext, name, value) {
  Object.defineProperty(runtimeContext, name, {
    value,
    writable: false,
    configurable: false,
    enumerable: false,
  });
}

The allowlisted browser client is evaluated in that trusted context, but its bootstrap unconditionally installs a second process shim:

globalThis.process = processShim;
globalThis.global = globalThis.global ?? globalThis;
globalThis.global.process = processShim;

The first assignment is at browser-client.mjs:33 and attempts to replace the already locked property. ES-module evaluation stops there, so setupBrowserRuntime() is never exported/called.

A normal untrusted local module can assign globalThis.process; the collision is specific to the trusted context used for the allowlisted production browser client.

Expected behavior

The production browser client should import successfully under the trusted node_repl context and make setupBrowserRuntime() callable.

Suggested repair

  1. Do not unconditionally replace globalThis.process or globalThis.global.process when the trusted runtime already supplies a locked safe facade.
  2. Audit bundled dependencies for the passive process fields they require. Reuse the runtime facade and narrowly extend the facade or remove Node-environment assumptions where needed.
  3. Add an integration test that imports the production browser-client under a trusted context with a non-writable, non-configurable process property.

Making the trusted process property writable does not appear desirable because the lock protects the Node REPL transport and host process.

Impact and exclusions

The failure occurs before browser discovery or IPC. Therefore Chrome process state, extension enablement, native-host setup, website login state, page content, and website rate limits are not reached. No private browsing data is needed to reproduce this issue.

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 1 month ago

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

  • #32935
  • #32934
  • #32925

Powered by Codex Action

derektraini · 1 month ago

Independent reproduction on macOS:

  • ChatGPT Desktop: 26.707.71524 (build 5263)
  • Bundled Codex CLI: 0.144.2
  • macOS: 27.0 (build 26A5378j)
  • Browser plugin: 26.707.71524
  • Chrome plugin: 26.707.71524

Both @Browser and @Chrome fail during the documented runtime bootstrap with:

Cannot redefine property: process

The Chrome extension is installed, and the failure occurs before any extension handshake or tab discovery. Reproduced after restarting the desktop app, moving the signed-in pages between the in-app Browser and Chrome, resetting the JavaScript kernel, and retrying from a fresh connection attempt multiple times. No website content or account data was accessed because module initialization failed first.

coolxll · 1 month ago

Additional low-level checks from an independent macOS reproduction on 2026-07-14:

  • Google Chrome 149.0.7827.201 was running from /Applications/Google Chrome.app.
  • The Codex Chrome extension was installed and enabled in the Default profile (extension version 1.2.27203.26575_0).
  • The Native Messaging manifest com.openai.codexextension.json exists and passed all checks: host name matches, expected origin is allowlisted, and the expected extension ID matches.
  • Importing the bundled browser client fails before setupBrowserRuntime() completes and before agent.browsers.get("extension") can run:

``text
TypeError: Cannot redefine property: process
at .../chrome/26.707.71524/scripts/browser-client.mjs:33:22
``

  • Resetting the node_repl kernel and retrying reproduces the same error.

These checks show that Chrome process detection, extension installation/enabling, and Native Messaging configuration are healthy. The failure occurs during browser-client module initialization, before extension handshake or tab discovery.