Skip to content

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

Closed

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

  1. added
    bug
    on Sep 30, 2026
  2. added
    enhancement
    CLI
    TUI
    config
    on Sep 30, 2026
  3. github-actions commented on Sep 30, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  4. removed
    bug
    on Sep 30, 2026
  5. etraut-openai commented on Sep 30, 2026

    @etraut-openai
    Contributor

    Can you say more about why you want to disable this? Why not just avoid right-clicking if you don't want to copy?

  6. bolen commented on Sep 30, 2026

    @bolen
    Author

    Can you say more about why you want to disable this? Why not just avoid right-clicking if you don't want to copy?

    I use right-click a lot out of habit from previous versions, where it never copied anything. Now it silently overwrites my clipboard, which I only notice later when I paste the wrong thing. I already set copy_on_select = "never" to stop mouse copying — right-click copy should be covered by that too, or get its own opt-out. Not asking to change the default, just want a way to turn it off.

  7. etraut-openai commented on Oct 1, 2026

    @etraut-openai
    Contributor

    I'm wondering why you're right clicking. Does that map to some behavior that you want to retain?

    You have the option to switch back to scrollback mode using /tui if you prefer.

  8. maqboolkhan commented on Oct 1, 2026

    @maqboolkhan

    I also agree with @bolen and it should be optional, and I have the same habit

  9. jrfeathe commented on Oct 2, 2026

    @jrfeathe

    I need to right click to change my terminal profile back and forth between Default and High DPI. Stuck on v156 until this is fixed. Right click mapping to commands should be optional. For me, I would prefer to turn it off.

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

    CLITUIconfigenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions