Codex CLI keyboard shortcuts

Codex CLI gives you a small TUI around a running coding task. The useful keys are the ones that steer the current turn, queue the next instruction, move through prompt history, and change reasoning effort.

Begin with the controls around the current turn. Once stopping, resuming, and editing feel familiar, the session and reasoning controls become much easier to use without breaking your train of thought.

Steering a running task

Enter injects instructions into the current turn while Tab queues work for the next turn instead of interrupting.

ActionWindowsmacOSLinux
Send the message, or inject into the running turnEnterEnterEnter
Queue a follow-up for the next turnTabTabTab
Interrupt the running taskEscEscEsc
Edit your previous messageKeep pressing to walk back through the transcript. The composer must be empty.EscEscEscEscEscEsc

Session control

Stop, resume, exit, or change the current Codex session without abandoning the terminal.

ActionWindowsmacOSLinux
Cancel the current operationPress twice to quit the session.CtrlCCtrlCCtrlC
Exit CodexPress twice to force quit.CtrlDCtrlDCtrlD
Clear the terminal UI, keeping the conversationCtrlLCtrlLCtrlL
Toggle the shortcut overlay???

Input and history

Edit the prompt in progress and move through the instructions you have already entered.

ActionWindowsmacOSLinux
Open the current draft in an external editorUses VISUAL, falling back to EDITOR.CtrlGCtrlGCtrlG
Copy the last agent response to the clipboardCtrlOCtrlOCtrlO
Next match in reverse searchCtrlSCtrlSCtrlS
Navigate draft historyDown moves forward.UpUpUp
Fuzzy search files to attach to the conversation@@@
Run the line as a shell command!!!

Reasoning effort

Change how much reasoning Codex spends on the current task before you send the next instruction.

ActionWindowsmacOSLinux
Increase reasoning effortShiftUpShiftUpShiftUp
Decrease reasoning effortShiftDownShiftDownShiftDown
Edit the most recently queued messageShiftLeftShiftLeftShiftLeft

Make the useful keys stick

A coding agent should remain steerable. Learn the keys that stop or reshape a turn before you worry about the rest, because confidence comes from knowing you can change course.

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