CodexHowSupport Us

The Codex CLI Slash Commands, Explained

Slash commands are how you talk to the CLI itself mid-session, as distinct from talking to the model. /init, /status, /permissions, /model and /review are the ones the CLI's own landing page introduces first, but the built-in list has grown well past them — the CLI defaults and versions reference carries every command with OpenAI's stated purpose. This guide sorts the ones that matter by what they change: what a session costs, what it's allowed to do, what it knows, and how a long piece of work is steered — plus a sane order to learn them in.

Typing a command while Codex is working

Type / in the composer to open the slash popup and keep typing to filter it. If a turn is already running, type the command and press Tab to queue it for the next turn. Codex parses a queued command when it actually runs, so any menu or error it produces appears after the current turn finishes — not a sign that the command was ignored.

The commands that change what a session costs

/model switches the active model, and reasoning effort where the model offers it — the direct lever behind most of this site's guidance about not simply accepting the default. Switching models with /model covers when that's worth doing. /fast toggles the current model's Fast tier when the model catalog exposes one, and saves the choice; signed in with ChatGPT, Fast draws on included usage at 2.5x the Standard rate, so it's a cost decision as much as a speed one. Toggling Fast mode with /fast has the details.

Two commands tell you what you're spending. /status shows the session's configuration and token usage — the active model, approval policy, writable roots and how much context remains — and it's the fastest answer to "what is this session actually running?" /usage shows your ChatGPT account's token activity by day, week or overall, and is also where you use a rate-limit reset. Checking Codex usage with /status and /usage turns those readings into a budget. /statusline puts model, context, limits and token counts in the footer permanently, so you stop needing to ask.

/compact summarizes the visible chat to free tokens. After a long run it keeps the key points without dragging the full history into every later turn — which matters for both cost and quality, since long sessions lose the thread as context fills.

The commands that change what a session may do

/permissions sets what Codex can do without asking first — switching between Auto and Read Only, say — without restarting the session or losing the context built up so far. /approve retries one recent action that the auto-reviewer denied, for the cases where its judgment was wrong; see configuring auto-review. /experimental toggles options such as the network proxy. And when a setting doesn't seem to take effect, /debug-config prints the layers your configuration came from and any requirements a managed environment imposes — usually quicker than reading every config file by hand.

The commands that shape what a session knows

/init writes an AGENTS.md scaffold in the current directory: persistent instructions every later session in that project reads automatically. Run it early, because the file is worth more the more sessions it serves — writing an AGENTS.md file with /init covers what to put in it. Be deliberate about its contents, too: newer models follow instructions in files like this closely, so a stray rule there shapes every session.

/mention attaches a specific file or folder; /ide pulls in what's open in your editor, including the current selection. /mcp lists the MCP tools the session can call, with server details if you add verbose. /skills, /plugins, /apps, /hooks and /memories browse and manage the other things that can feed a session context or run around it.

Steering longer work

/plan switches to plan mode, so Codex proposes an approach before it starts editing. /goal sets a persistent target for a larger task, which you can edit, pause, resume or clear. /agents opens the agent command center, and /subagents switches between subagent threads when work has been delegated. /side opens an ephemeral side chat for a quick question without cluttering the main transcript, and /fork branches the chat to try a different approach without losing the current one. /ps shows background terminals and their recent output; /stop stops them all. Newer still, /recap summarizes the conversation so far, /export saves it as Markdown, and /cd and /worktree move the session to another directory or a managed Git worktree.

Reviewing and finishing

/diff shows the Git diff, including files Git isn't tracking yet — the quickest check of what Codex actually changed. /review asks Codex for a review pass over your working tree, which is a different exercise from asking the same conversation whether its own work looks right; reviewing a Codex-generated diff covers doing that well. /copy grabs the latest finished output.

Housekeeping, and the one command to be careful with

/new starts a fresh chat in the same CLI session, /clear also clears the terminal, /resume picks up a saved chat, and /rename gives one a recognizable name. /archive removes the current session from active lists without deleting its transcript. /delete is the exception to "slash commands are harmless to explore": it permanently deletes the current session's transcript and its descendant sessions, then exits. Reach for /archive unless you're sure.

Moving in from another tool

/import brings Claude Code or Cursor setup, projects and chats into Codex configuration and local files. If you're switching tools, it's a better starting point than rebuilding by hand — and migrating a Claude Code workflow covers what still needs a human decision afterwards.

A realistic first-session sequence

For a new project: /init first, so every later session benefits from the AGENTS.md it produces, then /status to confirm the model and permissions you actually started with. Work normally, reaching for /permissions the moment a task needs more access, /model only when the task's actual shape suggests a different model, and /compact when a long session starts to sprawl. Finish with /diff and /review once there's a real change worth checking.

Combining slash commands with flags

Slash commands operate on a running session; flags like --sandbox and --ask-for-approval set the configuration a session starts with. They aren't competing mechanisms — flags decide where a session starts, slash commands adjust it once you're inside — and knowing both is what lets you start conservative and loosen deliberately as a task's real needs become clear.

What isn't a slash command

Ordinary requests — "fix this bug," "add a test for this function" — are conversation, and they're what a session spends most of its time on. Slash commands are a fixed menu of session-management actions layered on top of that conversation. The menu is longer than it used to be, but it's still a menu: if something isn't in the popup, it isn't a command, and typing it just sends text to the model.

Where to find the authoritative, current list

The slash popup itself is always current for the version you're running, which makes it the first place to look. The CLI reference page on this site records the full list as of its verified date, and OpenAI's command documentation is the source both are checked against. Commands are the part of the CLI that changes fastest between releases, so re-check after an upgrade rather than trusting a list — including this one — indefinitely.

Verified 2026-10-28 against CodexHow facts module (src/data/facts/) — see /about/#accuracy.