Skip to content

Repeated Text Fragment When Scrolling in Codex CLI #1478

Closed

Description

@tao12345666333

What version of Codex is running?

codex-cli 0.2.0

Which model were you using?

o3

What platform is your computer?

Linux 6.14.5-100.fc40.x86_64 x86_64 unknown

What steps can reproduce the bug?

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?

Image

Additional information

No response

Activity

  1. added
    bug
    on Jul 8, 2025
  2. bolinfest commented on Jul 8, 2025

    @bolinfest
    Collaborator

    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.

  3. velaris1 commented on Jul 8, 2025

    @velaris1

    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:

    • First prompt: "Only reference source code available in the working directory. Always provide source code reference when replying".
    • Second prompt: "Describe how TWeakObjectPtr works."
    Image
  4. m4dc4p commented on Aug 12, 2025

    @m4dc4p

    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.

  5. yudhiesh-oc commented on Sep 9, 2025

    @yudhiesh-oc

    Noticing a similar issue where TERM=xterm-kitty on codex-cli 0.31.0, I never have this issue with Claude Code.

    Image
  6. tibo-openai commented on Oct 16, 2025

    @tibo-openai
    Collaborator

    Should be fixed in recent versions, marking as closed

  7. pthrasher commented on Feb 9, 2026

    @pthrasher

    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

  8. gennaro-tedesco commented on Apr 14, 2026

    @gennaro-tedesco

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions