/compact
Compacts the context by summarizing the earlier conversation, freeing up context space.
Use after long runs; Codex keeps the key information so the context window does not fill up.
/compact
Here are 63 OpenAI Codex slash commands, grouped by category, each with a description, when to use it and an example. Based on the official Developer commands documentation. Codex commands work in three places — the Codex CLI in a terminal, the IDE extension and the Codex mode of the ChatGPT desktop app — and each supports a slightly different set; commands available only in some of them are marked. ChatGPT on the web has its own command menu, and these commands don’t work there.
/compact /recap /side /mention /ide /ide-context /memories
/compactCompacts the context by summarizing the earlier conversation, freeing up context space.
Use after long runs; Codex keeps the key information so the context window does not fill up.
/compact
/recapGenerates a summary of the current conversation without compacting the context.
Use to catch up quickly after stepping away; to free up context space, use /compact.
/recap
/side [question]Opens a temporary side conversation that does not interrupt or affect the main conversation.
Use to ask a related question without adding the exchange to the main conversation. In the CLI you can also use /btw.
/side why does this function need a lock?
/mention <path>Adds a file or folder to the conversation so later turns can reference it directly.
Use to have Codex focus on specific files next; type a path and pick from the popup list.
/mention src/lib/api.ts
/ide [note]Brings context such as open editor files and the current selection into the next prompt.
Use when running Codex in the terminal with an IDE open, so you do not have to explain which files are open.
/ide explain the selected code
/ide-contextToggles automatically attaching IDE context.
Turn it off if you do not want every message to include editor files and selections automatically.
/ide-context
/memoriesSets whether existing memories are used and whether new memories are generated.
Available when memories are enabled for your account; the setting affects later sessions.
/memories
/model /reasoning /fast /personality /plan /goal /permissions /approve /experimental
/modelChooses the model to use (and its reasoning effort).
The list shows only models available to your account and workspace; after switching, confirm with /status.
/model
/reasoningChooses the reasoning effort for the current conversation.
Raise it for hard problems and lower it for simple tasks to go faster. In the CLI, choose it in /model.
/reasoning
/fastToggles the Fast tier for the current model, and the choice is saved.
This command appears only when the model offers a Fast tier. Run it again to turn it off.
/fast
/personalityChooses the style of Codex's responses.
Available when the current model supports multiple styles.
/personality
/plan [prompt]Switches to plan mode, optionally with a first planning request.
Have Codex produce an execution plan before changing code. Temporarily unavailable while Codex is working.
/plan design a database migration for this service
/goal [goal|edit|pause|resume|clear]Sets, views, edits, pauses, resumes, or clears the task goal.
Gives a large task a goal that is tracked continuously; with no argument, shows the current goal. Goals are limited to 4000 characters; put longer instructions in a file and reference it.
/goal finish the migration and keep all tests passing
/permissionsSets which actions Codex can perform without asking for approval.
Loosen or tighten approvals mid-session, for example switching between Auto and Read Only.
/permissions
/approveApproves one retry of the action most recently denied by auto-review.
Use when auto-review blocked a command you know is safe; retries once without changing permission settings.
/approve
/experimentalToggles experimental features, such as the network proxy and preventing sleep while running.
After choosing, restart Codex when prompted for changes to take effect.
/experimental
/review [note]Has Codex review changes in the workspace and find problems.
Use after Codex finishes a piece of work, or when you want a second look at local changes; can also compare against a base branch.
/review
/diffShows Git changes, including new files not yet tracked by Git.
Check what Codex changed before committing or running tests.
/diff
/initGenerates AGENTS.md in the current directory with standing instructions for Codex.
Run the first time you use Codex in a new project, then add coding conventions, test commands, and so on.
/init
/worktree /local /cloud /cloud-environment /project /cd /pwd
/worktreeStarts or continues a conversation in a new Git worktree.
Use to work in a separate checkout without affecting the current branch. Requires a local repository; unavailable while a task is running.
/worktree
/localRuns the conversation in the local workspace.
Use to switch from the cloud back to running on your machine.
/local
/cloudRuns the conversation in the cloud.
Available when your account can use cloud execution; suited to long-running tasks you do not want tying up your machine.
/cloud
/cloud-environmentChooses the cloud environment for this conversation.
Use when you have multiple cloud environments configured (different repositories or dependencies).
/cloud-environment
/projectChooses the project a new conversation belongs to.
/project
/cd [path]Changes the session's working directory, or switches to the home directory when no path is given.
Requires the main session to be idle, with no queued input and no background terminals.
/cd ../another-repo
/pwdShows the current session's working directory.
/pwd
/new /clear /rename /fork /resume /archive /delete /agents /subagents /copy /export /app /quit
/new [name]Starts a new conversation, optionally with a name.
Use when switching to an unrelated task. In the CLI it does not clear the terminal first; to clear the screen too, use /clear.
/new fix login issue
/clear [name]Clears the terminal and starts a new conversation.
Use to reset both the screen and the context. To clear only the screen and keep the current conversation, press Ctrl+L. Unavailable while a task is running.
/clear
/rename [name]Renames the current conversation.
Give the session a recognizable name so you can find it later with /resume.
/rename payment module refactor
/forkCopies the current conversation into a new conversation.
Use to try a different approach without losing the current history.
/fork
/resumeResumes a previously saved conversation from the session list.
Pick up where you left off in an earlier CLI session.
/resume
/archiveArchives the current session, removing it from the session list while keeping its history.
Restore it later with codex unarchive. Any running turn is stopped first.
/archive
/deletePermanently deletes the current session and any child sessions forked from it.
Use when archiving is not enough and you really want the history gone; this cannot be undone. Unavailable while the conversation is running or in a side conversation.
/delete
/agentsOpens the agent command center to browse conversations and switch between agents.
/agents
/subagentsSwitches to one of the current session's subagent threads.
View or continue work a subagent is doing.
/subagents
/copyCopies Codex's most recent complete response.
You can also press Ctrl+O.
/copy
/export [file name]Exports the whole conversation as Markdown, copying it to the clipboard or saving it to a file.
Include a file name to save directly; wait for the current turn to finish before exporting.
/export session.md
/appContinues the current session in the ChatGPT desktop app.
Switches from the terminal to the desktop app; supports macOS and Windows.
/app
/quitExits the Codex CLI.
Save or commit important changes before exiting.
/quit
/skills /mcp /apps /plugins /hooks /import /ps /stop
/skillsBrowses and uses skills, so Codex completes specific tasks following a skill's instructions.
You can also invoke one by writing $skill-name in a prompt; skills enabled in the desktop app and IDE appear directly in the command list.
/skills
/mcp [verbose|login <name>]Shows configured MCP tools and their connection status.
Confirm which external tools Codex can call in this session; add verbose for server details.
/mcp verbose
/appsBrowses apps (connectors) and inserts them into the prompt.
Once selected, an app is inserted as $app-name so you can ask Codex to use it.
/apps
/pluginsBrowses installed and available plugins.
See the tools plugins provide, install recommended plugins, or manage plugins.
/plugins
/hooksShows and manages lifecycle hooks.
Inspect configured hooks, trust new or changed hooks, or disable them before they run.
/hooks
/importImports configuration, project files, and recent conversations from Claude Code or Cursor.
Run in a local TUI session; imports up to 50 chats from the last 30 days. Unavailable while a task is running or in a remote session.
/import
/psLists background terminals and their recent output.
Check on long-running commands without leaving the main conversation.
/ps
/stopStops all background terminals in the current session.
/stop
/status /usage /statusline /title /theme /pet /tui /vim /keymap /raw /debug-config /daemon /warnings /setup-default-sandbox /feedback /logout
/statusShows session configuration and usage: current model, approval policy, writable directories, remaining context, and more.
Confirm Codex is running the way you expect.
/status
/usage [daily|weekly|cumulative]Shows your account's token usage, or uses a quota reset.
/usage weekly
/statuslineSets which items the bottom status line shows and in what order.
Options include model, context, quota, Git branch, tokens, and more; saved to config.toml.
/statusline
/titleSets which information the terminal window or tab title shows.
/title
/themeChooses a syntax highlighting theme, with a preview before saving.
/theme
/pet [off]Chooses or hides the pet in the interface.
/pet off
/tuiChooses the terminal mode for the next launch: scrollback or full screen.
Takes effect after restarting Codex.
/tui
/vimToggles Vim mode for the input box.
To enable it by default, set tui.vim_mode_default = true in config.toml.
/vim
/keymapShows and changes TUI keyboard shortcuts, saving them to config.toml.
/keymap
/raw [on|off]Toggles raw scrollback mode, making it easier to select and copy text in the terminal.
You can also press Alt+R.
/raw on
/debug-configPrints configuration layers and policy sources to troubleshoot why a setting is not taking effect.
/debug-config
/daemonOpens the management interface for the local background service.
Confirming an update exits Codex and may interrupt work in progress.
/daemon
/warningsShows warnings and diagnostics retained during the session.
/warnings
/setup-default-sandboxSets up the elevated agent sandbox on Windows.
Appears only on Windows when Codex is using a degraded sandbox; follow the prompts to complete the administrator setup.
/setup-default-sandbox
/feedbackSends feedback to the Codex team, optionally with logs.
/feedback
/logoutSigns out of Codex and clears local credentials.
Use when you are done on a shared computer.
/logout
Claude and Claude Code are trademarks of Anthropic, PBC. Codex and ChatGPT are trademarks of OpenAI. DeepSeek is a trademark of its respective owner. VibeSlash is an independent, unofficial open-source project and is not affiliated with, endorsed by, sponsored by or authorized by Anthropic, OpenAI or DeepSeek. These names are used only to describe compatibility; all trademarks belong to their respective owners.