Repository navigation
Description
Summary
After upgrading to Codex CLI 0.156.0 and enabling Fullscreen mode through /tui, normal right-click no longer pastes clipboard text into the composer. Switching back to Scrollback mode restores right-click paste.
Shift + right-click does work in Fullscreen mode. The issue is the loss of the terminal's normal right-click paste behavior without an obvious hint about the alternative gesture.
Environment
- Codex CLI:
0.156.0(npm installation, native Windows) - OS: Windows 11 Pro, build
26200 - Terminal: Windows Terminal
1.24.11911.0 - Configuration:
[tui]withfullscreen_transcript = true - Windows Terminal:
copyOnSelect = true
Steps to reproduce
- Start Codex CLI, choose Fullscreen using
/tui, and restart Codex to apply it. - Copy some plain text to the clipboard.
- With no text selected in the composer or transcript, right-click inside the composer.
- Observe that no text is pasted.
- Press Shift + right-click: the clipboard text is pasted.
- Switch to Scrollback mode and restart Codex. Normal right-click pastes again.
Expected behavior
Ideally, right-click in the composer with no active selection should paste, while preserving right-click copying when a selection exists.
If copy-only right-click is intentional in Fullscreen mode, please make the change discoverable, for example by documenting Shift + right-click in the /tui picker or relevant shortcut help.
Actual behavior
Normal right-click with no selection has no visible effect in Fullscreen mode. The same terminal supports normal right-click paste in Scrollback mode.
Source-level observations
The following appears to explain the behavior:
- Fullscreen screen ownership enables mouse capture in
tui.rs. - The Windows implementation explicitly uses
EnableMouseCapture.execute_winapi()inalternate_screen.rs. - Composer right-click is recognized as a copy request, but
mouse_selection_range()?returnsNonewhen there is no selection. There is no clipboard-paste fallback inchat_composer/mouse.rs. - Unhandled mouse events ultimately reach a no-op branch in
app.rs.
Related change: #46895 introduced right-click copying for transcript and composer selections.
Verification scope and workaround
The interactive behavior above was reproduced on 0.156.0. Source inspection found the relevant behavior unchanged in 0.156.1 and in main inspected on 2026-09-23; those versions were not interactively tested.
Confirmed workaround: Shift + right-click, or switching back to Scrollback mode.
Activity
fidonan commentedon Sep 26, 2026
Also affected on Codex CLI 0.157.1, installed via npm on native Windows x64 with Windows Terminal and PowerShell. In this case, right-click copying works, but a plain right-click with no selection does not paste text. Windows Terminal has
copyOnSelect = false, so this is not limited to thecopyOnSelect = trueconfiguration in the original report.Reproduction
Expected: a right-click with no selection inserts clipboard text into the draft without submitting it; right-click copying keeps its existing behavior.
Source analysis and proposed local fix
Inspected and patched
rust-v0.157.1, commit36650394c5b38c2990ccf2a3457165ca3e9d9726:TuiEvent::Mouse(_)branch in app.rs without a text-paste fallback.The proposed Windows-only fallback runs after the existing selection-copy handlers decline the event. An unmodified right-button press reads text using the existing
arboarddependency and converts it intoTuiEvent::Paste. It then uses the existing paste routing and newline normalization. Mouse release and modified clicks do not trigger clipboard reads; overlays and active modal views are left to their existing handlers.This addresses native Windows text pasting. It is not presented as a fix for remote-host clipboard access or Linux/macOS mouse-paste behavior.
Validation
A local build of
codex-clisucceeded. These focused tests passed 8/8:Four new tests cover:
Four existing composer/transcript right-click-copy regression tests also passed. The new tests use injected clipboard text, not the real system clipboard. The rest of the TUI suite was not run.
Manual verification update (2026-09-26): After installation, the affected user tested the local fix and confirmed that right-click text paste is working again in Windows Terminal. This adds user-confirmed interactive verification to the automated results above. This patch has not been rebased onto or tested against current
main.Proposed patch
The patch below contains only the three TUI source/test files for this issue. No terminal settings or additional dependencies are required.
Patch against rust-v0.157.1 (3 files, 148 added lines)
bc-openai commentedon Oct 1, 2026
Thanks for the report! This is fixed in 0.158.0.
wbdb commentedon Oct 3, 2026
@bc-openai The problem persists in version 0.160.0 via PuTTY/SSH connection to Debian / Pi4:
wbdb commentedon Oct 31, 2026
@bc-openai same for 0.166.0. Edit: Worked when I change PuTTY settings to:
„Disable xterm-style mouse reporting“
But then you have the familiar drawbacks, such as scrolling through the Codex history, etc.