Skip to content

Windows 10: apply_patch falsely detects reparse points on normal paths after Codex updates #52173

Open

Description

@Grumeteus

What version of the Codex App are you using (From “About Codex” dialog)?

ChatGPT Desktop 26.1002.52244 (07 Oct 2026); bundled Codex CLI 0.162.0-alpha.2. Using Codex integrated into ChatGPT Desktop.

What subscription do you have?

ChatGPT Plus

What platform is your computer?

Windows 10 Pro, version 22H2, build 19045, x64

What issue are you seeing?

Summary

After two recent updates to the ChatGPT Desktop/Codex environment, apply_patch started failing on Windows 10 with false path contains a reparse point errors.

This affects normal files on both C: and D:, including newly created test files. The affected directories were checked with PowerShell and do not have the ReparsePoint attribute.

The issue occurs in Codex integrated into ChatGPT Desktop. It was also reproduced using the VS Code Codex extension on Windows.

Environment

  • OS: Windows 10 Pro, build 19045, x64
  • ChatGPT Desktop: 26.1002.52244, released October 7, 2026
  • Codex CLI: 0.162.0-alpha.2
  • Subscription: ChatGPT Plus
  • Sandbox: workspace-write

Steps to reproduce

  1. Open a local Windows workspace in Codex.
  2. Create a temporary text file using PowerShell with the content linha original.
  3. Ask Codex to change it to linha alterada using the normal apply_patch mechanism.
  4. The operation fails, even though the file exists and PowerShell can read and write it.

This was reproduced in both C:\CODEX_TESTE and a project workspace on D:.

Actual result

Failed to read file to update C:\CODEX_TESTE\teste.txt: path contains a reparse point

The same error occurs on D: with normal files.

Expected result

apply_patch should successfully update files located in normal Windows directories that do not contain reparse points.

Troubleshooting already performed

  • Repaired ChatGPT Desktop through Windows settings.
  • Restarted Windows.
  • Created a fresh project workspace and tested new Codex conversations.
  • Confirmed normal PowerShell file operations work.
  • Verified the tested directories do not have the ReparsePoint attribute.
  • Reproduced the failure on both C: and D:.
  • Encountered a separate Windows sandbox initialization failure involving node_repl.exe and os error 32. After terminating the affected runtime processes, command execution recovered, but apply_patch continued to fail.
  • Installed Ubuntu 24.04 in WSL2 and tested Codex through VS Code.
  • Both forward and reverse apply_patch operations succeeded in WSL2, including when editing a temporary file in the original Windows project directory through /mnt/d/.

Intermittent behaviour

A newly copied project workspace initially allowed successful apply_patch operations. Later, without a known additional update, the same workspace started failing with path contains a reparse point.

The problem has persisted after a system restart.

Request

Please investigate whether the Windows path-validation fix from PR #47672 is included in the Codex runtime distributed with ChatGPT Desktop 26.1002.52244 / Codex CLI 0.162.0-alpha.2.

Could you confirm whether this is a known regression, which release contains the complete fix, and whether there is a supported workaround for native Windows execution?

I would prefer to continue using Codex integrated into ChatGPT Desktop on Windows rather than switching to WSL2.

Related reports: #46290 and #50617.

What steps can reproduce the bug?

Steps to reproduce:

  1. Run Codex integrated into ChatGPT Desktop on Windows 10 Pro (build 19045), using Codex CLI 0.162.0-alpha.2.
  2. Open a local workspace, for example C:\CODEX_TESTE.
  3. Create a normal text file using PowerShell:
New-Item -ItemType Directory -Path "C:\CODEX_TESTE" -Force
Set-Content -Path "C:\CODEX_TESTE\teste.txt" -Value "linha original"
  1. Ask Codex to use its native apply_patch tool to replace linha original with linha alterada in C:\CODEX_TESTE\teste.txt.
  2. Observe that apply_patch fails with:
Failed to read file to update C:\CODEX_TESTE\teste.txt: path contains a reparse point
  1. Repeat the test in another workspace on drive D:. The same error occurs.

Additional reproduction details:

  • The file exists and is readable/writable through PowerShell.
  • The tested directories have the normal Directory attribute, not ReparsePoint.
  • The problem occurs across different Codex sessions and Windows workspaces.
  • The problem persists after restarting Windows and repairing ChatGPT Desktop.
  • Running the same apply_patch operations through Codex in Ubuntu 24.04 WSL2 succeeds, including when accessing the original Windows workspace through /mnt/d/.
  • No session ID, token-limit measurements or context-window statistics were collected for these tests.

What is the expected behavior?

The native apply_patch tool should successfully read and modify ordinary files in authorized Windows workspaces when the paths do not contain reparse points.

The same behavior should be consistent across Codex sessions and should not require moving projects, disabling the sandbox or using WSL2.

The existing security protections against genuine reparse points should remain enabled.

Additional information

Regression history:

The issue started after two recent ChatGPT Desktop/Codex updates.

A copied workspace initially worked correctly with apply_patch, but subsequently began failing without any additional update known to the user.

Environment:

  • Windows 10 Pro, build 19045
  • ChatGPT Desktop 26.1002.52244 (released October 7, 2026)
  • Codex CLI 0.162.0-alpha.2
  • ChatGPT Plus
  • Also reproduced using the Codex extension for VS Code on native Windows

Separate sandbox issue:

The Windows sandbox also experienced helper_unknown_error: setup refresh had errors, associated with os error 32 while validating access to node_repl.exe.

After stopping the affected runtime processes, command execution recovered, but the apply_patch reparse-point error persisted.

Potentially related fixes/reports:

Please confirm whether the relevant Windows path-validation fix is included in the Codex runtime distributed with ChatGPT Desktop, and whether a supported native Windows fix or workaround is available.

Activity

  1. added
    app
    on Oct 8, 2026
  2. added
    bug
    windows-os
    sandbox
    tool-calls
    on Oct 8, 2026
  3. Grumeteus commented on Oct 9, 2026

    @Grumeteus
    Author

    Update: controlled native Windows CLI comparison (9 Oct 2026)

    We tested standalone Codex CLI versions on the same Windows 10 Pro 22H2 (build 19045, x64) machine and in the same local workspace (C:\CODEX_TESTE_0162\workspace).

    CLI version Launch mode Get-Location Native apply_patch
    0.160.0 --no-daemon PASS PASS twice (forward and reverse patch; original content restored)
    0.161.0 Normal FAIL: setup refresh had errors Not reached
    0.162.0 Normal FAIL: setup refresh had errors Not reached
    0.162.0 --no-daemon FAIL: setup refresh had errors Not reached

    For 0.160.0, sandbox setup logged errors=[]. The file teste_patch.txt was successfully changed from linha original to linha alterada using native apply_patch, then restored using native apply_patch. No fallback file-writing tool was used.

    For 0.162.0 even with --no-daemon, the sandbox log at 2026-10-09 00:39:03 UTC confirms the immediate failure:

    runtime read/execute validation failed: validate runtime read/execute access on
    C:\Users\hugom\AppData\Local\OpenAI\Codex\runtimes\cua_node\3dd31cfff853001c\bin\node_repl.exe:
    open ACL target for root-only update:
    O processo não pode aceder ao ficheiro porque este está a ser utilizado por outro processo. (os error 32)
    setup refresh completed with errors
    setup error: setup refresh had errors
    

    0.161.0 produced the same node_repl.exe / os error 32 failure in its log. This rules out --no-daemon alone as a workaround for 0.162.0, and shows that native Windows patching can work on this machine in 0.160.0. It does not yet isolate whether the behavioral difference is caused by a version regression or other version-dependent runtime interactions.

    Potentially relevant merged fixes:

    The goal remains a supported fix for native Codex Desktop on Windows 10, not a permanent switch to the older standalone CLI or WSL. Please confirm which Desktop release bundles both fixes and whether additional regression testing for Windows 10 is planned.

  4. Grumeteus commented on Oct 9, 2026

    @Grumeteus
    Author

    Positive retest: 0.163.0-alpha.2 succeeds on native Windows 10 (9 Oct 2026)

    Good news: Codex CLI 0.163.0-alpha.2 now passes the previously failing native Windows sandbox and apply_patch tests on the affected machine.

    Environment: Windows 10 Pro 22H2, build 19045, x64. Official Windows x64 release ZIP extracted into a separate folder. Started standalone CLI with --no-daemon, explicitly from C:\CODEX_TESTE_0162\workspace (confirmed in the Codex header). No Windows permission changes, file-copy fallback, or Desktop binary replacements.

    Results:

    • API request succeeded (unlike 0.163.0-alpha.1's HTTP 400 in an earlier test).
    • Get-Location: PASS, returned C:\CODEX_TESTE_0162\workspace.
    • Native apply_patch: PASS, changed teste_patch.txt from linha original to linha alterada.
    • Native apply_patch again: PASS, restored linha original.
    • No node_repl.exe / os error 32 or false path contains a reparse point occurred in these successful tests.

    Important nuance: An initial 0.163.0-alpha.2 invocation inadvertently had C:\Windows\System32 as its CWD and failed with os error 5 while trying to grant a write ACE to that protected directory. After launching from the intended test workspace, command execution and both patches succeeded. We did not modify System32 ACLs.

    This is strong evidence that current upstream binaries can operate successfully on this Windows 10 installation, but it does not establish general reliability across all workspaces or prove which particular change fixed the issue.

    Remaining request: The affected ChatGPT/Codex Desktop installation is still on version 26.1002.52244 (7 Oct 2026) with bundled Codex CLI 0.162.0-alpha.2, where native apply_patch has failed. Please ship/confirm a Desktop build incorporating the working fixes (possibly PRs #51511 and #51822), or advise when the integrated Windows version will be updated. The user wants a supported Desktop fix rather than a permanent standalone CLI workaround.

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

    appbugsandboxtool-callswindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions