Repository navigation
Description
Goal
Every message the user sends is a user message, and messages sent while a turn runs behave the same as any other. The only choice is when a message goes out: right away, joining the running turn at its next tool-round boundary, or held until the turn finishes. Today, pressing Enter while a turn runs does the first. The engine adds the message after the next tool results (engine/turn.rs), the way Claude Code delivers messages sent while it works. A message can't be held until the turn ends, and pending messages can't be edited or withdrawn before they go out.
Acceptance criteria
- Enter while a turn runs keeps today's behavior and sends the message at the next tool-round boundary. Ctrl+Enter holds it until the turn finishes. Shift+Enter and Alt+Enter stay newlines. Terminals without the kitty keyboard protocol report Ctrl+Enter as plain Enter, so there the hold action also answers to the chord Ctrl+X Enter, and the input hint shows whichever form works in that terminal. Either way it is recorded, rendered, and checkpointed as an ordinary user message (Rewind to any user message #293).
- Each pending message carries an id. The engine reports delivery by id, so the TUI no longer matches delivered messages by their text (
tui/app/events.rs), and withdrawing a message the engine already took reports that it was delivered. - Pending messages show in one ordered list in the input preview, and messages held for after the turn carry a small marker. The
queued-promptsstatus segment counts them. Each pending row starts with↳, so the preview can't be mistaken for sent user turns, which start with❯. Codex lists queued messages the same way (codex-rs/tui/src/snapshots/codex_tui__status_indicator_widget__tests__renders_with_queued_messages.snap). - A named action pulls the most recent pending message back into the input for editing, defaulting to ↑ on an empty input. Esc interrupts the turn and keeps pending messages, which today it discards.
- Held messages are sent in order as new turns once the turn ends. A turn that fails or is cancelled leaves them pending without sending them.
- Both actions are in the named-action table (Archive and unarchive sessions from the /resume picker #280), so Fit modal key hints to narrow terminals and add a key overlay #281 hints and Customize TUI key bindings #278 bindings cover them.
- Tests cover a message delivered at a round boundary, a message held until the turn ends, editing and withdrawing a pending message, and cancellation with pending messages.
Notes
Claude Code also has Ctrl+Enter, which interrupts a reply that is still streaming text so the message goes out at once. That isn't planned here: oxide-code discards a partial reply when it aborts a stream, and keeping it would need its own abort policy. Enter already delivers a message as soon as the next tool round finishes, which covers the common case.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTodo
Activity
[-]Choose between steering the running turn and queueing for after it[/-][+]Send a message now or hold it until the turn finishes[/+]