-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Drawing of the text input area messes with the TUI causing visual artifacts on successive terminal resizes #16165
Description
What version of Codex CLI is running?
0.117.0
What subscription do you have?
Business
Which model were you using?
any
What platform is your computer?
Same across OSes
What terminal emulator and version are you using (if applicable)?
gnome-terminal, xfce4-terminal, xterm, Windows termina, Alacritty, every single one I tried
What issue are you seeing?
Display artifacts and disappearing text when resizing the window:
The text entry area fills the screen with an input area that is too big, and there is something that looks like an off-by-one calculation when rendering it as it incrementally overwrites the scrollback until the entry area is at the top of the terminal with no scrollback visible.
What steps can reproduce the bug?
Run codex
type any prompt
resize the terminal a few times
What is the expected behavior?
The text entry area should not change position or output additional background color blocks which become artifacts all over the screen
Additional information
I have implemented a workaround and applied it successively to the last few versions of Codex, here is the before and after showing current behavior and expected behavior:
(The video was captured of an older version that had a remnant of another experiment, but it shows the expected behavior)
codex-2026-03-29_01.32.21.1.mp4
Downstream issues, each describing different behavior of the same cause:
#5259
#14045
#5259
#8344 (The current output of the text input area, messes with the TUI)
#14323
Potentially downstream issues:
#14098
#8344
#3464
#16134
#14323
I'm sure there are more, can't find them now.
I'm happy to work on this. I've experimented with different solutions.
Here's one that just redraws the whole scrollback after a resize, that I think literally everybody will accept: https://github.com/dagelf/codex/tree/displayfix
It would of course be preferable to just render the input area properly under resize, but that will require more pervasive research and testing as cursor movement and redrawing gets into the quirks of different terminals.