-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Add a keyboard modal for selecting and actioning structured reply units #14386
Description
Summary
Codex should support a keyboard-first modal selection mode for assistant replies, so users can navigate structured reply units and act on them without touching the mouse.
This is the keyboard companion to #14384.
The idea is to make reply structure directly operable:
- paragraphs remain whole
- list items remain whole
- tool calls / tool results can be selected as units
- code blocks can be selected as units
Problem
Right now, once a reply has been generated, the main path for reusing part of it is still too composer-bound:
- manual text selection
- mouse interaction
- retyping
- awkward clipboard workflows
That wastes a lot of structure that Codex already produced.
The terminal should let users break attention out of the composer and operate directly on reply objects with the keyboard.
Requested behavior
Add a modal reply-selection mode with keyboard navigation, for example:
Alt+Up/Alt+Downto move selection across structured reply units- selected units are visibly highlighted
- paragraphs remain whole instead of degenerating into line fragments
- reply units can include:
- paragraphs
- bullet items
- numbered items
- code blocks
- tool calls
- tool results
Suggested actions
Inside this modal:
a= append selected unit(s) into the composer as quoted text (> ...) and remain in selection modeEnter= same asa, but return focus to the composer immediatelySpace= toggle selection for multi-selectShift+Up/Shift+Down= stretch selection range
Configurable action system
This gets much more powerful if actions are configurable instead of hardcoded.
For example, users should be able to bind keys to actions like:
append_quoteappend_plainsend_quotesend_with_prefixpipe_to_command
Example configured actions:
- quote and append, then let me continue typing
- append with a prefix like
fix this - send immediately in chat
- pipe the selected text into a shell script
Example mental model:
- select one or more reply units
- hit a key
- Codex performs the configured action on that structured selection
Why this matters
This becomes an excellent Swiss-army-knife interaction surface.
It dramatically improves developer flow because users are less trapped inside the composer and can move their attention across multiple zones:
- the live thread
- structured prior reply content
- the composer
- external command/script actions
That makes Codex feel more like an operable control surface and less like a single text box.
Design notes
- this should be visually obvious when the mode is active
- selection boundaries should follow semantic reply structure, not wrapped terminal lines
- multi-selection should feel first-class, not bolted on
- actions should be configurable in both keys and behavior
- mouse and keyboard flows should feel like siblings, not separate products
Related issue
- Mouse-first version: Support click-to-copy and shift-click quote for structured reply sections #14384
Invitation
I’d especially encourage discussion on:
- better default keybindings
- additional action types
- good semantics for tool call / tool result selection
- multi-selection UX
- whether shell-command piping should be first-class or plugin-driven