Skip to content

Windows: Codex CLI 0.158.0 opens dozens of Git terminal error windows on startup and every prompt #49181

Closed as duplicate

Description

@hungchenhsu

What version of Codex CLI is running?

0.158.0 (installed via npm) The managed app-server daemon is also running from the 0.158.0-x86_64-pc-windows-msvc release directory.

What subscription do you have?

Pro

Which model were you using?

gpt-6-Sol

What platform is your computer?

Windows 11 Pro, version 10.0.26200, build 26200, x64. Native Windows environment using PowerShell.

What terminal emulator and version are you using (if applicable)?

The unwanted error windows are hosted by Windows Terminal 1.24.11911.0.

Codex doctor report

Not collected yet.

What issue are you seeing?

After updating Codex CLI to 0.158.0 on September 29, 2026, starting Codex or submitting a prompt causes dozens of terminal windows to appear almost immediately.

The windows display the following error:

[error 2147942632 (0x800700e8) when launching `"git" -c safe.bareRepository=explicit -c core.hooksPath=NUL -c core.fsmonitor=false rev-parse HEAD']

This happens repeatedly during normal use and makes the CLI very disruptive to use.

The approximate number of windows is based on visual observation; an exact count has not been captured.

I first noticed this behavior after the update. I have not yet performed a controlled comparison against the previously installed version, so I cannot confirm which release introduced it.

What steps can reproduce the bug?

Observed reproduction on my machine:

  1. Use the npm-installed Codex CLI 0.158.0 in a native Windows PowerShell environment.
  2. Start Codex. A managed app-server daemon from the 0.158.0 release is also running on this machine.
  3. Observe dozens of terminal error windows appearing almost immediately.
  4. Submit a prompt in Codex.
  5. Observe another burst of terminal windows displaying the Git command and error shown above.

This is my current environment's reproduction, not yet a minimal isolated reproduction. I have not tested with the managed daemon disabled or with a clean configuration.

What is the expected behavior?

Starting Codex and submitting prompts should not open additional visible terminal windows for background Git metadata queries.

Background commands such as git rev-parse HEAD should run without stealing focus or leaving terminal error windows behind. Any background launch failure should be handled internally and reported through diagnostics.

Additional information

Verified local observations

  • Codex CLI npm package version: 0.158.0.
  • Running managed app-server daemon executable: from the 0.158.0-x86_64-pc-windows-msvc release directory.
  • Git for Windows version: 2.53.0.windows.2.
  • Windows Terminal version: 1.24.11911.0.
  • Git resolves to C:\Program Files\Git\cmd\git.exe.
  • Windows error 232, corresponding to 0x800700E8, is reported locally as "The pipe is being closed."

Independent Git check

The exact Git command shown in the error was executed directly in an existing local Git repository using .NET ProcessStartInfo with:

UseShellExecute = false
CreateNoWindow = true
RedirectStandardOutput = true
RedirectStandardError = true

Command:

git -c safe.bareRepository=explicit -c core.hooksPath=NUL -c core.fsmonitor=false rev-parse HEAD

Result:

Exit code: 0
Stdout: a valid HEAD commit hash
Stderr: empty

This confirms that the command succeeds in that repository when launched without creating a visible window. It does not reproduce Codex's launch path or establish the root cause.

Related reports

Possibly related to:

I am reporting the Git-command error-window variant observed on 0.158.0. I have not confirmed whether it shares the same root cause as these reports. Please consolidate this issue if appropriate.

Investigation status

The managed daemon's Windows child-process launch behavior is a possible area to investigate, including whether background Git processes are started with appropriate no-window creation flags.

I have not independently verified the relevant Codex source path or creation flags for this incident.

The following comparisons have not yet been performed:

  • Running with the managed daemon disabled.
  • Downgrading to the previously working version.
  • Changing the default Windows terminal application.
  • Reproducing with a clean configuration and no plugins, MCP servers, or command hooks.

Private repository names, paths, commit hashes, and raw session logs are omitted.

Activity

  1. added
    bug
    on Sep 29, 2026
  2. added
    CLI
    windows-os
    app-server
    on Sep 29, 2026
  3. hungchenhsu commented on Sep 29, 2026

    @hungchenhsu
    Author

    Thanks for identifying these related reports. After reviewing them, my symptoms appear to overlap with #48935, #48601, and #48356, including the same background Git command and 0x800700E8 error.

    My report adds an observation that this still occurs with Codex CLI and managed app-server daemon 0.158.0, with dozens of error windows appearing on startup and prompt submission.

    I have not established a separate root cause, so I am closing this as a duplicate to consolidate tracking. The environment details and diagnostic evidence remain available in this report.

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

    CLIapp-serverbugwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions