openai / openai/codex

Mouse selection disappears on scrolling with Astra model

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

Nobody has claimed this yet.

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

Description

What version of Codex CLI is running?

codex-cli 0.154.0

What subscription do you have?

20x pro

Which model were you using?

gpt-6-astra

What platform is your computer?

Ubuntu x86_64

What terminal emulator and version are you using (if applicable)?

xfce terminal

Codex doctor report
Yes — this is a **Codex CLI TUI bug specific to Astra’s decorative animation**, not a problem with your terminal.

Astra currently enables a little “star/sparkle” effect in the composer. In Codex CLI 0.154.0, that animation triggers terminal redraws roughly every 150 ms. Those redraws can interfere with the terminal emulator’s native mouse selection. When you drag beyond the top edge, the terminal tries to auto-scroll while maintaining the selection; an Astra redraw occurs at the same time and the selection gets invalidated/reset. ([GitHub][1])

That also explains your very useful observation:

> Astra tab → selection disappears
> Sol tab → selection works

Sol doesn't use the Astra-specific sparkle/“whimsy” effect, so it isn't continuously repainting that part of the terminal. The Codex source explicitly describes `tui.whimsy` as controlling decorative effects including **“Astra composer stars.”** ([GitHub][2])

There are already multiple reports of exactly this family of problems: Astra preventing mouse text selection, cursor jumping around while idle, and selection/scrolling behaving badly because of the repeated redraws. One report even reproduced it on Ubuntu 24.04. ([GitHub][1])

The easiest fix is to put this in `~/.codex/config.toml`:


[tui]
whimsy = false


Then restart Codex. This **keeps normal TUI animations but removes Astra's stars**, and users have confirmed that mouse selection starts working normally again. ([GitHub][1])

You can also test it without changing your config:


codex -c tui.whimsy=false


If you want to eliminate all potentially troublesome redraw animations instead:


[tui]
animations = false


or:


codex -c tui.animations=false


Disabling all animations is a broader workaround and has also fixed other TUI/redraw problems. ([GitHub][3])

So the underlying sequence is approximately:


mouse drag upward
	↓
pointer reaches top of terminal
	↓
terminal begins scrollback/autoscroll selection
	↓
Astra sparkle timer fires
	↓
Codex redraws TUI
	↓
terminal screen/cursor state changes
	↓
native terminal selection is cancelled


There is also a newly reported Codex 0.154.0 regression specifically describing **mouse selection breaking when extended beyond the terminal viewport**, with 0.153.4 reportedly working. ([GitHub][4]) So what you're seeing is very likely the interaction of that viewport-selection regression with Astra's frequent redraws.

I would use **`whimsy = false` rather than `animations = false`**. It removes the thing causing the Astra-specific behavior while leaving the rest of the Codex UI intact.

[1]: https://github.com/openai/codex/issues/44398?utm_source=chatgpt.com "[Bug] Astra composer sparkle animation prevents mouse text selection in kitty (0.154.0) · Issue #44398 · openai/codex · GitHub"
[2]: https://github.com/openai/codex/blob/main/codex-rs/config/src/types.rs?utm_source=chatgpt.com "codex/codex-rs/config/src/types.rs at main · openai/codex · GitHub"
[3]: https://github.com/openai/codex/issues/44728?utm_source=chatgpt.com "macOS VoiceOver regression in 0.154.0: repeated output fragments; disabling animations restores usability · Issue #44728 · openai/codex · GitHub"
[4]: https://github.com/openai/codex/issues?utm_source=chatgpt.com "Issues · openai/codex · GitHub"
What issue are you seeing?
Image
What steps can reproduce the bug?

just select test and drag outside of the window, up

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

Start by reproducing the issue on Ubuntu with Astra using the reported drag-outside-the-window steps, then compare the related selection and redraw reports linked in the body. Read codex-rs/config/src/types.rs for the tui.whimsy and animation settings. Done means terminal mouse selection remains intact while scrolling beyond the viewport without requiring those workarounds.

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
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.