Repository navigation
Description
Codex version
- Codex desktop:
26.901.1978.0(Microsoft Store/MSIX, x64) - Bundled Codex CLI:
0.153.0-alpha.5 - A similar relocation failure also occurred after updating version
26.820.7780.
Environment
- Windows 11 Pro 25H2, build
26200.8457, AMD64 - Runtime root:
%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node - Affected runtime content ID:
ad3b5049246cde44
Description
After an app update, Codex desktop starts but becomes extremely slow and eventually enters Windows' "Not responding" state. This is not ordinary renderer lag: the desktop main process repeatedly tries to materialize its bundled Node runtime and fails at the final staging-directory rename with Windows EPERM.
Each failed attempt creates another large .staging-* directory. In this incident, the loop produced 591 staging directories and consumed 58.96 GB before remediation. The retries were approximately three seconds apart. Windows also recorded MoAppHang for the app.
Sanitized log evidence
event=bundled_executable_relocation_failed
destinationPath=%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\ad3b5049246cde44
errorCode=EPERM
operation=rename_staging
executableName=node.exe # also observed for node_repl.exe
originalError={"errno":-4048,"code":"EPERM","syscall":"rename",
"path":"%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\.staging-ad3b5049246cde44-<uuid>",
"dest":"%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\ad3b5049246cde44"}
The relocation failure is followed by errors equivalent to:
Unable to locate the Codex CLI binary / bundled Node runtime
Reproduction sequence
- Update Codex desktop on Windows and launch it.
- The app reports an Electron/PATH-related startup error; retrying can eventually open the UI.
- The UI then freezes or becomes unresponsive.
- Observe
%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_nodewhile the app is running. - A new
.staging-ad3b5049246cde44-*directory appears roughly every three seconds, while the finalizedad3b5049246cde44directory never appears. - Disk usage and main-process blocking continue to grow until Codex is terminated.
Implementation-level findings
Inspection of the installed desktop bundle indicates this failure is amplified by the materialization logic:
- The app recursively copies the bundled runtime synchronously, then calls a synchronous directory rename from staging to the content-addressed final directory.
- If the rename throws, staging cleanup is attempted, but any cleanup failure is swallowed.
- The resolved-runtime cache is populated only after successful finalization, so a transient failure is not remembered.
- Separate startup consumers request
node.exe,node_repl.exe, andnode_modules; after each failure they can re-enter the full copy-and-rename path. - There is no bounded retry, exponential backoff, lock coordination, or failure circuit breaker for transient
EPERM. - Because recursive copy/rename work is synchronous in the desktop main process, the retry loop directly contributes to UI hangs.
This explains both the repeated staging-directory creation and the user-visible freeze. The initial process that briefly held the file/directory handle cannot be proven retroactively without ProcMon/ETW data, but the persistent app hang and disk exhaustion are caused by the unbounded failure/retry behavior.
Recovery verification
With Codex fully stopped, constructing the complete runtime in a single staging directory and atomically renaming it to ad3b5049246cde44 succeeded. After restarting:
- the staging-directory count remained at
0; - bundled Node (
v24.19.0) was usable; - Codex processes remained responsive;
- no new hang/crash events appeared;
- the desktop UI became immediately smooth again.
Deleting the orphaned staging directories recovered 58.96 GB. No Codex settings or project data were removed.
Expected behavior
- Treat
EPERMduring final rename as a transient Windows sharing/scan condition and retry the rename itself with bounded exponential backoff and jitter. - Coordinate concurrent runtime requests so only one materialization is in flight per content ID.
- Never repeat the entire synchronous recursive copy every few seconds from the main process.
- Surface cleanup failures and reliably remove orphaned staging directories on the next launch.
- Add a retry/circuit-breaker limit so runtime relocation cannot indefinitely freeze the UI or exhaust the system drive.
Related reports
- [Windows][26.825.6671.0] Headless startup persists after clean runtime reset; cua_node staging never finalizes #41850 — Windows runtime staging does not finalize after a clean reset
- Windows Codex Desktop repeatedly regresses across updates due to Application Protected runtime relocation failures #41654 — Windows desktop update regressions involving protected runtime relocation
Only sanitized excerpts are included here; raw logs may contain local paths and account/session metadata.
Activity
github-actions commentedon Sep 3, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
cua_noderuntime relocation #42412Powered by Codex Action
WilliamClifton-dev commentedon Sep 3, 2026
Additional reproduction from a Windows user on Codex Desktop
26.901.1978.0(Microsoft Store/MSIX):ChatGPT.exeprocesses were present, but no usable window appeared.This suggests the runtime materialization/staging path can eventually succeed but blocks window creation for a long time on the first launch. From a user perspective the app appears broken because there is no progress UI or indication that initialization is still running.
JRGavin commentedon Sep 7, 2026
This issue is still reproducible with the Windows Codex Desktop package
26.901.6511.0and bundled app-server0.153.4.After updates, the desktop becomes very slow or unresponsive, with high disk activity. Repeated app restarts sometimes recover it, but the problem returns after later updates. The observed error is
EPERMduringrename_staging. The primary workspace-runtime updater can also fail its final directory rename and retry a full installation in the background.Please fix both installer paths rather than relying on users to clear caches after each update:
This is a minimal report: no machine paths, account identifiers, session logs, private project data, or attachments are included.
zjt15088176161-arch commentedon Sep 9, 2026
Additional confirmation on a newer Windows desktop build.
Environment
26.903.8094.0ChatGPT.exe:152.0.7977.8326200.9445, x64User-visible behavior
The entire desktop window intermittently stopped responding: clicks and scrolling did not work, and Windows showed “Not Responding.” Short freezes occurred approximately every few minutes, including while an ordinary conversation was idle with no active task or response streaming. One hang required force-terminating and reopening the app.
Disabling the Chrome computer-control integration and then the master computer-control permission did not stop the already-running retry loop.
Correlated diagnostics
The affected desktop session repeatedly logged:
for the bundled
cua_noderuntime (node.exeandnode_repl.exe), followed by failures to sync Chrome native-host resources andmain_thread_jank_snapshot processRole=browser_main.Counts from the affected session:
rename_staging / EPERM: 240Windows recorded:
AppHangTransientat 23:44:15 local timeMoAppHangat 23:58:46The last desktop log line before the terminal hang was another
rename_staging / EPERMfailure at 23:56:54.597; logging then stopped.File-monitor correlation (not proven causation)
A third-party real-time security/file-monitoring driver was active during the failures. Its uninstall log showed file monitoring still enabled at 23:56:45.826. The last Codex
EPERMoccurred at 23:56:54.597, and the filter driver removal was logged at 23:56:54.844.After the security software was uninstalled, the hung app was force-terminated, and Codex was relaunched:
EPERMor reconciliation failures;This timing suggests that the file-monitor may have contributed to the initial sharing/rename denial, but it does not prove it was the sole cause. Regardless of the original lock holder, the unbounded retry behavior and synchronous/main-process work appear to amplify a transient Windows filesystem conflict into repeated UI freezes and disk growth.
Expected behavior remains as described in this issue: bounded retry/backoff, coordination of concurrent runtime materialization, responsive UI, and reliable cleanup of failed staging directories.
kidplayeva commentedon Sep 15, 2026
Additional deterministic reproduction on a newer Windows desktop build.
Environment
26.908.4834.026.908.9136.0(Microsoft Store/MSIX, x64)0.154.0-alpha.6.2v24.20.0Reproduction timeline
The old package was healthy at 09:52 local time. After the updater switched to
26.908.9136.0, two consecutive launches failed with the user-visible dialog:First post-update launch (09:55:06)
bundled_executable_relocation_failedeventscodex.exenode.exenode_repl.exeerrorCode=EPERMandoperation=rename_stagingSecond launch (09:56:05)
codex.exenode.exeThird launch (09:57:10)
codex.exerelocation failureSanitized destinations:
Race/coordination evidence
The finalized CUA runtime was created during the second failed launch, while the finalized Codex CLI directory was created during the third launch. On the successful third launch, one
rename_stagingattempt still returnedEPERM, but the same final directory became available and the app-server spawned roughly one second later.This strongly suggests overlapping materialization attempts (within a launch and/or with cleanup from the preceding failed launch) are racing for the same content-addressed destination. One attempt can succeed while another receives
EPERM; if no attempt wins before bootstrap gives up, the app reports the required components as missing. Repeated restarts gradually materialize the components and eventually allow startup.Current state
After the third launch:
codex.exe,node.exe, andnode_repl.exeall exist and have valid signatures;This is now reproducible after multiple independent desktop updates, not a one-off corrupt installation. A per-content-ID single-flight lock, coordination across overlapping app instances, and treating “destination now exists and validates” as success would prevent the post-update startup failure.
No raw logs, account identifiers, session metadata, or private project paths are included.
yaoshen2009-alt commentedon Sep 20, 2026
Additional confirmation: this issue still reproduces on the current Windows desktop build.
Environment
26.915.4065.0(Microsoft Store/MSIX, x64)0.155.0-alpha.9.2v24.21.019045, x64Observed behavior
After updating the desktop app, the UI became persistently sluggish. In one 76-second startup session, the app logged 19 occurrences of:
The failures recurred roughly every 2–3 seconds. The final content-addressed runtime directory never appeared.
This was followed by:
nodeandnode_replruntime components;The same failure pattern had occurred after the preceding desktop update, using a different content-addressed runtime directory. This indicates that the workaround does not persist across updates.
Recovery
I copied the
cua_nodepayload bundled with the currently installed package into a separate staging directory, verified all 2,283 files and critical executables, and atomically renamed it to the expected destination:After recovery:
node.exeandnode_repl.exeexecuted successfully;This provides another reproduction on a newer build and supports the existing conclusion that a transient Windows rename conflict is amplified by unbounded full-runtime retries in the desktop main process.
No raw logs, account identifiers, session data, or private project paths are included.
binawoh commentedon Oct 2, 2026
Captured what blocks the rename (Process Monitor), plus a minimal fix
Adding the handle-level evidence that this thread, #45593 and #49611 were missing.
Setup: Codex desktop (MSIX, x64) 26.928.1915.0 / 26.928.3736.0 / 26.930.2377.0, Windows 11 x64, Microsoft Defender plus a third-party real-time antivirus (file-system minifilter). The log shows
coreGateEnabledAtStartup=false selectedRuntimeSource=bundled.Every update hits it.
rename_staging/EPERMfailures logged beforecua_node\<hash>finally appeared: 34 (26.928.1915.0), 51 (26.928.3736.0), 30 (26.930.2377.0, spread over ~6 minutes of intermittent "Not Responding").What blocks the rename
resources\cua_nodeinto a new folder and rename it immediately →EPERM7/7. Keep the copy and retry ~100 ms later → succeeded 4/4..ps1shims (e.g. underbin\node_modules\corepack\shims\). Copying one of them alone and renaming its folder fails intermittently (2/5); the same bytes saved as.txtnever failed (0/5)..ps1(it scans newly created script files); all 74 retries ~100 ms later succeeded. Defender also scanned these files, but every failure coincided with the third-party scan.STATUS_ACCESS_DENIEDwhile any file in its subtree is open, even withFILE_SHARE_DELETE(MS-FSA 2.1.5.15.12). So any on-access scanner can cause it, and ProcMon "fixing" it in [Windows] Desktop startup repeatedly fails with EPERM during bundled executable rename_staging; succeeds after ProcMon changes timing #45593 fits: it shifts the timing.Why a ~100 ms collision becomes minutes of freezing: in
nn()(application-network-startup-*.js, names from the 26.930.2377.0 bundle) the recursivecopyFileSync,renameSyncand cleanuprmSyncall run synchronously on the main process. On rename failure the staging copy is deleted and the error rethrown without a retry;en()logsbundled_executable_relocation_failedand returnsnull, so the next caller copies all ~240 MB / ~2,370 files again and collides with the scanner again.Suggested fix
renameSync(staging, final)with a short backoff (start at 100 ms, give up after a few seconds). 100 ms was always enough here.Workaround that works here: create
cua_node\<hash>from outside the app (same content, retrying the rename) as soon as the new package lands, triggered by AppX deployment event 400 (Stage/Register) inMicrosoft-Windows-AppXDeploymentServer/Operational. Codex then finds the folder valid and skips the copy.ASCII-768977 commentedon Oct 23, 2026
Still reproducible on Windows x64 with MSIX package 26.1016.8622.0 (desktop reports 26.1016.62342, build 21477). The app's updater reports up to date.
After the update, the desktop repeatedly entered "Not Responding". Local investigation on 2026-10-23 found 206 bundled_executable_relocation_failed events across six launches that day (including the preceding 26.1016.6573.0 package), with operation=rename_staging and errorCode=EPERM. The latest launch alone logged 22 failures and browser_main main_thread_jank_snapshot events. Windows also recorded Application Hang event 1002.
The runtime content directory changed from 2fbcd108736f9c20 to 2b841c3d44b123ec across those packages.
A separate filesystem probe reproduced the timing sensitivity without invoking a plugin or touching the live runtime cache:
This is a filesystem reproduction on one machine, not a patched-client regression test. It does not identify which process or filter causes the transient denial. No antivirus settings were changed.
Inspection of the installed runtime resolver still shows synchronous recursive copying followed by synchronous rename, cleanup on failure, and subsequent callers re-entering materialization. Please move this work off the desktop main thread and retry transient finalization failures with bounded asynchronous backoff while retaining the verified staged payload. A failure cooldown would prevent repeated full copies.
Once the live runtime finalized, the UI recovered before any cleanup was performed. Its manifest, node.exe and node_repl.exe hashes match the packaged files. This is recovery, not a permanent fix for the next update.
Only sanitized diagnostic facts are included; no raw logs, usernames, project paths or session identifiers are attached.
ASCII-768977 commentedon Oct 24, 2026
Follow-up to my previous report: this happened again after the next update, and the external recovery script successfully restored the app.
Still affected: Windows MSIX package 26.1021.3705.0. After updating, Codex again became unresponsive. Users should not have to manually repair the runtime after repeated app updates. Please prioritize a permanent fix.
Local verification on October 25, 2026 (Australia/Sydney, UTC+11):
The script copies the payload once and supports bounded retries of the final directory rename instead of repeatedly copying the whole runtime. Its output does not record how many rename retries were needed in this recovery, so I cannot claim that a retry was actually exercised this time. The earlier independent filesystem probe demonstrated immediate EPERM followed by success after a 100 ms delay.
This is now a real post-update recovery using the workaround, not just a check-only validation. No application bundle, login settings, chats or projects were modified, and no antivirus settings were changed.
Please fix runtime materialization in the desktop client: move synchronous copy/hash/cleanup work off the main thread, serialize requests per content ID, and use bounded asynchronous final-rename retries that retain the verified staged payload. Please confirm whether a fix is planned and identify the first Windows build containing it.
Only sanitized facts are included; no raw logs or screenshots containing personal paths are attached.
ASCII-768977 commentedon Nov 3, 2026
Another post-update recurrence, verified on November 3, 2026. Windows x64 MSIX package 26.1027.6604.0 is still affected. This follows my earlier report on 26.1021.3705.0 (#42484 (comment)).
The user again reported severe post-update unresponsiveness and reran the external recovery script. Read-only inspection found:
989c7523a11c09b9, witherrorCode=EPERMandoperation=rename_staging.The script's console output was not captured in this inspection, so I cannot independently quote its result or claim a particular rename-retry count. The finalized files and subsequent logs are consistent with recovery after the user reran it. No new repair or settings changes were performed during this check.
This workaround must be repeated after updates; it is not a permanent resolution. Please prioritize a client fix and provide the first Windows build containing it: move expensive materialization off the main thread, serialize per-content-ID installation, and retain the staged payload while performing bounded asynchronous retries of final rename, with failure cooldown instead of repeated full copying.
Only sanitized facts are posted: no raw logs, personal paths, account/session identifiers, project data or screenshots.
Yunxiang8 commentedon Nov 4, 2026
Additional reproduction after the Windows Codex desktop update on 2026-11-04.
The bundled
cua_noderuntime repeatedly creates.staging-*directories, but the expected finalized runtime directory never appears. Desktop logs showbundled_executable_relocation_failedwitherrorCode=EPERMandoperation=rename_staging. I counted 497 such failures. After copies accumulated, the logs also recorded 73ENOSPCcopy failures.At one point, 399 staging directories had accumulated. Removing older staging directories recovered space, but new copies continued to appear; a later check found 52 directories using 6.31 GiB.
Environment: Codex desktop package
26.1029.7803.0, Windows build26300.9711, affected runtime content ID9c26d707817e90a7. Please limit retries, reuse an existing staged copy when retrying the rename, and clean up failed staging directories.bherreraicon commentedon Nov 4, 2026
Español
Puedo confirmar este problema en más de una máquina Windows y a través de varias actualizaciones recientes de Codex Desktop.
Patrón observado repetidamente:
%LOCALAPPDATA%\OpenAI\Codex\bin.<hash>, Codex crea múltiples carpetas.staging-<hash>-XXXXXX.codex.exeválido y ejecutable..staging-<hash>-XXXXXXa<hash>funciona inmediatamente.codex.exeresultante ejecuta--versioncorrectamente y Codex Desktop vuelve a iniciar.Casos recientes que hemos reproducido:
b6c7fc9497179c98a159911ff70742e9El mismo patrón se reprodujo también en una segunda máquina independiente.
Workaround verificado:
Después de esto, Codex vuelve a funcionar normalmente.
Esto parece indicar que el contenido del staging ya es correcto y que el fallo está específicamente en la promoción/rename final del staging al directorio content-addressed. Sería muy útil que Codex tratara este fallo como recuperable: reintento acotado del rename, coordinación de una sola materialización por hash y limpieza posterior de staging huérfanos.
English
I can confirm this issue on more than one Windows machine and across several recent Codex Desktop updates.
Repeatedly observed pattern:
%LOCALAPPDATA%\OpenAI\Codex\bin.<hash>directory, Codex creates multiple.staging-<hash>-XXXXXXdirectories.codex.exe..staging-<hash>-XXXXXXdirectory to<hash>succeeds immediately.codex.exeruns--versionsuccessfully and Codex Desktop starts working again.Recent reproduced cases:
b6c7fc9497179c98a159911ff70742e9The same pattern was also reproduced on a second independent Windows machine.
Verified workaround:
After this, Codex works normally again.
This strongly suggests that the staged payload is already valid and that the failure is specifically in the final promotion/rename from staging to the content-addressed runtime directory. It would help if Codex treated this as recoverable: bounded retry/backoff around the rename itself, single-flight coordination per content hash, and cleanup of orphaned staging directories on the next successful launch.
bherreraicon commentedon Nov 4, 2026
🔧 Small human-readable summary / Resumen con un poco de humor
🇪🇸 Versión corta: cada actualización nos está regalando una nueva colección de carpetas
.staging-*😅. El contenido está bien, elcodex.exefunciona, pero la “mudanza” al directorio final no termina. Cerramos Codex, hacemos el rename manual y… 🧟♂️ Codex vuelve a la vida.🇺🇸 Short version: every update seems to gift us a fresh collection of
.staging-*folders 😅. The payload is fine andcodex.exeruns, but the final move to the content-addressed directory does not complete. Stop Codex, rename one staging folder manually and… 🧟♂️ Codex comes back to life.🧩 What makes this especially useful diagnostically:
WindowsAppspermissions;CODEX_CLI_PATHworkaround when the final hash directory is created correctly.🙏 If maintainers can reproduce the final rename failure, a supported repair/retry path here would save users from having to perform the “staging resurrection ritual” after updates.
bherreraicon commentedon Nov 9, 2026
🟢 Update: this time Windows sign-out was enough / Actualización: esta vez bastó cerrar sesión de Windows
🇪🇸 Nueva observación, reproducida en dos máquinas al mismo tiempo:
.staging-*y haciendo el rename al hash final.CODEX_CLI_PATHy sin reconstruir el runtime.🧩 Esto parece importante porque sugiere que algo cambió para bien: quizá la build actual vuelve a intentar correctamente la promoción del runtime cuando desaparecen los handles/procesos de la sesión anterior.
😄 En otras palabras: por primera vez en varias actualizaciones, no tuvimos que realizar el ritual de resurrección de
.staging-*.Sería interesante confirmar si esto es resultado de una mejora deliberada en la lógica de retry/recovery. Si es así, va en la dirección correcta. 👍
🇺🇸 New observation, reproduced on two machines at the same time:
.staging-*directory to the final hash directory.CODEX_CLI_PATH, and without rebuilding the runtime.🧩 This seems significant: it may indicate that the current build now retries or completes runtime promotion correctly once stale handles/processes from the previous Windows session are gone.
😄 For the first time in several updates, the
.staging-*resurrection ritual was not needed.If this behavior is the result of a recent recovery/retry improvement, it is definitely a step in the right direction. 👍