Skip to content

Windows: CLI flashes a Windows Terminal window for every spawned command (regression, app-server daemon) #49264

Description

@JohnWayneeee

What version of Codex is running?

codex-cli 0.159.0 (npm, @openai/codex), Windows 11 Pro 26200

What happened?

Since updating (~2026-09-28), running codex from Windows Terminal briefly opens and closes a
new Windows Terminal window on startup and for every command the agent runs. The VS Code
extension does not have this problem, and older CLI versions didn't either.

Diagnosis (process monitor)

Commands are no longer spawned by the foreground CLI but by a background codex.exe
(app-server daemon) that has no console attached. Each child therefore gets a fresh console,
which Windows hands off to the default terminal app:

git.exe <- codex.exe (daemon) "git ... rev-parse --git-dir"
WindowsTerminal.exe <- svchost.exe
OpenConsole.exe -Embedding <- svchost.exe
conhost.exe <- git.exe

Same for the notify program (codex-computer-use.exe turn-ended) at the end of each turn.

Expected

Child processes spawned with CREATE_NO_WINDOW / hidden window (as the VS Code extension does),
or inherit the foreground CLI's console.

Workaround

Settings > System > For developers > Terminal = "Windows Console Host" stops the flashing.

Config

sandbox_mode = "danger-full-access", [windows] sandbox = "elevated" (flash also occurs with "unelevated")

Activity

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

    CLIIssues related to the Codex CLIapp-serverIssues involving app server protocol or interfacesbugSomething isn't workingwindows-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