openai / openai/codex

Codex CLI 0.154.0 breaks mouse selection when extending beyond terminal viewport; 0.153.4 works

Open
#45,044 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug CLI TUI
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What version of the Codex App are you using (From “About Codex” dialog)?

0.154.0

What subscription do you have?

chatgpt - plus

What platform is your computer?

MX-Linux-23.6

What issue are you seeing?

What version of Codex CLI is running?

The regression occurs with:

codex-cli 0.154.0

Downgrading to:

codex-cli 0.153.4

immediately restores the previous behavior.

Platform

  • MX Linux 23.6 (Debian Bookworm based)
  • XFCE
  • X11
  • Linux kernel 6.1.0-44-amd64
  • XFCE Terminal 1.1.3
  • VTE 0.70.6
  • No tmux/screen intermediary

What issue are you seeing?

Mouse text selection inside Codex CLI 0.154.0 works while the selection remains inside the currently visible terminal viewport.

However, when selecting a long Codex response and dragging the mouse beyond the upper visible boundary in order to extend the selection through previous terminal output, the existing selection suddenly disappears instead of continuing to autoscroll and extend.

This makes it impossible to conveniently select and copy long Codex analyses spanning multiple screenfuls.

The same workflow worked normally before upgrading to 0.154.0.

Steps to reproduce

  1. Start Codex CLI 0.154.0 in XFCE Terminal.
  2. Produce output spanning several screenfuls, for example a numbered list from 1 to 500.
  3. Start selecting text with the left mouse button.
  4. Keep the button pressed and drag upward beyond the visible terminal viewport to extend the selection into earlier output.
  5. The existing selection disappears instead of continuing through the scrollback buffer.

Holding Shift while dragging does not fix the problem.

Starting Codex with:

codex --no-alt-screen

does not fix the problem either.

Control tests

The following A/B tests were performed on the same machine, terminal and desktop session.

Normal Bash

A 500-line output generated with:

seq 1 500

can be selected normally across multiple screenfuls.

Result: works

Codex CLI 0.154.0

Large mouse selection disappears when extending the selection beyond the visible terminal boundary.

Result: fails

Codex CLI 0.154.0 with --no-alt-screen

Same behavior.

Result: fails

Codex CLI 0.153.4

After downgrading from 0.154.0 to 0.153.4, the previous mouse-selection behavior immediately works again in the same XFCE Terminal environment.

Result: works

No XFCE Terminal, VTE, X11, mouse, or desktop configuration was changed between these tests.

Expected behavior

Mouse selection should continue to autoscroll and extend through previous terminal output when dragging beyond the visible viewport, as it does with Codex CLI 0.153.4 and with ordinary Bash output.

Actual behavior

With Codex CLI 0.154.0, the active selection disappears when attempting to extend it beyond the visible viewport.

Additional information

This appears to be a regression introduced in Codex CLI 0.154.0.

--no-alt-screen does not resolve it, which suggests that alternate-screen mode alone is not responsible.

Possibly related issues:

  • #38017 – Status animation makes mouse selection and copying unreliable in GNOME Terminal/VTE
  • #44398 – Astra composer sparkle animation prevents mouse text selection in kitty (0.154.0)

Those reports appear related to TUI redraws/animations interfering with native terminal selection, although the exact reproduction here is different: selection works initially and is lost specifically when extending it across the viewport boundary.

For now, downgrading to Codex CLI 0.153.4 completely restores the expected behavior.

What steps can reproduce the bug?

see above

What is the expected behavior?

No response

Additional information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the regression in Codex CLI 0.154.0 using XFCE Terminal with output such as seq 1 500, then compare it with 0.153.4 and --no-alt-screen. Start by tracing terminal rendering, redraw, and mouse-selection handling across the 0.153.4 to 0.154.0 change. Done means dragging beyond the viewport preserves the selection and extends it through scrollback, matching Bash and 0.153.4.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.