codex - 💡(How to fix) Fix Latest npm Codex CLI renders raw ANSI/control sequences in Windows Terminal

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Fix / Workaround

  1. The same rendering issue occurs.
  2. Downgrade to 0.130.0:

Code Example

### What subscription do you have?

Pro

### Which model were you using?

5.5 but any

### What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

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

PowerShell 5 and 7

### Codex doctor report

---

### What issue are you seeing?

<img width="603" height="195" alt="Image" src="https://github.com/user-attachments/assets/cbfca6cf-8651-4af3-9b1b-60a6f1dfdd79" />

The latest npm-installed Codex CLI renders terminal control sequences as visible text inside Windows Terminal. The UI becomes filled with raw ANSI/control codes instead of formatted text.

Examples visible in the terminal include sequences like:

---

The visible output repeats across the screen and makes the TUI unusable. It looks like Codex is emitting a terminal renderer/control stream that is not being interpreted by Windows Terminal/ConPTY in this environment.

This happens in both Windows PowerShell 5.1 and PowerShell 7 (`pwsh`). Downgrading to `@openai/[email protected]` fixes the rendering, so this appears to be a regression after `0.130.0`, not a shell-specific issue.

### What steps can reproduce the bug?

at least on my pc :D

1. On Windows, open Windows Terminal.
2. Install the latest npm Codex CLI:

---

3. Run Codex:

---

4. Observe that the TUI renders raw ANSI/control sequences as text.
5. Try again in PowerShell 7:

---

6. The same rendering issue occurs.
7. Downgrade to `0.130.0`:

---

8. Rendering returns to normal.

### What is the expected behavior?


Codex should render its TUI normally in Windows Terminal, without printing raw ANSI/control sequences as visible text.

The same terminal setup works correctly with:
RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

Broken version: @openai/[email protected] and @openai/[email protected] Known working version: txt @openai/[email protected]

What subscription do you have?

Pro

Which model were you using?

5.5 but any

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

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

PowerShell 5 and 7

Codex doctor report

not available

What issue are you seeing?

<img width="603" height="195" alt="Image" src="https://github.com/user-attachments/assets/cbfca6cf-8651-4af3-9b1b-60a6f1dfdd79" />

The latest npm-installed Codex CLI renders terminal control sequences as visible text inside Windows Terminal. The UI becomes filled with raw ANSI/control codes instead of formatted text.

Examples visible in the terminal include sequences like:

[25;3H
[1m
[22m
[39m
[49m
[?2026h
[?2026l

The visible output repeats across the screen and makes the TUI unusable. It looks like Codex is emitting a terminal renderer/control stream that is not being interpreted by Windows Terminal/ConPTY in this environment.

This happens in both Windows PowerShell 5.1 and PowerShell 7 (pwsh). Downgrading to @openai/[email protected] fixes the rendering, so this appears to be a regression after 0.130.0, not a shell-specific issue.

What steps can reproduce the bug?

at least on my pc :D

  1. On Windows, open Windows Terminal.
  2. Install the latest npm Codex CLI:
npm install -g @openai/codex@latest
  1. Run Codex:
codex
  1. Observe that the TUI renders raw ANSI/control sequences as text.
  2. Try again in PowerShell 7:
pwsh
codex
  1. The same rendering issue occurs.
  2. Downgrade to 0.130.0:
npm install -g @openai/codex@0.130.0
codex
  1. Rendering returns to normal.

What is the expected behavior?

Codex should render its TUI normally in Windows Terminal, without printing raw ANSI/control sequences as visible text.

The same terminal setup works correctly with:

Additional information

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Latest npm Codex CLI renders raw ANSI/control sequences in Windows Terminal