Skip to content

Windows: native Chrome/Browser client fails with EPERM realpath before extension handshake (26.1002.51308) #51669

Open

Description

@yapivo

Observed: 2026-10-07. This report contains no account data, browser session contents, private URLs, or unredacted username.

Result

Native Chrome control is not restored. Selecting Chrome explicitly in the composer (@Chrome, browser family chrome) still fails before the browser runtime initializes or reaches the extension handshake. No page read, screenshot, click, or navigation occurred in this test.

Environment

  • Windows 11 Pro 25H2, build 26200.9457.
  • Codex app release and bundled Browser/Chrome plugins: 26.1002.51308; MSIX: 26.1002.6548.0.
  • Chrome: 154.0.8037.98; ChatGPT extension: 1.26.901.11451.
  • Native Windows workspace-write environment.

Reproduction

  1. Enable the already-installed Chrome plugin. The Codex CLI confirms installed=true and enabled=true.
  2. Restart Codex completely, leave Chrome open, and explicitly select Chrome from the composer menu.
  3. Import the official version-pinned Browser client in the provided JavaScript tool to initialize the Chrome backend.
  4. The import fails:
Failed to resolve module:
C:/Users/<USER>/.codex/plugins/cache/openai-bundled/browser/26.1002.51308/scripts/browser-client.mjs
EPERM: operation not permitted, realpath

The official Chrome plugin client fails in the same way.

Narrow diagnostic comparison

In the provided JavaScript tool:

  • stat and lstat succeed on the drive root, user directories, and runtime executable.
  • realpath fails with EPERM on those paths and the current task directory, including synchronous/native variants.
  • Reading the installed Chrome client succeeds (169556 bytes).
  • Reading the task diagnostic file succeeds.

Launching the same bundled Node executable through the shell tool: realpathSync succeeds on the drive root, task directory, and the exact Chrome client path.

This narrows the failure to path canonicalization in the JavaScript tool execution environment. The exact sandbox/token mechanism remains unconfirmed; it does not prove an extension transport failure.

Earlier read-only extension/native-host checks passed. No ACLs, security settings, trusted code roots, browser extensions, or vendor binaries were changed. Only the approved Chrome plugin flag was enabled. Restarting Codex and explicitly selecting Chrome did not clear the error.

Separate original Computer Use symptom

Native desktop Computer Use also previously stopped while determining the Chrome URL. Switching Windows UI to confirmed English did not clear that failure. Its causal relationship to the client import EPERM has not been established. Windows UI was restored to Russian.

Related primary reports

Activity

  1. added
    bug
    app
    windows-os
    sandbox
    tool-calls
    on Oct 7, 2026
  2. firascharkaoui commented on Oct 8, 2026

    @firascharkaoui

    I can reproduce a similar Browser client import failure on app version 26.1002.52244, build 13536, release channel prod.

    Error:
    EPERM: operation not permitted, realpath
    C:\Users<USER>.codex\plugins\cache\openai-bundled\browser\26.1002.52244\scripts\browser-client.mjs

    The failure occurs before browser selection or initialization. Edge connectivity remains untested.

    Read-only findings:

    • The file exists (169,556 bytes), and opening/reading it succeeds.
    • Parent-folder metadata, read-access, and directory-open checks succeed. No explicit ACL DENY entries were observed in the inspected paths.
    • Native/Promise realpath fails even on C:; non-native synchronous/callback realpath succeeds.
    • Unlike the shell comparison in the original report, a standard Node v22.18.0 / libuv 1.51.0 child retaining the sandbox restrictions also reproduces the native/Promise failure.
    • The inherited token reports Low Mandatory Level. Its causal role is unproven.
    • Configured Windows sandbox mode is elevated; effective mode remains unverified.
    • Windows registry reports Professional, 25H2, build 26200.9457. ProductName says Windows 10 Pro.
    • The existing sandbox.log was last modified on 29 May 2026 and contains May entries, so it does not establish the state of the October failing session.

    The app updater reports up to date.

    In-app feedback ID: 01a09ff2-cb1d-7583-ac04-337bc924bf82. Feedback was received, but some diagnostic files could not upload.

    No permissions, configuration, files, or installations were changed during diagnosis.

    Please advise how to obtain current-session sandbox diagnostics and identify a supported repair while preserving security boundaries.

  3. lhurtadojs-ux commented on Oct 9, 2026

    @lhurtadojs-ux

    We see a similar native-realpath failure while building a web application in Codex on Windows, rather than during browser initialization.

    We’re unable to build a web application inside Codex on Windows. A required dependency file exists and can be read normally. Node’s fs.realpathSync(path) succeeds, but fs.realpathSync.native(path) fails with EPERM: operation not permitted on the same file. The normal Vite build fails during configuration loading. Restarting the computer and granting scoped read permission did not resolve it. Node v24.16.0, Vite 8.0.13, Vinext 1.0.0-beta.5. Has anyone encountered this difference between ordinary and native realpath? We need a supported solution that preserves sandbox protections and does not expose credentials.

  4. lhurtadojs-ux commented on Oct 9, 2026

    @lhurtadojs-ux

    We independently reproduced this pattern with Node v24.16.0 while building EZChurchApp with Vite. Both ordinary and native realpath succeed in PowerShell launched from Windows Start; native realpath fails with EPERM inside Codex on the identical file. Our application build remains blocked.

  5. tobyhanlin commented on Oct 11, 2026

    @tobyhanlin

    Additional data point for the Browser-plugin case, still present on app 26.1007.21434 (MSIX 26.1007.2314.0, Windows 11 25H2) — plus one new lead for the fix.

    1. In-sandbox probe on the plugin file itself (run through node_repl, i.e. the same environment in which the browser client import fails):

    const fs = await import('node:fs');
    const p = 'C:/Users/<USER>/.codex/plugins/cache/openai-bundled/browser/26.1007.21434/scripts/browser-client.mjs';
    fs.existsSync(p)            // true
    fs.readFileSync(p).length   // 169521   <- the whole file reads fine
    fs.realpathSync(p)          // EPERM: operation not permitted, realpath '<p>'

    So inside the sandbox the file is stat-able and fully readable; only path resolution is denied. That is consistent with the GetFinalPathNameByHandleW → ERROR_ACCESS_DENIED finding in #52593 / #51989, and it means this is not an ACL or read-permission problem: outside the sandbox the same binary resolves and reads the same file with a normal user token (1,450,470 bytes for browser-service.mjs), with no deny ACEs and no reparse points along the path.

    2. New lead — why the shipped workaround does not cover this code path. The worker is started as

    codex.exe sandbox -c ... -c windows.sandbox="mxc" -- node.exe --experimental-vm-modules --eval "<shim>"
    

    and that shim states the exact condition we observe (“Windows may deny ancestor metadata even when the configured folder is readable.”) and patches fs.realpathSync with a root-allowlisted EPERM/EACCES fallback. The patch mutates the require("node:fs") object. On the same bundled node.exe:

    ESM namespace sees the patch: <original implementation>
    same function object: false
    

    i.e. import("node:fs") keeps the original realpathSync, so the fallback is invisible both to the ESM module resolution that produces this error and to tool code that obtains fs through import("node:fs") — which is what the probe in (1) did when it still threw EPERM. Making that fallback effective on the resolution path (or not requiring realpath when importing trusted services) looks like a targeted fix; the filesystem-policy entry for <codexHome>/plugins/cache/<marketplace>/<plugin>/<version>/scripts does not help on its own, since read access already works.

    Redactions: <USER> only; no account data, browser session contents, or private URLs in this comment.

  6. MikeJona73 commented on Oct 12, 2026

    @MikeJona73

    I can reproduce this on Windows 11 Home x64, build 26300, with Codex Desktop 26.1007.21434.

    The Chrome extension works when I select @chrome in a chat: it can open https://example.com and read the page title. However, the direct native Chrome browser client still fails before the extension handshake:

    EPERM: operation not permitted, realpath
    'C:\Users<USER>.codex\plugins\cache\openai-bundled\chrome\26.1007.21434\scripts\browser-client.mjs'

    I reproduced it after restarting Windows and Codex, and with the Windows sandbox modes mxc, elevated, and unelevated. The MXC probe succeeds.

    Please advise on a supported fix that restores the direct Codex-to-Chrome connection.

  7. noob000001 commented on Oct 16, 2026

    @noob000001

    Additional occurrence reported on October 16, 2026 (KST, UTC+9).

    Environment and scope:

    • Browser module version: 26.1007.71326. This is the Browser module version, not a confirmed ChatGPT/Codex application version.
    • The failure was reported both when starting the workflow directly from the Windows PC and when starting it remotely from an iPhone. Both reports concern loading a Windows-side module; this does not establish a separate iOS browser-runtime defect.
    • The earlier troubleshooting summary reports that updating, fully shutting down the app, and trying a new conversation did not clear the failure. I have not independently verified each of those steps.
    • Chrome was reported to be running. The setup UI was reported to show the Chrome extension installed and Chrome use enabled. These are setup indicators, not proof of a working extension connection.

    Reported diagnostic transcript:

    • Tool: mcp__node_repl__js, invoked through functions.exec.
    • Returned status: isError: true.
    • Failure stage: the initial import() of browser-client.mjs, during realpath resolution.

    Error text, with the Windows username redacted:

    Failed to resolve module "C:/Users/<USER>/.codex/plugins/cache/openai-bundled/browser/26.1007.71326/scripts/browser-client.mjs": EPERM: operation not permitted, realpath 'C:\Users\<USER>\.codex\plugins\cache\openai-bundled\browser\26.1007.71326\scripts\browser-client.mjs'
    

    The reported call stopped before setupBrowserRuntime(), Chrome selection, or tab enumeration. It returned no extension-installation or connection-status result. The diagnostic report states that no settings changes or reinstallation were performed during that particular diagnostic check.

    The failure establishes a reported module-path resolution error, not that Chrome was closed or that a specific security component denied access. Filesystem permissions, sandbox restrictions, security software, and the underlying cause have not been distinguished. These details are based on the supplied diagnostic transcript and assistant-reported results, not an independently inspected backend log.

    Please investigate whether this is the same import/path-resolution issue in Browser module 26.1007.71326, and advise on a supported fix or diagnostic procedure that preserves security protections.

    The Dot cloud-browser approval errors I reported separately are a different observed symptom; I am not claiming a shared cause.

    Usernames in paths are replaced with . Account details, device names, conversation identifiers or share links, browser contents, screenshots, and business details are omitted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbrowserbugsandboxtool-callswindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions