What variant of Codex are you using?
CLI
What feature would you like to see?
Summary
Add mouse drag selection support to the Codex TUI so users can select text from both the output area and the input composer, automatically copy the selected text to the clipboard, and show a short Copied to Clipboard notification.
Motivation
When reviewing generated output, commands, paths, errors, or pasted prompt text, it is useful to quickly select and copy text directly from the TUI. Today, copying text from terminal applications can be inconsistent, especially when mouse capture, alternate screen behavior, scrollback, and input widgets are involved.
This would make common workflows smoother:
- Copy a command or file path from assistant output.
- Copy part of an error message.
- Copy selected text from the input composer before submitting.
- Select partial lines rather than only whole rows.
Proposed behavior
- Enable mouse drag selection in the TUI.
- Allow selection in the output/history area.
- Allow selection in the input composer area.
- Support partial-line and multi-line selections.
- On mouse release, copy selected non-empty text to the clipboard.
- Show a
Copied to Clipboard notification after a successful copy.
- Show a copy failure message if clipboard access fails.
- Make the selected region visibly highlighted while dragging.
Additional information
I have a local prototype that implements this behavior in codex-rs/tui, including focused tests for:
- mouse event mapping,
- partial single-line selection,
- partial multi-line selection,
- output/history selection,
- input composer selection,
- visible selection highlighting.
Would the Codex team be open to this behavior? If so, I’d be happy to clean up the patch and submit a PR if invited.
Here is my prototype: https://github.com/hamsar4j/codex/tree/feat/select-to-copy
What variant of Codex are you using?
CLI
What feature would you like to see?
Summary
Add mouse drag selection support to the Codex TUI so users can select text from both the output area and the input composer, automatically copy the selected text to the clipboard, and show a short
Copied to Clipboardnotification.Motivation
When reviewing generated output, commands, paths, errors, or pasted prompt text, it is useful to quickly select and copy text directly from the TUI. Today, copying text from terminal applications can be inconsistent, especially when mouse capture, alternate screen behavior, scrollback, and input widgets are involved.
This would make common workflows smoother:
Proposed behavior
Copied to Clipboardnotification after a successful copy.Additional information
I have a local prototype that implements this behavior in
codex-rs/tui, including focused tests for:Would the Codex team be open to this behavior? If so, I’d be happy to clean up the patch and submit a PR if invited.
Here is my prototype: https://github.com/hamsar4j/codex/tree/feat/select-to-copy