Skip to main content
Watch: I Built an AI App Without Leaving Databricks

Codex CLI reference - Slash commands

Codex CLI slash commands

Codex CLI documents 58 slash commands, including /permissions, /ide and /keymap. You type these inside an interactive Codex CLI session. Each row gives the docs' description, accepted values and an example where one is documented.

Last verified 2 official pagesFull Codex CLI reference

Codex CLI slash commands
CommandDescriptionExample
/permissions

Set what Codex can do without asking first. Relax or tighten approval requirements mid-session, such as switching between Auto and Read Only.

Docs: /permissions
-no example
/ide

Include open files, current selection, and other IDE context. Pull editor context into the next prompt without re-explaining what’s open in your IDE.

Docs: /ide
-no example
/keymap

Remap TUI keyboard shortcuts. Inspect and persist custom shortcut bindings in config.toml.

Docs: /keymap
-no example
/vim

Toggle Vim mode for the composer. Switch between Vim normal/insert behavior and the default composer editing mode.

Docs: /vim
-no example
/setup-default-sandbox

Set up the elevated agent sandbox (Windows only). Replace the degraded Windows sandbox after Codex offers the elevated setup.

Docs: /setup-default-sandbox
-no example
/agents

Open the agent command center. Browse chats and switch between agents on the connected server.

Docs: /agents
-no example
/subagents

Switch the active subagent thread. Inspect or continue work in a subagent from the current session.

Docs: /subagents
-no example
/apps

Browse apps (connectors) and insert them into your prompt. Attach an app as $app-slug before asking Codex to use it.

Docs: /apps
-no example
/plugins

Browse installed and discoverable plugins. Inspect plugin tools, install suggested plugins, or manage plugin availability.

Docs: /plugins
-no example
/hooks

View and manage lifecycle hooks. Inspect configured hooks, trust new or changed hooks, or disable non-managed hooks before they run.

Docs: /hooks
-no example
/clear

Clear the terminal and start a fresh chat. Reset the visible UI and chat context together when you want a fresh start.

/clear [name]

Docs: /clear
/clear release prep
/rename

Rename the current chat. Give a saved session a recognizable name without leaving the TUI.

Docs: /rename
/rename <name>
/archive

Archive the current session. Remove the current session from active session lists without deleting its transcript.

Docs: /archive
-no example
/delete

Permanently delete the current session. Remove the transcript and descendant sessions when archiving isn’t enough.

Docs: /delete
-no example
/compact

Summarize the visible chat to free tokens. Use after long runs so Codex retains key points without blowing the context window.

Docs: /compact
-no example
/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.

Docs: /copy
-no example
/diff

Show the Git diff, including files Git isn’t tracking yet. Review Codex’s edits before you commit or run tests.

Docs: /diff
-no example
/exit

Exit the CLI (same as /quit). Alternative spelling; both commands exit the session.

same as /quit

Docs: /exit
-no example
/experimental

Toggle experimental features. Enable options such as Network proxy or Prevent sleep while running.

Docs: /experimental
-no example
/approve

Approve one retry of a recent auto review denial. Retry a command or action that the auto reviewer denied.

Docs: /approve
-no example
/memories

Configure memory use and generation. Turn memory injection or memory generation on or off without leaving the TUI.

Docs: /memories
-no example
/skills

Browse and use skills. Improve task-specific behavior by selecting a relevant local skill.

Docs: /skills
-no example
/import

Import Claude Code or Cursor setup, projects, and chats. Migrate supported external-agent artifacts into Codex configuration and local files.

Docs: /import
-no example
/feedback

Send logs to the Codex maintainers. Report issues or share diagnostics with support.

Docs: /feedback
-no example
/init

Generate an AGENTS.md scaffold in the current directory. Capture persistent instructions for the repository or subdirectory you’re working in.

Docs: /init
-no example
/logout

Sign out of Codex. Clear local credentials when using a shared machine.

Docs: /logout
-no example
/mcp

List configured Model Context Protocol (MCP) tools. Check which external tools Codex can call during the session; add verbose for server details.

/mcp verbose; /mcp login <name>

Docs: /mcp
/mcp verbose
/mention

Attach a file to the chat. Point Codex at specific files or folders you want it to inspect next.

Docs: /mention
/mention src/lib/api.ts
/model

Choose the active model (and reasoning effort, when available). Use gpt-6-luna or gpt-6.1-sol if shown.

Docs: /model
-no example
/fast

Toggle a Fast service tier when the model catalog exposes one. Turn the current model’s Fast tier on or off and persist the selection.

Docs: /fast
-no example
/plan

Switch to plan mode and optionally send a prompt. Ask Codex to propose an execution plan before implementation work starts.

/plan [prompt]

Docs: /plan
/plan Propose a migration plan for this service
/goal

Set, edit, pause, resume, view, or clear a task goal. Give Codex a persistent target to track while a larger task runs.

/goal <objective>, /goal edit, /goal pause, /goal resume, /goal clear; objectives must be non-empty and at most 4,000 characters

Docs: /goal
/goal Finish the migration and keep tests green
/ps

Show background terminals and their recent output. Check long-running commands without leaving the main transcript.

Docs: /ps
-no example
/stop

Stop all background terminals. Cancel background terminal work started by the current session.

alias: /clean

Docs: /stop
-no example
/fork

Fork the current chat into a new chat. Branch the active session to explore a new approach without losing the current transcript.

Docs: /fork
-no example
/app

Continue the current session in the ChatGPT desktop app. Move from the TUI to the desktop app on macOS or Windows.

Docs: /app
-no example
/side

Start an ephemeral side chat. Ask a focused follow-up without disrupting the main chat’s transcript.

alias: /btw

Docs: /side
/side Check whether this plan has an obvious risk
/raw

Toggle raw scrollback mode. Make terminal selection and copying less formatted while reviewing long output.

/raw, /raw on, /raw off

Docs: /raw
/raw on
/resume

Resume a saved chat from your session list. Continue work from a previous CLI session without starting over.

Docs: /resume
-no example
/new

Start a new chat inside the same CLI session. Reset the chat context without leaving the CLI when you want a fresh prompt in the same repo.

/new [name]

Docs: /new
/new bug bash
/quit

Exit the CLI. Leave the session immediately.

Docs: /quit
-no example
/review

Ask Codex to review your working tree. Run after Codex completes work or when you want a second set of eyes on local changes.

Docs: /review
-no example
/status

Display session configuration and token usage. Confirm the active model, approval policy, writable roots, and remaining context capacity.

Docs: /status
-no example
/usage

View account token usage or use a rate-limit reset. Inspect daily, weekly, or cumulative ChatGPT token activity from inside the TUI.

/usage daily | weekly | cumulative

Docs: /usage
/usage daily
/debug-config

Print config layer and requirements diagnostics. Debug precedence and policy requirements, including experimental network constraints.

Docs: /debug-config
-no example
/statusline

Configure TUI status-line fields interactively. Pick and reorder footer items (model/context/limits/git/tokens/session) and persist in config.toml.

Docs: /statusline
-no example
/title

Configure terminal window or tab title fields interactively. Pick and reorder title items such as project, status, thread, branch, model, and task progress.

Docs: /title
-no example
/theme

Choose a syntax-highlighting theme. Preview and persist a terminal syntax-highlighting theme.

Docs: /theme
-no example
/pets

Choose or hide a terminal pet. Personalize the TUI with a built-in or custom ambient pet.

alias: /pet; /pets off

Docs: /pets
/pets off
/tui

Choose the terminal mode for the next launch. Switch between terminal scrollback and a fullscreen transcript.

Docs: /tui
-no example
/export

Export the conversation as Markdown. Save a complete transcript to a file or copy it to the clipboard.

/export [file]

Docs: /export
/export session.md
/recap

Generate a summary of the current conversation. Catch up on the chat without compacting its context.

Docs: /recap
-no example
/cd

Change the session’s working directory. Continue an idle primary chat in another directory.

/cd <path>; /cd alone uses your home directory

Docs: /cd
/cd <path>
/pwd

Show the working directory. Check the directory the active session uses.

alias: /cwd

Docs: /pwd
-no example
/worktree

Start or continue a chat in a managed Git worktree. Work in a separate checkout of a local repository.

Docs: /worktree
-no example
/daemon

Open background server controls. Inspect the connection and manage a local server owned by Codex.

Docs: /daemon
-no example
/warnings

View retained warnings and diagnostics. Revisit warnings that appeared during the session.

Docs: /warnings
-no example
/voice

Experimental /voice command in the Codex CLI. Admins can disable it by setting features.realtime_conversation to false in requirements.toml.

Docs: /voice
-no example

The rest of the Codex CLI reference

FAQ

How many slash commands does Codex CLI have?

The official Codex CLI docs list 58 slash commands, including /permissions, /ide and /keymap. All of them are in the table above, in the docs' order.

What does /permissions do in Codex CLI?

Set what Codex can do without asking first. Relax or tighten approval requirements mid-session, such as switching between Auto and Read Only.

Where are Codex CLI slash commands documented?

On 2 official docs pages at learn.chatgpt.com, last read on October 17, 2026. Every row in the table links the exact section it came from.

More on Codex CLI

Sources

Last verified . Names and examples are copied verbatim from the 2 official pages below, and every row above links the exact section it came from.

Newsletter

Know when your tools change

One email per week. New coding agent releases, the flags and commands they add, and what they mean for how you work.