Text clipped when scrolling in TUI
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:
- 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.
- 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.
- 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_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗