Skip to content

Windows: Codex CLI 0.157.0 flashes visible helper console windows during local work #48152

Closed as duplicate

Description

@darsh-jaiswal

What version of Codex CLI is running?

codex-cli 0.157.0

What subscription do you have?

ChatGPT Plus

Which model were you using?

GPT-6-Sol-medium-fast.

What platform is your computer?

Windows 11 x64, OS version 10.0.26200.0

What terminal emulator and version are you using (if applicable)?

Windows Terminal 1.24.11911.0; Windows PowerShell 5.1

Codex doctor report

{
  "schemaVersion": 1,
  "generatedAt": "1790358201s 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\\REDACTED\\.codex\\app-server-control\\app-server-control.sock",
        "daemon state dir": "C:\\Users\\REDACTED\\.codex\\app-server-daemon",
        "dedicated pid file": "C:\\Users\\REDACTED\\.codex\\app-server-daemon\\daemon.pid (file)",
        "dedicated update-loop pid file": "C:\\Users\\REDACTED\\.codex\\app-server-daemon\\daemon-updater.pid (file)",
        "mode": "ephemeral",
        "pid file": "C:\\Users\\REDACTED\\.codex\\app-server-daemon\\app-server.pid (missing)",
        "settings": "C:\\Users\\REDACTED\\.codex\\app-server-daemon\\settings.json (missing)",
        "status": "running",
        "update-loop pid file": "C:\\Users\\REDACTED\\.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\\REDACTED\\.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\\REDACTED\\.codex",
        "active thread overrides": "not inspected",
        "config.toml": "C:\\Users\\REDACTED\\.codex\\config.toml",
        "config.toml parse": "ok",
        "configuration load ms": "19",
        "configuration scope": "invocation config, including cloud-managed policy",
        "cwd": "C:\\Users\\REDACTED\\Desktop\\REDACTED_PROJECT",
        "enabled feature flags": "<redacted>",
        "feature flag overrides": "none",
        "feature flags enabled": "53",
        "log dir": "C:\\Users\\REDACTED\\.codex\\log",
        "mcp servers": "2",
        "model": "gpt-6-sol",
        "model provider": "openai",
        "sqlite home": "C:\\Users\\REDACTED\\.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": 5
    },
    "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\\REDACTED\\AppData\\Roaming\\npm\\codex.cmd",
        "current executable": "C:\\Users\\REDACTED\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin\\codex.exe",
        "install context": "npm (package C:\\Users\\REDACTED\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc, bin C:\\Users\\REDACTED\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin, resources C:\\Users\\REDACTED\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-resources, path C:\\Users\\REDACTED\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-path)",
        "managed by Vite+": "false",
        "managed by bun": "false",
        "managed by npm": "true",
        "managed by pnpm": "false",
        "managed package root": "C:\\Users\\REDACTED\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex",
        "npm update target": "not inspected (PATH helpers are not executed)"
      },
      "remediation": null,
      "durationMs": 3
    },
    "mcp.config": {
      "id": "mcp.config",
      "category": "mcp",
      "status": "warning",
      "summary": "MCP configuration has optional issues",
      "details": {
        "configured servers": "2",
        "disabled servers": "1",
        "node_repl": "env var CODEX_WINDOWS_REGISTERED_CORE is not set",
        "stdio servers": "2"
      },
      "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": 154
    },
    "network.websocket_reachability": {
      "id": "network.websocket_reachability",
      "category": "websocket",
      "status": "ok",
      "summary": "Responses WebSocket handshake succeeded",
      "details": {
        "DNS": "2 IPv4, 0 IPv6, first IPv4",
        "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": 1599
    },
    "runtime.provenance": {
      "id": "runtime.provenance",
      "category": "runtime",
      "status": "ok",
      "summary": "running npm on windows-x86_64",
      "details": {
        "commit": "unknown",
        "current executable": "C:\\Users\\REDACTED\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin\\codex.exe",
        "install method": "npm (package C:\\Users\\REDACTED\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc, bin C:\\Users\\REDACTED\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin, resources C:\\Users\\REDACTED\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-resources, path C:\\Users\\REDACTED\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\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\\REDACTED\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\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": "<redacted>"
      },
      "remediation": null,
      "durationMs": 0
    },
    "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": 31
    },
    "state.paths": {
      "id": "state.paths",
      "category": "state",
      "status": "ok",
      "summary": "state paths and databases are inspectable",
      "details": {
        "CODEX_HOME": "C:\\Users\\REDACTED\\.codex (dir)",
        "active rollout files": "129 files, 189994031 total bytes, 1472821 average bytes",
        "archived rollout files": "0 files, 0 total bytes, 0 average bytes",
        "goals DB": "C:\\Users\\REDACTED\\.codex\\goals_1.sqlite (file)",
        "goals DB integrity": "ok",
        "log DB": "C:\\Users\\REDACTED\\.codex\\logs_2.sqlite (file)",
        "log DB integrity": "ok",
        "log dir": "C:\\Users\\REDACTED\\.codex\\log (missing)",
        "memories DB": "C:\\Users\\REDACTED\\.codex\\memories_1.sqlite (file)",
        "memories DB integrity": "ok",
        "memories v2 DB": "C:\\Users\\REDACTED\\.codex\\memories_v2_1.sqlite (missing)",
        "memories v2 DB integrity": "skipped (missing)",
        "queue DB": "C:\\Users\\REDACTED\\.codex\\queue_1.sqlite (file)",
        "queue DB integrity": "ok",
        "sqlite home": "C:\\Users\\REDACTED\\.codex (dir)",
        "state DB": "C:\\Users\\REDACTED\\.codex\\state_5.sqlite (file)",
        "state DB integrity": "ok",
        "thread history DB": "C:\\Users\\REDACTED\\.codex\\thread_history_1.sqlite (file)",
        "thread history DB integrity": "ok"
      },
      "remediation": null,
      "durationMs": 296
    },
    "state.rollout_db_parity": {
      "id": "state.rollout_db_parity",
      "category": "threads",
      "status": "ok",
      "summary": "rollout files and state DB thread inventory agree",
      "details": {
        "default model provider": "openai",
        "rollout DB active files": "129",
        "rollout DB active rows": "129",
        "rollout DB archive mismatches": "0",
        "rollout DB archived files": "0",
        "rollout DB archived rows": "0",
        "rollout DB duplicate DB paths": "0",
        "rollout DB duplicate rollout thread ids": "0",
        "rollout DB malformed file names": "0",
        "rollout DB missing active rows": "0",
        "rollout DB missing archived rows": "0",
        "rollout DB model providers": "openai=129",
        "rollout DB rows": "129",
        "rollout DB scan cap reached": "false",
        "rollout DB scan errors": "0",
        "rollout DB sources": "vscode=64, subagent:other=29, cli=24, subagent:thread_spawn=11, exec=1",
        "rollout DB stale rows": "0"
      },
      "remediation": null,
      "durationMs": 108
    },
    "system.disk": {
      "id": "system.disk",
      "category": "disk",
      "status": "ok",
      "summary": "sufficient free disk space (54.6 GiB)",
      "details": {
        "CODEX_HOME available": "54.6 GiB",
        "failure threshold": "1.0 GiB",
        "warning threshold": "5.0 GiB",
        "worktree available": "54.6 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 CoreSingleLanguage) [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": "437",
        "console output code page": "437",
        "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": "REDACTED_PROJECT",
        "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-25T11:04:36.910720Z",
        "latest version": "0.157.0",
        "latest version status": "current version is not older",
        "npm update target": "not inspected (PATH helpers are not executed)",
        "update action": "npm install -g @openai/codex",
        "version cache": "C:\\Users\\REDACTED\\.codex\\version.json"
      },
      "remediation": null,
      "durationMs": 729
    }
  }
}

What issue are you seeing?

While using Codex CLI 0.157.0 in Windows Terminal, separate console tabs for node_repl.exe and codex-code-mode-host.exe appear in front of my work. This happens when I open Codex CLI or submit a prompt that triggers local work. I have also seen a PowerShell window flash, but have not confirmed its process details.

Expected: these background helpers run without opening visible tabs or stealing focus.

Image Image Image

What steps can reproduce the bug?

  1. Open Windows Terminal with a PowerShell tab in a local folder.
  2. Run codex (CLI version 0.157.0).
  3. Submit a prompt that makes Codex perform local work, such as inspecting files or running a command.
  4. Observe separate terminal tabs/windows appear for node_repl.exe and codex-code-mode-host.exe. They flash or come to the foreground while Codex is working.

I have also observed a PowerShell window flash, but have not captured its exact process details. The behavior can occur when starting Codex or during a prompt. No specific code snippet or thread ID is required to trigger it.

What is the expected behavior?

Codex should run its background helpers without opening separate terminal tabs or windows, flashing on screen, or taking focus from my active terminal.

Additional information

This occurs with Codex CLI 0.157.0 on Windows 11. The Codex desktop app was not running when I generated the doctor report. The doctor report shows the background server running and the installation consistent. Similar behavior has been reported in #46949, #37599, and #18984.

Activity

  1. added
    CLIIssues related to the Codex CLI
    windows-osIssues related to Codex on Windows systems
    on Sep 25, 2026
  2. darsh-jaiswal commented on Sep 25, 2026

    @darsh-jaiswal
    Author

    Possible cause: Codex 0.157.0 enabled automatic app-server daemon startup by default (https://github.com/openai/codex/releases/tag/rust-v0.157.0). My doctor report confirmed the background server was running. The daemon may be launching console-based helper processes without suppressing their Windows terminal windows .

    They must compare daemon startup and helper process creation in 0.156.0 and 0.157.0.

    I initially thought my PC was causing this. I rolled back to 0.156.0 without changing my terminal setup. The extra windows and flashing stopped, and Codex now works normally.

  3. RedArtem39 commented on Sep 25, 2026

    @RedArtem39

    Same here, same setup: codex-cli 0.157.0, Windows 11 10.0.26200, Windows Terminal 1.24.11911.0, PowerShell 5.1, default terminal left at "Let Windows decide". Started right after a reboot, i.e. the first launch with the daemon auto-started (#47179).

    Process chain captured while Codex was reviewing a repo (read-only git/grep commands), sampled every 0.7 s:

    codex.exe (app-server-daemon\releases\0.157.0\bin) -> powershell.exe -Command "try { [Console]::OutputEncoding=..." -> conhost.exe 0x4
    svchost.exe -> OpenConsole.exe -Embedding   (Windows Terminal default-terminal handoff, one per command)
    

    A new visible window every 5-8 s, one per tool command. The daemon has no console of its own, so each PowerShell child gets a fresh console, and on Windows 11 that console is handed to Windows Terminal as a new window. It looks like the child is created without CREATE_NO_WINDOW / hidden STARTUPINFO.

    Workaround: codex --no-daemon (commands run inside the launching terminal again).

  4. etraut-openai commented on Sep 29, 2026

    @etraut-openai
    Contributor

    We're using #48074 to track this, and we're working on a fix. I'll post updates there.

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 CLIbugSomething 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