Windows: Codex spawns many Git for Windows processes causing sustained high CPU after recent update
What happened?
After updating Codex to the latest Windows version, my development machine becomes very slow. In Windows Task Manager, CPU is continuously consumed by multiple Git for Windows processes while Codex is open during development.
I manage version control manually and did not explicitly ask Codex to run any Git operation. The Git processes appear to be spawned repeatedly by Codex or by its integration while working in a local project.
Impact
- Windows 11 becomes noticeably laggy during development.
- CPU remains high for a long time.
- Multiple
Git for Windows/git.exeprocesses are visible in Task Manager. - This makes the current Windows Codex workflow difficult to use.
Environment
- OS: Windows 11
- Git: Git for Windows
- Codex: latest Windows version available at the time of reporting
- Shell/IDE: Windows development environment; also considering PowerShell CLI because WSL is not available on this machine
Screenshot / observation
Task Manager shows multiple Git for Windows processes, each consuming CPU, while Codex is running.
Expected behavior
Codex should not continuously spawn Git processes or keep Git CPU usage high when idle or during normal development. Ideally there should also be a setting to disable Codex Git integration, since some users manage Git manually.
Actual behavior
After the recent update, Codex appears to repeatedly invoke Git, causing sustained CPU usage and system lag.
Request
Could you please check whether the recent Windows build introduced a Git polling / metadata loop? Also, is there any supported configuration to disable Git integration or reduce Git polling frequency in Codex on Windows?
Potentially related reports:
- Windows desktop app repeatedly spawning
git.exe/git add -A/git rev-parse - Windows app repeatedly running Git commands at high frequency
- Git metadata retry loop in non-standard or non-Git workspaces
I can provide more details if needed, such as process tree, exact Codex version, workspace layout, or logs.
13 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I have the same issue.
I’m using Codex in JetBrains now.
I have the same issue.
<img width="492" height="249" alt="Image" src="https://github.com/user-attachments/assets/1cb5e01b-48e3-468a-9e8d-c940c46d8971" />
Besides, the change detection structure of Git is also incorrect
I have the same issue. The problem started occurring since the upgrade to version 26.506.31421 on May 9. Codex will continuously invoke the Git for Windows process to operate on the project repository, and there is no problem when switching to a new chat without a Git project.
I have the same issue.
Same here. It spawns Git for Windows once you click into a git managed project. And it get worse when you click multiple projects.
<img width="625" height="319" alt="Image" src="https://github.com/user-attachments/assets/fff8bbbb-6255-42ff-8fb2-00e5d65896eb" />
Same problem here.
A temporary alternative is to use Codex without a .git folder in your project. This can be done by copying the project to another folder without the .git or simply renaming the .git folder to something like .git_ or .git_bak.
If you need to keep Git active in your directory, another workaround is using a PowerShell script (.ps1) like the one I created.
If you prefer, you can ask an AI to generate a similar script for you, but I am sharing mine below in case it helps. It monitors the system and terminates the Git process whenever it is spawned by Codex.exe. I also created a batch file (.bat) for an easy startup.
For this to work, both files must be saved in the same folder. Whenever you use Codex, just run the .bat launcher as an Administrator.
Note: This workaround can cause a few side effects that I'm still trying to find a solution for. For instance, it prevents modified files from showing up directly within the Codex IDE, meaning you'll need to keep another IDE (like VS Code) open alongside it to track your changes.
Here is a preview of the script working in the background:
<img width="624" height="159" alt="Image" src="https://github.com/user-attachments/assets/6d601f27-44e4-499e-9acd-d0ed6f9926bc" />
Same on mac
@azsama Why did you close this issue?
I’m seeing what looks like the same Windows
git.exefan-out pattern, with one additional detail that may help narrow the trigger.Environment:
OpenAI.Codex_26.608.1337.0What I observed:
git.exeprocesses underCodex.exe/codex.exe.git.exe -c core.hooksPath=NUL -c core.fsmonitor= hash-object --no-filters -- <path>Diagnostics I collected:
git.exeprocess with parent process, grandparent process, command line, classification, path count, and recenthash-objectcount.hash-object --no-filters -- <file>invocations against generated artifacts.2026-06-11T17:35:19to2026-06-11T18:07:14logged:1582HashObjectRows:0StormRows:0WouldKillStorm:0rev-parse,remote -v,status --porcelain,config core.fsmonitor,diff,ls-files, etc.Mitigation that appears to have helped:
_tmp/<workflow>/<run>/.....gitignorerules for historical hot generated folders and file types.git.exewatchdog to a storm-only monitor so normal Codex Git probes are allowed and onlyhash-objectfan-out is flagged.My interpretation:
Same comment posted on #20567
The solution is to filter path from git and PS (I have used Codex chat to analize the problem)
Agents will work well, may be some time need to say to use full path, when agent forget how to work.
Run normally for Codex updates.
Run with only git removed
pwsh -File Start-Codex-FilteredPath.ps1
Run with git and powershell removed
pwsh -File Start-Codex-FilteredPath.ps1 -RemovePowerShell
Powershell script copy in Start-Codex-FilteredPath.ps1