Windows VS Code extension repeatedly spawns git.exe in non-Git folders, causing ~10 GB paged-pool growth
What version of the IDE extension are you using?
26.5623.42026
What subscription do you have?
ChatGPT Plus
Which IDE are you using?
Visual Studio Code 1.126.0
What platform is your computer?
Microsoft Windows 11, version 10.0.26200, x64
What issue are you seeing?
The OpenAI VS Code extension repeatedly executes Git repository detection in a folder that is not a Git repository.
This caused continuous growth of the Windows kernel paged pool, eventually reaching approximately 10 GB and consuming a large portion of my 32 GB of RAM.
The repeatedly executed command was:
git.exe -c core.hooksPath=NUL -c core.fsmonitor= rev-parse --show-toplevel
Closing applications did not release most of the accumulated memory. A Windows restart was required to fully recover it.
What steps can reproduce the bug?
- Open a normal folder without a .git directory in VS Code.
- Enable and open the OpenAI Codex extension.
- Monitor git.exe process creation or Windows paged-pool usage.
- Observe repeated git rev-parse executions and gradual paged-pool growth.
Running git init in the folder immediately stopped the repeated Git process creation and memory growth.
What is the expected behavior?
A non-Git folder should be detected once. The negative result should be cached or retried with a reasonable delay.
The extension should not continuously spawn git.exe processes, and kernel paged-pool memory should not continue increasing.
Additional information
An ETW trace captured 120 git.exe process starts and 60 conhost.exe process starts in approximately 49 seconds.
At least 61 process starts came directly from the VS Code extension-host process.
PoolMon showed abnormal growth primarily under the Toke paged-pool tag. An ETW stack trace linked allocations to:
Code.exe -> CreateProcessW -> NtCreateUserProcess
After running git init, a 20-second high-frequency sample detected zero git.exe processes and the paged-pool growth stopped.
Related issues:
https://github.com/openai/codex/issues/22085
https://github.com/openai/codex/issues/20933
https://github.com/openai/codex/issues/17229
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗