Skip to content

[Windows] Orphaned git.exe processes persist in 26.707.9981.0 and correlate with kernel pool growth #33264

Open

Description

@Kingnamji

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

26.707.9981.0

What subscription do you have?

ChatGPT Plus

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

The Windows Codex/ChatGPT desktop app repeatedly spawns local Git metadata commands even when I have not requested any Git operation.

Observed commands include:

  • git status --porcelain
  • git rev-parse HEAD
  • git remote -v
  • git config --null --get core.fsmonitor

I confirmed that a newly created git.exe process had the main ChatGPT.exe process as its direct parent. The short-lived parent/helper processes exit, but many git.exe processes remain alive for several minutes as orphaned processes.

During approximately two minutes of monitoring:

  • The number of live git.exe processes increased from 31 to 36.
  • Git processes consumed approximately 1.22 GB of private memory.
  • Git processes held approximately 3,349 handles.
  • Git working set was approximately 245 MB.
  • Nonpaged pool increased from approximately 1.09 GB to 1.40 GB.
  • Paged pool increased from approximately 856 MB to 894 MB.

The kernel pool growth is temporally correlated with the repeated Git/conhost process creation. I cannot attribute every byte of kernel pool growth to Git without pool-tag tracing, but the user-mode Git process and handle accumulation is directly observable.

No GitHub remote or authentication is configured for the active workspace. The observed commands are local metadata checks and should not require GitHub connectivity.

What steps can reproduce the bug?

Feedback ID: 019f6440-966a-76b1-8e36-1ab349c360d9

What is the expected behavior?

No response

Additional information

App package:

OpenAI.Codex_26.707.9981.0_x64__2p2nqsd0c76g0

Selected executable:

app\ChatGPT.exe

This appears closely related to the following issues, but it is still reproducible in the newer 26.707.9981.0 build and includes measured memory, handle, and kernel-pool growth:

The active workspace has no configured Git remote. GitHub authentication or remote connectivity should therefore not be required for reproduction.

Activity

  1. added
    appIssues related to the Codex desktop app
    on Jul 15, 2026
  2. suiyuebaobao commented on Jul 22, 2026

    @suiyuebaobao

    The persistent orphaned git.exe processes and downstream pool growth here closely match the process churn 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.

  3. Kingnamji commented on Jul 22, 2026

    @Kingnamji
    Author

    Update from my Windows test environment:

    I have confirmed that the issue is still reproducible as repeated short-lived and sometimes orphaned git.exe probes launched by the Codex/ChatGPT desktop app. The recurring commands include:

    • git rev-parse HEAD
    • git rev-parse --git-dir
    • git remote -v
    • git config --null --get core.fsmonitor
    • git status --porcelain

    As a temporary local mitigation, I run two narrow PowerShell guards at logon:

    1. A Git Guard that waits for a Git probe to persist for at least 8 seconds, then terminates only recognized read-only Codex/ChatGPT probe patterns. It does not target git add, commit, push, or other normal write operations.
    2. A Workspace Stabilizer that only acts on empty or missing .git metadata in affected user workspaces. It leaves normal, non-empty repositories untouched.

    Latest observation:

    • Both guards were running normally.
    • Git Guard detected and stopped the previously missed rev-parse --git-dir orphan pattern.
    • During an 18-second observation window, active git.exe processes dropped from 9 to 0.
    • No Git process remained alive for 12 seconds or longer by the end of the observation.
    • The Guard reported 20 stale Codex-related Git probes stopped during the current session.

    This reduces the risk of long-lived orphaned processes accumulating handles/memory, but it is only a reactive workaround. It does not stop the desktop app from creating rapid short-lived Git probes in the first place, and it is not an upstream fix.

    Could the team please investigate why the Windows desktop app repeatedly spawns these Git discovery/status probes, and why some can outlive their parent process? A built-in option to disable Git integration, or a fix to prevent orphaned probes, would be preferable to external process monitoring.

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