High CPU usage (Up to 100%) on Windows caused by repeated Git scans of large untracked directories
What version of the Codex App are you using (From “About Codex” dialog)?
Codex & OWL Version 26.715.72359 Released 22.07.2026
What subscription do you have?
Pro 5x
What platform is your computer?
Windows
What issue are you seeing?
After a recent Codex Windows update, opening Codex caused sustained high CPU usage even when no tasks were running. Restarting did not fix the issue.
The load was distributed across:
- WMI Provider Host
- Codex
- Antivirus/Windows Defender
- Repeatedly spawned Git processes
- Closing Codex immediately returned CPU usage to normal.
Investigation
The active repository contained a large local artifact directory with tens of thousands of untracked files and more than 1 GB of data.
Codex appeared to repeatedly run Git repository inspections. Enumerating the untracked files was slow and also triggered additional WMI and antivirus activity.
A full git status did not complete within 24 seconds.
Workaround
I added the local artifact directory to:.git/info/exclude
After adding the exclusion:
- Untracked entries reported by Git dropped to zero
- git status completed in approximately 56 ms
- Repeated Git processes stopped
- WMI and antivirus CPU usage returned to normal
- Codex remained usable
What steps can reproduce the bug?
working directory had .pnpm-store not in .gitignore. CPU load goes up to 100%
What is the expected behavior?
It may also be useful to detect unusually slow Git status operations and warn users about large untracked directories.
Additional information
_No response_
1 Comment
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action