The terminal composer
The interactive terminal's composer is a full line editor, so a message can be as long as it needs to be.
- Send:
Entersends. - New line:
Ctrl-JorAlt-Enteradds a line break (or just paste one). - Pasting: paste anything, including many lines. The whole block lands in the composer as one editable message and is never sent line by line. A large paste collapses to a short placeholder like
[#1 pasted 120 lines]so it doesn't bury the screen; the real text is what gets sent. This works even in terminals without bracketed-paste support. - History: messages are remembered per project folder and survive restarts, multi-line ones included.
- Shell commands: a line starting with
!runs in your own shell. See "Running your own commands".
Keys
| Key | Does |
|---|---|
Enter | send the message |
Ctrl-J, Alt-Enter | insert a line break |
Up / Down | move between lines, then step through past messages |
Ctrl-R | search past messages (type to filter, Ctrl-R again for older, Enter to accept, Esc to cancel) |
Tab | complete a slash command or an @-file mention (fuzzy: @tuied finds src/tui-editor.ts) |
Ctrl-A / Ctrl-E | start / end of line |
Alt-B / Alt-F | move a word |
Ctrl-W | delete the word before the cursor |
Ctrl-K / Ctrl-U | delete to end / start of line |
Ctrl-Y | paste back what was just deleted |
Ctrl-X Ctrl-E | open the draft in $VISUAL/$EDITOR and come back with it |
Ctrl-L | repaint the screen |
/image | attach the image on your clipboard (also /paste) |
Ctrl-C | discard the draft (twice in a row to leave) |
Esc | while the agent works: clear what you typed, or stop the run if nothing is typed |
Ctrl-D | leave (on an empty composer) |
Shift-Tab | switch approval mode (plan → ask → auto-edit → full auto → plan) |
Vim keys
/vim turns on modal editing in the composer and remembers it; /vim off goes back.
- Each prompt starts in insert mode, so typing a message never needs a mode change.
Escgoes to normal mode.- The marker in front of the prompt shows the mode:
IorN. Terminals that support it also show a bar cursor for insert and a block for normal.
Supported in normal mode:
- Motions:
h j k l w W b B e E 0 ^ $ gg G, with counts (3w,d2j) - Insert:
i a I A o O s - Edits:
x X D C r - Operators:
d c yover any motion, plusdd cc yy - Paste and undo:
p/P,u
Not supported: visual mode, text objects (ciw), registers beyond the unnamed one, marks, macros, and . repeat.
Everything else in the composer (Enter to send, Ctrl-R history search, Ctrl-X Ctrl-E, pasting) works the same in both modes.