Pi coding agent keyboard shortcuts

Pi's keyboard model separates the message you are writing from the work already running. These keys handle session control, model and thinking changes, queued messages, and editing the current prompt.

Pi separates the prompt you are writing from the work already in progress. Start with session control and prompt editing, then add model, thinking, and queued-message keys when you begin steering longer runs.

Session control

Interrupt, clear, exit, or change the current pi session without losing the terminal.

ActionWindowsmacOSLinux
Clear the editor, or exit on the second pressCtrlCCtrlCCtrlC
Exit when the editor is emptyCtrlDCtrlDCtrlD
Cancel autocomplete or abort streamingEscEscEsc
Open the session tree to jump to an earlier pointEscEscEscEscEscEsc
Suspend to the backgroundResume with fg in the shell.CtrlZCtrlZCtrlZ

Models and thinking

Switch models, providers, and thinking levels while the prompt remains available.

ActionWindowsmacOSLinux
Open the model selectorCtrlLCtrlLCtrlL
Cycle scoped models forwardShift+Ctrl+P cycles backward.CtrlPCtrlPCtrlP
Cycle the thinking levelShiftTabShiftTabShiftTab
Toggle tool output expansionCtrlOCtrlOCtrlO
Toggle thinking block visibilityCtrlTCtrlTCtrlT

Message queue

While the agent works, Enter queues a steering message delivered after the current tool call, and Alt+Enter queues a follow-up for after all work finishes.

ActionWindowsmacOSLinux
Send now, or queue a steering message while busyEnterEnterEnter
Queue a follow-up messageAltEnterAltEnterAltEnter
Abort and restore queued messages to the editorEscEscEsc

Editing and input

Move through the prompt, edit text, open history, and insert a line without sending it.

ActionWindowsmacOSLinux
Complete paths or accept autocompleteTabTabTab
Fuzzy search project files to reference@@@
Edit the message in your external editorUses VISUAL or EDITOR.CtrlGCtrlGCtrlG
Paste an image from the clipboardCtrlVCtrlVCtrlV
Delete one word backwardsOption+Backspace does the same on macOS.CtrlWCtrlWCtrlW
Delete to the start of the lineCtrlUCtrlUCtrlU
Delete to the end of the lineCtrlKCtrlKCtrlK

Make the useful keys stick

Pi is easier to trust when the prompt and the running task do not compete for attention. Learn the keys that let you pause, edit, and steer, then add the model controls when you need them.

You do not need this whole page in your head. Pick two shortcuts that remove a repeated hand movement, use them until they feel ordinary, and come back for the next pair.

Make a printable sheet for this app