Skip to content

Windows: managed app-server daemon spawns git status in visible console windows, and it keeps running after the host app closes #49481

Closed

Description

@facerenza16

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

Codex CLI 0.159.1 (npm @openai/codex), plus the managed daemon it installed: app-server --managed-daemon, 0.159.1-x86_64-pc-windows-msvc

What subscription do you have?

Plus

What platform is your computer?

Windows 11 Pro 10.0.26200

What issue are you seeing?

Since 0.159.1, the managed app-server daemon (codex app-server --managed-daemon, installed under <CODEX_HOME>/packages/app-server-daemon/) opens a visible console window every time it runs git. It comes in batches of dozens of windows. With Windows Terminal as the default terminal, each one opens as a tab, and some of them fail with:

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

The daemon keeps running after the host app closes, with its parent process gone, and the windows keep appearing. Console-based hooks (node, cmd, bash) run by the daemon open visible windows too.

What steps can reproduce the bug?

  1. On Windows 11, leave the default terminal app on "Let Windows decide", which means Windows Terminal.
  2. Use Codex 0.159.1 through a host app that runs codex app-server, so the managed daemon gets installed and started. In my case the host app is Orca 1.4.215.
  3. Work in a git repository. Console windows start appearing for git status --porcelain, and also for any console hook configured in hooks.json.
  4. Close the host app. The daemon process stays alive and the windows keep appearing.

What is the expected behavior?

The daemon's git and hook child processes run hidden, with CREATE_NO_WINDOW, and never show a window. I'd also expect the daemon to shut down when its host app exits, or at least have a documented way to turn off managed daemon mode.

Additional information

  • Environment: Codex CLI 0.159.1 (npm), daemon 0.159.1-x86_64-pc-windows-msvc, Windows 11 Pro 10.0.26200, Git 2.53.0.windows.3, Orca 1.4.215.
  • The daemon process has no console attached: I found no conhost.exe child for it. Its console child processes therefore get a new console each, which suggests they are spawned without CREATE_NO_WINDOW.
  • The Codex desktop app's own codex app-server process has a hidden console and doesn't show the problem.
  • Workaround: killing the daemon processes (codex.exe app-server --listen unix:// --managed-daemon, its pid-update-loop, and codex-code-mode-host.exe) stops the windows until the host starts the daemon again.

Activity

  1. added
    app
    on Sep 30, 2026
  2. added
    bug
    CLI
    windows-os
    app-server
    on Sep 30, 2026
  3. etraut-openai commented on Oct 3, 2026

    @etraut-openai
    Contributor

    Thanks for the bug report. We have a fix in place, and it will be included in either 0.161.0 or 0.162.0.

  4. dr-brinewell-s-lobstrom commented on Oct 31, 2026

    @dr-brinewell-s-lobstrom

    A codex.exe process from ~.codex\packages\app-server-daemon\releases\0.162.1-x86_64-pc-windows-msvc\bin is still running after a simple terminal run of Codex, a hello world prompt, and then terminating it.

    WHY is this still running? I have to taskkill it every time I close codex to be sure that an AI engine isn't running on my system taking orders from god knows what. I'm on codex-cli 0.166.0 in Windows 11. Please fix this.

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

    CLIappapp-serverbugwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions