Skip to content

Rerender scrollback after terminal resize #5259

@kvcop

Description

@kvcop

What feature would you like to see?

Summary

Running Codex inside narrow terminals causes conversation history to be inserted into the scrollback already wrapped to the small width. When the user later widens the terminal (e.g., reconnecting from desktop, or making it full-screen), previously emitted lines remain hard wrapped, so reading old messages is painful

Reproduction

  1. Start Codex in a very narrow terminal (just make it small, or use tmux over mobile SSH works well).
  2. Send/receive a few messages so history is printed into the scrollback.
Image
  1. Resize the terminal wider (or reconnect to tmux from a PC).
  2. Scroll up: older lines keep the original narrow wrapping while new frames render at the new width
Image

Requested Feature

Add some way of redrawing history on resize. May be chat-command, or automatic resize with ~100ms waiting time after resizing is done to not produce flickering.

In my current implementation I've sticked with command one because it's more controllable, but this may be inconvenient to end user. I've already tried automatic resizing, but didn't push the code yet.
Example (using same setup as in reproduction):

Image Image Image

Banner about successful resize lives for one second before switching off on any redraw.

Additional information

I don't know if it's really a bug, or missing feature, but i'll be glad to provide PR for any of the implementations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    TUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displayenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions