Skip to content

[Windows] Codex CLI 0.158.0 inserts raw [M mouse sequences into prompt #49071

Closed

Description

@HSodergrenADI

What version of Codex CLI is running?

0.158.0

What subscription do you have?

Business

Which model were you using?

gpt-6-Sol xhigh

What platform is your computer?

Windows

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

Rider

Codex doctor report

{
  "schemaVersion": 1,
  "generatedAt": "1790626953s since unix epoch",
  "overallStatus": "warning",
  "codexVersion": "0.158.0",
  "checks": {
    "app_server.status": {
      "id": "app_server.status",
      "category": "app-server",
      "status": "ok",
      "summary": "background server is running",
      "details": {
        "app-server version": "0.158.0",
        "control socket": "C:\\Users\\hamilton.sodergren\\.codex\\app-server-control\\app-server-control.sock",
        "daemon state dir": "C:\\Users\\hamilton.sodergren\\.codex\\app-server-daemon",
        "dedicated pid file": "C:\\Users\\hamilton.sodergren\\.codex\\app-server-daemon\\daemon.pid (file)",
        "dedicated update-loop pid file": "C:\\Users\\hamilton.sodergren\\.codex\\app-server-daemon\\daemon-updater.pid (file)",
        "mode": "ephemeral",
        "pid file": "C:\\Users\\hamilton.sodergren\\.codex\\app-server-daemon\\app-server.pid (missing)",
        "settings": "C:\\Users\\hamilton.sodergren\\.codex\\app-server-daemon\\settings.json (missing)",
        "status": "running",
        "update-loop pid file": "C:\\Users\\hamilton.sodergren\\.codex\\app-server-daemon\\app-server-updater.pid (missing)"
      },
      "remediation": null,
      "durationMs": 44
    },
    "auth.credentials": {
      "id": "auth.credentials",
      "category": "auth",
      "status": "ok",
      "summary": "auth is configured",
      "details": {
        "auth file": "C:\\Users\\hamilton.sodergren\\.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": 1
    },
    "config.load": {
      "id": "config.load",
      "category": "config",
      "status": "ok",
      "summary": "config loaded",
      "details": {
        "CODEX_HOME": "C:\\Users\\hamilton.sodergren\\.codex",
        "active thread overrides": "not inspected",
        "config.toml": "C:\\Users\\hamilton.sodergren\\.codex\\config.toml",
        "config.toml parse": "ok",
        "configuration load ms": "22",
        "configuration scope": "invocation config, including cloud-managed policy",
        "cwd": "C:\\Users\\hamilton.sodergren\\Desktop\\ALD Repos\\ALDClaims\\ALD_Infrastructure",
        "enabled feature flags": "<redacted>",
        "feature flag overrides": "experimental_windows_sandbox=true",
        "feature flags enabled": "54",
        "log dir": "C:\\Users\\hamilton.sodergren\\.codex\\log",
        "mcp servers": "1",
        "model": "gpt-6-sol",
        "model provider": "openai",
        "sqlite home": "C:\\Users\\hamilton.sodergren\\.codex"
      },
      "remediation": null,
      "durationMs": 1
    },
    "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": {
        ".git entry": "directory",
        "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": "true",
        "repo root": "C:\\Users\\hamilton.sodergren\\Desktop\\ALD Repos\\ALDClaims",
        "selected git": "C:\\Program Files\\Git\\cmd\\git.exe"
      },
      "remediation": null,
      "durationMs": 50
    },
    "git.worktree.dev_drive": {
      "id": "git.worktree.dev_drive",
      "category": "git",
      "status": "warning",
      "summary": "this worktree is not on a Windows Dev Drive; moving it to a trusted Dev Drive can significantly improve repository and filesystem performance",
      "details": {},
      "remediation": "create a trusted Windows Dev Drive for source repositories: https://learn.microsoft.com/en-us/<redacted>",
      "durationMs": 2
    },
    "installation": {
      "id": "installation",
      "category": "install",
      "status": "ok",
      "summary": "installation looks consistent",
      "details": {
        "PATH codex #1": "C:\\Users\\hamilton.sodergren\\AppData\\Roaming\\npm\\codex.cmd",
        "current executable": "C:\\Users\\hamilton.sodergren\\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\\hamilton.sodergren\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc, bin C:\\Users\\hamilton.sodergren\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin, resources C:\\Users\\hamilton.sodergren\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-resources, path C:\\Users\\hamilton.sodergren\\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\\hamilton.sodergren\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex",
        "npm update target": "not inspected (PATH helpers are not executed)"
      },
      "remediation": null,
      "durationMs": 39
    },
    "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": 247
    },
    "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": 2170
    },
    "runtime.provenance": {
      "id": "runtime.provenance",
      "category": "runtime",
      "status": "ok",
      "summary": "running npm on windows-x86_64",
      "details": {
        "commit": "unknown",
        "current executable": "C:\\Users\\hamilton.sodergren\\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\\hamilton.sodergren\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc, bin C:\\Users\\hamilton.sodergren\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin, resources C:\\Users\\hamilton.sodergren\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-resources, path C:\\Users\\hamilton.sodergren\\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.158.0"
      },
      "remediation": null,
      "durationMs": 1
    },
    "runtime.search": {
      "id": "runtime.search",
      "category": "search",
      "status": "ok",
      "summary": "search command found (bundled); execution not verified",
      "details": {
        "search command": "C:\\Users\\hamilton.sodergren\\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": 1
    },
    "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": "ok",
      "summary": "no supported endpoint protection detected",
      "details": {
        "endpoint products": "none detected"
      },
      "remediation": null,
      "durationMs": 179
    },
    "state.paths": {
      "id": "state.paths",
      "category": "state",
      "status": "ok",
      "summary": "state paths and databases are inspectable",
      "details": {
        "CODEX_HOME": "C:\\Users\\hamilton.sodergren\\.codex (dir)",
        "active rollout files": "648 files, 712745430 total bytes, 1099915 average bytes",
        "archived rollout files": "0 files, 0 total bytes, 0 average bytes",
        "goals DB": "C:\\Users\\hamilton.sodergren\\.codex\\goals_1.sqlite (file)",
        "goals DB integrity": "ok",
        "log DB": "C:\\Users\\hamilton.sodergren\\.codex\\logs_2.sqlite (file)",
        "log DB integrity": "ok",
        "log dir": "C:\\Users\\hamilton.sodergren\\.codex\\log (dir)",
        "memories DB": "C:\\Users\\hamilton.sodergren\\.codex\\memories_1.sqlite (file)",
        "memories DB integrity": "ok",
        "memories v2 DB": "C:\\Users\\hamilton.sodergren\\.codex\\memories_v2_1.sqlite (missing)",
        "memories v2 DB integrity": "skipped (missing)",
        "queue DB": "C:\\Users\\hamilton.sodergren\\.codex\\queue_1.sqlite (file)",
        "queue DB integrity": "ok",
        "sqlite home": "C:\\Users\\hamilton.sodergren\\.codex (dir)",
        "state DB": "C:\\Users\\hamilton.sodergren\\.codex\\state_5.sqlite (file)",
        "state DB integrity": "ok",
        "thread history DB": "C:\\Users\\hamilton.sodergren\\.codex\\thread_history_1.sqlite (file)",
        "thread history DB integrity": "ok"
      },
      "remediation": null,
      "durationMs": 3876
    },
    "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": "648",
        "rollout DB active rows": "648",
        "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=648",
        "rollout DB rows": "648",
        "rollout DB scan cap reached": "false",
        "rollout DB scan errors": "0",
        "rollout DB sources": "cli=641, vscode=6, subagent:review=1",
        "rollout DB stale rows": "0"
      },
      "remediation": null,
      "durationMs": 46029
    },
    "system.disk": {
      "id": "system.disk",
      "category": "disk",
      "status": "ok",
      "summary": "sufficient free disk space (620.9 GiB)",
      "details": {
        "CODEX_HOME available": "620.9 GiB",
        "failure threshold": "1.0 GiB",
        "warning threshold": "5.0 GiB",
        "worktree available": "620.9 GiB"
      },
      "remediation": null,
      "durationMs": 1
    },
    "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": 3
    },
    "terminal.env": {
      "id": "terminal.env",
      "category": "terminal",
      "status": "warning",
      "summary": "height 23 rows - content may scroll off (recommended >=24)",
      "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": "Apple Terminal",
        "terminal size": "403x23"
      },
      "issues": [
        {
          "severity": "warning",
          "cause": "height 23 rows - content may scroll off (recommended >=24)",
          "measured": "403 x 23",
          "expected": ">= 24 rows",
          "remedy": "resize the window to at least 24 rows",
          "fields": [
            "terminal size"
          ]
        }
      ],
      "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": "git repo root",
        "terminal title project value": "ALDClaims",
        "terminal title source": "default"
      },
      "remediation": null,
      "durationMs": 1
    },
    "updates.status": {
      "id": "updates.status",
      "category": "updates",
      "status": "ok",
      "summary": "update configuration is locally consistent",
      "details": {
        "cached latest version": "0.158.0",
        "check for update on startup": "true",
        "desktop application": "OpenAI.Codex",
        "desktop latest build": "26.924.2738.0",
        "desktop update status": "available",
        "last checked at": "2026-09-28T14:48:50.056487600Z",
        "latest version": "0.158.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\\hamilton.sodergren\\.codex\\version.json"
      },
      "remediation": null,
      "durationMs": 473
    }
  }
}

What issue are you seeing?

After updating to Codex CLI 0.158.0 this morning, my PowerShell session began inserting long strings of characters into the Codex prompt automatically. A representative excerpt is:

[M#l5[M#k5[M#j5[M#h5[M#g5[M#f5

The characters repeat rapidly even though I am not pasting them. This did not happen before the update. I expected the prompt to accept only the text I enter.

What steps can reproduce the bug?

Open a new PowerShell terminal on Windows.

Run:

codex --version
codex

In Codex CLI 0.158.0, use the prompt and move the mouse over the terminal.

Raw sequences such as [M#l5[M#k5[M#j5 appear in the prompt without being typed or pasted.

What is the expected behavior?

Moving the mouse over the terminal should not insert text into the Codex prompt. The prompt should contain only text I type or intentionally paste.

Additional information

No response

Activity

  1. added
    bug
    on Sep 28, 2026
  2. added
    CLI
    windows-os
    TUI
    on Sep 28, 2026
  3. bc-openai commented on Oct 2, 2026

    @bc-openai
    Contributor

    Thanks for the report! This should be fixed in 0.159.0.

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

    CLITUIbugwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions