What’s Covered in This Codex Cheat Sheet (August 2026)

Codex is OpenAI’s coding agent: a Rust CLI with a full TUI, plus a Codex workspace inside the ChatGPT desktop app. Bindings below are checked against OpenAI’s slash command docs and the desktop Commands reference. ChatGPT-only keys (temporary chat, Quick Chat) stay on the ChatGPT page so this URL targets Codex search intent. Use Ghostty or Warp if Shift+Enter newlines misbehave in your terminal.

CLI TUI — session control

Open slash-command menu
/
Interrupt current turn
CtrlC
Exit Codex (EOF)
CtrlD
Clear terminal view (keeps the chat)
CtrlL
Copy latest completed Codex output
CtrlO
Open prompt in $EDITOR / $VISUAL
CtrlG
Toggle raw scrollback (easier copy)
AltR
Remap TUI shortcuts
/keymap
Toggle Vim mode in the composer
/vim

CLI TUI — while Codex is working

Inject new instructions into the current turn
Enter
Queue a follow-up for the next turn
Tab
Queue a slash command for the next turn
Tab
Attach files with fuzzy search
@
Run a local shell command
!
Edit previous user message (empty composer)
EscEsc
Submit prompt
Enter
Insert newline without sending
ShiftEnter

CLI slash commands — session

Switch model / reasoning effort
/model
Toggle Fast service tier
/fast
Enter plan mode
/plan
Set or view a task goal
/goal
Change approval policy
/permissions
Show model, sandbox, and token status
/status
View account token usage
/usage
Start a new chat in the same CLI session
/new
Clear terminal and start a fresh chat
/clear
Resume a saved session
/resume
Fork the current chat
/fork
Open an ephemeral side chat
/side
Continue this session in the desktop app
/app
Exit Codex
/quit

CLI slash commands — code & context

Summarize chat to free context
/compact
Show working-tree Git diff
/diff
Review the working tree
/review
Include IDE open files / selection
/ide
Attach a file or folder
/mention
Generate AGENTS.md in this directory
/init
List MCP tools
/mcp
Browse skills
/skills
Browse apps / connectors
/apps
Browse plugins
/plugins
Import Claude Code or Cursor setup
/import
Stop background terminals
/stop
Show background terminals
/ps

Desktop app — general

Command menu
CtrlShiftP
Command menu (alternate)
CtrlK
Open settings
Ctrl,
Show keyboard shortcuts
Ctrl/
Open folder
CtrlO
Navigate back
Ctrl[
Navigate forward
Ctrl]
Toggle sidebar
CtrlB
Toggle bottom panel
CtrlJ
Toggle terminal
Ctrl`
Clear terminal (when focused)
CtrlL
Clear all unread indicators
ShiftEsc
Increase font size
Ctrl=
Decrease font size
Ctrl-
Reset font size
Ctrl0
Close current tab or window
CtrlW
Toggle full screen
F11

Desktop app — chats

New chat
CtrlN
New chat (alternate)
CtrlShiftO
New standalone Codex chat
CtrlAltO
Open side chat
CtrlAltS
Archive chat
CtrlShiftA
Pin or unpin chat
CtrlAltP
Rename chat
CtrlAltR
Find in chat
CtrlF
Find next match
CtrlG
Find previous match
ShiftF3
Previous chat or tab
CtrlShiftTab
Next chat or tab
CtrlTab
Next chat needing attention
CtrlAltA
Go to chat 1–9
Ctrl1
Open recent chat 1–6
CtrlAlt1

Desktop app — input & modes

Open model picker
CtrlShiftM
Open project picker
CtrlAltShiftO
Start dictation
CtrlShiftD
Start voice chat
CtrlShiftV
Restore previous composer prompt
Approve request
Enter
Decline request
Esc
Toggle Activity view
CtrlAltU

Desktop app — workspace, review & browser

Search files
CtrlP
Toggle file tree
CtrlShiftE
Open review tab
CtrlShiftG
Toggle review panel
CtrlAltB
Open browser tab
CtrlT
Toggle browser panel
CtrlShiftB
Focus address bar / go to line
CtrlL
Browser back
Alt
Browser forward
Alt
Reload browser page
CtrlR
Hard reload (no cache)
CtrlShiftR
Copy working directory
CtrlShiftC
Copy session ID
CtrlAltC
Copy chat deep link
CtrlAltL

CLI TUI — session control

Open slash-command menu
/
Interrupt current turn
CtrlC
Exit Codex (EOF)
CtrlD
Clear terminal view (keeps the chat)
CtrlL
Copy latest completed Codex output
CtrlO
Open prompt in $EDITOR / $VISUAL
CtrlG
Toggle raw scrollback (easier copy)
AltR
Remap TUI shortcuts
/keymap
Toggle Vim mode in the composer
/vim

CLI TUI — while Codex is working

Inject new instructions into the current turn
Enter
Queue a follow-up for the next turn
Tab
Queue a slash command for the next turn
Tab
Attach files with fuzzy search
@
Run a local shell command
!
Edit previous user message (empty composer)
EscEsc
Submit prompt
Enter
Insert newline without sending
ShiftEnter

CLI slash commands — session

Switch model / reasoning effort
/model
Toggle Fast service tier
/fast
Enter plan mode
/plan
Set or view a task goal
/goal
Change approval policy
/permissions
Show model, sandbox, and token status
/status
View account token usage
/usage
Start a new chat in the same CLI session
/new
Clear terminal and start a fresh chat
/clear
Resume a saved session
/resume
Fork the current chat
/fork
Open an ephemeral side chat
/side
Continue this session in the desktop app
/app
Exit Codex
/quit

CLI slash commands — code & context

Summarize chat to free context
/compact
Show working-tree Git diff
/diff
Review the working tree
/review
Include IDE open files / selection
/ide
Attach a file or folder
/mention
Generate AGENTS.md in this directory
/init
List MCP tools
/mcp
Browse skills
/skills
Browse apps / connectors
/apps
Browse plugins
/plugins
Import Claude Code or Cursor setup
/import
Stop background terminals
/stop
Show background terminals
/ps

Desktop app — general

Command menu
P
Command menu (alternate)
K
Open settings
,
Show keyboard shortcuts
/
Open folder
O
Navigate back
[
Navigate forward
]
Toggle sidebar
B
Toggle bottom panel
J
Toggle terminal
Ctrl`
Clear terminal (when focused)
CtrlL
Clear all unread indicators
Esc
Increase font size
+
Decrease font size
-
Reset font size
0
Close current tab or window
W
Toggle full screen
CtrlF
Quit the app
Q

Desktop app — chats

New chat
N
New chat (alternate)
O
New standalone Codex chat
O
Open side chat
S
Archive chat
A
Pin or unpin chat
P
Rename chat
R
Find in chat
F
Find next match
G
Find previous match
G
Previous chat or tab
[
Next chat or tab
]
Next chat needing attention
A
Go to chat 1–9
1
Open recent chat 1–6
1

Desktop app — input & modes

Open model picker
CtrlM
Open project picker
O
Start dictation
CtrlD
Start voice chat
CtrlV
Restore previous composer prompt
Approve request
Return
Decline request
Esc
Toggle Activity view
U

Desktop app — workspace, review & browser

Search files
P
Toggle file tree
E
Open review tab
CtrlG
Toggle review panel
B
Open browser tab
T
Toggle browser panel
B
Focus address bar / go to line
L
Browser back
Browser forward
Reload browser page
R
Hard reload (no cache)
R
Copy working directory
C
Copy session ID
C
Copy chat deep link
L

Also see: Claude CodeChatGPTCursorGitHub CopilotGhostty

Codex Shortcuts — Frequently Asked Questions

Are Codex CLI shortcuts the same as ChatGPT shortcuts?

No. Codex CLI uses a terminal TUI: slash commands, @ file search, Tab to queue follow-ups, and Ctrl+L to clear the view. The ChatGPT desktop app also has a Codex workspace with its own bindings (Ctrl/Cmd+Shift+P command menu, Ctrl/Cmd+P file search). For ChatGPT chat keys, see our ChatGPT shortcuts page.

How do I see or change Codex CLI keyboard shortcuts?

In the CLI, type /keymap to inspect and remap TUI bindings. Codex writes custom bindings to tui.keymap in config.toml. In the desktop app, open Settings → Keyboard Shortcuts (Ctrl+/ or Cmd+/).

What is the difference between Ctrl+L and /clear in Codex CLI?

Ctrl+L only clears the terminal view and keeps the current chat. /clear resets the transcript and starts a fresh chat in the same CLI session. Both are disabled while a task is in progress.

How do I queue a message while Codex is still working?

Press Tab to queue a follow-up prompt or slash command for the next turn. Press Enter to inject instructions into the current turn. Type @ to attach files without waiting.

Where are Codex desktop shortcuts documented?

OpenAI publishes them at learn.chatgpt.com under Commands. This page lists the Codex-relevant defaults: command menu, chats, terminal, file tree, review, and the built-in browser pane.