Text clipped when scrolling in TUI

Resolved 💬 4 comments Opened Dec 8, 2025 by Relicus Closed Apr 3, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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 "<prompt>" (or just "" and type codex exec ... manually) so the session stays in normal
scrollback.

  1. 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.

  1. 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_

View original on GitHub ↗

4 Comments

github-actions[bot] contributor · 8 months ago

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

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

Powered by Codex Action

anupammaurya6767 · 8 months ago

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

etraut-openai contributor · 8 months ago

@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 contributor · 4 months ago

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.