Windows Codex Desktop triggers kernel Token/Toke object growth via repeated git.exe process creation
Summary
On Windows 11, Codex Desktop appears to trigger sustained growth of Windows kernel Token objects / pool tag Toke.
The local ETW evidence points to the Codex Desktop GUI process repeatedly launching git.exe for repository/root detection. Closing Codex stops the Token object growth; reopening Codex starts it again.
This does not look like a normal Codex.exe user-space memory leak. The missing RAM is mostly kernel/system memory: Paged Pool, Nonpaged Pool, Page Table, and very high kernel object counts.
Environment
- OS: Windows 11 Pro, build
28000
- RAM:
63.38 GB
- Codex package:
OpenAI.Codex_26.623.11225.0_x64__2p2nqsd0c76g0
- Codex executable/product version observed locally:
149.0.7827.197
- Git path used by Codex:
C:\Program Files\Git\cmd\git.exe
High-level symptom
Task Manager/RAMMap showed high used RAM that was not attributable to normal user processes.
Local counters showed:
Token objects around 1.25M to 1.29M
Token handles only around 2.1K
Paged Pool around 6.9 GB
Nonpaged Pool around 2.55 GB
- User-mode Codex working set was much smaller than the missing RAM.
The Token objects vs Token handles mismatch suggests kernel-held references, not visible user handles.
Close/reopen confirmation
After closing Codex Desktop:
- Observation window:
2026-07-02T16:37:38 to 2026-07-02T16:52:39
CodexProcesses=0 throughout
Token objects: 1,289,018 -> 1,288,882
- Delta:
-136 over 15 minutes
After reopening Codex Desktop:
- Observation window: 60 seconds
CodexProcesses=9
Token objects: 1,289,270 -> 1,289,550
- Delta:
+280 in 60 seconds
ETW/WPR evidence
Two local WPR pool traces were captured and analyzed with TraceEvent.
First trace:
- Events read:
126,078,389
Toke allocations: 42,299
Toke frees: 41,848
- Net
Toke count: 451
- Net
Toke bytes: 812,544
- Largest outstanding
Toke stack: first process Codex.exe, Count=420, Bytes=752,448
Second mostly-idle trace:
- Events read:
131,809,943
Toke allocations: 36,605
Toke frees: 36,415
- Net
Toke count: 190
- Net
Toke bytes: 355,200
- Largest outstanding
Toke stack: first process Codex.exe, Count=272, Bytes=487,488
Symbolized kernel stack:
NtCreateUserProcess
PspAllocateProcess
PspInitializeProcessSecurity
SeSubProcessToken
SepDuplicateToken
ObCreateObjectEx
ObpAllocateObject
ExAllocatePoolWithTag
This is the Windows process creation / security token duplication path.
Process-start evidence
The second trace contained 1,264 process start events.
Largest direct parent group:
- Parent:
Codex.exe, PID 18932
- Child:
git.exe
- Count:
263 starts in approximately 54.6 seconds
Command-line grouping:
"C:\Program Files\Git\cmd\git.exe" -c core.hooksPath=NUL -c core.fsmonitor= rev-parse --show-toplevel
"C:\Program Files\Git\cmd\git.exe" config --null --get core.fsmonitor
Additional direct child starts from Codex.exe:
powershell.exe: 55 starts, mostly process inventory via Get-CimInstance Win32_Process
Local app inspection
Read-only inspection of the installed app.asar showed code paths using:
gitManager.getWorktreeRepository(...)
git rev-parse --show-toplevel
core.fsmonitor
I did not find a user-facing setting in this build to disable the Git polling / review Git query behavior.
Expected behavior
Codex Desktop should not create hundreds of git.exe child processes per minute for stable workspace root detection, and should not cause unreclaimable Windows kernel Token/Toke object growth during long-running sessions.
Actual behavior
Codex Desktop repeatedly launches git.exe from the GUI process. On this system, that process churn correlates with Token/Toke growth in the Windows kernel. Closing Codex stops new growth; reopening Codex resumes growth.
Related public issues
Privacy / attachments
I have local ETW traces and CSV summaries, but the raw ETL files are very large and may contain local paths/process details. I would prefer not to attach full logs or ETL files publicly. I can provide sanitized summaries or share raw traces privately if requested by OpenAI maintainers.
Additional issue-age context checked on 2026-07-02
Related Windows Git/process and memory-retention reports are not isolated:
The current local evidence adds ETW/WPR stack-level data and close/reopen token-object deltas.
Windows Codex Desktop triggers kernel Token/Toke object growth via repeated git.exe process creation
Summary
On Windows 11, Codex Desktop appears to trigger sustained growth of Windows kernel
Tokenobjects / pool tagToke.The local ETW evidence points to the Codex Desktop GUI process repeatedly launching
git.exefor repository/root detection. Closing Codex stops theTokenobject growth; reopening Codex starts it again.This does not look like a normal Codex.exe user-space memory leak. The missing RAM is mostly kernel/system memory:
Paged Pool,Nonpaged Pool,Page Table, and very high kernel object counts.Environment
2800063.38 GBOpenAI.Codex_26.623.11225.0_x64__2p2nqsd0c76g0149.0.7827.197C:\Program Files\Git\cmd\git.exeHigh-level symptom
Task Manager/RAMMap showed high used RAM that was not attributable to normal user processes.
Local counters showed:
Tokenobjects around1.25Mto1.29MTokenhandles only around2.1KPaged Poolaround6.9 GBNonpaged Poolaround2.55 GBThe
Token objectsvsToken handlesmismatch suggests kernel-held references, not visible user handles.Close/reopen confirmation
After closing Codex Desktop:
2026-07-02T16:37:38to2026-07-02T16:52:39CodexProcesses=0throughoutToken objects:1,289,018 -> 1,288,882-136over 15 minutesAfter reopening Codex Desktop:
CodexProcesses=9Token objects:1,289,270 -> 1,289,550+280in 60 secondsETW/WPR evidence
Two local WPR pool traces were captured and analyzed with TraceEvent.
First trace:
126,078,389Tokeallocations:42,299Tokefrees:41,848Tokecount:451Tokebytes:812,544Tokestack: first processCodex.exe,Count=420,Bytes=752,448Second mostly-idle trace:
131,809,943Tokeallocations:36,605Tokefrees:36,415Tokecount:190Tokebytes:355,200Tokestack: first processCodex.exe,Count=272,Bytes=487,488Symbolized kernel stack:
This is the Windows process creation / security token duplication path.
Process-start evidence
The second trace contained
1,264process start events.Largest direct parent group:
Codex.exe, PID18932git.exe263starts in approximately54.6secondsCommand-line grouping:
225starts:38starts:Additional direct child starts from
Codex.exe:powershell.exe:55starts, mostly process inventory viaGet-CimInstance Win32_ProcessLocal app inspection
Read-only inspection of the installed
app.asarshowed code paths using:gitManager.getWorktreeRepository(...)git rev-parse --show-toplevelcore.fsmonitorI did not find a user-facing setting in this build to disable the Git polling / review Git query behavior.
Expected behavior
Codex Desktop should not create hundreds of
git.exechild processes per minute for stable workspace root detection, and should not cause unreclaimable Windows kernelToken/Tokeobject growth during long-running sessions.Actual behavior
Codex Desktop repeatedly launches
git.exefrom the GUI process. On this system, that process churn correlates withToken/Tokegrowth in the Windows kernel. Closing Codex stops new growth; reopening Codex resumes growth.Related public issues
git.exe status --porcelain=v1 -zand leaves orphangit.exe/conhost.exeprocesses #17229Privacy / attachments
I have local ETW traces and CSV summaries, but the raw ETL files are very large and may contain local paths/process details. I would prefer not to attach full logs or ETL files publicly. I can provide sanitized summaries or share raw traces privately if requested by OpenAI maintainers.
Additional issue-age context checked on 2026-07-02
Related Windows Git/process and memory-retention reports are not isolated:
;ntfs.sysNtFCnonpaged pool grows continuously#16786 opened 2026-04-04, still open: repeated git.exe on Windows.git.exe status --porcelain=v1 -zand leaves orphangit.exe/conhost.exeprocesses #17229 opened 2026-04-09, still open: Codex Windows App repeatedly starts git.exe.The current local evidence adds ETW/WPR stack-level data and close/reopen token-object deltas.