Codex slash commands are built-in actions you run by typing / in the composer, such as /model to switch models, /permissions to change what Codex may do without asking, and /compact to free context. The Codex CLI has more than 50 of them; the IDE extension and desktop app have shorter lists of their own.
This page lists them all, grouped by what you are trying to do, with the details that are easy to miss. It is based on OpenAI's CLI slash commands reference, IDE extension slash commands and desktop app slash commands, read on 26 October 2026, when the latest Codex CLI release was 0.164.0.
How do you use slash commands in Codex?
Type / in the composer to open the popup, keep typing to filter, and press Enter. Many commands take inline text, for example /plan Propose a migration plan for this service or /new bug bash to name the new chat.
While Codex is working, type a slash command and press Tab to queue it for the next turn. Codex parses queued commands when they run, so any menu or error appears after the current turn ends. A few commands, such as /plan, /clear, /cd and /worktree, are unavailable while a task is running.
The list you see depends on your environment and access. /fast appears only when the current model offers a Fast tier, and /setup-default-sandbox only on Windows with the degraded sandbox.
Which CLI slash commands control the chat session?
| Command | What it does |
|---|---|
/new |
Start a fresh chat in the same CLI session |
/clear |
Clear the terminal and start a fresh chat |
/resume |
Reopen a saved chat from your session list |
/fork |
Copy the current chat into a new one to try another approach |
/side (or /btw) |
Open a temporary side chat without disturbing the main one |
/rename |
Rename the current chat |
/compact |
Replace earlier turns with a summary to free context |
/recap |
Summarize the chat without compacting it |
/export |
Export the full conversation as Markdown, to a file or the clipboard |
/copy |
Copy the latest completed response (also Ctrl+O) |
/archive |
Archive the session; restore it later with codex unarchive |
/delete |
Permanently delete the session and its spawned sessions |
/app |
Continue the session in the ChatGPT desktop app (macOS and Windows) |
/quit, /exit |
Exit the CLI |
Three distinctions trip people up. /clear and /new both start a new chat, but only /clear wipes the terminal; Ctrl+L clears the view and keeps the chat. /compact frees context, /recap only summarizes. /archive keeps the transcript, /delete does not.
Which commands change the model, permissions and behavior?
| Command | What it does |
|---|---|
/model |
Choose the model and reasoning effort |
/fast |
Toggle the model's Fast tier and save the choice |
/plan |
Switch to plan mode, optionally with a first prompt |
/goal |
Set, view, edit, pause, resume or clear a persistent task goal |
/permissions |
Change what Codex can do without asking, such as Auto or Read Only |
/approve |
Retry once an action the automatic reviewer denied |
/memories |
Turn memory use and generation on or off |
/experimental |
Toggle experimental features, such as Network proxy |
/goal keeps a target attached to the chat while a long task runs, for example /goal Finish the migration and keep tests green. Goals can be up to 4,000 characters; for more, point the goal at a file.
Use /permissions to loosen or tighten approvals for the rest of the session. /approve is narrower: it retries one recent action that automatic review blocked. The approvals and sandbox guide explains the modes, and the Codex models guide helps you choose in /model.
Which commands work with code and changes?
| Command | What it does |
|---|---|
/diff |
Show the Git diff, including untracked files |
/review |
Ask Codex to review your working tree |
/init |
Generate an AGENTS.md scaffold in the current folder |
/mention |
Attach a file or folder to the chat |
/ide |
Include open files and the current selection from your IDE |
/cd |
Move an idle chat to another folder |
/pwd (or /cwd) |
Show the working directory |
/worktree |
Start or continue a chat in a managed Git worktree |
/review focuses on behavior changes and missing tests and uses the session model unless you set review_model in config.toml. Follow it with /diff to see the exact changes. /init gives you a first draft of project instructions; the Codex AGENTS.md guide explains what to keep in it.
Which commands manage tools, skills and extensions?
| Command | What it does |
|---|---|
/mcp |
List configured MCP tools; /mcp verbose adds server details, /mcp login <name> signs in |
/apps |
Browse apps (connectors) and insert one as $app-slug |
/plugins |
Browse, install and toggle plugins |
/hooks |
Review, trust or disable lifecycle hooks |
/skills |
Browse and apply a skill |
/import |
Bring in Claude Code or Cursor setup, projects and recent chats |
/import runs only from a local TUI session, not during a task or in remote sessions. It looks at up to 50 chats from the last 30 days. Related guides: Codex MCP, Codex plugins, Codex hooks and Codex skills.
Which commands handle agents, background work and diagnostics?
| Command | What it does |
|---|---|
/agents |
Open the command center for chats on a shared server |
/subagents |
Switch to a subagent's thread |
/ps |
Show background terminals and their recent output |
/stop (or /clean) |
Stop all background terminals |
/daemon |
Manage the local background server |
/status |
Show the model, approval policy, writable roots and token usage |
/usage |
Show daily, weekly or cumulative account usage |
/debug-config |
Show config layer order and policy sources |
/warnings |
Revisit warnings from the session |
/feedback |
Send logs and diagnostics to the Codex maintainers |
/logout |
Sign out and clear local credentials |
When something behaves oddly, /status and /debug-config usually explain it: the first shows what is active, the second shows which config layer set it. The Codex troubleshooting guide goes further.
Which commands change how the terminal looks?
/statusline picks footer items such as model, context, rate limits and Git branch. /title sets the terminal title, /theme the syntax theme, /keymap remaps shortcuts, /vim toggles Vim mode in the composer, /raw toggles plain scrollback for easier copying, /tui chooses scrollback or fullscreen for the next launch, and /pets adds or hides a terminal pet. /statusline, /title, /theme and /keymap save their choice to config.toml. /vim and /raw apply to the current session; make them the default with tui.vim_mode_default = true or tui.raw_output_mode = true.
Which slash commands work in the IDE extension and desktop app?
The IDE extension and desktop app share most commands, with a few differences:
| Command | IDE | App | What it does |
|---|---|---|---|
/model, /reasoning |
Yes | Yes | Choose the model or reasoning effort |
/plan, /goal |
Yes | Yes | Plan mode and persistent goals |
/review |
Yes | Yes | Review uncommitted changes or compare against a base branch |
/compact, /side, /fork |
Yes | Yes | Manage context and chats |
/local, /cloud, /cloud-environment |
Yes | Yes | Run locally or in the cloud, and pick the environment |
/worktree, /project |
Yes | Yes | Run in a new worktree; choose a project for new chats |
/init, /mcp, /memories, /fast, /approve |
Yes | Yes | Same as in the CLI |
/ide-context |
Yes | Yes | Turn IDE context on or off |
/status, /feedback |
Yes | Yes | Chat ID, context and rate limits; send feedback |
/personality |
Yes | No | Choose how Codex responds, where the model supports it |
/new, /rename, /archive, /pin, /chat, /usage, /pet |
No | Yes | Chat and account actions in the app, not the IDE extension. All but /pin and /chat are also CLI commands |
/local and /cloud have no CLI equivalent: they move a chat between your machine and Codex cloud. See the Codex IDE extension guide and Codex app guide for the rest of each interface.
Can you add your own slash commands to Codex?
Not in the way you might expect. Codex used to support custom prompts: Markdown files in ~/.codex/prompts/ that you run as /prompts:<name>, with $1 to $9, $ARGUMENTS and named placeholders. OpenAI's custom prompts page now says: "Custom prompts are deprecated. Use skills for reusable instructions that Codex can invoke explicitly or implicitly."
Skills are the replacement. A skill is a folder with a SKILL.md file. You call it with $skill-name or /skills, or Codex picks it up when your request matches its description. In the desktop app, enabled skills also appear in the slash list. Unlike custom prompts, skills can live in your repo under .agents/skills, so the whole team gets them. When you run /import, Claude Code slash commands are converted into skills. The skills vs slash commands guide compares the two models, and Claude Code's equivalents are in the Claude Code slash commands guide.
Where should your reusable prompts live?
Since custom prompts are on their way out, it helps to keep the prompts and skills you rely on somewhere that outlasts any one tool. Kipt keeps your prompts and Agent Skills as Markdown in a private GitHub repo you own, with fill-in blanks, tags and Cmd+K search, and installs every skill into Codex with npx skills add https://github.com/<you>/<repo>.git --all -g. The free SKILL.md generator converts an old custom prompt into a skill in your browser.