Summary
I found a reproducible performance issue in the Codex/ChatGPT Windows desktop app related to the Git Changes/Summary integration.
When the currently maintained branch has diverged significantly from an obsolete main branch, the Codex app appears to continuously recalculate or refresh the branch comparison shown in the Changes/Summary panel.
In my case, the current branch differed from origin/main by approximately:
- +3.3 million lines
- -325,000 lines
The app displayed these numbers in the branch comparison view.
Whenever a file changed, a Codex command ran, Unity compiled, or text was entered/output in the UI, the app appeared to refresh this very large comparison again.
This caused:
- CPU usage spikes of 70–100% on one desktop PC
- High WMI Provider Host and PowerShell activity
- Unity performance measurements becoming unreliable
- Severe text input and general UI lag on an older laptop
- High CPU on the first app launch of the day, followed by temporary recovery
- Sustained high CPU whenever the Unity project was compiling or changing files
Environment
Affected Codex/ChatGPT Windows App version:
26.715.10079.0
Git for Windows version tested:
2.43.0.windows.1
The affected repository is a large Unity project.
The repository was originally cloned from main. Development later moved permanently to another long-lived branch, while main became obsolete. The two branches eventually differed by several million lines.
Important observations
-
Renaming the repository folder:
.git -> .git_disabled_test
immediately stopped the high CPU usage and UI lag.
-
Restoring the .git folder caused the problem to return.
-
Manually running Git status was fast:
git status --porcelain=v1 -uno: approximately 81 ms
git status --porcelain=v1: approximately 64 ms
Therefore, the repository itself was not slow when running a single Git status command.
-
A newly cloned copy of the maintained branch on another desktop did not reproduce the issue.
On that machine, the Codex Changes panel showed zero branch changes and the app remained responsive.
-
The same underlying problem produced different symptoms on different hardware:
- Faster desktop: very high CPU usage
- Older laptop: severe UI typing and rendering lag
-
Large unstaged changes also amplified the problem. For example, importing a Unity effects package added approximately 600,000 unstaged lines. Committing the package reduced the amount of work shown in the Changes panel.
-
The .git folder size alone does not appear to be the root cause:
- One affected repository had approximately 616 MB of Git metadata.
- The older laptop had approximately 3 GB of Git metadata.
- The key trigger appeared to be the huge active branch comparison and repeated refresh behavior.
Steps to reproduce
- On Windows, open a Git repository in the Codex desktop app.
- Use a current branch that has diverged from
main by several million lines.
- Allow the Changes/Summary panel to compare the current branch against
origin/main.
- Open the project conversation.
- Edit or create files, run Codex commands, or trigger an external build that changes project files.
- Observe Task Manager and UI responsiveness.
- Note that CPU, WMI Provider Host, PowerShell, or Git-related activity increases whenever the Changes view refreshes.
- Close the Codex app or temporarily rename
.git.
- Observe that CPU usage and UI responsiveness return to normal.
Actual behavior
The app appears to repeatedly refresh or recalculate a multi-million-line branch comparison whenever repository files change or commands run.
This can consume a large amount of CPU and make the entire Codex UI unresponsive.
The issue is especially noticeable in large Unity repositories where compilation and asset imports produce frequent filesystem changes.
Expected behavior
The Codex desktop app should not continuously recalculate or render the complete branch diff after every filesystem event, command execution, input event, or UI update.
Suggested improvements:
- Debounce and throttle Git refreshes.
- Cache branch comparison statistics.
- Recalculate only files affected by relevant Git changes.
- Lazily calculate large Diff statistics only when the Changes panel is opened.
- Do not continuously refresh a collapsed or hidden Changes panel.
- Allow users to select the comparison/base branch.
- Allow users to disable Git integration for a project.
- Warn when a branch comparison contains millions of changed lines.
- Avoid comparing against an obsolete
main branch automatically.
- Avoid recalculating branch-level Diff when only unstaged changes need to be displayed.
Workarounds discovered
The following workarounds resolved or significantly reduced the problem:
-
Temporarily rename .git to disable Git detection.
Warning: this disables Git functionality and should only be used as a temporary diagnostic workaround.
-
Align the maintained branch with the repository's default/main comparison branch.
-
Change the comparison baseline from obsolete main to the actual maintained branch or its remote tracking branch.
-
Commit or remove very large unstaged changes instead of leaving hundreds of thousands of changed lines in the working tree.
-
Clone only the currently maintained branch into a clean directory.
-
Keep the Changes/Summary count near zero or at a manageable size.
-
Fully close the Codex app before performance testing another application.
Impact
This issue initially caused me to incorrectly conclude that a new Unity feature had introduced a major performance regression.
After reverting the feature, I discovered that the actual performance loss came from the Codex desktop app consuming CPU while continuously refreshing Git comparison information.
This makes the problem particularly serious for developers performing CPU-sensitive profiling, compilation, game development, or other real-time workloads.
I can provide screenshots showing:
- The +3.3 million / -325,000 branch comparison
- The +600,000 unstaged changes
- Task Manager CPU usage
- WMI Provider Host activity
- CPU usage before and after renaming
.git
Summary
I found a reproducible performance issue in the Codex/ChatGPT Windows desktop app related to the Git Changes/Summary integration.
When the currently maintained branch has diverged significantly from an obsolete
mainbranch, the Codex app appears to continuously recalculate or refresh the branch comparison shown in the Changes/Summary panel.In my case, the current branch differed from
origin/mainby approximately:The app displayed these numbers in the branch comparison view.
Whenever a file changed, a Codex command ran, Unity compiled, or text was entered/output in the UI, the app appeared to refresh this very large comparison again.
This caused:
Environment
Affected Codex/ChatGPT Windows App version:
26.715.10079.0
Git for Windows version tested:
2.43.0.windows.1
The affected repository is a large Unity project.
The repository was originally cloned from
main. Development later moved permanently to another long-lived branch, whilemainbecame obsolete. The two branches eventually differed by several million lines.Important observations
Renaming the repository folder:
.git->.git_disabled_testimmediately stopped the high CPU usage and UI lag.
Restoring the
.gitfolder caused the problem to return.Manually running Git status was fast:
git status --porcelain=v1 -uno: approximately 81 msgit status --porcelain=v1: approximately 64 msTherefore, the repository itself was not slow when running a single Git status command.
A newly cloned copy of the maintained branch on another desktop did not reproduce the issue.
On that machine, the Codex Changes panel showed zero branch changes and the app remained responsive.
The same underlying problem produced different symptoms on different hardware:
Large unstaged changes also amplified the problem. For example, importing a Unity effects package added approximately 600,000 unstaged lines. Committing the package reduced the amount of work shown in the Changes panel.
The
.gitfolder size alone does not appear to be the root cause:Steps to reproduce
mainby several million lines.origin/main..git.Actual behavior
The app appears to repeatedly refresh or recalculate a multi-million-line branch comparison whenever repository files change or commands run.
This can consume a large amount of CPU and make the entire Codex UI unresponsive.
The issue is especially noticeable in large Unity repositories where compilation and asset imports produce frequent filesystem changes.
Expected behavior
The Codex desktop app should not continuously recalculate or render the complete branch diff after every filesystem event, command execution, input event, or UI update.
Suggested improvements:
mainbranch automatically.Workarounds discovered
The following workarounds resolved or significantly reduced the problem:
Temporarily rename
.gitto disable Git detection.Warning: this disables Git functionality and should only be used as a temporary diagnostic workaround.
Align the maintained branch with the repository's default/main comparison branch.
Change the comparison baseline from obsolete
mainto the actual maintained branch or its remote tracking branch.Commit or remove very large unstaged changes instead of leaving hundreds of thousands of changed lines in the working tree.
Clone only the currently maintained branch into a clean directory.
Keep the Changes/Summary count near zero or at a manageable size.
Fully close the Codex app before performance testing another application.
Impact
This issue initially caused me to incorrectly conclude that a new Unity feature had introduced a major performance regression.
After reverting the feature, I discovered that the actual performance loss came from the Codex desktop app consuming CPU while continuously refreshing Git comparison information.
This makes the problem particularly serious for developers performing CPU-sensitive profiling, compilation, game development, or other real-time workloads.
I can provide screenshots showing:
.git