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

Open 💬 1 comment Opened May 15, 2026 by whynot-hime

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.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗