Codex CLI TUI fails to render in VS Code terminal making it unusable on Windows
What version of Codex CLI is running?
all versions >= 0.131.0
What subscription do you have?
Pro
Which model were you using?
_No response_
What platform is your computer?
Microsoft Windows NT 10.0.26100.0 x64
What terminal emulator and version are you using (if applicable)?
VS Code
Codex doctor report
not available
What issue are you seeing?
Ever since updating to Codex CLI 0.131.0 or later, running codex inside the VS Code integrated terminal causes the TUI to fail to render. Instead, the terminal prints raw ANSI escape sequences, making Codex unusable. For example this is what I see in the output:
←[39;49m←[K https://community.openai.com/c/codex/37←[39m←[49m←[0m←[r←[14;3H←[12;2H←[0m←[49m←[K←[14;2H←[0m←[49m←
[K←[15;2H←[0m←[49m←[K←[16;34H←[0m←[49m←[K←[17;2H←[0m←[49m←[K←[18;41H←[0m←[49m←[K←[13;1H←[1m←[38;2;128;128;128;49m•←[13;3HBooting MCP server: codex_apps←[13;34H←[22m←[2m
←[2m←[39;49m(0s • esc to interrupt)←[16;1H←[22m←[1m›←[16;3H←[22m←[2m←[2mFind and fix a bug in @filename←[18;3H←[22m←[38;2;246;226;183;49mgpt-5.5 xhigh fast←[2m←[39;49m · ←[22m←[38;2;242;181;144;49mContext 100% left←[39m←[49m
←[0m←[0 q←[?25h←[16;3H←[?2026l←[?2026h←[12;2H←[0m←[49m←[K←[14;2H←[0m←[49m←[K←[15;2H←[0m←[49m←[K←[16;34H←[0m←[49m
←[K←[17;2H←[0m←[49m←[K←[18;41H←[0m←[49m←[K←[39m←[49m←[0m
It works completely fine in version 0.130.0 or earlier.
I've tested it with versions 0.131.0, 0.132.0, and 0.133.0 (the latest release as of opening this issue) and they all have that bug.
In normal CMD or PowerShell, it works fine. But when running in the integrated vscode terminal it breaks (cmd and powershell). Using codex cli with WSL works fine within vscode still, so its something with Windows.
What steps can reproduce the bug?
- Open VS Code.
- Open the integrated terminal.
- Install or switch to Codex CLI
0.131.0or later (on Windows native, not WSL). - Run
codex. - Observe that the TUI fails to render and raw ANSI escape sequences are printed instead.
What is the expected behavior?
It should display the TUI not raw ANSI escape sequences.
Additional information
This is what it looks like when running codex in the vscode cli:
<img width="1263" height="1310" alt="Image" src="https://github.com/user-attachments/assets/0286e61a-5a16-4017-a4fb-d7f419148aba" />
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗