Repository navigation
Description
What version of Codex CLI is running?
codex-cli 0.167.0 (npm installation, confirmed on November 8, 2026). The doctor update check reports that the installed CLI was current when checked.
What subscription do you have?
Not provided; this report concerns local Windows terminal/process behavior.
Which model were you using?
Configured default model: gpt-6-sol (from codex doctor --json). The model in every affected session has not been separately recorded.
What platform is your computer?
Windows 11 CoreSingleLanguage, x64, reported OS version 10.0.26300. Shell: Windows PowerShell 5.1.
What terminal emulator and version are you using (if applicable)?
Windows Terminal, running Windows PowerShell 5.1 (WT_SESSION present in doctor output). Windows Terminal's exact package version has not been captured. The visible symptom is rapid appearance/disappearance of additional terminal tabs or windows.
Codex doctor report
codex doctor --json succeeded. Selected, privacy-redacted diagnostic fields (not the full raw report):
{
"schemaVersion": 1,
"overallStatus": "warning",
"codexVersion": "0.167.0",
"appServer": {
"status": "running",
"version": "0.158.0",
"mode": "ephemeral"
},
"installation": {
"status": "ok",
"installMethod": "npm"
},
"desktopApp": {
"version": "26.1103.4239.0",
"running": false
},
"system": {
"os": "Windows 11 CoreSingleLanguage",
"osVersion": "10.0.26300",
"architecture": "x64"
},
"terminal": {
"name": "Windows Terminal",
"WT_SESSION": "present"
},
"configuredModel": "gpt-6-sol"
}Relevant finding: The CLI is at 0.167.0 while its running background app-server reports 0.158.0. This version mismatch may matter given earlier daemon/console-spawning reports, but it is not evidence by itself of a causal link. The doctor run does not independently prove that the affected TUI session uses that daemon. Authentication, network reachability, installation and terminal metadata checks passed. Other warning checks concern optional MCP environment variables, historical session/database path mismatches, and unverified Defender exclusions; none establishes the source of the flashing windows.
Update (2026-11-08): background daemon synchronized with CLI; window flashing no longer observed
After the initial report, I ran:
codex app-server daemon update --from-cli
codex doctor --jsonThe update command confirmed replacement of the daemon package and restart. Its returned status was updated with installedVersion: 0.167.0 and runningVersion: 0.167.0. A fresh doctor run independently confirmed:
- CLI: 0.167.0
- Running app-server: 0.167.0 (previously 0.158.0)
- App-server status: running, mode: ephemeral
- Overall doctor status: warning, because of other checks (not a daemon update failure).
- The daemon package was pinned to the CLI version; the update command said
codex app-server daemon updatecan be used later to return to production updates.
Reporter follow-up: After updating and restarting the daemon to 0.167.0, the additional terminal windows stopped appearing in the affected environment. The earlier flashing symptom is no longer observed. This is a successful local workaround/resolution, but it does not conclusively establish that the version mismatch caused the issue or that every Windows environment is fixed. I have not captured a process trace or run a controlled --no-daemon comparison. If the issue recurs, a sanitized process tree and timings would help investigate.
What issue are you seeing?
While using the Codex CLI interactively from PowerShell on Windows, an existing chat can be in the middle of generating a response when the terminal starts behaving unexpectedly:
- Multiple additional terminal tabs or console windows suddenly appear.
- They open and close rapidly, often within seconds.
- This happens during an ongoing response/task, not necessarily when I initially launch
codex. - I have encountered the symptom many times. I cannot yet confirm that it occurs on every prompt, or whether the windows correlate with specific shell/tool calls.
- It is visually disruptive and makes the running CLI session difficult to use normally.
I have not captured the process tree, window titles, exact spawned executable, error output, or a recording. I do not yet know whether these are new Windows Terminal tabs versus separate console windows, or whether the current Codex process/daemon itself is directly creating them. I am reporting the directly observed behavior rather than assuming a root cause.
What steps can reproduce the bug?
Intermittent reproduction based on repeated observations (not a deterministic minimal reproducer yet):
- On Windows 11, open PowerShell.
- Start an interactive Codex CLI session:
codex
- Submit a normal task/prompt and allow Codex to respond and continue its work. The issue has been noticed while a response is still in progress.
- Watch for additional terminal tabs/windows rapidly opening and closing while the Codex session is active.
- Continue using Codex over multiple prompts; I have seen the behavior recur.
Not yet isolated: specific prompt, number of concurrent sessions, whether the affected TUI is attached to the detected background app-server, configured Windows sandbox backend, whether a shell command is being executed at the instant of the popup, exact Windows Terminal version, and whether --no-daemon changes the result. The doctor report confirms a background app-server is running, but not the exact process responsible for the windows.
What is the expected behavior?
Codex should generate responses and execute any internal/helper/shell work without spawning visible extra terminal tabs or windows, stealing focus, or interfering with the existing PowerShell session. Any subprocess consoles that are not intended for the user should remain hidden/contained.
Additional information
Impact: Recurring, rapid window/tab flashes during active CLI work are distracting and reduce usability, especially during longer tasks.
Possibly related existing reports (please merge/close as duplicate if this is the same issue):
- Powershell terminals poping up in windows #49976 — PowerShell terminals popping up in Windows (open; reports a possible
--no-daemondistinction). - [Windows] Every shell command spawns a visible console window #50892 — Every shell command spawns a visible console window on Windows (open).
- Windows: secondary Codex session spawns visible console windows for child executable calls #44856 — Secondary Codex session spawns visible console windows (open; concurrency may be relevant, not verified here).
- Windows: terminal windows repeatedly flash during requests after installing the Codex daemon #48074 — Terminal windows repeatedly flashing during requests after installing the daemon (previously closed as completed).
- Windows: visible console windows flash for shell process children on every session/turn #48422 — Visible console windows from shell-process children (closed as duplicate).
I am filing this observation because I have encountered the behavior repeatedly during an ongoing interactive response. I have not verified that this is a new regression or a different underlying bug from the reports above.
Follow-up outcome: On this affected Windows machine, flashing stopped after synchronizing the background app-server from 0.158.0 to the matching CLI version 0.167.0. The update and post-update doctor checks were captured; a detailed process trace and a controlled --no-daemon comparison were not. The underlying source-level root cause remains unverified.
Activity
secheverrianogal-beep commentedon Nov 8, 2026
Proposed remediation (investigation direction; not implemented)
Please identify the exact process responsible before assigning a root cause. Capture a sanitized process tree and correlate visible window creation with the child-process launch site. Centralize Windows subprocess launch policy so background/helper processes explicitly request the intended window visibility and do not accidentally inherit a visible console or steal focus.
Treat CLI/app-server version alignment as a diagnostic dimension only. The reported version mismatch was later corrected, but the issue itself states that an interactive retest is still pending; that does not prove the mismatch caused the flashing.
Regression coverage: interactive CLI, shell/tool subprocesses, daemon and no-daemon modes, matching/mismatched app-server versions, Windows Terminal and classic console hosts. Assert that helper processes do not create visible windows.
Consolidated proposal index: #60227 (section 8).
harshjohiya commentedon Nov 8, 2026
Reporter follow-up (2026-11-08): The terminal-window flashing has stopped after running
codex app-server daemon update --from-cliand confirming viacodex doctor --jsonthat both the CLI and running daemon are now0.167.0(daemon was previously0.158.0). Thank you for the suggested investigation direction. This is the observed outcome on my machine, not proof that the version mismatch was the root cause. I have updated the issue description with the result. No controlled--no-daemoncomparison or process trace was captured. I'm leaving the issue open for maintainers to assess possible duplication or broader fixes.secheverrianogal-beep commentedon Nov 8, 2026
Maintainer questions and proposed validation
Thanks for the follow-up: the reporter now confirms that the flashing stopped after
codex app-server daemon update --from-clialigned the running app-server from0.158.0to CLI0.167.0. That is a useful before/after observation, but it does not isolate the cause because no controlled process trace or--no-daemoncomparison was captured.I checked the current
mainimplementation ofcodex-rs/app-server-daemon/src/backend/pid_start.rs: the Windows daemon launch currently usesCREATE_NO_WINDOW | DETACHED_PROCESS | CREATE_BREAKAWAY_FROM_JOB. This is consistent with the general goal of preventing the detached daemon itself from allocating a visible console. It does not, by itself, prove that every descendant launch path (Git metadata, legacy sandbox, hooks, MCP/code-mode helpers) is covered.There is substantial overlap with existing reports:
Questions for maintainers
0.167.0daemon include the relevant fixes across all child-process paths, particularly Git metadata collection and the legacy Windows sandbox when stdio is piped? If not, which issue/PR tracks the remaining gaps?codex app-server daemon update --from-clithe recommended supported recovery when the CLI and managed daemon versions differ, and shouldcodex doctorsurface a stronger warning or remediation when they do?/status, redactedcodex doctor --json, a process-start/window-event trace, or a/feedbacksession upload? Please specify any fields that should be removed before sharing.Proposed validation (not yet performed by us): on the affected Windows setup, repeat equivalent shell/tool activity with the aligned daemon, record the CLI and app-server versions, and compare normal daemon-backed execution with
codex --no-daemon. If flashing recurs, capture the parent/child process names and timestamps and submit the session through/feedback. Avoid disabling Git metadata, hooks, or sandboxing as a workaround.No source change or PR is being claimed here. The current evidence supports a successful local workaround after daemon alignment; it does not yet establish a universal root cause.