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
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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 ↗

5 Comments

github-actions[bot] contributor · 4 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #15726
  • #15380

Powered by Codex Action

hunterlarcuad · 4 months ago

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:

  • reproducible on macOS + iTerm2
  • codex --no-alt-screen still does not restore normal upward scrollback
  • the Windows Terminal workaround from #15726 does not apply here

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

etraut-openai contributor · 4 months ago

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?

andres99x · 4 months ago

@hunterlarcuad check this out: https://github.com/openai/codex/issues/2485

etraut-openai contributor · 4 months ago

See #19645 for details and a workaround.