Skip to content

Windows: Opening Codex tab in non-Git workspace causes continuous git.exe spawning and high Defender CPU #29858

Open

Description

@mdyks01

What version of the Codex App are you using (From “About Codex” dialog)?

26.616.81150

What subscription do you have?

Plus

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

Observed

  • git.exe and conhost.exe continuously appear and exit.
  • Microsoft Defender MsMpEng.exe CPU rises to ~8-10% and stays there.
  • Behavior Monitoring is responsible.
  • Simply opening the Codex tab reproduces the issue.

What steps can reproduce the bug?

Steps to reproduce

  1. Open a folder that is NOT a Git repository.
  2. Switch to the Codex tab.
  3. Do not issue any commands.

What is the expected behavior?

Expected

Codex should detect a non-Git workspace once and stop retrying, rather than repeatedly launching git.exe.

Additional information

Additional observations

Opening the same project after running:

git init

completely eliminates the issue.

Opening a folder that is already a Git repository also does not reproduce the issue.

Activity

  1. added
    appIssues related to the Codex desktop app
    on Jun 24, 2026
  2. mdyks01 commented on Jun 24, 2026

    @mdyks01
    Author

    Close duplicate to #29492

  3. Yassycodes commented on Jun 25, 2026

    @Yassycodes

    Thanks for writing this up. I am seeing a related Windows Codex Desktop performance regression in #28855: since June 12, opening/using Codex Desktop can cause severe intermittent mouse/typing/system input lag, and it still persists for me on OpenAI.Codex 26.616.10790.0.

    I linked your report in a broader Discussion collecting recent Windows Desktop performance reports here: #29949 (comment)

    No action needed from you unless you want to add more detail there, but I wanted to connect the reports because the recent Windows issues look related enough that they may need a canonical tracker.

  4. crash2kx commented on Jul 1, 2026

    @crash2kx

    Related confirmation from another Windows machine: I hit the same repeated Git-probing pattern, but in this case the immediate trigger was an empty/invalid .git directory inside a default Codex chat workspace under %USERPROFILE%\Documents\Codex\....

    ETW showed Codex repeatedly launching:

    git.exe -c core.hooksPath=NUL -c core.fsmonitor= rev-parse --show-toplevel
    git.exe config --null --get core.fsmonitor
    

    Before removing the empty .git, a 120s sample saw 115 new git.exe processes, 96 new conhost.exe processes, and MsMpEng.exe at ~55.6% of one CPU core.

    After deleting only that empty .git directory, a 60s sample saw 0 new git.exe / conhost.exe processes and MsMpEng.exe dropped to ~1.1% of one CPU core.

    I posted the detailed confirmation on #29911 since it matches the empty .git variant more directly.

  5. suiyuebaobao commented on Jul 22, 2026

    @suiyuebaobao

    The continuous git.exe spawning and downstream Defender CPU in a non-Git workspace here closely match the behavior I reproduced.

    I published a single-file Windows launcher for the original Microsoft Store/MSIX Codex app:

    It starts Codex with a process-scoped GIT_DIR=NUL. On my machine, the stable trace changed from 247 new git.exe and 137 new taskkill.exe processes per 10 seconds to 0 and 0 over 15 seconds; WMI Provider Host fell from about 6.6% to 0.9%.

    Usage: fully exit Codex from the Windows system tray, then run the script.

    This is an unofficial workaround, not an upstream fix. It deliberately disables or limits Review, Changes, branch detection, commit, and other Git-backed Codex features. It does not patch Codex, modify repositories or Git configuration, write system environment variables, require elevation, terminate processes, or remove chat history. Launching Codex normally restores Git integration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingperformancewindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions