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

Resolved 💬 5 comments Opened Apr 19, 2026 by hunterlarcuad Closed Apr 28, 2026

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.

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗