Codex Desktop thread switching is consistently slow on Windows
Open 💬 7 comments Opened Jun 20, 2026 by HouseOfCog
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of the Codex App are you using (From “About Codex” dialog)?
Version 26.616.32156 • Released 19 June 2026
What subscription do you have?
Pro
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
Codex Desktop thread switching is consistently slow on Windows.
Environment:
- Codex Desktop version: 26.611.61753
- OS: Windows
- Shell originally: PowerShell 5.1
- Integrated terminal shell changed to Command Prompt, persisted in config.toml as integratedTerminalShell = "commandPrompt"
Symptom:
- Cold-opening/switching to any thread takes roughly 6 seconds.
- This happens even after fully quitting Codex / ending the Codex task and reopening.
- It also happens for a brand-new tiny thread with a trivial request, so thread transcript size does not appear to be the cause.
- Warm switching is much faster once the thread has already been opened.
Relevant log evidence:
- During thread/start and thread/resume, logs repeatedly show:
Failed to create shell snapshot for powershell: Shell snapshot not supported yet for PowerShell
- This still appears after changing Integrated terminal shell to Command Prompt.
Question:
Is Codex session initialization still using PowerShell internally despite the integrated terminal setting, and could that be causing the fixed ~6s cold thread activation delay?
What steps can reproduce the bug?
Switch to a thread that hasn't been opened yet in the current session.
What is the expected behavior?
Switching threads happens within 1 second.
Additional information
_No response_
7 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Codex Desktop has become significantly slower recently. Even simple questions or minor edits to a small file can take around five minutes, with long delays during both reasoning and tool execution. This issue occurs repeatedly on Windows and affects both new and existing threads, making routine tasks unnecessarily time-consuming.
Update after more isolation testing:
We did several additional Windows repro tests after restarting Codex and, separately, after a full laptop restart.
New observations:
Process observations from low-overhead sampling during slow cold switches:
We also found one separate local contributor: an invalid/empty
.gitfolder in one project root made switching worse. Removing it improved some timings, but did not fix the remaining cold-thread issue. The residual problem persists even when Git/Defender are quiet.Current best hypothesis:
This looks less like Git, Defender, terminal shell choice, or transcript size, and more like a Codex Desktop cold thread hydration/resume/render path on Windows. Once a thread has been hydrated in the current app session, switching back to it is fast.
Possible useful repro refinement:
Seeing the same issue on Windows 11 running WSL.
Feedback ID: no-active-thread-019ef5d4-c21c-7430-85bc-d61cfa924fbf
Thanks for writing this up. I am seeing a related Windows Codex Desktop performance regression in #28855: since June 12, opening/using Codex Desktop can cause severe intermittent mouse/typing/system input lag, and it still persists for me on
OpenAI.Codex 26.616.10790.0.I linked your report in a broader Discussion collecting recent Windows Desktop performance reports here: https://github.com/openai/codex/discussions/29949#discussioncomment-17428007
No action needed from you unless you want to add more detail there, but I wanted to connect the reports because the recent Windows issues look related enough that they may need a canonical tracker.
Additional update after more targeted capture:
We ran a 90-second process-tree watcher during a user-driven slow thread switch / return test on Windows.
Observed behavior:
Codex.exeworking set jumped from ~233 MB to ~1,058 MB.Codex.exe: ~9.47 CPU-secondsCodex.exe: ~5.92 CPU-secondscodex.exe app-server: ~1.19 CPU-secondsnode_repl.exe: 0 CPU deltaFull 90-second capture summary:
Codex.exe: ~31.52 CPU-secondsCodex.exe: ~27.53 CPU-secondscodex.exe app-server: ~4.94 CPU-secondsnode_repl.exeprocesses were present undercodex.exe app-server; 7 were present from the start and 1 appeared partway through, but all showed 0 CPU delta.Additional isolation since the last comment:
~\.codex\.tmp\pluginsoutside the Codex tree did not improve switching. Codex recreated the plugin staging tree and latency remained/worsened, so this does not look like the primary cause.logs_2.sqlite,state_5.sqlite-wal,models_cache.json, and.codex-global-state.jsonlook more like background/tooling noise than the specific switch bottleneck.Current read:
This still looks most consistent with a Codex Desktop cold thread hydration/resume/render path on Windows, where heavy app/renderer work blocks the UI long enough for Windows to mark the app “Not responding”.
node_repl.exehelper fanout exists on this machine, but the latest capture did not shownode_repl.exeCPU as the immediate freeze driver.Other negative/isolating tests already run:
logs_2.sqlite, session files, generated images, plugin/runtime cache, and disposable app/web cache did not fix the issue..gitfolder, but after removing that local issue, the remaining slow cold-switch behavior persisted with Git/Defender quiet.Adding another Windows repro with lower-level file I/O evidence. This looks like the same user-visible issue as this thread, but the strongest signal in my capture is different from the earlier Git/app-server theories.
Environment:
OpenAI.Codex_26.623.8305.0_x64__2p2nqsd0c76g0codex-cli 0.142.410.0.22631, x64codex doctor --summary --ascii --no-color:17 ok | 1 idle | 1 notes | 0 warn | 0 fail; state DB healthy; rollout files and state DB thread inventory agree; app-server was idle at doctor time.Symptom:
logs_2.sqlite, repairing stale workspace/thread cwd metadata, adding narrow Defender exclusions, using Chrome-only browser backend config, and resetting only the local Codex runtime cache under%LOCALAPPDATA%\OpenAI\Codex\binand%LOCALAPPDATA%\OpenAI\Codex\runtimes.Perf-counter evidence from a manual sidebar/thread switch:
Procmon evidence from an Administrator capture during manual thread switching:
The key part: the main Desktop
Codex.exe, not the app-server, repeatedly read full helper/runtime binaries from both the packaged app and the local runtime cache:This capture does not look like the old
logs_2.sqlitereread issue:It also does not look like Defender doing the reads in this capture. Defender can spike CPU in some traces, but this Procmon run shows Codex itself issuing the repeated full-file reads.
Targeted cache reset did not help:
Current hypothesis:
Normal Desktop UI/sidebar thread switching is triggering repeated helper/runtime validation, hashing, copy/reconciliation, or startup checks in the main Electron
Codex.exeprocess. That work seems to reread large packaged and cached helper binaries multiple times and is happening on, or too close to, a UI-sensitive path. It probably needs to be cached/debounced, moved off the thread-switch path, or run only when the package/runtime version changes.Related issues that look adjacent but not identical: #30428 has WPR evidence around UI stutter and app-server/Git churn; #28855 tracks broader Windows Desktop whole-system input lag. This comment adds Procmon path-level evidence that the remaining thread-switch hitch can be dominated by main-process full-file reads of runtime/helper binaries.
I am not attaching the raw Procmon
.pml/CSV publicly because the raw capture is several GB and may include sensitive local activity. I have a small parsed summary and can provide a redacted bundle through an appropriate private channel if useful.