Repository navigation
Description
What variant of Codex are you using?
CLI, codex-cli 0.157.1.
What feature would you like to see?
A supported option to disable Codex's mouse capture independently of alternate-screen/fullscreen mode, so the enclosing terminal or multiplexer can handle selection and copy-on-select.
I use Herdr with ui.copy_on_select = true. Ordinary left-button drag selection should remain owned by Herdr and copy the selected text when the button is released, without requiring Shift or an additional copy shortcut. Inside fullscreen Codex, mouse events are forwarded to Codex instead, so Herdr's copy-on-select does not run.
Reproduction:
- Run Herdr 0.9.1 inside kitty on Linux, with Herdr's mouse capture and copy-on-select enabled.
- Start Codex CLI 0.157.1 in a pane using its default alternate-screen mode.
- Drag-select transcript text with the mouse or touchpad, without holding Shift, and release.
- Herdr does not perform its configured copy-on-select action.
Please allow users to retain the fullscreen interface while leaving mouse gestures to the enclosing terminal/multiplexer. Losing Codex-specific mouse interactions would be an acceptable tradeoff when explicitly choosing this option.
Additional information
Environment: Arch Linux x86_64, Niri/Wayland, kitty 0.49.1, Herdr 0.9.1, Codex CLI 0.157.1.
Startup output captured in isolated PTYs on this installation showed:
- Default Codex enabled mouse modes
1000,1002,1003, and SGR mouse encoding1006. - With
--no-alt-screen, those mouse modes were not enabled. - With
-c 'tui.alternate_screen="never"', those mouse modes were also not enabled.
These checks verified startup terminal control sequences, not an end-to-end clipboard test of the workaround. Herdr 0.9.1's mouse handler forwards left-button gestures to a pane when the pane requests mouse reporting, rather than starting Herdr's own selection.
Disabling alternate-screen mode is a workaround, but also changes the display/scrollback workflow. Shift-selection uses the outer terminal's selection instead of Herdr's. Neither provides the requested combination of fullscreen Codex and Herdr-owned ordinary drag-to-copy.
Related reports: #48139 (CLI copy/paste behavior on Debian) and #47469 (fullscreen mouse capture intercepting Windows Terminal right-click paste). This request specifically concerns an opt-out from mouse capture without leaving fullscreen mode.
Activity
github-actions commentedon Sep 27, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
lwmacct commentedon Sep 28, 2026
A tmux
mouse onworkflow needs this separation as well.With tmux configured to own ordinary drag selection and copy through
MouseDragEnd1Pane, 0.157.x fullscreen mode enables mouse reporting and causes tmux to forward drags to Codex. The tmux copy path therefore never runs.--no-alt-screenrestores it, but it also changes the display/scrollback model.For tmux,
mouse onis not consent for the child application to capture pointer events; it often explicitly means tmux should mediate copy-mode and selection. A setting that leaves fullscreen rendering enabled while suppressing Codex mouse reporting would preserve the terminal/multiplexer contract. Losing Codex-specific mouse interactions under that setting would be an acceptable tradeoff.lwmacct commentedon Sep 28, 2026
I'd frame this as separating transcript rendering from input ownership.
The current workaround works:
For a tmux session with
mouse onand drag-select/copy bindings, this restores the previous terminal/multiplexer path. However, it also forces users back to the scrollback UI rather than solving the actual input-ownership problem.A useful API might be:
Possible values could be:
auto: current behavior, including the existing tmux detection.always: explicitly request Codex-managed mouse reporting.never: never enable mouse reporting, leaving selection, wheel, and other mouse gestures to the enclosing terminal or multiplexer.With
never, Codex should not emit?1000h,?1002h,?1003h, or?1006h, including when entering fullscreen or overlays. Codex-managed selection, copy-on-select, right-click paste fallback, and link hover would naturally be unavailable; that is an acceptable tradeoff when the user explicitly chooses terminal/multiplexer ownership.This would particularly help tmux users because
set -g mouse onoften means tmux is intentionally responsible for selection and copy-mode. Right now Codex receives the drag events, soMouseDragEnd1Paneand the user's copy path never run.Suggested acceptance criteria:
fullscreen_transcript = truecan be combined with disabled mouse reporting.autobehavior remains unchanged.mouse onplus drag-selection ownership.gardner commentedon Sep 29, 2026
It is frustrating to have copy / paste hijacked in a remote terminal window. It means the copy / paste functionality doesn't work.
EDIT: looks like it broke ⌘-click to open URLs in my browser. This used to work with remote sessions. Cmd-click a URL on the remote session terminal and it would open on my local desktop browser.
entomb commentedon Sep 30, 2026
Seeing this on Codex CLI 0.159.2 as well. I want to keep the fullscreen/alternate-screen UI, especially the sticky input bar and other fullscreen features, while letting my terminal emulator or multiplexer own text selection and clipboard handling.
Codex capturing selection breaks normal copy-paste, particularly over SSH or inside Herdr, where copying inside Codex does not reliably reach the client clipboard.
I tried
tui.copy_on_select = "never", but that did not restore terminal-owned selection and copying. Settingtui.alternate_screen = "never"is the workaround, but it sacrifices the fullscreen UI I want to keep.Please provide an independent option to disable Codex mouse capture while retaining fullscreen rendering. Rendering mode and selection/clipboard ownership should be separate choices.