Skip to content

Windows: managed app-server 0.159 persists after npm CLI downgrade and console popups continue #49326

Open

Description

@giodl73-repo

Summary

On Windows 11, visible CMD/PowerShell windows repeatedly appear in front of the desktop while I use the Codex CLI inside a PowerShell terminal in VS Code. The rate can reach dozens of windows in a short period, interrupting typing and making the CLI impractical to use. I downgraded the global npm CLI from 0.159.0 to 0.156.1, but a separately installed managed app-server daemon remained running from a 0.159.0 release path. The user-visible popup problem continued after the npm downgrade.

This report focuses on the mixed-version state and the fact that npm CLI downgrade does not stop or downgrade the managed daemon. The daemon-side console spawning problem is also described in #44768; related popup reports include #48074 and #48876.

Environment

  • Windows 11 Home, x64, build 26200.
  • Codex CLI launched inside VS Code's integrated PowerShell terminal.
  • Global npm package and codex --version after downgrade: @openai/[email protected] / codex-cli 0.156.1.
  • Managed daemon processes still ran from ~/.codex/packages/app-server-daemon/releases/0.159.0-x86_64-pc-windows-msvc/bin/codex.exe:
    • app-server --listen unix:// --managed-daemon
    • app-server daemon pid-update-loop
  • ~/.codex/config.toml has no [windows] block. I also found no project config.toml override.

What happened

  1. I used Codex CLI on Windows after updating to 0.159.0 and saw repeated foreground console windows during normal agent work.
  2. I removed the [windows] settings from my config; the popups continued.
  3. I installed @openai/[email protected] globally. npm ls -g and codex --version both confirmed 0.156.1 on disk, but the popup problem was still reported.
  4. Process inspection found the two managed app-server processes above still running from the separate 0.159.0 release path. They were stopped explicitly; neither had restarted five seconds later.

Several CLI sessions started before the downgrade were also still running, so I cannot attribute every popup after the downgrade to the daemon or claim that a fresh 0.156.1-only session reproduces this. A newly started CLI process was present as well. I did not capture the parent process of each transient popup. The process/version mismatch is verified; the precise source of every visible window is not.

Expected behavior

Background tool and daemon processes should not open foreground console windows. Downgrading or changing the CLI version should not leave an incompatible or problematic managed daemon silently serving CLI sessions; the CLI should handle that state clearly or provide a reliable automatic restart/version alignment path.

Actual behavior and impact

The popup storm continued while codex --version showed 0.156.1 and the managed app-server still ran 0.159.0. The foreground window storm makes current Codex CLI releases unusable for my work in VS Code. I am stuck on 0.156.1 and unable to upgrade until this is fixed. This now blocks normal access to GPT-6.1 Sol, which was added to the bundled catalog in the 0.159.1 release.

Requested investigation

Please confirm whether a CLI at 0.156.1 can attach to a 0.159.0 managed daemon, make daemon version/state visible in CLI diagnostics, and prevent visible Windows console creation for daemon-launched commands and helpers. A supported command that safely stops or aligns a stale daemon after npm upgrade/downgrade would also help.

Activity

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

    @zdd

    This is terrible. I can't input anything on the CLI at all. You should fix this problem as soon as possible and give us 100 banked reset!

  3. giodl73-repo commented on Oct 1, 2026

    @giodl73-repo
    Author

    Follow-up from the same Windows 11 / VS Code integrated PowerShell setup (2026-10-01):

    The user tried codex --no-daemon and still saw separate console windows during tool operations, with titles resembling git and package commands. This means --no-daemon is not a sufficient workaround on this machine. A later codex doctor --json reported CLI 0.156.1 and a stale/unreachable app-server control socket. A process snapshot showed PowerShell children under CLI codex.exe processes, but we did not capture the creator of each transient visible window. I therefore cannot attribute every popup to a specific launch site.

    I investigated a candidate fix in a side-by-side checkout of official rust-v0.159.3 (01fc69f4026735edfdf6789820549727a4867b11), without replacing the installed CLI. That source uses background launch helpers for several Git/npm/hook paths, but PowershellParserProcess::spawn in codex-rs/shell-command/src/command_safety/powershell_parser.rs still launches a background PowerShell process without CREATE_NO_WINDOW (also tracked in #49760). My local candidate adds this immediately before command.spawn():

    #[cfg(windows)]
    {
        use std::os::windows::process::CommandExt;
        const CREATE_NO_WINDOW: u32 = 0x0800_0000;
        command.creation_flags(CREATE_NO_WINDOW);
    }

    Validation in that isolated checkout:

    • Added a Windows regression test that starts a detached parent, invokes the actual parser on Get-Location, and verifies the parser has no visible console window.
    • just test -p codex-shell-command: 174 passed, 0 skipped, including that regression.
    • cargo build -p codex-cli: succeeded; the side-by-side binary reports codex-cli 0.159.3.
    • File-scoped rustfmt --check and git diff --check: passed. The broad just fmt recipe could not complete because its Bazel/Starlark formatter launcher was unavailable on this host.

    This is a source-level candidate, not a verified end-to-end fix for the user's popup storm. We have not run a live Codex tool session using the patched binary or established GPT-6.1 Sol access through it. The globally installed CLI remains 0.156.1.

    Please verify console suppression for the direct CLI shell/Git/package paths as well as the daemon path, and cover the persistent PowerShell parser spawn in the Windows fix. The original mixed-version daemon finding remains valid, but the new --no-daemon observation shows that fixing daemon alignment alone does not establish a complete workaround for this setup.

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