cli/slash-commands.md +43 −4
16Codex ships with the following commands. Open the slash popup and start typing16Codex ships with the following commands. Open the slash popup and start typing
17the command name to filter the list.17the command name to filter the list.
18 18
19When a task is already running, you can type a slash command and press `Tab` to
20queue it for the next turn. Codex parses queued slash commands when they run, so
21command menus and errors appear after the current turn finishes. Slash
22completion still works before you queue the command.
23
19| Command | Purpose | When to use it |24| Command | Purpose | When to use it |
20| ------------------------------------------------------------------------------- | --------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |25| ------------------------------------------------------------------------------- | --------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
21| [`/permissions`](#update-permissions-with-permissions) | Set what Codex can do without asking first. | Relax or tighten approval requirements mid-session, such as switching between Auto and Read Only. |26| [`/permissions`](#update-permissions-with-permissions) | Set what Codex can do without asking first. | Relax or tighten approval requirements mid-session, such as switching between Auto and Read Only. |
22| [`/sandbox-add-read-dir`](#grant-sandbox-read-access-with-sandbox-add-read-dir) | Grant sandbox read access to an extra directory (Windows only). | Unblock commands that need to read an absolute directory path outside the current readable roots. |27| [`/sandbox-add-read-dir`](#grant-sandbox-read-access-with-sandbox-add-read-dir) | Grant sandbox read access to an extra directory (Windows only). | Unblock commands that need to read an absolute directory path outside the current readable roots. |
23| [`/agent`](#switch-agent-threads-with-agent) | Switch the active agent thread. | Inspect or continue work in a spawned subagent thread. |28| [`/agent`](#switch-agent-threads-with-agent) | Switch the active agent thread. | Inspect or continue work in a spawned subagent thread. |
24| [`/apps`](#browse-apps-with-apps) | Browse apps (connectors) and insert them into your prompt. | Attach an app as `$app-slug` before asking Codex to use it. |29| [`/apps`](#browse-apps-with-apps) | Browse apps (connectors) and insert them into your prompt. | Attach an app as `$app-slug` before asking Codex to use it. |
2530| [`/clear`](#clear-the-terminal-and-start-a-new-chat-with-clear) | Clear the terminal and start a fresh chat. | Reset the visible UI and conversation together when you want a clean slate. || [`/plugins`](#browse-plugins-with-plugins) | Browse installed and discoverable plugins. | Inspect plugin tools, install suggested plugins, or manage plugin availability. |
31| [`/clear`](#clear-the-terminal-and-start-a-new-chat-with-clear) | Clear the terminal and start a fresh chat. | Reset the visible UI and conversation together when you want a fresh start. |
26| [`/compact`](#keep-transcripts-lean-with-compact) | Summarize the visible conversation to free tokens. | Use after long runs so Codex retains key points without blowing the context window. |32| [`/compact`](#keep-transcripts-lean-with-compact) | Summarize the visible conversation to free tokens. | Use after long runs so Codex retains key points without blowing the context window. |
2733| [`/copy`](#copy-the-latest-response-with-copy) | Copy the latest completed Codex output. | Grab the latest finished response or plan text without manually selecting it. || [`/copy`](#copy-the-latest-response-with-copy) | Copy the latest completed Codex output. | Grab the latest finished response or plan text without manually selecting it. You can also press `Ctrl+O`. |
28| [`/diff`](#review-changes-with-diff) | Show the Git diff, including files Git isn't tracking yet. | Review Codex's edits before you commit or run tests. |34| [`/diff`](#review-changes-with-diff) | Show the Git diff, including files Git isn't tracking yet. | Review Codex's edits before you commit or run tests. |
29| [`/exit`](#exit-the-cli-with-quit-or-exit) | Exit the CLI (same as `/quit`). | Alternative spelling; both commands exit the session. |35| [`/exit`](#exit-the-cli-with-quit-or-exit) | Exit the CLI (same as `/quit`). | Alternative spelling; both commands exit the session. |
30| [`/experimental`](#toggle-experimental-features-with-experimental) | Toggle experimental features. | Enable optional features such as subagents from the CLI. |36| [`/experimental`](#toggle-experimental-features-with-experimental) | Toggle experimental features. | Enable optional features such as subagents from the CLI. |
34| [`/mcp`](#list-mcp-tools-with-mcp) | List configured Model Context Protocol (MCP) tools. | Check which external tools Codex can call during the session. |40| [`/mcp`](#list-mcp-tools-with-mcp) | List configured Model Context Protocol (MCP) tools. | Check which external tools Codex can call during the session. |
35| [`/mention`](#highlight-files-with-mention) | Attach a file to the conversation. | Point Codex at specific files or folders you want it to inspect next. |41| [`/mention`](#highlight-files-with-mention) | Attach a file to the conversation. | Point Codex at specific files or folders you want it to inspect next. |
36| [`/model`](#set-the-active-model-with-model) | Choose the active model (and reasoning effort, when available). | Switch between general-purpose models (`gpt-4.1-mini`) and deeper reasoning models before running a task. |42| [`/model`](#set-the-active-model-with-model) | Choose the active model (and reasoning effort, when available). | Switch between general-purpose models (`gpt-4.1-mini`) and deeper reasoning models before running a task. |
3743| [`/fast`](#toggle-fast-mode-with-fast) | Toggle Fast mode for GPT-5.4. | Turn Fast mode on or off, or check whether the current thread is using it. || [`/fast`](#toggle-fast-mode-with-fast) | Toggle Fast mode for supported models. | Turn Fast mode on or off, or check whether the current thread is using it. |
38| [`/plan`](#switch-to-plan-mode-with-plan) | Switch to plan mode and optionally send a prompt. | Ask Codex to propose an execution plan before implementation work starts. |44| [`/plan`](#switch-to-plan-mode-with-plan) | Switch to plan mode and optionally send a prompt. | Ask Codex to propose an execution plan before implementation work starts. |
39| [`/personality`](#set-a-communication-style-with-personality) | Choose a communication style for responses. | Make Codex more concise, more explanatory, or more collaborative without changing your instructions. |45| [`/personality`](#set-a-communication-style-with-personality) | Choose a communication style for responses. | Make Codex more concise, more explanatory, or more collaborative without changing your instructions. |
40| [`/ps`](#check-background-terminals-with-ps) | Show experimental background terminals and their recent output. | Check long-running commands without leaving the main transcript. |46| [`/ps`](#check-background-terminals-with-ps) | Show experimental background terminals and their recent output. | Check long-running commands without leaving the main transcript. |
47| [`/stop`](#stop-background-terminals-with-stop) | Stop all background terminals. | Cancel background terminal work started by the current session. |
41| [`/fork`](#fork-the-current-conversation-with-fork) | Fork the current conversation into a new thread. | Branch the active session to explore a new approach without losing the current transcript. |48| [`/fork`](#fork-the-current-conversation-with-fork) | Fork the current conversation into a new thread. | Branch the active session to explore a new approach without losing the current transcript. |
42| [`/resume`](#resume-a-saved-conversation-with-resume) | Resume a saved conversation from your session list. | Continue work from a previous CLI session without starting over. |49| [`/resume`](#resume-a-saved-conversation-with-resume) | Resume a saved conversation from your session list. | Continue work from a previous CLI session without starting over. |
43| [`/new`](#start-a-new-conversation-with-new) | Start a new conversation inside the same CLI session. | Reset the chat context without leaving the CLI when you want a fresh prompt in the same repo. |50| [`/new`](#start-a-new-conversation-with-new) | Start a new conversation inside the same CLI session. | Reset the chat context without leaving the CLI when you want a fresh prompt in the same repo. |
46| [`/status`](#inspect-the-session-with-status) | Display session configuration and token usage. | Confirm the active model, approval policy, writable roots, and remaining context capacity. |53| [`/status`](#inspect-the-session-with-status) | Display session configuration and token usage. | Confirm the active model, approval policy, writable roots, and remaining context capacity. |
47| [`/debug-config`](#inspect-config-layers-with-debug-config) | Print config layer and requirements diagnostics. | Debug precedence and policy requirements, including experimental network constraints. |54| [`/debug-config`](#inspect-config-layers-with-debug-config) | Print config layer and requirements diagnostics. | Debug precedence and policy requirements, including experimental network constraints. |
48| [`/statusline`](#configure-footer-items-with-statusline) | Configure TUI status-line fields interactively. | Pick and reorder footer items (model/context/limits/git/tokens/session) and persist in config.toml. |55| [`/statusline`](#configure-footer-items-with-statusline) | Configure TUI status-line fields interactively. | Pick and reorder footer items (model/context/limits/git/tokens/session) and persist in config.toml. |
56| [`/title`](#configure-terminal-title-items-with-title) | Configure terminal window or tab title fields interactively. | Pick and reorder title items such as project, status, thread, branch, model, and task progress. |
49 57
50`/quit` and `/exit` both exit the CLI. Use them only after you have saved or58`/quit` and `/exit` both exit the CLI. Use them only after you have saved or
51committed any important work.59committed any important work.
135the in-progress response. The command is unavailable before the first completed143the in-progress response. The command is unavailable before the first completed
136Codex output and immediately after a rollback.144Codex output and immediately after a rollback.
137 145
146You can also press <kbd>Ctrl</kbd>+<kbd>O</kbd> from the main TUI to copy the
147latest completed response without opening the slash command menu.
148
138### Grant sandbox read access with `/sandbox-add-read-dir`149### Grant sandbox read access with `/sandbox-add-read-dir`
139 150
140This command is available only when running the CLI natively on Windows.151This command is available only when running the CLI natively on Windows.
177limits, git branch, token counters, session id, current directory/project root,188limits, git branch, token counters, session id, current directory/project root,
178and Codex version.189and Codex version.
179 190
191### Configure terminal title items with `/title`
192
1931. Type `/title`.
1942. Use the picker to toggle and reorder items, then confirm.
195
196Expected: The terminal window or tab title updates immediately and persists to
197`tui.terminal_title` in `config.toml`.
198
199Available title items include app name, project, spinner, status, thread, git
200branch, model, and task progress.
201
180### Check background terminals with `/ps`202### Check background terminals with `/ps`
181 203
1821. Type `/ps`.2041. Type `/ps`.
187 209
188Background terminals appear when `unified_exec` is in use; otherwise, the list may be empty.210Background terminals appear when `unified_exec` is in use; otherwise, the list may be empty.
189 211
212### Stop background terminals with `/stop`
213
2141. Type `/stop`.
2152. Confirm if Codex asks before stopping the listed terminals.
216
217Expected: Codex stops all background terminals for the current session. `/clean`
218is still available as an alias for `/stop`.
219
190### Keep transcripts lean with `/compact`220### Keep transcripts lean with `/compact`
191 221
1921. After a long exchange, type `/compact`.2221. After a long exchange, type `/compact`.
217Expected: Codex starts a fresh conversation in the same CLI session, so you247Expected: Codex starts a fresh conversation in the same CLI session, so you
218can switch tasks without leaving your terminal.248can switch tasks without leaving your terminal.
219 249
220250Unlike `/clear`, `/new` does not clear the current terminal view first.Unlike `/clear`, `/new` doesn't clear the current terminal view first.
221 251
222### Resume a saved conversation with `/resume`252### Resume a saved conversation with `/resume`
223 253
270Expected: Codex inserts the app mention into the composer as `$app-slug`, so300Expected: Codex inserts the app mention into the composer as `$app-slug`, so
271you can immediately ask Codex to use it.301you can immediately ask Codex to use it.
272 302
303### Browse plugins with `/plugins`
304
3051. Type `/plugins`.
3062. Choose a marketplace tab, then pick a plugin to inspect its capabilities or available actions.
307
308Expected: Codex opens the plugin browser so you can review installed plugins,
309discoverable plugins that your configuration allows, and installed plugin state.
310Press <kbd>Space</kbd> on an installed plugin to toggle its enabled state.
311
273### Switch agent threads with `/agent`312### Switch agent threads with `/agent`
274 313
2751. Type `/agent` and press Enter.3141. Type `/agent` and press Enter.