About high CPU and severe UI input lag

Open 💬 3 comments Opened Aug 3, 2026 by lclgames2022-ctrl
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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

  1. Renaming the repository folder:

.git -> .git_disabled_test

immediately stopped the high CPU usage and UI lag.

  1. Restoring the .git folder caused the problem to return.
  1. 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.

  1. 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.

  1. The same underlying problem produced different symptoms on different hardware:
  • Faster desktop: very high CPU usage
  • Older laptop: severe UI typing and rendering lag
  1. 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.
  1. 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

  1. On Windows, open a Git repository in the Codex desktop app.
  2. Use a current branch that has diverged from main by several million lines.
  3. Allow the Changes/Summary panel to compare the current branch against origin/main.
  4. Open the project conversation.
  5. Edit or create files, run Codex commands, or trigger an external build that changes project files.
  6. Observe Task Manager and UI responsiveness.
  7. Note that CPU, WMI Provider Host, PowerShell, or Git-related activity increases whenever the Changes view refreshes.
  8. Close the Codex app or temporarily rename .git.
  9. 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:

  1. Temporarily rename .git to disable Git detection.

Warning: this disables Git functionality and should only be used as a temporary diagnostic workaround.

  1. Align the maintained branch with the repository's default/main comparison branch.
  1. Change the comparison baseline from obsolete main to the actual maintained branch or its remote tracking branch.
  1. Commit or remove very large unstaged changes instead of leaving hundreds of thousands of changed lines in the working tree.
  1. Clone only the currently maintained branch into a clean directory.
  1. Keep the Changes/Summary count near zero or at a manageable size.
  1. 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

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 24 days ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #35776

Powered by Codex Action

BinhG · 23 days ago

Additional reproduction from another Windows installation, on current Codex package 26.730.8199.0:

  • The entire UI becomes laggy, including typing in the composer, switching panels, and normal chat navigation.
  • Reproduces after restarting Codex and with a fresh UI profile/cache.
  • During a 20-second idle sample while the lag was visible, the main ChatGPT.exe UI process consumed 14.62 CPU seconds (~73% of one logical core). The Codex app-server consumed only 0.25 seconds and codex-code-mode-host consumed 0 seconds.
  • Runtime logs increased only 43 rows during the same 20 seconds, so this does not look like an active agent/tool loop or a log flood.
  • Disabling the newly installed Superpowers plugin did not change the behavior; it was re-enabled afterward.
  • Rotating the 254 MB runtime log database, rebuilding renderer/GPU caches, and creating a fresh UI profile produced only temporary improvement. The UI hot-loop returned after restart.

This appears to be a Windows desktop main-process/UI regression, not Vietnamese input, insufficient hardware, or an unfinished agent loop. Please investigate the main ChatGPT.exe idle CPU path and UI input/render scheduling.

austinlee1226 · 13 days ago

_Removed by author._