Repository navigation
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.325.31654 (1272)
What subscription do you have?
pro
What platform is your computer?
Microsoft Windows 11 Pro 10.0.26200 x64
What issue are you seeing?
I traced a Windows nonpaged pool growth problem to Codex Desktop repeatedly spawning child git.exe processes during normal app use.
In this environment, the user-mode trigger was Codex repeatedly launching:
git ls-files --others --exclude-standard -z
The kernel-side memory growth showed up under ntfs.sys pool tag NtFC.
I am reporting this here because the reproducible trigger appears to be Codex Desktop behavior, even if part of the retention/cleanup problem may also involve Windows NTFS or Microsoft Defender.
Observed evidence from the same affected session:
- System nonpaged pool was growing while process-level nonpaged pool remained tiny, which pointed to kernel-side growth rather than a normal user-mode process pool leak.
- Direct pool-tag sampling showed
NtFCdominating and increasing. - After deleting all temporary trace files I created for diagnosis,
NtFCstill increased from4984.46 MBto5072.56 MBin 30 seconds (+88.10 MB). NtFCownership was confirmed locally by matching the tag string insideC:\Windows\System32\drivers\ntfs.sys.- During that same window,
Codex.exekept spawning childgit.exeprocesses with the exact command:git ls-files --others --exclude-standard -z - New child
git.exepairs were observed at local times2026-04-04 22:16:23,22:16:26,22:16:49, and22:16:58, all parented byCodex.exe. - A short Procmon capture showed
git.exegenerating the most filesystem activity by a large margin (131,169file events in about 3 seconds). MsMpEng.exewas also highly active in the same capture (10,736file events), which suggests Microsoft Defender amplifies the I/O pressure once Codex starts the scans.
What I ruled out in the same session:
- This was not explained by process-local nonpaged pool usage.
- High-handle but low-file-activity processes did not match the growth pattern.
What steps can reproduce the bug?
- On Windows 11 Pro 26200 x64, launch Codex Desktop 26.325.31654 (1272).
- Open a local workspace under the user profile.
In my affected session, the active thread cwd wasC:\Users\JW\Documents\playground. - Leave the app open and use it normally, or keep the session open long enough for background repo/status activity to happen.
- Observe the process tree from elevated PowerShell / Process Explorer:
Codex.exerepeatedly spawnsgit.exe- the command line repeats as
git ls-files --others --exclude-standard -z
- In parallel, sample Windows nonpaged pool / pool tags.
- Observe
ntfs.sysNtFCnonpaged pool continuing to increase while those repeated git scans are occurring.
Repro status:
- This reproduced multiple times in the same affected session.
- I have not yet reduced it to a fully minimal deterministic repro outside the affected environment.
What is the expected behavior?
- Codex Desktop should not repeatedly spawn unbounded background
git ls-files --others --exclude-standard -zscans during normal or idle app use. - Repo scanning should stay scoped to the active workspace roots and should be debounced/cached appropriately.
- Codex should not act as a user-mode trigger that drives continuously growing NTFS nonpaged pool on Windows.
Additional information
I understand the ultimate pool-retention bug may also involve Windows NTFS or Microsoft Defender, but the reproducible user-mode trigger in this environment was Codex repeatedly spawning git.exe.
Directionally related Codex reports:
- [extension] Runaway rg processes + high CPU/RAM after extension update #13717 runaway
rgprocesses with high CPU/RAM - Long git diffs create lag in Codex App #13809 long git diffs create lag in Codex App
- Severe chat-switch lag in Codex Electron from oversized git-origins root enumeration and slow thread/resume loads #14469 Windows app lag from oversized
git-origins/ Git-worktree scans
If useful, I can provide follow-up artifacts from the affected machine, including:
- process tree snapshots showing repeated
Codex.exe -> git.exe - pool tag samples showing
NtFCgrowth over time - Procmon summaries showing
git.exeas the top filesystem event source
Activity
github-actions commentedon Apr 4, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
shell_commandleaves descendantwhere.exeprocesses running #15868Powered by Codex Action
keydango27-maker commentedon Jul 5, 2026
I have another Windows Desktop data point that looks related to this issue, although the dominant pool tags are different on my machine.
Environment:
OpenAI.Codex_26.623.13972.0_x64__2p2nqsd0c76g026200x6432.0.31021.5001(amdkmdag.sys)Observed behavior:
File/IoFEgrowth resumed.PoolMon / A-B evidence:
File~270 MBIoFE~91 MBSQSFparticipated earlier but is a Storage QoS amplifier, not the root causestorqosflt.sysA/B test:storqosfltreleasedSQSFfrom37.42 MBto0 MBFilestill grew by+15.38 MBIoFEstill grew by+5.53 MBFile/IoFEgrowth.WPR/WPA evidence from an elevated trace:
Representative interpretation:
File/IoFEstack family goes throughamdkmdag.sys.Codex.exe/ Chromium (chrome.dll) stacks are present in the sameFile/IoFEtrace.Disk I/O evidence during the trace:
codex.exe <OpenAI.Codex>generated 7,177 disk I/O rows.%USERPROFILE%\.codex\logs_2.sqlite- 6,234 rows%USERPROFILE%\.codex\logs_2.sqlite-wal- 1,327 rowsCurrent working hypothesis:
So while my dominant tags are
File/IoFErather thanNtFC, this looks directionally related: Codex Desktop user-mode activity is the reproducible trigger for continuously growing Windows kernel nonpaged pool. Happy to provide more exact PoolMon/WPA summaries if useful; the raw ETL is large (~29 GB).DesignMike commentedon Jul 7, 2026
I have this exact problem
KeiraX commentedon Jul 17, 2026
me 2
haoodddf commentedon Jul 20, 2026
Independent reproduction on a newer Windows desktop build
I independently reproduced the same severe Windows nonpaged-pool growth on 2026-07-20. I have not yet verified the exact repeated
git.execommand line on this machine, but the A/B behavior and dominantNtFCpool tag closely match this issue.Environment
OpenAI.Codex 26.715.4045.0x64 (new unified ChatGPT/Codex desktop app; UI is labeled ChatGPT)26200.8875Controlled closed → open → closed sampling
Memory counters were sampled every 5 seconds.
1275.8–1281.4 MB1394.2 MBto6483.3 MB(+5089.1 MB)478.7 MB/min, withR² = 0.9996851750.9 MB→1717.9 MB0.28 MB1.72–1.75 GBProcessCount = 0), system nonpaged pool was7684.4 MBand remained7684.7 MBabout 5 minutes later, so the accumulated pool was not meaningfully releasedSeparate PoolMon reproduction
System nonpaged pool (
Pool N) increased as follows:23:50:59:687,464 K23:55:15:3,326,668 K23:56:28:4,046,564 KAt
23:55:15, the dominant entry was:For comparison,
NVRMwas only about67,096,576bytes in the same sample, so the NVIDIA pool tag was not the dominant source.This confirms that the issue still reproduces on package version
26.715.4045.0, with the desktop app acting as a reliable user-mode trigger for rapidNtFC/ntfs.sysnonpaged-pool growth. I have the CSV time series and PoolMon screenshots available if maintainers need the raw artifacts.suiyuebaobao commentedon Jul 22, 2026
The repeated
git ls-files --othersloop in this report is the same class of Git-backed refresh workload I reproduced.I published a single-file Windows launcher for the original Microsoft Store/MSIX Codex app:
It starts Codex with a process-scoped
GIT_DIR=NUL. On my machine, the stable trace changed from 247 newgit.exeand 137 newtaskkill.exeprocesses per 10 seconds to 0 and 0 over 15 seconds; WMI Provider Host fell from about 6.6% to 0.9%.Usage: fully exit Codex from the Windows system tray, then run the script.
This is an unofficial workaround, not an upstream fix. It deliberately disables or limits Review, Changes, branch detection, commit, and other Git-backed Codex features. It does not patch Codex, modify repositories or Git configuration, write system environment variables, require elevation, terminate processes, or remove chat history. Launching Codex normally restores Git integration.
maphew commentedon Jul 23, 2026
I triggered this runaway memory leak on myself by making my home dir a git repo (
%USERPROFILE%\.git) months ago for forgotten reasons (probably to track dot-file customisation).kdyoung9677-hub commentedon Aug 3, 2026
Additional reproduction on Codex Windows 26.727.6591.0 (severe regression)
I am seeing the same Codex-triggered untracked-file scan pattern on a current Windows build, with enough memory growth to freeze the whole machine.
Environment
OpenAI.Codex_26.727.6591.0_x6410.0.262002.53.0.windows.1Observed command
Codex spawns four concurrent copies of this command without an explicit Git request:
Impact and frequency
git.exeprocesses each consumed approximately 2,560–2,973 MB, about 11 GB total.Why this appears app-side
Expected behavior
Codex should single-flight/debounce untracked-file discovery per workspace, cancel superseded scans, and impose bounded memory/time/concurrency limits. A large working tree may make one scan expensive, but it should not result in four identical unbounded scans that can freeze Windows.
It would also help to provide either:
No repository contents, session transcripts, or unredacted local paths are attached publicly. Sanitized process snapshots or Windows event details can be provided if maintainers request them.
enord15 commentedon Aug 17, 2026
I can reproduce what appears to be the same
NtFC/nonpaged-pool growth on a current Codex/ChatGPT Windows desktop build.Environment:
Observed behavior:
NtFC Nonpat 22,408,235,776 bytes (~20.9 GiB), with a Diff/outstanding allocation count of 68,789,554 and ~325 bytes per allocation.Defender test:
Controlled reproduction with the app's built-in Performance Trace:
Uploaded performance trace / Feedback ID (as displayed by the app):
019f06df-f34a-7c02-a79b-24008e4f45f8This looks closely aligned with the original report: sustained Codex repository/file activity correlates with rapid growth of
ntfs.syspool tagNtFC, while ordinary user-mode process memory does not account for the retained RAM. The issue remains present on version 26.810.52044.ovws commentedon Aug 25, 2026
@codex Let's resolve this issue.
enord15 commentedon Aug 30, 2026
Additional live reproduction — 2026-08-30
Caught another affected session while total system memory usage was roughly 40 GB.
git.exeprocesses were visible concurrently under the Codex/Git process chain, with command lines including Codex-style Git operations such asls-filesandstatus.\Memory\Pool Nonpaged Bytesremained at the already-elevated 7.57–7.58 GB level; I did not observe rapid additional growth during that short window.This is consistent with my earlier reproduction in this thread: Codex/Git filesystem activity is present during the affected state, while the large memory consumption resides in Windows kernel nonpaged pool rather than Codex/git process working sets. Screenshots of the PowerShell captures are available if useful.
ChaoticLuna commentedon Sep 8, 2026
Deep-dive root cause:
bindflt.sysleaks the reparse buffer on the failed-query path — the packaged-app context is the trigger switchWe independently root-caused this on Windows 11 26200.9168, Codex package
OpenAI.Codex_26.901.6511.0_x64__2p2nqsd0c76g0(same build as @idkwhatname9180's report). Summary: theNtFCgrowth is a memory-release omission inbindflt.sys(Microsoft's bind filter driver, used for MSIX packaged-app file-system redirection). Codex's Git scanning is the amplifier, not the root cause.The kernel defect (instruction-level attribution)
bindflt!BfPreCreate→bindflt!BfpDoesFileExistWithCrossVolumeECP→FLTMGR!FltCreateFileEx2→Ntfs!NtfsFsdCreate→NtfsCommonCreate→NtfsGetReparsePointValue(allocates with tagNtFC).bindflt.sys 10.0.26100.8972,BfpDoesFileExistWithCrossVolumeECPORsIO_STOP_ON_SYMLINK(0x8) into the Flags of its firstFltCreateFileEx2call (call at RVA 0x246b). When the call returnsSTATUS_STOPPED_ON_SYMLINK(0x8000002D, compared at RVA 0x24a3), the code zeroes the status and exits — without ever reading or freeing theREPARSE_DATA_BUFFERreturned viaIO_STATUS_BLOCK.Information. Microsoft'sIoCreateFileExdocumentation explicitly states the caller must free this buffer.BfCreateFile,BfpHandleNetworkQueryOpen) free correctly.Minimal repro (no Git required)
GetFileAttributesExWon a nonexistent name through a directory junction (e.g. pnpm'sAppData\Local\pnpm\store\v11\projects\<hash>junction) leaks exactly one ~320-byteNtFCallocation per call — but only when the caller runs in Codex's packaged-app context:Invoke-CommandInDesktopPackageNotably, the trigger does not require formal package identity: the real
codex.exetoken has no package identity (GetPackageFullNameFromToken→ 15700) and is not an AppContainer, yet its children leak; a normally-spawned child of a package-context process (no package identity, still in the job) does not leak. The remaining candidate is the package's silo / job configuration — still open.The amplifier
Codex Desktop periodically spawns
git status/git ls-files --others --exclude-standardfor session repos. Git probes.git,.git\HEAD,.gitignoreat every directory level — all failing lookups. With a stray%USERPROFILE%\.git, the repo root becomes the whole profile, so scans traverse the pnpm junction and leak at ~11–22 MiB/min. An A/B test with the profile.git\HEADrenamed: leak flat for 35+ min; HEAD restored → +36,216 objects / +11.05 MiB per 75 s within 75 s; HEAD renamed again → flat.Mitigations that work: remove the stray
%USERPROFILE%\.git(kills the amplifier); note already-leaked pool memory is only reclaimed by reboot. The actual fix belongs to Microsoft (bindflt.sys), but Codex could stop driving the path: scope scans to real workspace roots, debounce, and avoid probing under junctions.Happy to share the probe scripts, the pool-tag reader (no poolmon needed — uses
NtQuerySystemInformation(SystemPoolTagInformation)), ETW capture notes, and the disassembly offsets.ovws commentedon Sep 8, 2026
We Need Help!!!!
enord15 commentedon Sep 12, 2026
Follow-up after disabling the unused home-level Git repository
I can now report a longer-duration A/B result from the same affected machine.
I renamed the unused
%USERPROFILE%\.gitdirectory so that my entire Windows user profile was no longer being treated as a Git repository, then rebooted..git, an affected session reached 7.59 GB nonpaged pool and roughly 40 GB total system memory, with multiple concurrent Codex/Git processes observed.This is a dramatic improvement on this machine and independently supports the home-level Git repository as a major amplifier/trigger for the runaway behavior. I have not seen the previous rapid multi-gigabyte nonpaged-pool growth since disabling that unused
%USERPROFILE%\.gitrepository.This does not establish that the underlying Windows kernel defect is fixed; it is a mitigation result. But for this system, preventing Codex from treating the entire user profile as a repository appears to have eliminated the practical runaway-memory failure so far.
luohui0801-bit commentedon Sep 18, 2026
Additional sanitized Windows reproduction:
ovws commentedon Sep 28, 2026
@tibo-openai help me.
HiRenan commentedon Oct 13, 2026
Another amplifier on 26.1007.2314.0: bundled-plugin install loop through a directory junction (no home-level
.git, no git spawns)Sanitized reproduction from 2026-10-13. The kernel side matches @ChaoticLuna's
bindflt.sysanalysis; the amplifier is different from the Git scanning described above.Environment
OpenAI.Codex_26.1007.2314.0_x64__2p2nqsd0c76g0; the app-server reports0.162.0-alpha.17.2.ntfs.sysis 10.0.26100.8875 andbindflt.sysis 10.0.26100.9278. RAM is 32 GB.%USERPROFILE%\.git, and the desktop log for the affected session contains nogit ls-filesorgit statusspawns.What the app was doing
Every app session logged the same loop:
plugin_install_failedper app session: 329 in 33 min, 278 in 29 min, 550 in 57 min and 151 in 16 min.%APPDATA%\orca\codex-runtime-home\homeis a Codex home managed by another desktop app, Orca. In it,pluginsis a directory junction to%USERPROFILE%\.codex\plugins.documents,presentationsandspreadsheets). "Too many temporary files" therefore looks like an exhausted create-retry loop, not an actual pile of files.CODEX_HOMEpoints elsewhere, to%USERPROFILE%\.codex-system. I could not determine why the app-server resolved its plugin cache under the Orca home.Measurements (unprivileged
NtQuerySystemInformation(SystemPoolTagInformation)plusWin32_ProcessI/O counters)NtFCheld 5,695.7 MiB of nonpaged pool in 37,327,599 outstanding allocations, growing +85.4 MiB per 10 s. The totalPool Nonpaged Byteswent 5.68 → 6.32 → 7.28 → 8.30 GB over about 5 minutes, roughly 0.5 GB/min.codex.exe app-serverdid 595,184 "other" I/O operations (~119k/s) and the mainChatGPT.exedid 333,005 (~66k/s). Handle counts stayed low (446 and 2,038), so this is not a user-mode handle leak.taskkill /T /Fon theChatGPT.exetree,NtFCgrowth stopped immediately (+0.0 MiB over 15 s and again over 10 s). It stayed at 7,423.6 MiB / 48,651,430 allocations (~160 B each) and was not reclaimed, which is consistent with the reports above.BugcheckCode=0) or a Resource-Exhaustion-Detector 2004 event.Mitigation so far: I disabled the app's start-at-login and kept it closed. I did not test removing the junction.
bozzisss commentedon Oct 14, 2026
I am experiencing a very similar issue with Codex Desktop on Windows.
On October 14, 2026, I observed the following behavior:
NtFC(Nonp) as the dominant growing tag, with approximately 3,581,254,832 bytes allocated and 31,975,487 outstanding allocations in one capture.%USERPROFILE%\.gitdoes not exist, and Git does not recognize my user profile directory as a repository.I have not confirmed whether Codex is repeatedly spawning
git.exe.I previously attempted relocating some Codex data from C: to D:, so filesystem redirection or directory junctions may also be relevant.
I can provide PoolMon screenshots and additional diagnostic information if needed.
Is there a confirmed fix or safe workaround for this issue?
EighteenWu commentedon Oct 15, 2026
Additional sanitized WPR data point from a Codex Desktop installation:
OpenAI.Codex 26.1007.9446.0; Windows 11 build26200.NtFCallocations; 32,878.7 KB (~99.8%) mapped to a stack beginningchrome.exe -> CreateFileW -> bindflt.sys!BfpDoesFileExistWithCrossVolumeECP -> ntfs.sys!NtfsGetReparsePointValue.chrome.exewas the embedded Chromium process running under the packaged Codex desktop app, not a standalone Chrome session.%APPDATA%\Codex\web\Codex\GrShaderCacheandDefault\Cachedirectories are modest in size (~11.7 MB and ~6.8 MB); I do not yet have ProcMon evidence of the extreme cache-path CreateFile loop described elsewhere.The raw ETL is available privately if maintainers need it; I have not attached it publicly because it contains machine-specific diagnostic metadata.
KarlAvec1K commentedon Oct 17, 2026
I reproduced the same
NtFC/ntfs.syssystem-pool growth on Codex Desktop26.1013.3656.0:NtFC+5.990 GiB.NtFCstayed flat.--disable-gpu-shader-disk-cache, 10 minutes: nonpaged pool +0.019 GiB;NtFCstayed flat within ~1 MiB sampling resolution.I did not capture Git process activity or ETW stacks in this test, so I cannot confirm that my reproduction shares the repeated
git ls-filestrigger described in this issue. The phases ran in one session without a reboot, and this single 10-minute comparison does not identify the component responsible or prove a permanent fix.For users trying the workaround, fully exit Codex before relaunching with
--disable-gpu-shader-disk-cache.chenziyang110 commentedon Oct 28, 2026
Additional measured case: profile-root
git statuson Windows Desktop 26.1021.3705.0An additional case from 2026-10-28 supports the profile-root repository trigger discussed here, with a different Git command on a newer desktop package. A same-build intervention stopped the measured pool growth without closing Codex.
Environment
26200.9711, x64.OpenAI.Codex_26.1021.3705.0_x64, identified from the running process path. Subscription: Pro.2.52.0.windows.1.Confirmed workload and scope
The observed ancestry was
ChatGPT.exe(Codex Desktop) -> Git launcher -> Git executable. Its command was:The current directories of both Git processes were read from their process parameters as
%USERPROFILE%;git rev-parse --show-toplevelindependently resolved to the same root. A sampled Git process had approximately 40,638 Other I/O operations/second, measured usingWin32_Processdeltas. This is not a direct count of file opens.A pre-existing profile-level
.githad an unbornHEAD, no indexed paths, and no refs returned bygit for-each-ref. It contained old object data; its creator is unknown. The diagnostic chat's directory was under%USERPROFILE%\Documents\Codexwithout an independent repository. The specific desktop view scheduling the operation was not identified; other chats/projects were open.In-session intervention
System nonpaged pool had reached approximately 43 GiB,
NtFCapproximately 36.9 GiB, and available RAM approximately 3.9 GiB.We preserved the original profile repository's local
.git/info/excludeand appended:These rules prune root-level untracked directories except the two named directories. Only the old background status processes with the matching command and profile-root working directory were stopped so later operations would read the new rules. Codex Desktop and two existing QEMU processes remained running.
NtFCnonpaged-byte changeNtFCbytesThe identical Git status arguments then completed in approximately 0.11 s, exit code 0, with no stderr and 0-byte
NtFCdelta. Later samples remained at the same byte count for more than four minutes after the intervention. Existing accumulated pool was retained.After Windows restarted, nonpaged pool was approximately 1.54 GiB and
NtFCwas 32 bytes, unchanged over another 60.3-second observation. The desktop package changed to26.1023.6123.0across the restart, so the restart result demonstrates recovery, not an isolated version-fix comparison. The successful scan-pruning intervention happened before that restart on the affected build.After user confirmation, the profile-level metadata was backed up and moved away. The profile-root
rev-parseprobe then exited 128; independent project repositories were preserved.Interpretation and limits
NtFCsampling usedNtQuerySystemInformation(SystemPoolTagInformation)from a 64-bit process: 40-byte entries,NonPagedUsedat offset 32. Memory counters independently confirmed the pool total. Units are binary GiB/MiB.Requested product safeguards
Please make unexpectedly broad resolved roots visible before expensive automatic enumeration, with explicit confirmation or bounded defaults for profile/drive roots. Background untracked/ignored scans should have cancellation, deduplication, time/result budgets and backoff, plus a supported per-project option to narrow or disable them. Please also correlate this workload with the kernel investigation in #56160, without assuming that report's precise driver explanation is proven on this machine.
Prepared with Codex assistance from contemporaneous local measurements. Usernames, machine names, project names, PIDs, raw profile contents and Git object data are omitted.