Windows Terminal/cmd/pwsh: cursor blink speeds up and jumps during Codex TUI redraw
What version of Codex is running?
codex-cli 0.80.0
What subscription do you have?
ChatGPT Plus
Which model were you using?
gpt-5.2
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
On Windows Terminal / cmd.exe / PowerShell (pwsh), while Codex CLI is waiting/streaming and the TUI redraws
frequently, the terminal cursor blink rate (and intensity animation) becomes abnormally fast and the cursor visibly
“jumps/sweeps” during redraws.
This makes the UI distracting and hard to use. It does not reproduce in IntelliJ IDEA’s built-in terminal.
What steps can reproduce the bug?
- Open Windows Terminal (also reproduces in cmd.exe and pwsh).
- Run
codex. - Trigger a redraw-heavy state (e.g. any waiting/streaming state such as a long-running tool call / background exec).
- Observe the cursor while the status line/spinner updates.
Expected: cursor blink rate stays consistent with terminal defaults; cursor does not visibly jump.
Actual: cursor blink speeds up dramatically and cursor position visibly jumps/sweeps during redraws.
Evidence: MP4 recording attached.
https://github.com/user-attachments/assets/023d43ec-6e46-4942-95f8-7a4cfbe11f2e
What is the expected behavior?
_No response_
Additional information
_No response_
9 Comments
This is an unfortunate behavior of the PowerShell terminal. I'm not sure that there's anything we can do about it given the way the Codex TUI works.
https://github.com/openai/codex/pull/9082
@YcccByHe, I saw your PR after I wrote that comment. Looks like you've proven me wrong. :)
@etraut-openai ,
Thanks for the quick follow-up!
Agreed it looked terminal-specific at first. The fix in #9082 keeps the real terminal cursor hidden and renders a non-
blinking “fake cursor” in the in-memory buffer (reverse-video on the cursor cell), which avoids the visible cursor
jumping / accelerated blinking during redraws on Windows Terminal / cmd.exe / pwsh.
The change is limited to
custom_terminal.rsin bothcodex-tuiandcodex-tui2. I’ve tested it locally on WindowsTerminal (pwsh + cmd) and also did a quick sanity check on Linux (WSL). Would appreciate a review on the PR when you
have a moment.
@YcccByHe, I'm personally not that familiar with the terminal code. I've asked one of my colleagues to review the PR, and it's in his queue.
Thanks for the report. One important detail we need to clarify here is which terminal version is in use.
Codex relies on synchronized output (DEC private mode 2026) to batch redraws and avoid displaying partially rendered frames during high-frequency UI updates. This behavior is implemented by the terminal emulator, not by the Windows OS itself.
On Windows, support for synchronized output was added in Windows Terminal Preview v1.24 (released Aug 26, 2025):
https://github.com/microsoft/terminal/releases/tag/v1.24.2372.0
If an older Windows Terminal version is being used, the
CSI ? 2026 h / lescape sequences are silently ignored. In that case, redraw-heavy applications can exhibit cursor blinking or visual artifacts even though the application logic is behaving as intended.Could you confirm the Windows Terminal version you’re running (for example, via
wt --version)? That will help us determine whether synchronized output is available in your environment and whether this issue is expected behavior. Confirmed: Windows Terminal 1.23.13503.0 (stable). This is below 1.24 Preview, so synchronized output (DEC 2026) may
be unsupported. If you'd like, I can install 1.24 Preview and re-test to report back.
------------------ 原始邮件 ------------------
发件人: "Josh @.*>;
发送时间: 2026年1月16日(星期五) 上午10:27
收件人: @.*>;
抄送: @.>; @.>;
主题: Re: [openai/codex] Windows Terminal/cmd/pwsh: cursor blink speeds up and jumps during Codex TUI redraw (Issue #9081)
joshka-oai left a comment (openai/codex#9081)
Thanks for the report. One important detail we need to clarify here is which terminal version is in use.
Codex relies on synchronized output (DEC private mode 2026) to batch redraws and avoid displaying partially rendered frames during high-frequency UI updates. This behavior is implemented by the terminal emulator, not by the Windows OS itself.
On Windows, support for synchronized output was added in Windows Terminal Preview v1.24 (released Aug 26, 2025):
https://github.com/microsoft/terminal/releases/tag/v1.24.2372.0
If an older Windows Terminal version is being used, the CSI ? 2026 h / l escape sequences are silently ignored. In that case, redraw-heavy applications can exhibit cursor blinking or visual artifacts even though the application logic is behaving as intended.
Could you confirm the Windows Terminal version you’re running (for example, via wt --version)? That will help us determine whether synchronized output is available in your environment and whether this issue is expected behavior.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.***>
This is an issue with versions of Windows Terminal older than 1.24. To fix, please upgrade to a newer version.
Just upgraded to wt.exe version 1.24 and the issue is way worse than 1.23
When I type fast, I see the words only after a second, expecially with long words.
<img width="191" height="151" alt="Image" src="https://github.com/user-attachments/assets/b839ef7b-c4ac-4636-af99-9a5abd1e5d92" />