codex - 💡(How to fix) Fix Codex Desktop on Windows leaks orphan git.exe + conhost.exe via ambient commit-history (200+ zombies over 30h, kills Chromium browsers)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

When default-commit-history for any workspace is set to accepted (i.e., the user accepted the Ambient Suggestions / Commit History consent prompt), Codex Desktop runs a background snapshot loop that invokes git add -u + git write-tree every few tens of seconds. On Windows, each invocation leaks one orphan git.exe + one orphan conhost.exe (parent process exits before the child finishes cleanup, so the children become orphans with no parent and never get reaped).

Over ~30 hours of normal use, this accumulated 221 orphan git.exe + 235 orphan conhost.exe in my session, consuming ~28,000 handles (11% of total system handles) and ~456 PIDs (55% of total processes).

Root Cause

System-wide handle / process pressure caused Chromium-based browsers (Chrome and Edge, including Edge Guest mode) to fail CreateProcess for utility/renderer subprocesses and exit their entire process tree silently — simultaneous crash of both browsers. No user-mode crash dumps are generated because the browsers exit cleanly (CreateProcess returns failure, top-level process self-terminates). SFC/DISM clean. AMD driver reinstall did nothing.

Fix Action

Fix / Workaround

Workaround in use

Code Example

"ambient-suggestions:default-statuses": {
  "ambient-suggestions:default-statuses:local:F:\\<workspace>": {
    "default-commit-history": "accepted"
  }
}
RAW_BUFFERClick to expand / collapse

Codex Desktop version: 26.506.3741.0 (MSIX from Microsoft Store) Platform: Windows 11 Pro 26200, AMD Ryzen 7 6800H, 32 GB RAM Codex CLI version: N/A — this is the Desktop app

Summary

When default-commit-history for any workspace is set to accepted (i.e., the user accepted the Ambient Suggestions / Commit History consent prompt), Codex Desktop runs a background snapshot loop that invokes git add -u + git write-tree every few tens of seconds. On Windows, each invocation leaks one orphan git.exe + one orphan conhost.exe (parent process exits before the child finishes cleanup, so the children become orphans with no parent and never get reaped).

Over ~30 hours of normal use, this accumulated 221 orphan git.exe + 235 orphan conhost.exe in my session, consuming ~28,000 handles (11% of total system handles) and ~456 PIDs (55% of total processes).

Impact

System-wide handle / process pressure caused Chromium-based browsers (Chrome and Edge, including Edge Guest mode) to fail CreateProcess for utility/renderer subprocesses and exit their entire process tree silently — simultaneous crash of both browsers. No user-mode crash dumps are generated because the browsers exit cleanly (CreateProcess returns failure, top-level process self-terminates). SFC/DISM clean. AMD driver reinstall did nothing.

Repro

  1. Open Codex Desktop on Windows 11.
  2. Open any workspace that is a git repository.
  3. When Codex prompts about Ambient Suggestions / Commit History, click Accept.
  4. Leave Codex Desktop running for several hours.
  5. Get-Process git, conhost | Group-Object Name | Select Count, Name will show hundreds of accumulated processes.
  6. Get-CimInstance Win32_Process -Filter "Name='git.exe'" shows all of them have CommandLine = git write-tree or git add -u, with ParentProcessId pointing to a dead PID (orphans).
  7. Eventually open Chrome and Edge — both will crash simultaneously.

State file evidence

%USERPROFILE%\.codex\.codex-global-state.json contains:

"ambient-suggestions:default-statuses": {
  "ambient-suggestions:default-statuses:local:F:\\<workspace>": {
    "default-commit-history": "accepted"
  }
}

Changing "accepted""dismissed" only hides the UI suggestions but does NOT stop the background snapshot loop — the leak continues after Codex restart.

Expected behavior

  • Either don't spawn the snapshot worker as fire-and-forget on Windows, OR
  • Ensure child git.exe is reaped (close pipe handles before exiting the worker), OR
  • Respect the dismissed state to actually stop background git invocations.

Workaround in use

Scheduled task that kills orphan git.exe / conhost.exe every 3 minutes. Functional but should not be required.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

  • Either don't spawn the snapshot worker as fire-and-forget on Windows, OR
  • Ensure child git.exe is reaped (close pipe handles before exiting the worker), OR
  • Respect the dismissed state to actually stop background git invocations.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Codex Desktop on Windows leaks orphan git.exe + conhost.exe via ambient commit-history (200+ zombies over 30h, kills Chromium browsers)