codex icon indicating copy to clipboard operation
codex copied to clipboard

Text clipped when scrolling in TUI

Open Relicus opened this issue 11 months ago • 4 comments

What version of Codex is running?

65.0

What subscription do you have?

Pro

Which model were you using?

GPT 5.1

What platform is your computer?

Windows x64

What issue are you seeing?

This is what GPT found out after hours and hours of me trying to fix it.

" Why you still see it here:

  • Our backend’s default boot command runs the full-screen TUI (DEFAULT_CLI_BOOT="codex --dangerously-bypass- approvals-and-sandbox"), so every CLI session is the alt-screen TUI.
  • When Codex is not involved (plain shell), the terminal stays in the normal buffer, so scrollback works.

Practical ways to avoid the clipping:

  1. Don’t launch the TUI: run Codex in non-interactive mode. For our app, set DEFAULT_CLI_BOOT to something like codex exec "" (or just "" and type codex exec ... manually) so the session stays in normal scrollback.
  2. If you need interactive use, open a plain shell session (no Codex auto-boot), then run codex exec commands from there. This keeps the terminal in the inline buffer.
  3. If you must use the TUI, know that the scrollback/scrollbar loss is by design in upstream 61.0; there isn’t a toggle to disable alt-screen in the released binary. You can at least record the transcript via CODEX_TUI_RECORD_SESSION=1 (writes to ~/.codex/log/codex-tui.log) but it won’t restore the scrollbar."

What steps can reproduce the bug?

Just open codex in a VSCode terminal and have it produce outputs long enough to exceed the visible height of the terminal and then see it will be clipped.

What is the expected behavior?

Output, text not clipping or trimming. So we can scroll back like a normal shell.

Additional information

No response

Relicus avatar Dec 08 '25 13:12 Relicus

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #6727
  • #6456
  • #6447
  • #6327

Powered by Codex Action

github-actions[bot] avatar Dec 08 '25 13:12 github-actions[bot]

@etraut-openai I'd like to work on this. Is this still available?

anupammaurya6767 avatar Dec 16 '25 04:12 anupammaurya6767

@anupammaurya6767, thanks for offering, but a member of the codex team is working on a major rewrite of the TUI that is designed to address this issue.

etraut-openai avatar Dec 16 '25 04:12 etraut-openai

Closing stale bug. @Relicus, we've fixed a bunch of bugs in the TUI since you reported this error. If you see a similar problem with the latest version of the CLI (0.118.0 or newer), please open a new bug report with repro steps.

etraut-openai avatar Apr 03 '26 03:04 etraut-openai