Windows desktop app triggers multiple git.exe add -A processes when opening a project/chat, causing severe CPU and disk usage
Summary
On Windows, opening a local project in the Codex desktop app and then opening the chat/thread UI for that project can trigger multiple git.exe processes in parallel.
In my case, the spawned commands include repeated:
git.exe add -Agit.exe rev-parse --git-dir
This causes severe local CPU and disk usage. The issue appears to be triggered by opening the project/chat UI itself, not by explicitly asking Codex to run Git commands.
Environment
- Codex App version:
26.429.3425.0 - Platform:
Windows 11 x64 - Shell:
PowerShell - Git:
Git for Windows - Date observed:
May 3-4, 2026
What issue are you seeing?
When I open a local project in Codex and then open the conversation/chat for that project from the left sidebar, Codex starts several Git for Windows processes at the same time.
Observed symptoms:
- multiple
git.exeprocesses run concurrently - local CPU usage can jump to around
50%–60% - disk usage also rises significantly
- the issue can happen immediately after opening the project/chat UI
- this can feel much worse on larger repositories
This does not appear to require any explicit Git action from me.
Steps to reproduce
- Launch the Codex desktop app on Windows.
- Open a local project folder that is a Git repository.
- Open the project conversation/chat from the left sidebar.
- Watch Task Manager.
- Observe several
Git for Windowsprocesses starting in parallel, with CPU and disk usage spiking.
Expected behavior
Opening a project or chat should not trigger heavy Git write/index operations.
At most, I would expect lightweight repository detection or status checks. The app should not start multiple git add -A processes just from opening the project/chat UI.
Actual behavior
The app appears to start multiple Git commands in parallel, including repeated git.exe add -A, which is much heavier than a normal lightweight repo check.
This causes:
- high CPU usage
- high disk activity
- degraded responsiveness
- concern that Git index/state may be modified unexpectedly
Evidence collected
I inspected the running processes while the issue was happening and captured command lines such as:
git.exe add -Agit.exe rev-parse --git-dir
I also observed multiple git.exe add -A processes running at the same time.
Example symptom pattern:
- opening the project/chat UI triggers the spike
- several
Git for Windowsprocesses appear - each process consumes noticeable CPU
- total CPU can rise to around
50%–60%
Why this seems like a bug
This appears to be an app-side Git/indexing/workspace snapshot issue, because:
- it is triggered by opening the project/chat UI
- it happens without asking Codex to perform Git actions
- the commands include
git add -A, which is unexpectedly heavy for passive UI loading - the behavior is severe enough to impact system performance
Additional information
The issue may be easier to reproduce in repositories containing large generated directories unless they are ignored, for example:
node_modules/dist/build/.venv/- large logs or generated assets
However, even if large directories amplify the problem, the core issue still appears to be that the desktop app triggers heavy Git operations during normal UI/project opening.
Privacy note
This report intentionally omits raw local paths, usernames, repository names, and screenshots containing personal information. If maintainers need logs, sanitized versions can be provided later with personal paths redacted.
10 Comments
same
<img width="581" height="539" alt="Image" src="https://github.com/user-attachments/assets/b142a771-bc3a-485a-a4f1-00dee8e9842a" />
<img width="1353" height="813" alt="Image" src="https://github.com/user-attachments/assets/7bd9070e-9145-46ba-90ad-8db5a3f75ae2" />
same, 96gb ram
Same here. WTH is going on? Looks like Git is set out to starve the host of its resources!!
<img width="987" height="707" alt="Image" src="https://github.com/user-attachments/assets/d9a29877-d70c-4787-a459-25e67e0a7e74" />
Follow-up after debugging this further:
I was able to identify a concrete trigger/amplifier. The workspace Git root had a large number of visible, unignored local/generated artifacts: logs, deploy/package output, browser test output, temp folders, server/config snapshots, etc. In this state,
git status --porcelain --untracked-files=allshowed roughly 20k untracked paths.While the CPU spike was happening, process inspection showed many concurrent:
git.exe add -ACodex Desktop logs also showed repeated entries for the same command, with sources including:
source=local_conversation_git_summarysource=commit_modalrequestKind=review-summaryfailureReason=abortedSo the pattern seems to be:
git add -Afor review/summary-related Git state.git add -Aattempts, including overlapping/concurrent ones.Workaround that stopped the runaway behavior:
I added local-only Git excludes in
.git/info/excludefor the generated/log/temp/deploy/snapshot folders. After that, the visible Git change set dropped from ~20k paths to only the real modified source files, and the repeatedgit.exe add -Aprocesses stopped.This workaround avoids exposing or committing local ignore rules, but it also points to the underlying issue: passive summary/review UI flows should probably not run a mutating/index-writing command like
git add -A, especially not concurrently or with retry behavior.Possible app-side mitigations:
git add -Afor passive project/chat/review summariesgit status --porcelain,git diff --name-only, etc.--untracked-files=nofor lightweight summariesAdditional reproduction / impact report from another Windows Desktop user.
Environment:
Observed on 2026-05-10:
Amplifying factor:
Mitigation that worked:
This supports the existing hypothesis that the desktop app is triggering heavy snapshot/index Git operations passively, and that large/untracked worktrees amplify the failure mode.
I've run into the exact same issue. Codex compares the repository's current branch with the origin/HEAD branch, so you can fix it temporarily by modifying origin/HEAD with this command:
git remote set-head origin xxxsame
<img width="1028" height="583" alt="Image" src="https://github.com/user-attachments/assets/01658d4a-5e0e-4d05-afe2-ef14ce1f709e" />
I found a related failure later in the same passive
review-summaryworkflow and documented it in #27570:The process trace shows Desktop first constructing its temporary index using sequential
git add -- <up to 1,024 paths>batches andgit write-tree, matching the workflow discussed here.After the metadata diffs, however, revision calculation attempts a bulk:
Three nested-repository directory entries caused that command to fail. The fallback then retried all 5,042 paths concurrently with one Git process per path and no concurrency bound.
This appears adjacent to the
git addfanout reported here rather than an exact duplicate: both are passive review-summary operations amplified by large/untracked worktrees, but #27570 identifies a separate unbounded error fallback after snapshot construction.Thanks for documenting #27570. This matches the operational risk we saw on Windows as well.
In our case, opening Codex Desktop against a large/dirty production workspace caused severe CPU/disk pressure from many Git processes. We have been able to continue working only by treating this as an unresolved Desktop-side risk and avoiding direct attachment to the production workspace where possible, using smaller/cleaner worktrees and stopping immediately if many
git.exe add,git write-tree, or related Git processes appear.So from our side, this is not fully "resolved" by workflow changes. The workflow mitigates the impact, but the underlying Desktop behavior still looks dangerous for large or untracked-heavy repositories.
#27570 looks especially relevant because it suggests another unbounded fallback path after snapshot/revision calculation fails. That seems adjacent to, and possibly part of the same risk class as, this issue.
I can reproduce the same issue on a much newer Windows build of Codex, and an ETW trace shows an additional WMI-related amplification path that can make the entire machine lag.
Environment
26.715.2305.025H2, build26200.8875, x642.53.0.windows.2User-visible impact
While Codex Desktop is open, mouse movement and keyboard input become delayed. Task Manager shows sustained CPU usage in:
Winmgmt)WmiPrvSE.exe)After stopping my own diagnostic monitor to rule out observer overhead,
WinmgmtandWmiPrvSEstill consumed roughly 1.7 and 1.4 logical CPU cores respectively.ETW evidence
I captured synchronized 15-second traces using:
Microsoft-Windows-Kernel-ProcessMicrosoft-Windows-WMI-ActivityDuring that 15-second window, the Codex Desktop parent process spawned:
git.exetaskkill.exepowershell.exeThe
taskkill.exechildren alone generated 255 WMI operations, including 126 repeated queries againstWin32_Process:A representative Git child command was performing a per-file diff under a generated dependency tree:
The process tree and WMI client attribution were:
This appears to be the same Git/workspace scanning family described in this issue, with Windows process cleanup through
taskkill.exeamplifying the load through WMI.Large generated/untracked dependency directories such as
node_modulesappear to amplify the issue, but Codex spawning hundreds of Git and process-cleanup subprocesses within seconds seems to be the underlying problem.I can provide a sanitized ETW summary if maintainers need more detail. Please investigate throttling/batching repository scans and avoiding a subprocess-per-file / cleanup retry loop on Windows.