You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows: CLI flashes a Windows Terminal window for every spawned command (regression, app-server daemon) #49264
CLIIssues related to the Codex CLIapp-serverIssues involving app server protocol or interfacesbugSomething isn't workingwindows-osIssues related to Codex on Windows systems
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:
Additional reproduction on Windows 11 ARM64 (2026-09-29). The foreground Codex CLI is 0.159.0; the managed app-server daemon executable is 0.157.0. Windows Terminal is the configured default terminal.
I captured the live process tree without launching another Codex instance:
codex.exe app-server --listen unix:// --managed-daemon spawned node_repl.exe, several node.exe stdio MCP processes, and cmd.exe for the codex-security MCP launcher.
There were two startup bursts, around 21:38:51 and 21:39:01 local time. Each child had a conhost.exe; Windows Terminal's OpenConsole.exe processes appeared in matching bursts under svchost.exe (roughly nine new instances across the two bursts).
codex-code-mode-host.exe spawned later and was accompanied by another conhost.exe / OpenConsole.exe pair.
The resulting terminal windows steal focus. This affects MCP/tool-runtime startup as well as the command and notify cases already reported above.
This is process-tree/timing evidence; I did not capture the exact Windows process creation flags. Expected: background app-server children with stdio pipes should not create visible terminal windows.
The issue happens when running Codex CLI directly, so it is not specific to JetBrains/IntelliJ.
My config.toml no longer contains a notify = ... entry.
The Codex runtime still contains codex-computer-use.exe under both @oai/cua and @oai/sky.
Searching the runtime shows turn_ended / "Notify trusted libraries that a Codex turn ended" strings in the bundled runtime, and references to resolving/writing the Windows Computer Use notify configuration.
If I temporarily rename the bundled codex-computer-use.exe files, the flashing CMD windows stop completely.
However, after doing that Codex eventually reports No active thread is available.
Restoring codex-computer-use.exe makes Codex work normally again, but the CMD windows return.
This strongly suggests the visible console window is tied to the Windows Computer Use helper / turn-ended path, rather than a user-defined notify hook.
A no-window spawn (CREATE_NO_WINDOW / equivalent) for that helper would likely avoid the flash without breaking the turn lifecycle.
I can verify this. I run 16 instances of Luna, and since the update, terminal windows keep appearing every couple of seconds on my screen. I'm using Windows 11 with 0.159.1. Not just CMD commands, but git commands do this as well (they are running the git shell, installed with Git for Windows).
Additional diagnostics from another Windows 0.159.0 installation, especially concerning the Console Host workaround and already-running daemon processes.
While preparing this report, I found that 0.159.2 was released with the Windows console suppression fix in #49385. The observations below are from 0.159.0; 0.159.2 has not yet been tested on this machine. This is additional evidence for the existing regression, not a claim that the new release is still affected.
Environment
Windows 11 Pro for Workstations, build 26200, x64.
Codex CLI 0.159.0, installed globally using npm.
A custom CODEX_HOME containing the managed daemon package packages/app-server-daemon/releases/0.159.0-x86_64-pc-windows-msvc/bin/codex.exe.
Codex Desktop Microsoft Store package 26.901.6511.0 is also installed.
Windows Terminal Stable 1.24 and Canary 1.26 installed; PowerShell used for CLI sessions.
Pebrel command hooks and a notify chain ending in codex-computer-use.exe turn-ended are configured. They were retained during the observations below, so this is not a hooks/notify-free minimal reproduction.
Symptoms and direct observations
Windows repeatedly appear and disappear during startup and command execution.
An initial attempt to change the default terminal was incomplete: only DelegationTerminal was changed to the Console Host GUID, while DelegationConsole still selected Windows Terminal. This should not be treated as a failed test of the correctly configured workaround.
Both values were subsequently set and read back under HKCU\Console\%%Startup:
After correcting both values, an out-of-process observer using SetWinEventHook(EVENT_OBJECT_SHOW) and IsWindowVisible recorded three visible ConsoleWindowClass windows in a 12-second observation:
PID 23404 was verified as codex.exe app-server --listen unix:// --managed-daemon, started before the registry change and still running during this observation. PID 32448 was a separate app-server daemon pid-update-loop helper, not a second command-serving daemon. The managed daemon ran under the desktop user's account.
These observations establish that visible windows were created by children of the old managed daemon. They do not establish registry/delegation caching, or identify whether each individual PowerShell spawn originated from a tool call, a command hook, or another background operation. No reboot or controlled daemon-restart test was performed.
Mitigation and validation limits
A new interactive TUI was observed starting with --no-daemon while the existing daemon remained alive.
That TUI actually executed Write-Output CODEX_CONSOLE_PROBE_A and git --version, returning the marker and Git 2.45.2.windows.1 respectively.
This demonstrates that the bypassed execution path remains functional; it is not a completed human confirmation of zero flashing across all operations.
features.daemon_auto_start = false was also applied, but --no-daemon was used explicitly to avoid reusing an existing daemon.
Existing sessions were kept running. As an interim measure, a narrowly scoped window helper hid only console windows whose process ancestry included the verified managed daemon PID. It recorded five matching windows being hidden. Event-based hiding may still allow a brief flash and is not a substitute for suppression at process creation.
So the CLI is newer than the running managed app-server daemon. A process snapshot also showed the managed app-server --managed-daemon and its codex-code-mode-host.exe child running while Codex was open. The user-provided screenshot shows the terminal windows appearing and disappearing during the session.
I haven't yet tested after updating/restarting the daemon, or compared against codex --no-daemon, and I didn't capture a window/process trace tying an individual popup to a specific child process. This looks consistent with the daemon child-process console-window regression already reported here; sharing the version mismatch in case it helps narrow down why the issue is still visible on a newer CLI.
Expected: background commands and helper processes should not open visible terminal windows or steal focus.
OpenAI is absolute trash. Codex has been completely bug-ridden ever since version 0.157. Weren't you bragging about how amazing your Astra model is? How come the PowerShell pop-up issue still hasn't been fixed after so many versions? You should really learn a thing or two from Claude Code.
CLI totally unusable for now, spawning
C:\Program Files\Microsoft Visual Studio\18\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\cmd\git.exe all around, likely some git access trying to complete at session start.
@nos1609@shushu789@etraut-openai It is indeed fixed but you need to update daemon with codex app-server daemon update --from-cli -y, it updates separately from the cli.
CLIIssues related to the Codex CLIapp-serverIssues involving app server protocol or interfacesbugSomething isn't workingwindows-osIssues related to Codex on Windows systems
Activity
github-actions commentedon Sep 29, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
nos1609 commentedon Sep 29, 2026
Additional reproduction on Windows 11 ARM64 (2026-09-29). The foreground Codex CLI is 0.159.0; the managed app-server daemon executable is 0.157.0. Windows Terminal is the configured default terminal.
I captured the live process tree without launching another Codex instance:
codex.exe app-server --listen unix:// --managed-daemonspawnednode_repl.exe, severalnode.exestdio MCP processes, andcmd.exefor thecodex-securityMCP launcher.conhost.exe; Windows Terminal'sOpenConsole.exeprocesses appeared in matching bursts undersvchost.exe(roughly nine new instances across the two bursts).codex-code-mode-host.exespawned later and was accompanied by anotherconhost.exe/OpenConsole.exepair.This is process-tree/timing evidence; I did not capture the exact Windows process creation flags. Expected: background app-server children with stdio pipes should not create visible terminal windows.
RubenEspadaEs commentedon Sep 29, 2026
It's the same for me.
RubenEspadaEs commentedon Sep 29, 2026
You can fix temporaly with:
codex --no-daemon
And you can make a alias for CMD making this:
C:\Users\YOUR_USER\cmd-aliases.txt
put this:
codex=codex --no-daemon $*
reg add "HKCU\Software\Microsoft\Command Processor" /v AutoRun /t REG_SZ /d "doskey /macrofile="C:\Users\YOUR_USER\cmd-aliases.txt"" /f
reset the CMD.
simplerandomuser commentedon Sep 29, 2026
I can reproduce this on Windows as well.
What I observed:
config.tomlno longer contains anotify = ...entry.codex-computer-use.exeunder both@oai/cuaand@oai/sky.turn_ended/ "Notify trusted libraries that a Codex turn ended" strings in the bundled runtime, and references to resolving/writing the Windows Computer Use notify configuration.codex-computer-use.exefiles, the flashing CMD windows stop completely.No active thread is available.codex-computer-use.exemakes Codex work normally again, but the CMD windows return.This strongly suggests the visible console window is tied to the Windows Computer Use helper / turn-ended path, rather than a user-defined notify hook.
A no-window spawn (
CREATE_NO_WINDOW/ equivalent) for that helper would likely avoid the flash without breaking the turn lifecycle.laxika commentedon Sep 29, 2026
I can verify this. I run 16 instances of Luna, and since the update, terminal windows keep appearing every couple of seconds on my screen. I'm using Windows 11 with 0.159.1. Not just CMD commands, but git commands do this as well (they are running the git shell, installed with Git for Windows).
karl-ravnjak-ctg commentedon Sep 30, 2026
I have the same issue especially with the hooks, i get 10 CLI flashes as once
avabbbb commentedon Sep 30, 2026
Additional diagnostics from another Windows 0.159.0 installation, especially concerning the Console Host workaround and already-running daemon processes.
While preparing this report, I found that 0.159.2 was released with the Windows console suppression fix in #49385. The observations below are from 0.159.0; 0.159.2 has not yet been tested on this machine. This is additional evidence for the existing regression, not a claim that the new release is still affected.
Environment
packages/app-server-daemon/releases/0.159.0-x86_64-pc-windows-msvc/bin/codex.exe.approval_policy = "never",sandbox_mode = "danger-full-access",[windows] sandbox = "elevated".codex-computer-use.exe turn-endedare configured. They were retained during the observations below, so this is not a hooks/notify-free minimal reproduction.Symptoms and direct observations
Windows repeatedly appear and disappear during startup and command execution.
An initial attempt to change the default terminal was incomplete: only
DelegationTerminalwas changed to the Console Host GUID, whileDelegationConsolestill selected Windows Terminal. This should not be treated as a failed test of the correctly configured workaround.Both values were subsequently set and read back under
HKCU\Console\%%Startup:After correcting both values, an out-of-process observer using
SetWinEventHook(EVENT_OBJECT_SHOW)andIsWindowVisiblerecorded three visibleConsoleWindowClasswindows in a 12-second observation:PID 23404 was verified as
codex.exe app-server --listen unix:// --managed-daemon, started before the registry change and still running during this observation. PID 32448 was a separateapp-server daemon pid-update-loophelper, not a second command-serving daemon. The managed daemon ran under the desktop user's account.These observations establish that visible windows were created by children of the old managed daemon. They do not establish registry/delegation caching, or identify whether each individual PowerShell spawn originated from a tool call, a command hook, or another background operation. No reboot or controlled daemon-restart test was performed.
Mitigation and validation limits
--no-daemonwhile the existing daemon remained alive.Write-Output CODEX_CONSOLE_PROBE_Aandgit --version, returning the marker and Git 2.45.2.windows.1 respectively.features.daemon_auto_start = falsewas also applied, but--no-daemonwas used explicitly to avoid reusing an existing daemon.Related: #48074. Microsoft documents that both delegation values must be changed together: https://learn.microsoft.com/en-us/windows/terminal/group-policy#registry-information-2.
Burjuy commentedon Sep 30, 2026
dont work
mynameistito commentedon Oct 3, 2026
Automatically submitted on behalf of the user by an AI agent.
I'm seeing the same repeated terminal-window flashing described here during normal Codex use on Windows.
I checked the versions currently in use:
So the CLI is newer than the running managed app-server daemon. A process snapshot also showed the managed
app-server --managed-daemonand itscodex-code-mode-host.exechild running while Codex was open. The user-provided screenshot shows the terminal windows appearing and disappearing during the session.I haven't yet tested after updating/restarting the daemon, or compared against
codex --no-daemon, and I didn't capture a window/process trace tying an individual popup to a specific child process. This looks consistent with the daemon child-process console-window regression already reported here; sharing the version mismatch in case it helps narrow down why the issue is still visible on a newer CLI.Expected: background commands and helper processes should not open visible terminal windows or steal focus.
pingg241 commentedon Oct 3, 2026
OpenAI is absolute trash. Codex has been completely bug-ridden ever since version 0.157. Weren't you bragging about how amazing your Astra model is? How come the PowerShell pop-up issue still hasn't been fixed after so many versions? You should really learn a thing or two from Claude Code.
etraut-openai commentedon Oct 3, 2026
This is fixed in 0.159.2.
nos1609 commentedon Oct 3, 2026
@etraut-openai still occuring to me in 0.160.0
CLI totally unusable for now, spawning
C:\Program Files\Microsoft Visual Studio\18\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\cmd\git.exe all around, likely some git access trying to complete at session start.
shushu789 commentedon Oct 4, 2026
still occuring to me in 0.160.0
LukaszWizla commentedon Oct 4, 2026
@nos1609 @shushu789 @etraut-openai It is indeed fixed but you need to update daemon with
codex app-server daemon update --from-cli -y, it updates separately from the cli.mynameistito commentedon Oct 4, 2026
still cooked @etraut-openai
Cap.2026-10-05.at.11.59.36.mp4
fixed it ty ty @LukaszWizla
EDIT: added fix
Mike-Kite commentedon Oct 12, 2026
Its still happening, its ridiculous because it breaks your workflow and stops you from typing - how did this pass QA?
nos1609 commentedon Oct 13, 2026
@Mike-Kite looks like they don't care about Windows at all.
Mike-Kite commentedon Oct 13, 2026
It just spawned 104 terminal windows.... asking to simply build a bundle and move some files...