You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Repeated Text Fragment When Scrolling in Codex CLI #1478
While using the OpenAI Codex CLI tool, I noticed that certain text fragments (such as "found in issue body") appear repeatedly and incorrectly on the screen during scroll events. This duplication seems to occur even when the content itself hasn't changed, creating a visually noisy and confusing interface.
Open codex
send and receive a lot of content (I just asked the codex to review my whole repo's code )
Scroll through the output using your terminal emulator (tested on Warp and Sakura Terminal).
What is the expected behavior?
Text should not be duplicated or visually repeated unless it actually exists multiple times
What do you see instead?
Additional information
No response
Reacted by astrosheep, Yudhiesh Ravindranath, Jeremy Möglich and Kokkie123
I'm using Windows Terminal / WSL2 / Ubuntu 22.04. When I run codex (0.20, rust binary), I don't get any scrollback . That is, once text scrolls off the top of the screen its gone. Scrolling up shows my last command prompt.
My terminal settings are such that I should be able to scroll 100,000 lines of history. Doesn't happen with man command, ls, etc. so it seems related to the codex binary.
This screen capture shows the problem. I scroll back up about 2 seconds in (you can see my prompt "m4dc4p@BEAST:~/Justin/Source/codex". Notice the scrolling text disappears under the prompt, and can't be recovered.
codex.scrolling.issue.mp4
Strangely, running in the VS Code terminal does not show the same problem:
vs.code.codex.scrolling.mp4
In both cases, TERM is set to xterm-256color.
Reacted by Jintao Zhang, Henri Chung, Sergei Fomin, Yudhiesh Ravindranath and astrosheep
This may have been solved already, but my changes definitely add a bit of hardening / robustness around this specific bug... Also some regression tests. See: #11221
Apologies to comment on a closed issue: has this been confirmed to work? Independent of the terminal I use (wezterm, iTerm, ghostty), text fragment artifacts and inability to scroll are still present. There are quite a few other reference issues still open, hence I wonder if/why this classifies as solved.
Is it possible to point me (if it exists) to a general codex cli scrolling docs/intended behaviour? This seems to be a long-running issue with the cli since the beginning.
Activity
bolinfest commentedon Jul 8, 2025
I need a good repro for this, but offhand, my best guess is that I'm not calling
ansi_escape()somewhere:https://github.com/openai/codex/blob/0b9cb2b9e767cba706c30381d9890a139b7d54d9/codex-rs/ansi-escape/src/lib.rs
At least, I have seen a similar issue in the past where that was the fix.
velaris1 commentedon Jul 8, 2025
I can repro it on Windows 10 (WSL) using Windows Terminal. I'm on Codex CLI 0.3 (latest as of the time of this writing).
Using the Unreal Engine codebase:
TWeakObjectPtrworks."m4dc4p commentedon Aug 12, 2025
I'm using Windows Terminal / WSL2 / Ubuntu 22.04. When I run codex (0.20, rust binary), I don't get any scrollback . That is, once text scrolls off the top of the screen its gone. Scrolling up shows my last command prompt.
My terminal settings are such that I should be able to scroll 100,000 lines of history. Doesn't happen with man command, ls, etc. so it seems related to the codex binary.
This screen capture shows the problem. I scroll back up about 2 seconds in (you can see my prompt "m4dc4p@BEAST:~/Justin/Source/codex". Notice the scrolling text disappears under the prompt, and can't be recovered.
codex.scrolling.issue.mp4
Strangely, running in the VS Code terminal does not show the same problem:
vs.code.codex.scrolling.mp4
In both cases,
TERMis set toxterm-256color.yudhiesh-oc commentedon Sep 9, 2025
Noticing a similar issue where
TERM=xterm-kittyoncodex-cli 0.31.0, I never have this issue with Claude Code.tibo-openai commentedon Oct 16, 2025
Should be fixed in recent versions, marking as closed
tui: harden inline scrollback bootstrap and scroll-region bounds (ope…
pthrasher commentedon Feb 9, 2026
This may have been solved already, but my changes definitely add a bit of hardening / robustness around this specific bug... Also some regression tests. See: #11221
tui: harden inline scrollback bootstrap and scroll-region bounds (ope…
gennaro-tedesco commentedon Apr 14, 2026
Apologies to comment on a closed issue: has this been confirmed to work? Independent of the terminal I use (wezterm, iTerm, ghostty), text fragment artifacts and inability to scroll are still present. There are quite a few other reference issues still open, hence I wonder if/why this classifies as solved.
Is it possible to point me (if it exists) to a general codex cli scrolling docs/intended behaviour? This seems to be a long-running issue with the cli since the beginning.