Codex CLI TUI rendering corruption and visible ANSI cursor sequences in Windows Terminal

Open 💬 0 comments Opened May 26, 2026 by MILK597

What version of Codex CLI is running?

codex-cli 0.133.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)?

Windows Terminal(PowerShell7.6.0) and Terminal In IDEA

Codex doctor report

What issue are you seeing?

When using Codex CLI interactively in Windows Terminal, the TUI is rendered incorrectly.

The slash-command menu sometimes contains overlapping rows and descriptions, as if previously rendered characters were not cleared before the menu was redrawn.

In another occurrence, visible text resembling [14;4H appeared near the input/menu area. This appears to be part of an ANSI/VT cursor-positioning control sequence being rendered as ordinary text instead of being interpreted by the terminal.

What steps can reproduce the bug?

  1. Open Windows Terminal:

``powershell
wt.exe -p "PowerShell"
``

  1. Start Codex CLI:

``powershell
codex
``

  1. Type / to open the slash-command menu.
  1. Interact with the menu or continue entering text.
  1. The command list may redraw incorrectly, with entries and descriptions overlapping. On a separate occurrence, cursor-control-sequence text such as [14;4H appeared visibly in the TUI.

What is the expected behavior?

The Codex CLI interactive UI should render normally in Windows Terminal, without overlapping menu text, stale characters, or visible terminal control sequences.

Additional information

The issue reproduces in Windows Terminal, not only in the legacy Windows console host. Switching to Windows Terminal did not resolve the issue.
Console input encoding: utf-8
Console output encoding: utf-8
I have attached some screenshots:

<img width="961" height="240" alt="Image" src="https://github.com/user-attachments/assets/9c688de7-8321-4647-a698-8341479f8ae7" />
<img width="814" height="193" alt="Image" src="https://github.com/user-attachments/assets/46934e91-ad9a-450a-b2eb-6c9f9f27063b" />
<img width="941" height="232" alt="Image" src="https://github.com/user-attachments/assets/30af93af-a60e-4ba6-914f-11ac47bb70b2" />
<img width="879" height="237" alt="Image" src="https://github.com/user-attachments/assets/7654a239-a5a8-4ba7-9628-025331b058b5" />

View original on GitHub ↗