Skip to content

iTerm2 cannot scroll up in interactive Codex session, including with --no-alt-screen #18528

Closed as duplicate

Description

@hunterlarcuad

What version of Codex is running?

codex-cli 0.121.0

What subscription do you have?

No response

Which model were you using?

No response

What platform is your computer?

macOS (Darwin), terminal: iTerm2, architecture appears to be Apple Silicon (arm64)

What issue are you seeing?

In iTerm2, an interactive codex session cannot scroll back upward using the mouse wheel / trackpad scroll gesture.

This still happens when launching Codex with:

codex --no-alt-screen

That suggests the problem is not only alternate-screen handling. It looks like the Codex TUI is still capturing scroll input, or redraw behavior is preventing normal scrollback access.

In the same terminal environment, claude scrolls normally, so this does not appear to be a general iTerm2 configuration issue.

What steps can reproduce the bug?

  1. Open iTerm2 on macOS.
  2. Run codex.
  3. Generate enough output to require scrolling.
  4. Try to scroll upward with the mouse wheel or trackpad gesture.
  5. Observe that the terminal does not scroll back.
  6. Repeat with codex --no-alt-screen.
  7. Observe the same behavior.

What is the expected behavior?

Interactive Codex sessions should allow normal upward scrollback in iTerm2, especially when --no-alt-screen is used.

Additional information

Environment details collected locally:

echo $TERM
# xterm-256color

which codex
# ~/.bun/bin/codex

codex --version
# codex-cli 0.121.0

Additional notes:

  • tmux is not involved (tmux ls returned no server running).
  • infocmp xterm-256color | rg smcup shows alternate-screen capability is present.
  • The package metadata points to openai/codex (@openai/codex, installed globally via bun).
  • Upgrading with bun install -g @openai/codex@latest still installs 0.121.0, so there was no newer version available to test.

If useful, I can also provide a short screen recording showing the behavior in iTerm2.

Activity

  1. added
    bug
    CLI
    TUI
    on Apr 19, 2026
  2. github-actions commented on Apr 19, 2026

    @github-actions
    Contributor
  3. hunterlarcuad commented on Apr 19, 2026

    @hunterlarcuad
    Author

    I reviewed #15726 more closely.

    That issue is still open, and the only apparent workaround there is user-reported: updating Windows Terminal fixed scrolling for some Windows users. I did not see a maintainer confirmation that the underlying Codex issue is resolved.

    My case still appears distinct:

    So I do not think #15726 fully covers this macOS/iTerm2 case, even if the symptoms are related.

  4. removed
    CLI
    on Apr 19, 2026
  5. etraut-openai commented on Apr 19, 2026

    @etraut-openai
    Contributor

    I'm not able to repro the problem. This must be something specific to your system or configuration. I'm using the default terminal settings for iTerm2. Perhaps you've modified your settings in some way?

  6. andres99x commented on Apr 23, 2026

    @andres99x

    @hunterlarcuad check this out: #2485

  7. etraut-openai commented on Apr 28, 2026

    @etraut-openai
    Contributor

    See #19645 for details and a workaround.

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

    TUIbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions