Skip to content

Drawing of the text input area messes with the TUI causing visual artifacts on successive terminal resizes #16165

Closed

Description

@dagelf

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.

Activity

  1. added
    bug
    on Mar 29, 2026
  2. added
    CLI
    TUI
    on Mar 29, 2026
  3. removed
    CLI
    on Mar 29, 2026
  4. maddada commented on Mar 29, 2026

    @maddada

    I'm very sorry to budge in here. Great job on the fix. Looks much better than what we have now.
    Would this help fix this issue with missing lines?

    #5259 (comment)

  5. etraut-openai commented on Jul 21, 2026

    @etraut-openai
    Contributor

    Merged PR #18575 explicitly fixes #16165 by rebuilding source-backed transcript history on resize and clearing stale pending rows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    TUIbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions