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:
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-sandbox
Also 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-fb5bfc577c81
The 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_hooks to [features].hooks
- removed duplicated hook representation between
hooks.json and config.toml
- fixed invalid YAML in multiple local
SKILL.md files
- disabled a problematic
autoresearch plugin/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:
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.
What version of Codex CLI is running?
Affected:
Regression baseline that did not show the issue on the same machine/workflow:
What subscription do you have?
ChatGPT/Codex authenticated account.
Which model were you using?
gpt-5.5withxhighreasoning, 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.9to0.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:
In the terminal these appear as visible
←[/←]sequences, for example:The most visible failure is during TUI startup while MCP/plugin/hook/skill startup messages are being rendered. Example startup lines around the corruption:
Warnings that were being rendered around the same time included plugin/hook/skill warnings such as:
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.22showed a large amount of churn in the relevant areas:plugin_hookschanged from under-development and disabled by default to stable and enabled by default in Enable plugin hooks by default #22549.The visible
ESC[?2026h/ESC[?2026lsequences 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:
0.131.0-alpha.22.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:
Also tested with resume:
The practical workaround is to run
0.131.0-alpha.9for affected sessions while keeping0.131.0-alpha.22globally 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:
[features].codex_hooksto[features].hookshooks.jsonandconfig.tomlSKILL.mdfilesautoresearchplugin/cache locallyThose 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:
codex_hookswarning behaviorThis report is specifically about a regression from
0.131.0-alpha.9to0.131.0-alpha.22where raw terminal control sequences leak visibly during Windows TUI startup/resume, especially around MCP/plugin/hook/skill rendering.