Repository navigation
Description
What version of Codex CLI is running?
Affected:
codex-cli 0.131.0-alpha.22
Regression baseline that did not show the issue on the same machine/workflow:
codex-cli 0.131.0-alpha.9
What subscription do you have?
ChatGPT/Codex authenticated account.
Which model were you using?
gpt-5.5 with xhigh reasoning, but this appears to be a local TUI/rendering startup issue rather than model-specific.
What platform is your computer?
Windows / PowerShell environment.
Observed from PowerShell sessions on Windows. Exact terminal host has not been fully isolated yet.
Terminal emulator and version
Not fully isolated yet. The issue was observed in normal Windows PowerShell/Codex CLI usage.
What issue are you seeing?
After upgrading from 0.131.0-alpha.9 to 0.131.0-alpha.22, some Codex CLI sessions and working directories render raw terminal escape sequences directly into the TUI instead of interpreting them.
The output includes visible control sequences such as:
ESC]0;gisSolution
ESC[?2026h
ESC[?2026l
ESC[39;49m
ESC[K
ESC[2;1H
ESC[2;41r
ESC[0 q
ESC[?25h
In the terminal these appear as visible ←[ / ←] sequences, for example:
←]0;gisSolution←]0;⠹ gisSolution←[?2026h←[2;1H←[J...
The most visible failure is during TUI startup while MCP/plugin/hook/skill startup messages are being rendered. Example startup lines around the corruption:
Starting MCP servers (0/3): cloudflare-api, codex_apps, context7
Starting MCP servers (0/2): cloudflare-api, codex_apps
Warnings that were being rendered around the same time included plugin/hook/skill warnings such as:
[features].codex_hooks is deprecated. Use [features].hooks instead.
loading hooks from both C:\Users\...\.codex\hooks.json and C:\Users\...\.codex\config.toml; prefer a single representation for this layer
Skipped loading 20 skill(s) due to invalid SKILL.md files.
... SKILL.md: invalid YAML: mapping values are not allowed in this context ...
Initially this looked resume-specific, because one important resumed session showed the problem, but a fresh session in the same kind of Windows working directory also reproduced it. Other sessions/directories may render normally.
Regression signal
This is the key signal:
0.131.0-alpha.9: same user/workflow did not show raw ANSI corruption.0.131.0-alpha.22: raw ANSI sequences appear in some sessions/directories, especially around startup/resume with MCP/plugin/hook/skill output.
This makes it look like a regression in the TUI rendering/startup path, possibly amplified by plugin hooks / MCP startup warnings.
Investigation notes
Local comparison of rust-v0.131.0-alpha.9...rust-v0.131.0-alpha.22 showed a large amount of churn in the relevant areas:
- 170 commits between the tags.
- Large TUI refactors touching startup/rendering/history cells/chatwidget/MCP startup.
plugin_hookschanged from under-development and disabled by default to stable and enabled by default in Enable plugin hooks by default #22549.- There is also a recent MCP startup render-related change (Fix /review mode MCP startup render issue #21624), which looks close to the affected surface.
The visible ESC[?2026h / ESC[?2026l sequences look like DEC private mode 2026 / synchronized output toggles being printed literally. The issue is not that these sequences exist; it is that they are leaking visibly into the terminal output.
What steps can reproduce the bug?
The repro is not fully minimal yet, but this is the observed pattern:
- On Windows, install/use Codex CLI
0.131.0-alpha.22. - Open PowerShell.
- Start Codex in a Windows project directory that loads MCP/plugin/hook/skill configuration.
- Example command used:
codex --dangerously-bypass-approvals-and-sandbox- Or resume an affected session:
codex --dangerously-bypass-approvals-and-sandbox resume 019e20c6-4b39-7e43-9ce6-fb5bfc577c81- Observe startup while MCP servers/plugins/hooks/skills initialize.
- Raw terminal control sequences appear directly in the visible TUI output.
A fresh session in one affected working directory reproduced the issue, so it is not only old transcript replay from the resumed session.
Workarounds tried
These were tried and did not resolve the issue in the affected setup:
codex --no-alt-screen --disable terminal_resize_reflow --disable plugin_hooks --disable plugins --disable hooks --dangerously-bypass-approvals-and-sandboxAlso tested with resume:
codex --no-alt-screen --disable terminal_resize_reflow --disable plugin_hooks --disable plugins --disable hooks --dangerously-bypass-approvals-and-sandbox resume 019e20c6-4b39-7e43-9ce6-fb5bfc577c81The practical workaround is to run 0.131.0-alpha.9 for affected sessions while keeping 0.131.0-alpha.22 globally for other work.
What is the expected behavior?
Codex should keep the terminal in a valid render state during startup/resume. Terminal escape sequences should be interpreted by the terminal or safely avoided, not printed visibly into the TUI.
Warnings from invalid skills, deprecated config keys, duplicate hooks, or MCP startup should not corrupt the TUI display.
What happens instead?
Raw ANSI/OSC/DEC control sequences are shown as visible text in the Codex TUI during startup/resume. The screen becomes hard to read, and affected sessions/directories feel visually corrupted.
Additional context
I fixed several local config/plugin issues during investigation:
- migrated
[features].codex_hooksto[features].hooks - removed duplicated hook representation between
hooks.jsonandconfig.toml - fixed invalid YAML in multiple local
SKILL.mdfiles - disabled a problematic
autoresearchplugin/cache locally
Those fixes reduced some warnings, but the raw ANSI rendering still occurred in affected cases on 0.131.0-alpha.22.
Related issues / nearby areas checked
I found related but not exact issues:
- CLI TUI remains visually corrupted after stream disconnect, while resumed session renders normally #22726: CLI TUI remains visually corrupted after stream disconnect
- Codex CLI startup hangs ~60s in WSL before UI due to Windows TERM_PROGRAM probe via cmd.exe #22799: Windows/WSL startup/terminal detection hang
- [Bug] Deprecated codex_hooks warning appears even when [features].hooks is enabled #22148: deprecated
codex_hookswarning behavior - Mouse Properties dialog opens unexpectedly on Windows #9370: Windows terminal escape/keyboard handling issue
This report is specifically about a regression from 0.131.0-alpha.9 to 0.131.0-alpha.22 where raw terminal control sequences leak visibly during Windows TUI startup/resume, especially around MCP/plugin/hook/skill rendering.
Activity
fcoury-oai commentedon May 16, 2026
Could you run a
/feedbackin one of your sessions and send me the session id?adelfino69 commentedon May 16, 2026
fcoury-oai commentedon May 16, 2026
Thanks, can you instead run this with alpha.22 and send me the output?
adelfino69 commentedon May 16, 2026
fcoury-oai commentedon May 16, 2026
Would you mind sending a screenshot of the issue as well?
adelfino69 commentedon May 16, 2026
runfence commentedon May 20, 2026
Same for me #23628
dano1066 commentedon May 20, 2026
Same issue, had to rollback to version 0.130 to fix it
5 remaining items
runfence commentedon May 22, 2026
@fcoury-oai , I don't have Git for Windows installed. I use SmartGit with git bundled in. The version is not newest because my license for smartgit updates is expired.
fcoury-oai commentedon May 22, 2026
@runfence you can either upgrade to a newer git temporarily or wait for the next release.
nikkelly commentedon May 22, 2026
just wanted to confirm this fixed my issue. upgraded git from 2.34.1.windows.1 to 2.54.0.windows.1 and text renders correctly
Xgatt commentedon May 23, 2026
Confirming that this fixed it for me
Chuangye-Wang commentedon May 23, 2026
Updating git to 2.54.0.windows.1 solved the issue. Thanks! @fcoury-oai
adelfino69 commentedon May 23, 2026
Updating with git update-git-for-windows solved the issue. Thanks!
feat(doctor): add environment diagnostics (#24261)
revert: drop host-cursor masking for TUI-agent panes
feat(doctor): add environment diagnostics (openai#24261)