Codex v0.131.0 terminal corruption after codex_apps MCP startup on Windows

Resolved 💬 7 comments Opened May 19, 2026 by Pedro-Fernandes Closed May 25, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

v0.131.0

What subscription do you have?

Plus

Which model were you using?

gpt-5.5

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

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

PowerShell

Codex doctor report

What issue are you seeing?

After upgrading to 0.131.0, Codex starts normally but the terminal UI becomes corrupted immediately after:

Booting MCP server: codex_apps

The terminal then fills with ANSI/control escape sequences like:

←[49m←[K←[52;27H...

The issue appears project-specific:

some repositories work normally
some repositories consistently trigger the corruption

Downgrading back to 0.130.0 fully resolves the issue.

<img width="2530" height="660" alt="Image" src="https://github.com/user-attachments/assets/3f8102c3-59c4-4cd5-8976-776c8a842d85" />

What steps can reproduce the bug?

npm install -g @openai/codex@0.131.0
cd <affected repo>
codex

What is the expected behavior?

no ANSI characters, normal text startup

Additional information

  • AGENTS.md content does not appear to be the cause
  • deleting .codex did not resolve it
  • corruption starts specifically during MCP server startup
  • issue reproduced in Windows Terminal using PowerShell
  • renaming some large folders slightly delayed the corruption but did not prevent it

View original on GitHub ↗

7 Comments

github-actions[bot] contributor · 2 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #23031
  • #23474
  • #23374

Powered by Codex Action

fcoury-oai contributor · 2 months ago

Would you do me a favor: can you run codex on a directory that isn't a git repository, like C:\Users\Pedro in your case and see if the issue still happens?

Pedro-Fernandes · 2 months ago

sure! here is the output:

<img width="2535" height="596" alt="Image" src="https://github.com/user-attachments/assets/63c82ed4-5d24-4a46-a0c7-3a94ecb10384" />

PS: It is still present in v0.132.0

fcoury-oai contributor · 2 months ago

Thanks for the outside-Git screenshot. That narrows the shape of this: on the affected machine the raw-control-byte rendering issue does not manifest outside a Git repo, so we are treating repo-conditioned startup work as a trigger rather than claiming Git status rendering itself is the proven root cause.

I opened draft PR #23723 to harden Windows TUI output when stdout VT processing cannot be trusted and to expose Windows stdout VT visibility in codex doctor.

If you are willing, a fresh codex doctor --json captured from a broken in-repo run on the affected machine would still help us compare the terminal details. Once a release contains the hardening change, we will ask you to retry that version as well.

Pedro-Fernandes · 2 months ago

Sure! Here is the output:

{ "schemaVersion": 1, "generatedAt": "1779301651s since unix epoch", "overallStatus": "warning", "codexVersion": "0.131.0", "checks": { "app_server.status": { "id": "app_server.status", "category": "app-server", "status": "ok", "summary": "background server is not running", "details": { "control socket": "C:\\Users\\Pedro\\.codex\\app-server-control\\app-server-control.sock", "daemon state dir": "C:\\Users\\Pedro\\.codex\\app-server-daemon", "mode": "ephemeral", "pid file": "C:\\Users\\Pedro\\.codex\\app-server-daemon\\app-server.pid (missing)", "settings": "C:\\Users\\Pedro\\.codex\\app-server-daemon\\settings.json (missing)", "status": "not running", "update-loop pid file": "C:\\Users\\Pedro\\.codex\\app-server-daemon\\app-server-updater.pid (missing)" }, "remediation": null, "durationMs": 0 }, "auth.credentials": { "id": "auth.credentials", "category": "auth", "status": "ok", "summary": "auth is configured", "details": { "auth file": "C:\\Users\\Pedro\\.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\\Pedro\\.codex", "config.toml": "C:\\Users\\Pedro\\.codex\\config.toml", "config.toml parse": "ok", "cwd": "C:\\Users\\Pedro\\code\\d4-build-assistant", "enabled feature flags": "shell_tool, shell_snapshot, terminal_resize_reflow, sqlite, hooks, enable_request_compression, multi_agent, apps, tool_search, tool_suggest, plugins, plugin_hooks, in_app_browser, browser_use, browser_use_external, computer_use, plugin_sharing, image_generation, skill_mcp_dependency_install, steer, guardian_approval, collaboration_modes, tool_call_mcp_elicitation, personality, fast_mode, tui_app_server, workspace_dependencies", "feature flag overrides": "none", "feature flags enabled": "27", "log dir": "C:\\Users\\Pedro\\.codex\\log", "mcp servers": "0", "model": "<default>", "model provider": "openai", "sqlite home": "C:\\Users\\Pedro\\.codex" }, "remediation": null, "durationMs": 0 }, "installation": { "id": "installation", "category": "install", "status": "warning", "summary": "npm-managed launch could not inspect npm global root", "details": { "PATH codex #1": "C:\\Users\\Pedro\\AppData\\Roaming\\npm\\codex", "PATH codex #2": "C:\\Users\\Pedro\\AppData\\Roaming\\npm\\codex.cmd", "PATH codex entries": "2", "current executable": "C:\\Users\\Pedro\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex\\codex.exe", "install context": "npm", "managed by bun": "false", "managed by npm": "true", "managed package root": "C:\\Users\\Pedro\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex", "npm root -g failed": "program not found" }, "remediation": null, "durationMs": 77 }, "mcp.config": { "id": "mcp.config", "category": "mcp", "status": "ok", "summary": "no MCP servers configured", "details": {}, "remediation": null, "durationMs": 0 }, "network.env": { "id": "network.env", "category": "network", "status": "ok", "summary": "network-related environment looks readable", "details": { "proxy env vars": "none" }, "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 base URL": "https://chatgpt.com/backend-api/ reachable (HTTP 403)", "reachability mode": "ChatGPT auth" }, "remediation": null, "durationMs": 122 }, "network.websocket_reachability": { "id": "network.websocket_reachability", "category": "websocket", "status": "warning", "summary": "Responses WebSocket failed; HTTPS fallback may still work", "details": { "DNS": "2 IPv4, 2 IPv6, first IPv6", "auth mode": "chatgpt", "connect timeout": "15000 ms", "endpoint": "wss://chatgpt.com/backend-api/<redacted>", "handshake transport error": "<redacted>", "model provider": "openai", "provider name": "OpenAI", "proxy env vars": "none", "supports websockets": "true", "wire API": "responses" }, "remediation": "Check proxy, VPN, firewall, DNS, custom CA, and WebSocket policy support.", "durationMs": 574 }, "runtime.provenance": { "id": "runtime.provenance", "category": "runtime", "status": "ok", "summary": "running npm on windows-x86_64", "details": { "commit": "unknown", "current executable": "C:\\Users\\Pedro\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex\\codex.exe", "install method": "npm", "platform": "windows-x86_64", "version": "0.131.0" }, "remediation": null, "durationMs": 0 }, "runtime.search": { "id": "runtime.search", "category": "search", "status": "ok", "summary": "search is OK (system)", "details": { "search command": "rg.exe", "search command readiness": "ripgrep 15.1.0 (rev af60c2de9d)", "search provider": "system" }, "remediation": null, "durationMs": 199 }, "sandbox.helpers": { "id": "sandbox.helpers", "category": "sandbox", "status": "ok", "summary": "sandbox configuration is readable", "details": { "approval policy": "OnRequest", "codex-linux-sandbox helper": "none", "execve wrapper helper": "none", "filesystem sandbox": "restricted", "network sandbox": "restricted" }, "remediation": null, "durationMs": 0 }, "state.paths": { "id": "state.paths", "category": "state", "status": "ok", "summary": "state paths and databases are inspectable", "details": { "CODEX_HOME": "C:\\Users\\Pedro\\.codex (dir)", "active rollout files": "2 files, 84517 total bytes, 42258 average bytes", "archived rollout files": "0 files, 0 total bytes, 0 average bytes", "log DB": "C:\\Users\\Pedro\\.codex\\logs_2.sqlite (file)", "log DB integrity": "ok", "log dir": "C:\\Users\\Pedro\\.codex\\log (dir)", "sqlite home": "C:\\Users\\Pedro\\.codex (dir)", "state DB": "C:\\Users\\Pedro\\.codex\\state_5.sqlite (file)", "state DB integrity": "ok" }, "remediation": null, "durationMs": 135 }, "terminal.env": { "id": "terminal.env", "category": "terminal", "status": "ok", "summary": "terminal metadata was detected", "details": { "color output": "enabled", "stderr is terminal": "true", "stdin is terminal": "true", "stdout is terminal": "true", "terminal": "unknown", "terminal size": "280x70" }, "remediation": null, "durationMs": 0 }, "updates.status": { "id": "updates.status", "category": "updates", "status": "warning", "summary": "npm update target could not be inspected", "details": { "cached latest version": "0.132.0", "check for update on startup": "true", "dismissed version": "0.132.0", "last checked at": "2026-05-20T16:26:54.163390300Z", "latest version": "0.132.0", "latest version status": "newer version is available", "npm root -g failed": "program not found", "update action": "npm install -g @openai/codex", "version cache": "C:\\Users\\Pedro\\.codex\\version.json" }, "remediation": null, "durationMs": 456 } } }
SG5 · 1 month ago

+1, just upgraded to v0.133.0 and have the same issue. v0.130.0 was fine and didn't have UI issues

fcoury-oai contributor · 1 month ago
+1, just upgraded to v0.133.0 and have the same issue. v0.130.0 was fine and didn't have UI issues

Upgrade your git version and this should be fixed. Otherwise you can wait for the next release.