Skip to main content
Watch: I Built an AI App Without Leaving Databricks

Codex CLI reference - Keyboard shortcuts

Codex CLI keyboard shortcuts

Codex CLI documents 14 keyboard shortcuts, including @, Up / Down and Ctrl+R. These work inside the Codex CLI terminal UI. Each row gives the docs' description, accepted values and an example where one is documented.

Last verified 2 official pagesFull Codex CLI reference

Codex CLI keyboard shortcuts
ShortcutDescription
@

Type @ to search for a file in the workspace and add its path to the prompt.

Docs: @
Up / Down

Press Up or Down to restore draft history.

Docs: Up / Down
Ctrl+R

Search prompt history, then press Enter to use a match or Escape to cancel.

Docs: Ctrl+R
Ctrl+O

Copy the latest completed Codex output from the main TUI (same as /copy).

Docs: Ctrl+O
!

Prefix a line with ! to run a local shell command under the current approval and sandbox settings.

Docs: !
Tab (while Codex is working)

Queue a follow-up prompt, slash command, or shell command for the next turn.

Docs: Tab (while Codex is working)
Enter (while Codex is working)

Inject new instructions into the current turn.

Docs: Enter (while Codex is working)
Escape Escape

Press Escape twice with an empty composer to edit the previous user message and fork the chat from that point.

Docs: Escape Escape
Ctrl+C

Close the session (same as /exit).

Docs: Ctrl+C
Ctrl+L

Clears only the terminal view and keeps the current chat (unlike /clear, which starts a new chat). Disabled while a task is in progress.

Docs: Ctrl+L
Alt+R

Default binding to toggle raw scrollback mode (same as /raw).

Docs: Alt+R
/

Type / in the composer to open the slash command popup.

Docs: /
Space (in /plugins)

Press Space on an installed plugin in the plugin browser to toggle its enabled state.

Docs: Space (in /plugins)
Ctrl+G

Open the editor configured by VISUAL (or EDITOR when VISUAL is not set) to write a longer prompt; save and close to return the text to the composer.

Docs: Ctrl+G

The rest of the Codex CLI reference

FAQ

How many keyboard shortcuts does Codex CLI have?

The official Codex CLI docs list 14 keyboard shortcuts, including @, Up / Down and Ctrl+R. All of them are in the table above, in the docs' order.

What does @ do in Codex CLI?

Type @ to search for a file in the workspace and add its path to the prompt.

Where are Codex CLI keyboard shortcuts documented?

On 2 official docs pages at learn.chatgpt.com, last read on October 17, 2026. Every row in the table links the exact section it came from.

More on Codex CLI

Sources

Last verified . Names and examples are copied verbatim from the 2 official pages below, and every row above links the exact section it came from.

Newsletter

Know when your tools change

One email per week. New coding agent releases, the flags and commands they add, and what they mean for how you work.