Repository navigation
Description
On Windows, the first launch of ChatGPT Desktop after an application update can take approximately 6–10 minutes before the UI becomes usable.
Subsequent launches are normal and take only a few seconds.
I performed a local forensic investigation and found that the long startup corresponds closely to the materialization of approximately 4,128 bundled runtime files (~639.9 MB) into "%LOCALAPPDATA%\OpenAI\Codex".
This appears similar to other reports of slow runtime extraction/materialization after updates, but I have not yet determined whether the delay is caused primarily by the application's own file-processing logic, MSIX behavior, Defender, or an interaction between them.
Environment
- OS: Windows
- Distribution: Microsoft Store / MSIX
- Package: "OpenAI.Codex"
- Package version observed during investigation: "26.911.7940.0"
- Electron/Chromium: "153.0.8010.36"
- Package installation volume: "D:\WindowsApps"
- User runtime/cache: "%LOCALAPPDATA%\OpenAI\Codex"
- Storage: KIOXIA KBG50ZNV1T02 NVMe SSD
- Filesystem: NTFS
- Allocation unit: 4 KB
- No third-party antivirus/EDR was found
Reproduction
The issue consistently occurs on the first launch after an application update.
Typical sequence:
- ChatGPT Desktop updates through Microsoft Store/MSIX.
- Launch ChatGPT for the first time after the update.
- "ChatGPT.exe" starts, but the UI is unavailable for several minutes.
- Thousands of files appear/materialize under:
- "%LOCALAPPDATA%\OpenAI\Codex\bin"
- "%LOCALAPPDATA%\OpenAI\Codex\runtimes"
- After this process completes, the UI becomes usable.
- Close ChatGPT.
- Launch it again.
- The subsequent launch takes only a few seconds.
Detailed startup timeline
A representative startup was measured on 2026-09-18.
Approximate timeline:
07:35:54 ChatGPT process/startup begins
07:35:54–07:38:10 Large runtime materialization activity
07:38:10 Main materialization activity has completed
07:38:27 ChatGPT UI becomes usable
The measured total startup time from process start to usable UI was approximately:
6 minutes 20 seconds
Approximately:
4 minutes 46 seconds
of that period was associated with the observed bundled-runtime materialization activity.
A subsequent launch:
07:55:46 ChatGPT starts
07:55:52 ChatGPT usable
took approximately:
6 seconds
This large difference between the first post-update launch and subsequent launches is highly reproducible.
Runtime materialization details
During the slow first launch, approximately:
4,128 files
639.9 MB
were created/materialized under:
%LOCALAPPDATA%\OpenAI\Codex\
including files under:
bin
runtimes\
Examples include:
codex.exe ~292.92 MB
code-mode-host ~69.14 MB
node.exe ~89 MB
node_modules ~4,123 files
The files in the user directory were byte-for-byte identical to the corresponding files in the MSIX package.
SHA-256 comparisons matched.
This suggests that the operation is not downloading a different runtime from the network; it is materializing/copying the bundled runtime into the user directory.
Network observation
During the critical materialization window:
07:35:54–07:38:10
no proxy/network connections were observed.
Therefore, the multi-minute delay does not appear to be caused by downloading these runtime files.
Disk / filesystem investigation
I compared the C: and D: volumes because the ChatGPT package was installed under "D:\WindowsApps".
Both volumes are partitions on the same physical SSD:
Disk 0
KIOXIA KBG50ZNV1T02 NVMe SSD
Both use:
NTFS
4 KB allocation unit
Approximate volume sizes:
C: ~249.8 GB, ~118.9 GB free
D: ~703.1 GB, ~252.4 GB free
EFS
The ChatGPT MSIX package on D: is EFS-encrypted.
A sample of WindowsApps packages on C: showed:
162 packages sampled
0 EFS-encrypted
On D:
7 packages sampled
7 EFS-encrypted
However, controlled file-copy benchmarks indicate that EFS cannot explain the multi-minute startup delay.
Controlled 4,123-file copy benchmark
Approximately 4,123 files were copied under controlled conditions.
Results:
D: EFS package → C: temporary directory
5.55 seconds
~743 files/s
D: EFS package → D: temporary directory
5.52 seconds
~746 files/s
C: non-EFS source → D: temporary directory
3.66 seconds
~1,126 files/s
C: non-EFS source → C: temporary directory
3.42 seconds
~1,138 files/s
Thus, the EFS source adds only roughly 2 seconds in this benchmark.
That is negligible compared with the approximately 286 seconds of observed materialization activity.
This also suggests that simply moving the application from D: to C: is unlikely to eliminate the multi-minute delay.
Cold vs. warm file access
Additional testing showed that newly introduced/sufficiently cold small files can be much slower to access than already-warmed files.
However, the extremely slow behavior observed during the ChatGPT post-update startup was substantially worse than the normal cold-read behavior.
Once the files had been processed/materialized, subsequent launches were thousands of files per second / only a few seconds overall.
This strongly suggests that the problem is specific to the post-update first-touch/materialization path rather than a persistent storage performance problem.
Filesystem filter drivers
The same system-level filesystem filters were observed on both volumes, including:
WdFilter Windows Defender
FileCrypt BitLocker
ahflt Microsoft PC Manager
BEDaisy BattlEye
No third-party antivirus/EDR was identified.
Windows Defender ("MsMpEng.exe") was active around the relevant period.
However, I have not yet established that Defender accounts for the majority of the approximately 286 seconds of materialization time.
I therefore do not want to claim that Defender is the root cause without a ProcMon trace.
What appears to be happening
The observed sequence appears to be approximately:
MSIX update
↓
First launch
↓
Bundled runtime is materialized into
%LOCALAPPDATA%\OpenAI\Codex
↓
~4,128 files / ~640 MB
↓
Very slow processing of many individual files
↓
ChatGPT UI becomes usable
↓
Subsequent launches are fast
The fact that:
- the files already exist inside the MSIX package,
- the copied files are byte-for-byte identical,
- there is no observed network activity,
- the storage device performs normally in controlled tests,
- EFS adds only a few seconds in the benchmark,
- and subsequent launches take ~6 seconds,
makes the post-update runtime materialization path the strongest correlation I have found so far.
Defender hypothesis
Defender may contribute to the slowdown because thousands of newly materialized executable/script/module files are being touched for the first time.
However, current evidence does not establish Defender as the primary bottleneck.
I have not disabled Defender or added exclusions.
A future Process Monitor capture can determine whether:
ChatGPT.exe file operations
are being delayed in correlation with:
MsMpEng.exe / WdFilter
or whether ChatGPT itself is spending most of the time performing serialized file operations.
Previous update-staging observations
There is also evidence that the MSIX update/staging process itself can take several minutes before the first launch.
Observed examples include approximately:
2026-09-17 448.8 seconds
2026-09-16 225.5 seconds
2026-09-15 272.8 seconds
These appear to be separate from the measured first-launch materialization delay.
Therefore, the user's perceived total "update → usable ChatGPT" time can be even longer than the approximately 6-minute first-launch measurement.
Other observations
No ChatGPT application crash or Windows Error Reporting event was found for the slow launch.
No evidence of:
- GPU initialization failure
- memory pressure
- SSD saturation
- database migration taking several minutes
- update process deadlock
was found during the investigation.
The system otherwise appears healthy.
Expected behavior
After an application update, ChatGPT Desktop should become usable within seconds or should avoid blocking the first UI launch for several minutes while synchronously materializing thousands of bundled runtime files.
Actual behavior
The first launch after an update can take approximately:
6–10+ minutes
with approximately:
4,128 files
~639.9 MB
being materialized before the application becomes usable.
Subsequent launches take only a few seconds.
Requested investigation
Could the Windows/MSIX startup path be investigated to determine whether the bundled runtime can be:
- materialized asynchronously,
- reused directly from the MSIX package where possible,
- extracted during the update rather than blocking the first launch,
- or otherwise optimized to avoid processing thousands of individual files synchronously?
I can provide a Process Monitor (".PML") capture from the next update to correlate:
- "ChatGPT.exe"
- "MsMpEng.exe"
- "CreateFile"
- "ReadFile"
- "WriteFile"
- file-operation duration
- and the runtime materialization timeline.
The main question is why approximately 4,128 already-bundled files require several minutes to become usable after every update.
Activity
[-][Windows] First launch after update takes 6+ minutes due to extremely slow runtime materialization (~4,128 files)[/-][+][Windows] First launch after update takes 6+ minutes due to extremely slow runtime materialization[/+]github-actions commentedon Sep 18, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Just1dream commentedon Sep 24, 2026
Independent reproduction on a newer Windows build. I think this adds a useful distinction to this issue:
Environment
26.917.9434.0WindowsApps%LOCALAPPDATA%\OpenAI\CodexObserved startup behavior
First launch after the update:
cua_nodematerialization occupies roughly ~212 s of that periodA startup log line shows:
Second launch of the same version:
This suggests PowerShell is not taking ~220 s. Instead, the Electron main event loop appears to be blocked during the first-launch runtime relocation, so the 5 s timer itself cannot run on time.
Experiment 1: identify exactly what is created during the slow first launch
During the slow launch I monitored
%LOCALAPPDATA%\OpenAI\Codex.For the
cua_noderuntime specifically:app\resources\cua_node%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\<hash>Across the full relocation window, about:
were created under
%LOCALAPPDATA%\OpenAI\Codex.The timestamps line up very closely with the period in which the UI is unavailable.
Experiment 2: rule out raw source-read performance
I read the complete 2,283-file
cua_nodetree without writing anything.Results:
Conclusion: simply reading the packaged runtime is fast enough that raw package-read throughput cannot explain a multi-minute stall.
Experiment 3: controlled normal tree copy
I then copied the same 2,283 files using a straightforward byte-stream tree copy, outside the ChatGPT code path.
Results:
The two results are very close.
Conclusion: the secondary AppX volume / cross-volume layout is not enough by itself to explain ~2-4 minutes of delay.
Experiment 4: inspect the current relocation implementation
I inspected the current packaged
app.asar.The Windows relocation helper effectively does this for each file:
The surrounding directory traversal and validation path also uses synchronous APIs such as:
So this work is happening synchronously on the startup path.
Experiment 5: reproduce the current fallback path directly
To test whether the fallback itself is expensive, I wrote a small Node.js reproduction using the same strategy:
cua_nodetree;fs.copyFileSync(src, dst)for every file;UNKNOWN / -4094, fall back tofs.readFileSync(src)+fs.writeFileSync(dst);Result:
Every single one of the 2,283 files first failed with:
before taking the synchronous fallback.
Progress during the run was approximately:
This is the most important result:
So on this machine, reproducing the current fallback strategy is already about 10x slower than a straightforward copy before accounting for the rest of Electron startup work.
Interpretation
This looks less like the original "-4094 causes relocation to fail" problem and more like a performance side effect of the fallback that now prevents that hard failure.
The likely sequence is:
This also explains why a nominal 5-second timer is observed only after ~220 seconds.
Potential fixes
The exact implementation choice is of course up to the Windows/Desktop team, but the measurements suggest several concrete options:
Avoid the guaranteed failed
copyFileSyncattempt for packaged files that consistently returnUNKNOWN/-4094.Once this source condition is detected, select the alternate copy path once instead of throwing and catching once per file.
Use a Windows-native copy path that supports protected/encrypted package files.
For example, equivalent semantics to
COPY_FILE_ALLOW_DECRYPTED_DESTINATIONrather than relying on Node's genericcopyFileSyncand then falling back file-by-file.Move runtime materialization off the Electron main thread.
Even if the byte-stream fallback must remain, doing it in a worker/child process would avoid blocking window creation, IPC and timers.
Materialize during update/install staging when possible.
That would keep the first user-visible launch off the critical path.
If the fallback is retained, detect the condition once.
One failed probe could switch the whole tree to the fallback mode, avoiding thousands of predictable exceptions.
Why I think this may be actionable
The current fallback appears to solve the older functional failure - the runtime eventually materializes successfully - but on this system it converts the failure into a multi-minute main-thread stall.
The controlled experiments above isolate the slowdown fairly well:
UNKNOWN/-4094path.I can provide the exact startup-log excerpts and the minimal Node.js reproduction script if that would help with verification.
hengweiyv commentedon Oct 2, 2026
I had the same symptom with the Windows Store Codex app installed on a secondary (D:) AppX volume: opening it could take minutes, then the window would appear. Moving Codex back to the system (C:) AppX volume with Windows' supported package migration resolved the delay on my PC.
For anyone in that situation, close Codex and back up your app data first, then check which AppX volume actually holds the package and use
Move-AppxPackageto move it to the system volume. Microsoft's documentation says this cmdlet moves the package and its app data: https://learn.microsoft.com/en-us/powershell/module/appx/move-appxpackageThis is one confirmed workaround for a secondary-volume installation, not proof that every slow startup has the same cause. I have not yet verified the first launch after a future update.
zhaozetong commentedon Nov 6, 2026
I also experienced startup delays of several minutes after an update. Here is another case where the app was already installed on C:, along with a workaround that succeeded on my machine.
App version:
Installation location:
Bundled runtime source:
Local runtime directory:
During investigation,
bin\node.exein the source directory had the attributesArchive, Encrypted. The app created the following staging directories during startup, while the main window remained unavailable:Based on the direct read/write approach discussed in this issue and the manual runtime preparation workaround in #47724, I used PowerShell to:
cua_nodetree from the currently installed package..NET ReadAllBytes / WriteAllBytes.Result: 2,461 files were copied in 4.07 seconds, and ChatGPT subsequently opened successfully.
Below is the script that worked in this case. The runtime ID
c4873bdffed0b168came from the.staging-<ID>-…directory created during this launch. Other versions should use their corresponding runtime ID. Running the script forcibly terminates ChatGPT.This PowerShell script was written during troubleshooting using the paths observed on my machine, drawing on the community’s existing analysis. In this case, direct read/write operations prepared the runtime quickly and restored startup for the installed version. A future update that changes the runtime ID may require preparing the corresponding runtime again.