Skip to content

Feature request: allow disabling right-click copy in the TUI #49420

Description

@bolen

What version of Codex CLI is running?

0.159.0

What subscription do you have?

Pro

Which model were you using?

No response

What platform is your computer?

Darwin 25.3.0 x86_64 i386

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

No response

Codex doctor report

What issue are you seeing?

Setting copy_on_select = "never" stops copy-on-mouse-release after a left-drag selection, but right-clicking the transcript still copies the current selection to the clipboard. There is no config option to disable right-click copy, so I cannot prevent the mouse from writing to the clipboard.

What steps can reproduce the bug?

  1. In ~/.codex/config.toml, set:
    [tui]
    copy_on_select = "never"

  2. Launch codex and wait for a response to appear.

  3. Left-drag to select some transcript text, then release the mouse button.

  4. Right-click anywhere inside the transcript while the selection is still active.

  5. Observe: the selected text is copied to the clipboard, even though copy_on_select is set to "never".

What is the expected behavior?

Right-clicking the transcript should not copy the current selection to the clipboard. Copying should only happen when I explicitly invoke it — via /copy, the copy keybinding, or the terminal's own copy shortcut (⌘C) — and setting copy_on_select = "never" (or a new copy_on_right_click option) should disable all mouse-triggered copying.

Additional information

Disabling mouse reporting in the terminal (macOS Terminal: View → Allow Mouse Reporting) stops Codex from receiving any mouse events, which also prevents the right-click copy. However, this disables all mouse interaction in the TUI (scrolling, click-to-select, drag selection), not just the copy behavior, so it is not an acceptable substitute for a dedicated config option.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLITUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displayconfigIssues involving config.toml, config keys, config merging, or config updatesenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions