Repository navigation
Windows app stutters when switching chats or opening Settings #30428
Description
What version of the Codex App are you using (From "About Codex" dialog)?
Windows app package: OpenAI.Codex 26.623.5546.0
PATH Codex CLI/runtime after update: codex-cli 0.142.3
The running app-server during capture was the embedded Windows app binary:
C:\Program Files\WindowsApps\OpenAI.Codex_26.623.5546.0_x64__2p2nqsd0c76g0\app\resources\codex.exe app-server --analytics-default-enabled
Note: Directly executing the embedded WindowsApps app\resources\codex.exe --version returned Access Denied, so I can confirm the Windows app package version and PATH CLI version, but not a separate embedded app-server version string.
What subscription do you have?
Not provided in this public report. I can update this if needed.
What platform is your computer?
OS: Windows 11 Pro
OS version: 10.0.26200
OS build: 26200
Architecture: x64
Logical processors: 32
Memory: 63.77 GB
Shell: PowerShell
What issue are you seeing?
The Codex Windows desktop app visibly stutters when switching conversations or entering Settings. During the stutter, mouse movement also feels interrupted.
I captured a clean WPR/ETW trace using these profiles:
GPU
DesktopComposition
HTMLResponsiveness
The capture was launched from an external elevated PowerShell process to reduce observer effect from Codex itself.
WPA export shows a large UI responsiveness delay:
Table: repro_UI_Delays_Summary_Table_Delays_By_Process,_Type.csv
Process: Codex.exe <OpenAI.Codex> (8308)
UI delay duration: 37.965 s
Start time: 0.392 s
End time: 53.326 s
This happened while the machine was not under overall CPU pressure:
WPA CPU precise Idle: 88.55%
WPA CPU sampled Idle: 89.44%
Codex.exe <OpenAI.Codex> (8308): 2.05% CPU in WPA precise table
codex.exe <OpenAI.Codex> (12748) app-server: 0.86% CPU in WPA precise table
Codex.exe <OpenAI.Codex> (6476) renderer: 0.71% CPU in WPA precise table
The same trace shows heavy repeated child-process activity from the Codex app-server. Using command-line detail rows from WPA Processes Lifetime to avoid double-counting aggregate PID rows:
| Executable | Detail rows | Total table duration | Max table duration |
|---|---|---|---|
git.exe |
494 | 161.320 s | 2.250 s |
conhost.exe |
88 | 75.250 s | 4.000 s |
powershell.exe |
60 | 74.810 s | 4.030 s |
node_repl.exe |
36 | 575.450 s | 39.400 s |
node.exe |
28 | 1.220 s | 0.050 s |
taskkill.exe |
28 | 5.060 s | 0.250 s |
Repeated Git command patterns:
| Command pattern | Count |
|---|---|
"git" -c core.hooksPath=NUL -c core.fsmonitor=false remote -v |
62 |
git.exe -c core.hooksPath=NUL -c core.fsmonitor=false remote -v |
62 |
"git" -c core.hooksPath=NUL -c core.fsmonitor=false rev-parse HEAD |
61 |
git.exe -c core.hooksPath=NUL -c core.fsmonitor=false rev-parse HEAD |
61 |
"git" config --null --get core.fsmonitor |
61 |
git.exe config --null --get core.fsmonitor |
61 |
"git" -c core.hooksPath=NUL -c core.fsmonitor=false status --porcelain |
60 |
git.exe -c core.hooksPath=NUL -c core.fsmonitor=false status --porcelain |
60 |
Git detail rows occurred from 1.748 s through 72.101 s, about 421 detailed Git command rows per minute.
Node/runtime churn in the same capture:
node_repl.exe: 36 lifecycle rows, parent process is Codex app-server codex.exe (12748)
node.exe --version: 28 rows
taskkill.exe /PID ... /T /F: 28 rows, apparently cleaning up node_repl PIDs
500 ms process sampling cross-check:
Main app Codex.exe (8308):
max CPU about 108% of one core
average CPU about 55% of one core
max working set 1723 MB
max private memory 2169 MB
App-server codex.exe (12748):
max CPU about 82% of one core
average CPU about 23% of one core
max working set 384 MB
Renderer Codex.exe (6476):
max CPU about 78% of one core
average CPU about 22% of one core
max working set 806 MB
No sampled Responding=False was observed, but ETW HTML responsiveness reports the UI delay above.
codex doctor --summary --ascii --no-color after updating the PATH runtime:
Codex Doctor v0.142.3 - windows-x86_64
16 ok | 1 idle | 2 notes | 1 warn | 0 fail degraded
Relevant checks:
- Runtime: standalone 0.142.3-x86_64-pc-windows-msvc
- Config loaded
- Auth configured
- State DB healthy
- Network websocket connected
- Active provider endpoints reachable
- Warning: rollout files are missing from the state DB
This does not look like system-wide CPU/GPU exhaustion. It looks like the Codex Windows app/UI path is experiencing long HTML responsiveness delay while app-server background work repeatedly polls Git state and starts/stops Node runtime helpers.
What steps can reproduce the bug?
- Launch the Codex Windows app.
- Keep an existing workspace/thread open.
- Start WPR with
GPU,DesktopComposition, andHTMLResponsiveness. - Switch between conversations and open the Settings UI.
- Observe visible UI stutter and mouse cursor stutter.
- Stop WPR and export with Windows Performance Analyzer / WPAExporter using
HtmlResponsivenessAnalysis.wpaprofile.
What is the expected behavior?
Switching conversations and opening Settings should be responsive, without visible UI freezes or cursor stutter.
Background Git scanning and Node/MCP/runtime helper management should not create enough churn to coincide with large UI responsiveness delays.
Additional information
Related issues I found while checking for duplicates:
- Windows App performance still lags behind macOS #30185: generic Windows app performance lag/stutter report.
- Codex Desktop Creates Empty
.gitDirectories, Then Repeatedly Scans Them and Triggers Windows Defender High CPU #29911: Windows Git scanner repeatedly launching Git for empty.gitdirectories. - Codex for macOS accumulates Computer Use / MCP helper processes and unreaped zombie children, causing HID lag and WindowServer/TCC stalls #25744: macOS helper/node_repl accumulation and input lag.
- /new and codex resume <session-uuid> are extremely slow after upgrading to 0.142.0 #29822: Windows CLI
/newandresumeslow after 0.142.0, possibly app/runtime related but not the same reproduction.
I have retained the raw WPR trace locally:
codex-ui-repro-20260628-165114.etl
Size: 3,292,528,640 bytes
I am not attaching the raw ETL publicly because it is large and may contain sensitive local activity. I can provide it through an appropriate private channel if useful.
A smaller evidence package is available locally and contains:
environment.txt
codex-doctor.txt
status.txt
wpr-output.txt
selected WPA exported CSV files
processes-before-codex-family.csv
process-samples-codex-family.csv
processes-after-codex-family.csv
process-lifetime-codex-family.csv
codex-ui-performance-summary.md
Activity
github-actions commentedon Jun 28, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
[-]Codex Windows app UI stutters when switching conversations or opening Settings; WPR shows 38s UI delay plus Git/node_repl churn[/-][+]Windows app stutters when switching chats or opening Settings[/+]kangmingxuan commentedon Jun 28, 2026
Additional source-code correlation and proposed fix
I did another pass comparing the WPR traces with the public source at
bdd282f3bbd55df3a869a5438519cd948c134d4d.The highest-confidence hypothesis is that latency-sensitive desktop UI paths are hitting local thread listing / metadata repair / Git enrichment work, rather than a general CPU saturation issue.
Relevant source paths:
ThreadListParams.useStateDbOnlydefaults to false, and the protocol comment says false preserves JSONL rollout scan-and-repair behavior:codex/codex-rs/app-server-protocol/src/protocol/v2/thread.rs
Lines 1099 to 1103 in bdd282f
thread/listpassesuseStateDbOnlythrough to the thread store:codex/codex-rs/app-server/src/request_processors/thread_processor.rs
Lines 1907 to 1966 in bdd282f
use_state_db_onlyis true; otherwise it falls back to rollout scanning:codex/codex-rs/thread-store/src/local/list_threads.rs
Lines 151 to 209 in bdd282f
status --porcelain,remote -v, andrev-parse HEAD:codex/codex-rs/git-utils/src/info.rs
Lines 291 to 300 in bdd282f
codex/codex-rs/core/src/turn_metadata.rs
Lines 315 to 320 in bdd282f
core.fsmonitoris intentionally probed every time:codex/codex-rs/git-utils/src/fsmonitor.rs
Lines 42 to 59 in bdd282f
This matches the WPR traces:
Codex.exeshows long UI delays while system CPU remains mostly idle, and the trace contains many short-livedgit.exeprocesses withstatus --porcelain,remote -v,rev-parse HEAD, andconfig --null --get core.fsmonitor.Proposed fix:
For latency-sensitive Windows desktop UI paths such as chat switching, sidebar history refresh, and entering Settings, call
thread/listwithuseStateDbOnly: true. Move JSONL rollout metadata repair and Git enrichment to a background, batched, or idle-time path, then refresh the UI when repaired metadata is available.A second useful optimization would be to cache or dedupe Git metadata probes per repo root for a short TTL, especially
git status --porcelainand the repeatedcore.fsmonitorprobe.This may be Windows-amplified rather than Windows-only: the same app-server paths are cross-platform, but Git-for-Windows process startup, NTFS metadata access, Defender scanning, and the Windows desktop shell make repeated short-lived Git probes more visible as UI stalls.
areslp commentedon Jul 18, 2026
Follow-up from the current Windows release with a source-level correlation.
Current build
OpenAI.Codex_26.715.4045.0_x64__2p2nqsd0c76g026.715.319250.145.0-alpha.18The update made the recurring system-wide stutter substantially worse. The Corsair K70 is still in BIOS mode, reducing the observed composite USB/HID nodes from 8 to 2, but that workaround is no longer enough.
Git process evidence
A narrow watchdog observed Codex-owned Git processes from 19:27:58 through 21:06:55 and terminated only processes older than 3 seconds. It recorded 623 process rows (including the Git-for-Windows wrapper and real child process as separate rows):
rev-parse HEADremote -vstatus --porcelainrev-parse --git-dir/ fsmonitor probesImmediately after the 4045 package started, the 20:55–20:59 window alone produced 56 such >3-second rows in minute-like bursts.
Running the same Git commands manually in the same repository took only 32–46 ms, so this is not an intrinsically slow repository or Git installation.
No new WER
AppHangTransientor Application Hang event 1002 was recorded during these short recurring stalls. That means formal Windows hang telemetry misses this failure mode even while the app and mouse visibly stutter.Public source correlation
The bundled Rust app-server path collects
rev-parse HEAD,remote -v, andstatus --porcelaintogether for turn workspace metadata. Its five-second timeout currently uses Tokiokill_on_drop(true), which terminates only the directly spawned wrapper.Open PR #30235 documents the exact residual-child mechanism: if
gitresolves to a wrapper, the wrapped Git process can keep scanning after the timeout. However, that PR only adds Unix process-group cleanup; the Windows path still has no equivalent process-tree termination.A Windows-specific fix should retain the child until timeout, run hidden
taskkill /PID <pid> /T /F, and reap the wrapper/output future. The existing exec-server already usestaskkill /T /Ffor Windows stdio process trees, so this would follow an established repository pattern rather than introduce a new platform mechanism.I have a focused patch and regression test locally; local
codex-git-utilstests pass (27/27), and the Windows-only Tokio code cross-checks successfully.areslp commentedon Jul 18, 2026
Follow-up: I now have a focused implementation available at areslp@b8d7f3c
It adds Windows-specific timeout cleanup for the entire wrapped process tree for all Git metadata probes, plus a regression test that verifies a wrapped child cannot survive the timeout.
Validation completed:
The repository contribution guide says external PRs are by invitation only, so I have not opened an unsolicited PR. If maintainers agree with this approach, please invite me to submit it and I can open the PR immediately.
areslp commentedon Jul 20, 2026
Follow-up after updating the same Windows installation to the July 20 Store package.
Current build and HID control
OpenAI.Codex_26.715.7063.0_x64__2p2nqsd0c76g0concurrent_reasoning_summaries = falseremains configuredThe HID/main-thread regression appears improved in this build. During a 45.78-second read-only external sample, the main window was responsive in 131/131 checks, with zero
Responding=Falsesamples and no new Application Hang event 1002. This is only a short smoke result, but it matches the positive 7063/52143 reports in #33780/#33884.Git process storm still reproduces
The same sample did not execute Git itself, but observed:
git.exePIDsstatus --porcelain,rev-parse HEAD,remote -v,rev-parse --git-dir, andconfig --null --get core.fsmonitorAn immediate follow-up snapshot found:
git.exeprocessescodex.exe app-serverThe app-server handle count increased from 490 to 621 during the 45.78-second sample and was 677 at the follow-up snapshot. This short observation is not enough by itself to claim a persistent handle leak, but it confirms substantial process/handle churn.
One tracked workspace still contains an empty/invalid
.gitdirectory, so that remains a plausible amplifier. However, the product behavior is unchanged: the app-server continues launching periodic Git metadata batches, and timed-out wrapped children can outlive their parent on Windows.Conclusion
26.715.7063.0appears to mitigate the synchronous HID freeze, but it does not include an effective Windows Git process-tree cleanup or invalid-repository backoff fix. The focused Windows cleanup implementation remains available here:areslp@b8d7f3c
PR #30235 has now received a maintainer approval, but it remains open and Unix-only. If maintainers want the Windows equivalent submitted, an invitation would let me open the focused PR immediately.
areslp commentedon Jul 24, 2026
Follow-up after updating the same Windows host to the current Microsoft Store package.
Current build
OpenAI.Codex_26.721.3996.0_x64__2p2nqsd0c76g0D:\work\.gitstill exists and still has zero children.Idle/periodic path is substantially improved
A 55.82-second read-only external sample while the app was naturally idle observed:
git.exePIDs, peak concurrent count 2taskkill.exePIDs, peak concurrent count 2This is dramatically better than the sustained process storms reproduced in earlier packages.
Session switching still causes visible stutter and a process burst
The user still perceives a short but obvious freeze when switching desktop sessions/threads. I ran a second 60.82-second, 250 ms external process sample while reproducing session switching:
git.exePIDstaskkill.exePIDs23:17:48.859through23:18:00.567local timeResponding=Truein 172/172 checksThe important distinction is that this no longer looks like the old long-lived process accumulation, but it is also not fully fixed. Session switching still coincides with a short burst of Git and cleanup processes, and the user-visible stall is shorter than Windows' coarse
Responding/hang detection.The current desktop log files for this process were still zero bytes/unflushed during the capture, so I cannot yet prove from logs whether this burst is specifically
thread/list, rollout metadata repair, or Git enrichment. The external timing correlation is reproducible, but I do not want to overstate the exact internal call path without flushed logs or ETW.Current conclusion
The 3996 package appears to have strongly improved the idle/periodic Git storm on this machine, but the latency-sensitive session-switch path still stutters and still launches a concentrated Git/taskkill burst. Please keep session switching and active-agent work as separate acceptance paths; a clean idle sample does not cover either one.
areslp commentedon Jul 26, 2026
Follow-up after several additional Store updates: the same Windows host is now running
OpenAI.Codex_26.721.4979.0_x64, and the app feels materially slower again, particularly when switching sessions.Git/process-tree control
A 60.70-second, 250 ms read-only sample observed:
git.exe, peak 1taskkill.exe, peak 2Therefore the old sustained idle Git process storm was not active in this window. The public Git timeout implementation still lacks Windows process-tree cleanup, so this does not close the Git bug; it only narrows the current 4979 slowdown to a different active path.
Renderer/app-server amplification
The same live sample recorded:
The flushed 4979 desktop log contained:
thread/listresponsesthread/listresponses in one secondIndividual responses are usually short, but the redundant bursts add foreground work during navigation/session switching.
Local config is still being overridden
Although
concurrent_reasoning_summaries = falseremains configured, the renderer resolved the feature totrue413 times and tofalsezero times. The same log had 15,123 reasoning-related rows and 512 ResizeObserver-loop errors. Reasoning completion rows were replicated about 2.92 times per unique item across primary and hidden overlay/dictation renderers.The full current-build evidence is posted here:
#33996 (comment)
Current conclusion
There are at least two separate Windows acceptance paths:
4979 looked clean for idle Git in this sample, but the second path has regressed: session switching still stutters, remote reasoning-summary enablement overrides the local config, renderer work is duplicated, and the long-lived process footprint exceeds 2 GiB.
Please do not treat a clean idle Git sample or
Responding=Trueas evidence that the Windows desktop performance issue is resolved.v2-share commentedon Aug 5, 2026
Additional evidence from current Windows build
I am adding this to the existing issue because the symptom matches the Windows chat-switching/UI stutter described here. This is not a new issue.
Environment and symptom
26.730.8199.0.Observed timings from the existing local trace
thread/resume:1,177 msand1,551 ms, with additional calls around1.0-1.4 s.plugin/list:1,601 ms, with additional calls at2,385 ms,2,786 ms, and3,666 ms.config/read: approximately690-1,102 ms.plugin/installed: approximately733-1,102 ms.main_thread_jank_snapshot: 4 occurrences.Interpretation
These timings coincide with conversation restoration/history handling and plugin/config loading during the UI stall. They suggest UI/main-thread contention around thread switching, but do not by themselves prove a single root cause.
Distinction from the older WMI reports
On the same current build, the clean-start trace did not show
electron-samplersnapshot failures, WMI Event 5858, a PowerShell/WMI snapshot storm, ortaskkill.exe/conhost.exe/git.exeprocess storms. The current chat-switching lag therefore appears to be a separate or later Windows UI performance path rather than the older WMI sampler issue.Related reports that seem relevant: #29187 and #29590.