Can't scroll up while text is printing.

Open 💬 2 comments Opened Jun 28, 2026 by TZubiri

What version of Codex CLI is running?

0.142.2

What subscription do you have?

Plus

Which model were you using?

gpt-5.5

What platform is your computer?

Debian, Xorg, Xfce4, Xterm. Linux 6.12.73

What terminal emulator and version are you using (if applicable)?

Xterm

Codex doctor report

N/A

What issue are you seeing?

When a prompt is processing, including when input is requested from the user, I can scroll up with scroll wheel or pgup, but the CLI app brings the screen to the bottom of the CLI history after about 200ms.

What steps can reproduce the bug?

Set Permissions to strict, launch a prompt, try to scroll up.

What is the expected behavior?

When the response of the agent is longer than the screen allows, and only the last part of the agent response is shown, and the user uses the scrollbar, scrollwheel, or pgup keys to scroll upwards, then the app should allow that and not bring the focus back to the latest messages, either during text generation or (even more so) when text generation is paused due to asking for user input.

Additional information

Distinct from #23280 as I'm not asking for an additional Codex feature, this is about native Terminal/OS functions being blocked from working by Codex functionality.

If I understand correctly, this scroll down feature was implemented as a hack to fix other bugs where the conversation wasn't scrolling to the bottom for other users, but I may be wrong.

View original on GitHub ↗

2 Comments

wgu9 · 1 month ago

I checked current main (80f54d1) and the likely owner is finalized-history insertion plus live tail anchoring in the TUI, not the model stream itself.

Relevant path:

  • codex-rs/tui/src/insert_history.rs writes finalized chat history into terminal scrollback using escape sequences.
  • In standard mode, when the viewport is not at the bottom, the code explicitly scrolls it down to make room before inserting history.
  • That behavior is useful for keeping the live conversation anchored, but it can conflict with a user intentionally using native terminal scrollback while output is still arriving or while an approval/input prompt is waiting.

A conservative behavior split would be:

  • keep auto-follow when the user is already at the live tail
  • suspend auto-follow when recent user input indicates manual scrollback/page-up
  • resume auto-follow on new typing, explicit End, or after the user returns to the tail
  • treat “waiting for user input/approval” as a stronger reason not to snap back to bottom

A targeted TUI regression could simulate live output while a manual-scroll flag is set and assert insert_history_lines/render does not force the viewport back to the tail until follow mode is resumed.

cfischer1967 · 26 days ago

I want to add a me-too.
Using Ubuntu on a Dell Laptop, amd64 (IA 64 bit) architecture, xterm/noble,now 390-1ubuntu3 amd64