cli/slash-commands.md +43 −5
8This guide shows you how to:8This guide shows you how to:
9 9
10- Find the right built-in slash command for a task10- Find the right built-in slash command for a task
1111- Steer an active session with commands like `/model`, `/personality`,- Steer an active session with commands like `/model`, `/fast`,
1212 `/permissions`, `/experimental`, `/agent`, and `/status` `/personality`, `/permissions`, `/agent`, and `/status`
13 13
14## Built-in slash commands14## Built-in slash commands
15 15
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. |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. |
23| [`/agent`](#switch-agent-threads-with-agent) | Switch the active agent thread. | Inspect or continue work in a spawned subagent thread. |23| [`/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. |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. |
2525| [`/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 to start over. || [`/plugins`](#browse-plugins-with-plugins) | Browse installed and discoverable plugins. | Inspect plugin tools, install suggested plugins, or manage plugin availability. |
26| [`/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. |27| [`/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. |
27| [`/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. |28| [`/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. |
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. |29| [`/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| [`/mcp`](#list-mcp-tools-with-mcp) | List configured Model Context Protocol (MCP) tools. | Check which external tools Codex can call during the session. |35| [`/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. |36| [`/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. |37| [`/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. |
38| [`/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. |
37| [`/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| [`/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. |
38| [`/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| [`/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. |
39| [`/ps`](#check-background-terminals-with-ps) | Show experimental background terminals and their recent output. | Check long-running commands without leaving the main transcript. |41| [`/ps`](#check-background-terminals-with-ps) | Show experimental background terminals and their recent output. | Check long-running commands without leaving the main transcript. |
42| [`/stop`](#stop-background-terminals-with-stop) | Stop all background terminals. | Cancel background terminal work started by the current session. |
40| [`/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. |43| [`/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. |
41| [`/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. |44| [`/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. |
42| [`/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. |45| [`/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. |
45| [`/status`](#inspect-the-session-with-status) | Display session configuration and token usage. | Confirm the active model, approval policy, writable roots, and remaining context capacity. |48| [`/status`](#inspect-the-session-with-status) | Display session configuration and token usage. | Confirm the active model, approval policy, writable roots, and remaining context capacity. |
46| [`/debug-config`](#inspect-config-layers-with-debug-config) | Print config layer and requirements diagnostics. | Debug precedence and policy requirements, including experimental network constraints. |49| [`/debug-config`](#inspect-config-layers-with-debug-config) | Print config layer and requirements diagnostics. | Debug precedence and policy requirements, including experimental network constraints. |
47| [`/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. |50| [`/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. |
51| [`/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. |
48 52
49`/quit` and `/exit` both exit the CLI. Use them only after you have saved or53`/quit` and `/exit` both exit the CLI. Use them only after you have saved or
50committed any important work.54committed any important work.
63 67
64Expected: Codex confirms the new model in the transcript. Run `/status` to verify the change.68Expected: Codex confirms the new model in the transcript. Run `/status` to verify the change.
65 69
70### Toggle Fast mode with `/fast`
71
721. Type `/fast on`, `/fast off`, or `/fast status`.
732. If you want the setting to persist, confirm the update when Codex offers to save it.
74
75Expected: Codex reports whether Fast mode is on or off for the current thread. In the TUI footer, you can also show a Fast mode status-line item with `/statusline`.
76
66### Set a communication style with `/personality`77### Set a communication style with `/personality`
67 78
68Use `/personality` to change how Codex communicates without rewriting your prompt.79Use `/personality` to change how Codex communicates without rewriting your prompt.
92### Toggle experimental features with `/experimental`103### Toggle experimental features with `/experimental`
93 104
941. Type `/experimental` and press Enter.1051. Type `/experimental` and press Enter.
951062. Toggle the features you want, then restart Codex.2. Toggle the features you want (for example, Apps or Smart Approvals), then restart Codex if the prompt asks you to.
96 107
97Expected: Codex saves your feature choices to config and applies them on restart.108Expected: Codex saves your feature choices to config and applies them on restart.
98 109
169limits, git branch, token counters, session id, current directory/project root,180limits, git branch, token counters, session id, current directory/project root,
170and Codex version.181and Codex version.
171 182
183### Configure terminal title items with `/title`
184
1851. Type `/title`.
1862. Use the picker to toggle and reorder items, then confirm.
187
188Expected: The terminal window or tab title updates immediately and persists to
189`tui.terminal_title` in `config.toml`.
190
191Available title items include app name, project, spinner, status, thread, git
192branch, model, and task progress.
193
172### Check background terminals with `/ps`194### Check background terminals with `/ps`
173 195
1741. Type `/ps`.1961. Type `/ps`.
179 201
180Background terminals appear when `unified_exec` is in use; otherwise, the list may be empty.202Background terminals appear when `unified_exec` is in use; otherwise, the list may be empty.
181 203
204### Stop background terminals with `/stop`
205
2061. Type `/stop`.
2072. Confirm if Codex asks before stopping the listed terminals.
208
209Expected: Codex stops all background terminals for the current session. `/clean`
210is still available as an alias for `/stop`.
211
182### Keep transcripts lean with `/compact`212### Keep transcripts lean with `/compact`
183 213
1841. After a long exchange, type `/compact`.2141. After a long exchange, type `/compact`.
209Expected: Codex starts a fresh conversation in the same CLI session, so you239Expected: Codex starts a fresh conversation in the same CLI session, so you
210can switch tasks without leaving your terminal.240can switch tasks without leaving your terminal.
211 241
212242Unlike `/clear`, `/new` doesn’t clear the current terminal view first.Unlike `/clear`, `/new` doesn't clear the current terminal view first.
213 243
214### Resume a saved conversation with `/resume`244### Resume a saved conversation with `/resume`
215 245
262Expected: Codex inserts the app mention into the composer as `$app-slug`, so292Expected: Codex inserts the app mention into the composer as `$app-slug`, so
263you can immediately ask Codex to use it.293you can immediately ask Codex to use it.
264 294
295### Browse plugins with `/plugins`
296
2971. Type `/plugins`.
2982. Pick a plugin from the list to inspect its capabilities or available actions.
299
300Expected: Codex opens the plugin browser so you can review installed plugins and
301discoverable plugins that your configuration allows.
302
265### Switch agent threads with `/agent`303### Switch agent threads with `/agent`
266 304
2671. Type `/agent` and press Enter.3051. Type `/agent` and press Enter.