Mouse wheel scrolls prompt history instead of transcript when Codex CLI runs inside tmux
What version of Codex CLI is running?
codex-cli 0.146.0
What subscription do you have?
ChatGPT Prolite
Which model were you using?
gpt-5.6-sol The issue appears to be independent of the selected model.
What platform is your computer?
Ubuntu 24.04 LTS, Linux x86_64
What terminal emulator and version are you using (if applicable)?
Remote SSH terminal session using tmux 3.4. TERM=xterm-256color
Codex doctor report
Codex Doctor v0.146.0 · linux-x86_64
18 checks passed, 0 warnings, 0 failures.
Environment:
* Runtime: standalone Unix installation
* Terminal: tmux 3.4
* TERM=xterm-256color
* State databases: healthy
* Thread inventory: healthy
* Authentication: ChatGPT
* WebSocket: connected
* App server: running in persistent mode
What issue are you seeing?
When Codex CLI is running inside tmux, I cannot scroll through the conversation transcript or terminal viewport.
Using the mouse wheel does not move the transcript up or down. Instead, it changes the contents of the Codex prompt composer, cycling through previously submitted prompts. The same behavior occurs regardless of where I click before scrolling.
Keyboard scrolling shortcuts also fail to move through the Codex transcript while inside tmux. I have tried clicking different parts of the interface and following the troubleshooting suggestions provided by Codex, but none of them resolved the problem.
The issue only occurs inside tmux. If I exit tmux and launch Codex directly in the same SSH terminal, mouse-wheel scrolling works normally and I can navigate through the transcript as expected.
This makes Codex difficult to use for long-running tasks because I need tmux to keep the process running after disconnecting my local computer or SSH session.
What steps can reproduce the bug?
Uploaded thread: 019fb317-4274-77c1-83dd-5a6acbff8045
What is the expected behavior?
When Codex CLI is running inside tmux, the mouse wheel and appropriate keyboard shortcuts should scroll through the conversation transcript in the same way they do when Codex is running directly in the terminal.
Scrolling over the transcript should not modify the prompt composer or cycle through previously submitted prompts.
Codex should remain fully navigable inside tmux so that long-running sessions can continue after the SSH client disconnects.
Additional information
Steps to reproduce
- Connect to an Ubuntu Linux server through SSH.
- Start a tmux session:
tmux new -s codex
- Open a project directory and launch Codex CLI:
cd ~/Desenvolvimento/actb
codex
- Send enough prompts for the conversation transcript to extend beyond the visible terminal viewport.
- Place the mouse pointer over the conversation transcript and use the mouse wheel to scroll upward.
- Try the usual keyboard shortcuts for scrolling through the terminal or transcript.
- Observe that the transcript does not scroll. Instead, the mouse wheel cycles through previously submitted prompts inside the Codex composer.
- Exit or detach from tmux and launch Codex directly in the same SSH terminal.
- Repeat the scrolling action and observe that transcript scrolling works normally outside tmux.
Environment
- Codex CLI 0.146.0
- tmux 3.4
- Ubuntu 24.04 LTS
- TERM=xterm-256color
- Remote SSH session
- Codex works normally outside tmux in the same terminal
- Codex Doctor reports 18 successful checks, 0 warnings, and 0 failures
tmux is important for this workflow because it allows Codex tasks to continue running when the local computer is turned off or the SSH connection is interrupted.
5 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Additional macOS reproduction:
Environment
0.146.0, installed through npm0.145.0arm64)3.6bTERM=screen-256colorxterm-256colorBehavior
Mouse-wheel scrolling stopped working after upgrading Codex CLI from
0.145.0to0.146.0.When Codex runs inside tmux, the mouse wheel does not scroll the conversation transcript. Other tmux settings and scrollback remain functional.
Workarounds already tested
Configured and restarted Codex with:
This did not fix the issue.
I verified after restart that:
alternate_on=0;mouse on;WheelUpPanebinding is present;I also enabled raw scrollback mode in the running session:
Mouse-wheel scrolling still did not work.
This appears to be a regression in Codex CLI
0.146.0when used inside tmux, rather than an alternate-screen or tmux mouse configuration problem.Can confirm this bug.
Angel here, founder of Runa. Needing tmux to keep Codex alive, then losing transcript navigation, trades persistence for visibility. https://runacode.io runs Codex on a cloud machine; we measured ~46% lower token cost on real runs. New users get $50 of machine usage, and Codex signs in interactively with an existing ChatGPT subscription. Want to try your long-running workflow there?
I encountered the same problem.