Add full text selection support to the CLI composer
What variant of Codex are you using?
CLI
What feature would you like to see?
Please add a full text selection model to the Codex CLI composer.
Right now the inline composer supports cursor movement and kill/yank-style editing well enough for short prompts, but it falls short once prompts
become multi-line and need normal text selection behavior.
Examples of expected editor behavior that appear to be missing or inconsistent:
Shift+Left/Shift+RightShift+Up/Shift+DownShift+Home/Shift+EndCtrl+Shift+Left/Ctrl+Shift+RightCtrl+Shift+Home/Ctrl+Shift+End
In particular, selecting to the beginning/end of the current line is important for editing multi-line prompts inline.
### Why this matters
The external editor (Ctrl+G) is a useful fallback, but it is much heavier than doing quick inline edits in the composer.
When editing prompts directly in the TUI, the lack of normal selection behavior makes common tasks harder than they should be, for example:
- replacing part of a line
- selecting a whole line segment
- selecting across wrapped or multiple lines
- making small edits without jumping out to the external editor
### Expected behavior
The composer should behave more like a normal terminal text editor / textarea:
- cursor movement should have selection-extending equivalents
- typing should replace the active selection
- backspace/delete should remove the active selection
- selection should work consistently for character, word, and line-oriented motions
Additional information
This looks like a feature gap rather than a single broken shortcut.
From the current code structure:
EditorKeymapexposes movement, deletion, kill, and yank actions, but noselect_*actions- the composer
TextAreaappears to track text, cursor position, wrapping, elements, and kill buffer state, but not an explicit selection anchor/
range
Home/Endare wired as movement actions, not selection-extending actions
Relevant files:
codex-rs/tui/src/keymap.rscodex-rs/tui/src/bottom_pane/textarea.rs
A reasonable implementation path would likely be:
- add selection state to the composer textarea
- add selection-aware editor actions / keybindings
- render highlighted selected ranges
- make insert/delete operations replace an active selection
- preserve correct behavior with atomic elements and vim mode
5 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Text selection in a terminal is handled by the terminal itself, not the app running in the terminal. Depending on which terminal emulator you're using, you may find configuration settings to control this.
I think there may be a terminology mismatch here.
I agree that terminal screen/scrollback selection is normally handled by the terminal emulator.
The request in this issue is different: it is about selection inside the editable composer input buffer before submitting a prompt.
Example:
Shift+Home,Shift+End, orShift+Arrow.Expected:
The range inside the editable prompt textarea should become selected. Typing should replace that selected range, and Backspace/Delete should remove it.
Actual:
No editable selection range is created/highlighted.
This cannot be implemented by the terminal emulator alone, because the terminal does not own the Codex composer buffer, cursor position, wrapping, atomic text elements, or insert/delete behavior.
So the request is not about copying rendered terminal output from scrollback. It is about standard editor selection semantics inside the Codex CLI composer.
Thanks for the clarification. Reopening.
This feature request hasn't received enough upvotes, so it is being closed automatically. If you still feel this feature is needed, please open a new feature request with an updated title and description.