Repository navigation
Closed as duplicate
Closed as duplicate
Copy link
Labels
CLIIssues related to the Codex CLIapp-serverIssues involving app server protocol or interfacesbugSomething isn't workingwindows-osIssues related to Codex on Windows systems
Description
What version of Codex CLI is running?
codex-cli 0.157.0
What subscription do you have?
ChatGPT Plus
Which model were you using?
Default model
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What terminal emulator and version are you using (if applicable)?
VS Code integrated terminal using Windows PowerShell. Windows Terminal is also installed: Windows Terminal 1.24.11911.0 The issue occurs when launching Codex from PowerShell.
Codex doctor report
{
"schemaVersion": 1,
"generatedAt": "1790342939s since unix epoch",
"overallStatus": "warning",
"codexVersion": "0.157.0",
"checks": {
"app_server.status": {
"id": "app_server.status",
"category": "app-server",
"status": "ok",
"summary": "background server is running",
"details": {
"app-server version": "0.157.0",
"control socket": "C:\\Users\\Vinicius\\.codex\\app-server-control\\app-server-control.sock",
"daemon state dir": "C:\\Users\\Vinicius\\.codex\\app-server-daemon",
"dedicated pid file": "C:\\Users\\Vinicius\\.codex\\app-server-daemon\\daemon.pid (file)",
"dedicated update-loop pid file": "C:\\Users\\Vinicius\\.codex\\app-server-daemon\\daemon-updater.pid (file)",
"mode": "ephemeral",
"pid file": "C:\\Users\\Vinicius\\.codex\\app-server-daemon\\app-server.pid (missing)",
"settings": "C:\\Users\\Vinicius\\.codex\\app-server-daemon\\settings.json (missing)",
"status": "running",
"update-loop pid file": "C:\\Users\\Vinicius\\.codex\\app-server-daemon\\app-server-updater.pid (missing)"
},
"remediation": null,
"durationMs": 5
},
"auth.credentials": {
"id": "auth.credentials",
"category": "auth",
"status": "ok",
"summary": "auth is configured",
"details": {
"auth file": "C:\\Users\\Vinicius\\.codex\\auth.json",
"auth storage mode": "File",
"stored API key": "false",
"stored ChatGPT tokens": "true",
"stored agent identity": "false",
"stored auth mode": "chatgpt"
},
"remediation": null,
"durationMs": 0
},
"config.load": {
"id": "config.load",
"category": "config",
"status": "ok",
"summary": "config loaded",
"details": {
"CODEX_HOME": "C:\\Users\\Vinicius\\.codex",
"active thread overrides": "not inspected",
"config.toml": "C:\\Users\\Vinicius\\.codex\\config.toml",
"config.toml parse": "ok",
"configuration load ms": "6",
"configuration scope": "invocation config, including cloud-managed policy",
"cwd": "C:\\WINDOWS\\System32",
"enabled feature flags": "<redacted>",
"feature flag overrides": "none",
"feature flags enabled": "53",
"log dir": "C:\\Users\\Vinicius\\.codex\\log",
"mcp servers": "1",
"model": "gpt-6-astra",
"model provider": "openai",
"sqlite home": "C:\\Users\\Vinicius\\.codex"
},
"remediation": null,
"durationMs": 0
},
"desktop.app.version": {
"id": "desktop.app.version",
"category": "desktop",
"status": "ok",
"summary": "the desktop application is installed",
"details": {
"log directory": "$HOME\\AppData\\Local\\Codex/Logs",
"running": "false",
"version": "26.917.9434.0"
},
"remediation": null,
"durationMs": 0
},
"desktop.app_server.handshake": {
"id": "desktop.app_server.handshake",
"category": "desktop",
"status": "ok",
"summary": "the desktop application is not running",
"details": {},
"remediation": null,
"durationMs": 0
},
"desktop.security.enforcement": {
"id": "desktop.security.enforcement",
"category": "desktop",
"status": "ok",
"summary": "no locally visible recent Codex security enforcement was found",
"details": {},
"remediation": null,
"durationMs": 0
},
"git.environment": {
"id": "git.environment",
"category": "git",
"status": "ok",
"summary": "git executable found; execution not verified",
"details": {
"PATH git #1": "C:\\Program Files\\Git\\cmd\\git.exe",
"PATH git entries": "1",
"git execution": "not inspected (PATH helpers are not executed)",
"repo detected": "false",
"selected git": "C:\\Program Files\\Git\\cmd\\git.exe"
},
"remediation": null,
"durationMs": 6
},
"git.worktree.dev_drive": {
"id": "git.worktree.dev_drive",
"category": "git",
"status": "ok",
"summary": "no Git worktree is active",
"details": {},
"remediation": null,
"durationMs": 0
},
"installation": {
"id": "installation",
"category": "install",
"status": "ok",
"summary": "installation looks consistent",
"details": {
"PATH codex #1": "C:\\Users\\Vinicius\\AppData\\Local\\Programs\\OpenAI\\Codex\\bin\\codex.exe",
"current executable": "C:\\Users\\Vinicius\\AppData\\Local\\Programs\\OpenAI\\Codex\\bin\\codex.exe",
"install context": "standalone (windows, package C:\\Users\\Vinicius\\.codex\\packages\\standalone\\releases\\0.157.0-x86_64-pc-windows-msvc, bin C:\\Users\\Vinicius\\.codex\\packages\\standalone\\releases\\0.157.0-x86_64-pc-windows-msvc\\bin, resources C:\\Users\\Vinicius\\.codex\\packages\\standalone\\releases\\0.157.0-x86_64-pc-windows-msvc\\codex-resources, path C:\\Users\\Vinicius\\.codex\\packages\\standalone\\releases\\0.157.0-x86_64-pc-windows-msvc\\codex-path)",
"managed by Vite+": "false",
"managed by bun": "false",
"managed by npm": "false",
"managed by pnpm": "false",
"managed package root": "not set"
},
"remediation": null,
"durationMs": 3
},
"mcp.config": {
"id": "mcp.config",
"category": "mcp",
"status": "warning",
"summary": "MCP configuration has optional issues",
"details": {
"configured servers": "1",
"disabled servers": "0",
"node_repl": "env var CODEX_WINDOWS_REGISTERED_CORE is not set",
"stdio servers": "1"
},
"remediation": "Set the missing MCP env vars or disable the affected server.",
"durationMs": 0
},
"network.env": {
"id": "network.env",
"category": "network",
"status": "ok",
"summary": "network-related environment looks readable",
"details": {
"managed proxy": "not configured",
"proxy env vars": "none",
"respect system proxy": "disabled"
},
"remediation": null,
"durationMs": 0
},
"network.provider_reachability": {
"id": "network.provider_reachability",
"category": "reachability",
"status": "ok",
"summary": "active provider endpoints are reachable over HTTP",
"details": {
"ChatGPT inference URL": "https://chatgpt.com/backend-api/<redacted> reachable (HTTP 405)",
"desktop assets CDN": "https://persistent.oaistatic.com/codex-app-prod/<redacted> reachable (HTTP 200)",
"reachability mode": "ChatGPT auth"
},
"remediation": null,
"durationMs": 312
},
"network.websocket_reachability": {
"id": "network.websocket_reachability",
"category": "websocket",
"status": "ok",
"summary": "Responses WebSocket handshake succeeded",
"details": {
"DNS": "2 IPv4, 2 IPv6, first IPv6",
"auth mode": "chatgpt",
"connect timeout": "15000 ms",
"endpoint": "wss://chatgpt.com/backend-api/<redacted>",
"handshake result": "HTTP 101 Switching Protocols",
"model provider": "openai",
"provider name": "OpenAI",
"proxy env vars": "none",
"reasoning header": "false",
"server model present": "false",
"supports websockets": "true",
"wire API": "responses"
},
"remediation": null,
"durationMs": 655
},
"runtime.provenance": {
"id": "runtime.provenance",
"category": "runtime",
"status": "ok",
"summary": "running standalone on windows-x86_64",
"details": {
"commit": "unknown",
"current executable": "C:\\Users\\Vinicius\\AppData\\Local\\Programs\\OpenAI\\Codex\\bin\\codex.exe",
"install method": "standalone (windows, package C:\\Users\\Vinicius\\.codex\\packages\\standalone\\releases\\0.157.0-x86_64-pc-windows-msvc, bin C:\\Users\\Vinicius\\.codex\\packages\\standalone\\releases\\0.157.0-x86_64-pc-windows-msvc\\bin, resources C:\\Users\\Vinicius\\.codex\\packages\\standalone\\releases\\0.157.0-x86_64-pc-windows-msvc\\codex-resources, path C:\\Users\\Vinicius\\.codex\\packages\\standalone\\releases\\0.157.0-x86_64-pc-windows-msvc\\codex-path)",
"platform": "windows-x86_64",
"version": "0.157.0"
},
"remediation": null,
"durationMs": 0
},
"runtime.search": {
"id": "runtime.search",
"category": "search",
"status": "ok",
"summary": "search command found (bundled); execution not verified",
"details": {
"search command": "C:\\Users\\Vinicius\\.codex\\packages\\standalone\\releases\\0.157.0-x86_64-pc-windows-msvc\\codex-path\\rg.exe",
"search command readiness": "file exists",
"search provider": "bundled"
},
"remediation": null,
"durationMs": 0
},
"sandbox.filesystem_paths": {
"id": "sandbox.filesystem_paths",
"category": "sandbox",
"status": "ok",
"summary": "no explicit filesystem paths to probe",
"details": {},
"remediation": null,
"durationMs": 0
},
"sandbox.helpers": {
"id": "sandbox.helpers",
"category": "sandbox",
"status": "ok",
"summary": "sandbox configuration is readable",
"details": {
"approval policy": "OnRequest",
"codex-linux-sandbox helper": "none",
"denied-read glob rules": "0",
"denied-read restrictions": "false",
"denied-read rules": "0",
"execve wrapper helper": "none",
"filesystem sandbox": "restricted",
"glob scan max depth": "unbounded",
"managed filesystem source": "none",
"network sandbox": "restricted",
"sandbox backend": "elevated",
"sandbox provisioning": "complete"
},
"remediation": null,
"durationMs": 2
},
"security.endpoint": {
"id": "security.endpoint",
"category": "security",
"status": "warning",
"summary": "endpoint protection detected; Codex exclusions are unverified",
"details": {
"Codex exclusions": "not verified",
"endpoint products": "Microsoft Defender",
"exclusion targets": "signed Codex app; codex.exe; codex-windows-sandbox-setup.exe; codex-command-runner.exe; codex-code-mode-host.exe"
},
"issues": [
{
"severity": "warning",
"cause": "Microsoft Defender can interfere with Codex. Verify Codex exclusions.",
"measured": "not verified",
"expected": "Codex application and helper exclusions",
"remedy": "Microsoft Defender: Add a certificate or executable-path exclusion for Codex and its helpers. If Attack Surface Reduction blocks Codex, add a rule exclusion. If Controlled Folder Access blocks Codex, allow the app.",
"fields": [
"Codex exclusions"
]
}
],
"remediation": "ask your security administrator to verify Codex exclusions and required helper allowances",
"durationMs": 21
},
"state.paths": {
"id": "state.paths",
"category": "state",
"status": "ok",
"summary": "state paths and databases are inspectable",
"details": {
"CODEX_HOME": "C:\\Users\\Vinicius\\.codex (dir)",
"active rollout files": "10 files, 35018518 total bytes, 3501851 average bytes",
"archived rollout files": "2 files, 216905 total bytes, 108452 average bytes",
"goals DB": "C:\\Users\\Vinicius\\.codex\\goals_1.sqlite (file)",
"goals DB integrity": "ok",
"log DB": "C:\\Users\\Vinicius\\.codex\\logs_2.sqlite (file)",
"log DB integrity": "ok",
"log dir": "C:\\Users\\Vinicius\\.codex\\log (dir)",
"memories DB": "C:\\Users\\Vinicius\\.codex\\memories_1.sqlite (file)",
"memories DB integrity": "ok",
"memories v2 DB": "C:\\Users\\Vinicius\\.codex\\memories_v2_1.sqlite (missing)",
"memories v2 DB integrity": "skipped (missing)",
"queue DB": "C:\\Users\\Vinicius\\.codex\\queue_1.sqlite (file)",
"queue DB integrity": "ok",
"sqlite home": "C:\\Users\\Vinicius\\.codex (dir)",
"standalone release cache": "1 entries in C:\\Users\\Vinicius\\.codex\\packages\\standalone\\releases",
"state DB": "C:\\Users\\Vinicius\\.codex\\state_5.sqlite (file)",
"state DB integrity": "ok",
"thread history DB": "C:\\Users\\Vinicius\\.codex\\thread_history_1.sqlite (file)",
"thread history DB integrity": "ok"
},
"remediation": null,
"durationMs": 106
},
"state.rollout_db_parity": {
"id": "state.rollout_db_parity",
"category": "threads",
"status": "warning",
"summary": "rollout files and state DB thread inventory differ",
"details": {
"default model provider": "openai",
"rollout DB active files": "10",
"rollout DB active rows": "9",
"rollout DB archive mismatches": "0",
"rollout DB archived files": "2",
"rollout DB archived rows": "2",
"rollout DB duplicate DB paths": "0",
"rollout DB duplicate rollout thread id sample": "01a0b98d-5109-7691-8bdd-70bef7aa5561",
"rollout DB duplicate rollout thread ids": "1",
"rollout DB malformed file names": "0",
"rollout DB missing active rows": "1",
"rollout DB missing active sample": "C:\\Users\\Vinicius\\.codex\\sessions\\2026\\09\\19\\rollout-2026-09-19T09-04-01-01a0b98d-5109-7691-8bdd-70bef7aa5561.jsonl",
"rollout DB missing archived rows": "0",
"rollout DB model providers": "openai=11",
"rollout DB rows": "11",
"rollout DB scan cap reached": "false",
"rollout DB scan errors": "0",
"rollout DB sources": "vscode=10, subagent:other=1",
"rollout DB stale rows": "0"
},
"issues": [
{
"severity": "warning",
"cause": "rollout files are missing from the state DB",
"measured": "1 active, 0 archived",
"expected": "every rollout file has a matching threads row",
"remedy": null,
"fields": []
},
{
"severity": "warning",
"cause": "duplicate thread inventory entries found",
"measured": "1 duplicate rollout thread ids, 0 duplicate DB paths",
"expected": "one rollout path and thread id per thread",
"remedy": "Attach the doctor report to a bug report so support can inspect samples.",
"fields": []
}
],
"remediation": null,
"durationMs": 20
},
"system.disk": {
"id": "system.disk",
"category": "disk",
"status": "ok",
"summary": "sufficient free disk space (87.5 GiB)",
"details": {
"CODEX_HOME available": "87.5 GiB",
"failure threshold": "1.0 GiB",
"warning threshold": "5.0 GiB",
"worktree available": "87.5 GiB"
},
"remediation": null,
"durationMs": 0
},
"system.environment": {
"id": "system.environment",
"category": "system",
"status": "ok",
"summary": "OS language en-US",
"details": {
"EDITOR": "not set",
"VISUAL": "not set",
"os": "Windows 10.0.26200 (Windows 11 Professional) [64-bit]",
"os language": "en-US",
"os type": "Windows",
"os version": "10.0.26200"
},
"remediation": null,
"durationMs": 0
},
"terminal.env": {
"id": "terminal.env",
"category": "terminal",
"status": "ok",
"summary": "terminal metadata was detected",
"details": {
"color output": "enabled",
"console input code page": "850",
"console output code page": "850",
"stderr console mode": "0x00000007 (VT processing: true)",
"stderr is terminal": "true",
"stdin is terminal": "true",
"stdout console mode": "0x00000007 (VT processing: true)",
"stdout is terminal": "true",
"terminal": "unknown",
"terminal size": "120x30"
},
"remediation": null,
"durationMs": 0
},
"terminal.title": {
"id": "terminal.title",
"category": "title",
"status": "ok",
"summary": "terminal title default",
"details": {
"terminal title activity": "true",
"terminal title items": "activity, project-name",
"terminal title project source": "cwd",
"terminal title project value": "System32",
"terminal title source": "default"
},
"remediation": null,
"durationMs": 0
},
"updates.status": {
"id": "updates.status",
"category": "updates",
"status": "ok",
"summary": "update configuration is locally consistent",
"details": {
"cached latest version": "0.157.0",
"check for update on startup": "true",
"last checked at": "2026-09-25T10:23:35.213538200Z",
"latest version": "0.157.0",
"latest version status": "current version is not older",
"update action": "standalone installer",
"version cache": "C:\\Users\\Vinicius\\.codex\\version.json"
},
"remediation": null,
"durationMs": 1136
}
}
}What issue are you seeing?
When I start Codex CLI normally on Windows using:
codex
Codex starts successfully, but two additional visible console windows open automatically.
The extra windows remain open while Codex is running.
The issue does not occur when I start Codex with:
codex --no-daemon
I inspected the running processes and found that the managed app-server daemon starts Node helper processes which receive visible conhost.exe instances.
Observed process tree:
codex.exe app-server --listen unix:// --managed-daemon
├─ node_repl.exe
│ └─ conhost.exe
└─ node.exe
├─ conhost.exe
└─ node_repl.exe
The relevant daemon executable is:
~\.codex\packages\app-server-daemon\releases\0.157.0-x86_64-pc-windows-msvc\bin\codex.exe
The CLI itself works correctly. The problem appears to be that helper processes launched by the managed daemon receive visible console windows instead of running headless/in the background.
Using codex --no-daemon avoids the issue.
### What steps can reproduce the bug?
```markdown
1. Install Codex CLI 0.157.0 on Windows using the official standalone Windows installer.
2. Open a non-elevated PowerShell terminal.
3. Run:
```powershell
codex
Codex starts normally.
Two additional console windows open automatically.
Leave Codex and the two windows open and inspect the process tree. The managed daemon can be seen spawning node.exe / node_repl.exe processes with conhost.exe.
Exit Codex.
Start it again using:
codex --no-daemon
Codex starts without the two additional visible console windows.
The behavior is consistently reproducible with codex, while codex --no-daemon avoids it.
### What is the expected behavior?
Running:
```powershell
codex
should start the Codex CLI and its managed daemon without opening additional visible console windows.
Background helper processes such as node.exe, node_repl.exe, and their console hosts should run headlessly/hidden unless a visible terminal is explicitly required.
### Additional information
Esse campo é importante porque temos um diagnóstico bem melhor do que apenas "duas janelas aparecem". Coloque:
```markdown
I also inspected the Windows process tree while the issue was occurring.
The CLI process I launched was:
```text
C:\Users\<user>\AppData\Local\Programs\OpenAI\Codex\bin\codex.exe
The shared managed daemon was running as:
codex.exe app-server --listen unix:// --managed-daemon
Its child processes included:
node_repl.exe
└─ conhost.exe
node.exe
├─ conhost.exe
└─ node_repl.exe
There are also other Codex app-server processes on the machine from the OpenAI/ChatGPT VS Code extension, but the visible console behavior correlates with the managed daemon.
The Codex CLI was installed using the official Windows installer:
powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"
I originally also had the npm installation, but switched to the standalone installation. The behavior remained related to the managed daemon rather than the PATH/install method.
codex --no-daemon works without opening the extra windows.
I can provide additional process-tree output or test a patched build if needed.Reacted by dbaula, Darsh Jaiswal, Locietta, Kasper Kirkegaard, Cecil Zorg, AlexIn.Tech, thynome and privacyguy123
Metadata
Metadata
Assignees
Labels
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 25, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
gggtwi commentedon Sep 25, 2026
I encountered the same issue when using codex-cli via cmd in VS Code, where Codex launched a bunch of visible cmd and PowerShell windows.
gggtwi commentedon Sep 25, 2026
The following is the information provided by Codex.
Title: Windows: codex-code-mode-host.exe briefly opens a visible terminal window during tool calls
Description
On Windows 11, Codex repeatedly opens a short-lived terminal window while running tools. The process shown in the window is codex-code-mode-host.exe from app-server daemon version 0.157.0.
Steps to reproduce
Use Codex on Windows.
Trigger a tool call backed by the code mode host. A trivial functions.exec call containing only text("test") is sufficient.
Observe a terminal window briefly appear on the desktop.
Expected behavior
Tool calls run without opening a visible terminal window.
Actual behavior
A terminal window briefly appears. This also happens when shell commands are run with tty: true. No cmd.exe or PowerShell command is needed to reproduce it.
Environment
Windows 11
Codex app-server daemon 0.157.0
Executable: C:\Users<user>.codex\packages\app-server-daemon\releases\0.157.0-x86_64-pc-windows-msvc\bin\codex-code-mode-host.exe
Troubleshooting performed
Confirmed that codex-code-mode-host.exe is launched by the app-server daemon’s codex.exe.
Confirmed that the host executable uses the Windows console subsystem.
Tested both Windows Terminal and Windows Console Host as the default terminal; the popup persisted. The original terminal setting was restored.
Confirmed that setting tty: true on exec_command does not prevent the host window from appearing.
yangda2024-cyber commentedon Sep 25, 2026
Additional Windows reproduction from an npm installation:
@openai/codex0.157.0 on Windows; running plaincodexfrom CMD opens several visible console windows, some of which close on their own.codex --no-daemonavoids the popups.npm install -g @openai/[email protected]from PowerShell failed withEBUSY: resource busy or locked, copyfilewhile npm tried to movecodex-code-mode-host.exefrom the current package to a temporary.codex-*directory. This suggests a running Codex helper can also block an npm downgrade.Expected: plain
codexshould not create visible helper consoles, and helper processes should not leave the CLI package locked after exit.MarcusNeufeldt commentedon Sep 25, 2026
Same here on Windows 11, Codex CLI 0.157.0 (standalone installer), Windows Terminal set as the default terminal.
It's not just the node helpers. Every console child that the managed daemon (
app-server --listen unix:// --managed-daemon) starts gets its own visible window:hooks.jsoncommand runs aspowershell.exe -NoProfile -Command "<hook>"with the daemon as parent. With PreToolUse/PostToolUse hooks configured, that's a window on every tool call. Each spawn is followed ~1s later byOpenConsole.exe -Embedding, i.e. the default-terminal handoff to Windows Terminal.node.exe,python.exe -m <server>,node_repl.exe, a.exeMCP server). I recorded 5 Windows Terminal windows titled with those executables within ~2s, plus a few morePseudoConsoleWindows.Shell tool calls (
pwsh.exefrom the bundled runtime) did not open a window in the same capture. So it looks like the hook runner and the MCP stdio launcher are missingCREATE_NO_WINDOW(or aren't inheriting a hidden console) when the parent is the detached daemon.What worked for me:
codex --no-daemon, or[features] daemon_auto_start = falseinconfig.toml, so new sessions don't auto-start the daemon.The downside is that I use remote control, which needs the daemon, so neither is a real fix for that setup.
yhb8746779 commentedon Sep 25, 2026
the same thing
baburabbasi commentedon Sep 25, 2026
I can reproduce this on Codex CLI 0.157.0 / Windows 11, launched from the VS Code integrated terminal inside a Git repository.
My case appears to be a more severe variant of the visible-console regression:
I have not yet confirmed whether
codex --no-daemonsuppresses the issue in my setup.This may overlap with the managed-daemon console-window bug described here, but the rapid repeated Git/helper-window spawning during an active task seems worth noting because it is substantially more frequent than just two extra windows at startup.
I can provide a short screen recording and additional diagnostics if useful.
BANG404 commentedon Sep 25, 2026
Additional reproduction on Windows 11 with a standard (non-elevated) PowerShell terminal.
Environment:
bun pm ls -g --depth 0reports@openai/[email protected])When Codex starts and CUA/browser integration is active, one or more visible console windows are opened for the bundled helper:
The path is listed as
nodeReplPathin the generatedchrome-native-hosts-v2.jsonnative-host configuration. The helper is expected to run as a background/native-messaging process, but its console window becomes visible under a non-elevated launch. The Codex functionality otherwise continues to work.The behavior differs when launching from an elevated terminal, so this may be related to Windows console inheritance or missing hidden-window creation flags when the managed daemon/native host starts the helper.
Expected:
node_repl.exeand other non-interactive CUA helpers should not create visible console windows.brodrigz commentedon Sep 25, 2026
Reproducible on Windows 10 as well
foxsalaf commentedon Sep 26, 2026
Repro plus some detail on which two windows these are in a default install, and confirmation of the
daemon_auto_startworkaround.Environment: Windows 11 Pro N (10.0.26200),
@openai/codex0.157.0 from npm, launched as plaincodexfromcmd.exe. Codex desktop app installed but not running. No user-defined MCP servers apart from what the desktop app writes intoconfig.toml.Symptom: two console windows appear a few seconds after every TUI start, titled
…\AppData\Local\OpenAI\Codex\runtimes\cua_node\<hash>\bin\node_repl.exeand…\bin\node.exe. They stay open for the whole session and come back when closed.Process tree (
Win32_Process): both windows belong to children ofcodex.exe app-server --listen unix:// --managed-daemon, which itself has no console. They are exactly the two stdio MCP servers a default install has:mcp_servers.node_replinconfig.toml(written by the desktop app) →node_repl.execua_replfrom the bundled pluginunified-computer-use@openai-bundled(plugins/cache/openai-bundled/unified-computer-use/26.908.70816/.mcp.json) →node.exe …\@oai\cua-repl\bin\cua-repl.mjs(this one spawns a secondnode_repl.exethat shares its console, so it does not add a third window)So, unlike the observation in #48023, direct
.exelaunches also get a window here. The deciding factor is not.cmdvs.exe: the detached daemon has no console, so every console-subsystem child allocates its own. Settingenabled = falseonnode_replonly removes one of the two windows.Workaround confirmed:
On the next
codexstart there is noapp-serverprocess, and the very same two MCP servers run as children of the TUIcodex.exewithMainWindowHandle = 0, i.e. no window (checked withGet-Process).--no-daemongives the same result, as noted above.Minor:
codex app-server daemon stopreturned{"status":"stopped"}but left thecodex.exe app-server daemon pid-update-loopprocess running; it had to be killed by hand.missingus3r commentedon Sep 26, 2026
Same issue here
DreamEnding commentedon Sep 26, 2026
Same issue here
xhocquet commentedon Sep 26, 2026
Also seeing this, how was this not caught in tests? Really sloppy.
mars70s commentedon Sep 27, 2026
Possibly related additional data point from Codex CLI 0.157.1 on Windows 11 x64.
Environment:
sandbox = "unelevated"During a Codex session, a Git subprocess failed to launch with:
[error 2147942632 (0x800700e8) when launching
'"git" -c safe.bareRepository=explicit -c core.hooksPath=NUL -c core.fsmonitor=false remote -v']
I then tested the same repository directly from PowerShell.
The following all succeeded with exit code 0:
git rev-parse HEADgit status --shortgit remote -vgit -c safe.bareRepository=explicit -c core.hooksPath=NUL -c core.fsmonitor=false remote -vSo I found no indication that the repository, Git executable, or command arguments themselves were failing.
I have also seen the same
0x800700e8process-launch error previously with a different Git subcommand (git rev-parse HEAD).I exited the Codex CLI and started it again. Immediately after restart, I ran the same three read-only diagnostics from Codex and all completed successfully. The failure did not reproduce on that single post-restart test.
So my current observation is:
0x800700e8across more than one Git subcommandThis may indicate a transient/session-state-dependent Windows subprocess-launch problem, but I do not have enough evidence to say it is the same root cause as the visible-console-window issue.
I preserved the local diagnostic outputs and SHA-256 hashes if additional details would be useful.
thornos78 commentedon Sep 27, 2026
Additional Windows reproduction on 2026-09-27, from a Codex Desktop task using the managed PowerShell-capable command path:
When new task messages/tool work started, visible console windows recurred intermittently. A 60-second process watch after the normal managed-daemon bootstrap recorded 28 relevant process starts and 2 foreground-owner changes. Captured chains included the Codex-managed daemon starting
git.exeandcodex-windows-sandbox-setup.exewithconhost.exe, andcodex-command-runner→pwsh.exe→conhost.exe, followed by visible Windows Terminal/OpenConsole activity. A hidden-daemon workaround avoided windows in one test but did not survive the normal managed bootstrap reliably.This suggests the issue is in Codex's Windows managed-helper/console launch path rather than a PowerShell profile alone; the exact root cause remains unconfirmed. Please cross-reference the related daemon/helper and code-mode-host reports, and clarify the supported workaround or fixed version.
Repeated reproduction and diagnosis of this apparent product bug consumed a substantial amount of our included Codex usage. We are also requesting an account-usage review and a one-time reset/credit if any goodwill adjustment is available.
Tinywan commentedon Sep 28, 2026
Same issue here
Tinywan commentedon Sep 28, 2026
• 对,daemon_auto_start = false 不等于默认添加 --no-daemon。当前版本没有 config.toml 对应项。
你已经有 codex 包装函数,编辑:
C:\Users\tinywan\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
把第 23 行从:
& "C:\Users\tinywan\AppData\Local\Programs\OpenAI\Codex\bin\codex.exe" @Args
改成:
& "C:\Users\tinywan\AppData\Local\Programs\OpenAI\Codex\bin\codex.exe" --no-daemon @Args
完整函数为:
function codex {
Sync-AiSkillsQuietly
& "C:\Users\tinywan\AppData\Local\Programs\OpenAI\Codex\bin\codex.exe" --no-daemon @Args
}
保存后重新加载:
. $PROFILE
以后直接执行:
codex
实际就相当于:
codex.exe --no-daemon
etraut-openai commentedon Sep 29, 2026
We're using #48074 to track this issue, and we're working on a fix. Version 0.158.0 contains a partial fix, but some users are still seeing the problem. We've identified a few additional code paths that require the same fix. I'll post updates to #48074.