[Windows] Primary runtime updater re-downloads 501.8 MB hourly after non-retryable EPERM activation failure
What version of the Codex App are you using?
- Current Windows Store package:
OpenAI.Codex 26.818.5229.0(x64) - The repeated failures were logged by package build
26.814.5167.0 - Codex CLI:
0.147.0 - Primary runtime bundle requested:
26.819.11345
What platform is your computer?
Windows 11 Pro x64, version 10.0.26200 (build 26200).
What issue are you seeing?
The Codex desktop primary-runtime updater downloaded the same 501,849,919-byte archive from persistent.oaistatic.com approximately once per hour after every activation failure.
The download URL was:
https://persistent.oaistatic.com/codex-primary-runtime/26.819.11345/codex-primary-runtime-win32-x64-26.819.11345.tar.gz
Local log analysis found:
- First attempt: 2026-08-19 08:37:52 local time
- Successful completion: 2026-08-23 11:48:03 local time
- 101 scheduled attempts in roughly 4 days
- 96 complete archive downloads followed by activation failure
- 4 network-stage failures
- 1 eventual success
- At least 48.678 GB of confirmed traffic from complete archive downloads alone
The repeated error was:
[primary-runtime-installer] primary_runtime_bundle_install_outcome
errorCategory=permission_denied
errorCode=EPERM
failureStage=activate_runtime
outcome=failed
retryable=false
trigger=scheduled_update
errorMessage="EPERM: operation not permitted, rename '%USERPROFILE%\.cache\codex-runtimes\codex-primary-runtime' -> '...previous-<uuid>'"
The current runtime directory contained executables being used by Codex. Windows therefore refused the directory rename. That part is expected Windows file-lock behavior. The bandwidth-consumption problem is that Codex deleted the staging directory (including the fully downloaded, verified archive) after the non-retryable activation failure, then the hourly scheduler downloaded the identical 501.8 MB archive again.
This happened silently, with no user notification or visible bandwidth warning.
What steps can reproduce the bug?
- Run Codex Desktop on Windows with the current primary runtime actively in use.
- Make a newer primary runtime bundle available to the hourly scheduled updater.
- Allow the 501.8 MB bundle to download.
- Let activation attempt to rename the active
codex-primary-runtimedirectory. - Observe
EPERMatfailureStage=activate_runtime. - Leave Codex running.
- Observe another full download on the next hourly scheduled check, despite
retryable=false.
What is the expected behavior?
After a complete bundle download and a non-retryable activation failure, Codex should not discard the verified archive and download it again every hour.
Any of the following would prevent the traffic loop:
- retain the verified archive and activate it after Codex exits/restarts;
- defer activation when the current runtime has live processes;
- stop automatic retries after a non-retryable error;
- use exponential backoff and a retry/traffic cap;
- notify the user and offer “restart to finish update”;
- respect metered-network settings.
At minimum, one failed 500 MB update must not become an unbounded hourly re-download loop.
Additional information
No raw log files are attached because they can contain local paths and session details. The counts above were derived from the local Codex desktop logs and the archive size was verified from the HTTP response.
5 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I reviewed #38999. It is related to primary-runtime installation on Windows, but the failure mode and impact here are distinct: the runtime was present, each verified 501.8 MB payload was discarded after a
retryable=falseactivation failure, and the scheduler downloaded it again hourly, producing at least 48.678 GB of traffic. This report is specifically about the unbounded re-download loop and missing backoff/cache/restart handling.This is a good match for one narrow Windows-local failure mode I’ve been tracking. I maintain WinBridge Recovery: https://github.com/zemeng5208/winbridge-recovery
For this issue, the part WinBridge may help with is diagnosing the local activation blocker, not the updater’s hourly retry policy itself. In particular, an
EPERMonis consistent with Windows still having one or more executables/DLLs under the active runtime tree mapped by a live or stale Codex/helper process. WinBridge’s local diagnostics are intended to identify this class of file-lock / runtime-helper ownership problem and distinguish it from cache/version/staging drift before attempting recovery.
A useful separation here is:
retryable=false, scheduling another full download every hour, or failing to defer activation until the owning processes exit. That retry/cache policy needs an OpenAI-side fix.I would also avoid deleting the active runtime directory manually while Codex is running; on Windows that can turn a clean lock failure into a partially staged state. WinBridge does not modify
WindowsApps, and I would not expect it to guarantee a fix if the only problem is the updater lifecycle/backoff logic.The fact that your final attempt eventually succeeded is also useful evidence: it makes a persistent package-corruption explanation less likely and is consistent with the blocking handle eventually disappearing.
This looks like the same underlying issue as #40455 (which I opened independently, before finding this one). My report approaches it from a different angle — network-level packet capture rather than internal error logs — but points to the exact same subsystem and even the same bundle version (
26.819.11345).Adding a few things that might help narrow this down further:
pktmon, deduplicated by PktGroupId+PktNumber to rule out double-counting across NDIS capture points).persistent.oaistatic.comresolves to two A records (104.18.32.47, 172.64.155.209); together they accounted for 98.9% of all captured traffic in a 63-second launch window.Given this, this bug seems to affect anyone who either keeps the app open long-term (hourly loop, as you found) or restarts it frequently (per-launch loop, as I found) — same root cause, different observed cadence. Closing my duplicate (#40455) and linking here.
Independent confirmation on Windows 11 x64. I am not attaching raw logs because they may contain local paths and session details.
Environment
OpenAI.Codex_26.818.2441.0_x64__2p2nqsd0c76g026.813.1231726.826.12353Network observations
A local per-process/per-destination traffic collector observed:
persistent.oaistatic.com;The requested archive was:
Sanitized failure signature
Process inspection showed a long-lived bundled
pwsh.exerunning from inside:It was a child of the Codex process. Because the executable being used is inside the directory that activation tries to rename, this is consistent with Windows denying the rename while the old runtime is still mapped by a live helper process.
This independently reproduces the same updater loop with a newer runtime target (
26.826.12353). The important upstream issue is still the same: after a completed download and aretryable=falseactivation failure, the verified archive is not reused and the full payload is downloaded again on the next scheduled attempt. The updater should coordinate helper shutdown, defer activation until restart, retain the verified archive, and/or stop retrying the full download.