Complete command list
Every Codex CLI slash command on one page: syntax, kind, and availability for all 57 official rows, plus examples, effects, and cautions by category.
Written and reviewed by Eric Han · Co-founder & CTO, reopt
Key takeaways
- Reviewed 2026-10-23 against Codex CLI 0.163.0. The 57 official rows can include aliases and removed entries; this is not a count of universally runnable commands.
- Use these commands inside the running CLI. Shell commands and flags are in the terminal CLI reference.
- Command guides below the tables give each command's syntax, examples, and effects. Commands with more material, such as /model, /mcp, /hooks, and /statusline, continue on their own pages.
Reading the labels · Terminal CLI reference
Official slash table
| Command / syntax | Kind · status | Purpose and availability | Details |
|---|---|---|---|
/permissions | Built-in · Current reference | Change Codex approval and permission policy during a session. | Guide |
/ide | Built-in · Current reference | Include open files, selections, and IDE context in the next prompt. | Guide |
/keymap | Built-in · Current reference | Inspect and remap TUI keyboard shortcuts. | Guide |
/vim | Built-in · Current reference | Toggle Vim mode for the Codex TUI composer. | Guide |
/setup-default-sandbox | Built-in · Conditional | Set up the elevated Windows agent sandbox when Codex is running in degraded restricted-token mode. Native Windows only; distinguish this from Linux sandboxing under WSL. | Guide |
/agents | Built-in · Current reference | Browse and switch chats in the server agent command center. | Guide |
/subagents | Built-in · Current reference | Switch the active subagent thread in the current session. | Guide |
/apps | Built-in · Current reference | Browse apps and connectors, then insert app mentions into the prompt. | Guide |
/plugins | Built-in · Current reference | Browse installed and discoverable Codex plugins. | Guide |
/hooks | Built-in · Current reference | Review lifecycle hooks and manage trust or disabled state. | Guide |
/clear | Built-in · Current reference | Clear the terminal and current chat context, then start a fresh Codex chat. | Guide |
/rename | Built-in · Current reference | Rename the current saved Codex chat without changing its transcript or execution state. | Guide |
/archive | Built-in · Current reference | Archive a completed or abandoned Codex session. | Guide |
/delete | Built-in · Current reference | Permanently delete the current Codex session transcript and spawned descendant sessions. | Guide |
/compact | Built-in · Current reference | Summarize a long conversation to free context. | Guide |
/copy | Built-in · Current reference | Pick a whole Codex response, code block, or blockquote and copy it as Markdown; the 0.162.0 release notes add navigating and copying transcript blocks. | Guide |
/diff | Built-in · Current reference | Review staged, unstaged, and untracked Git changes from inside Codex. | Guide |
/exit | Built-in · Current reference | Exit the Codex CLI session; equivalent to /quit. | Guide |
/experimental | Built-in · Current reference | Toggle experimental Codex features from the TUI. | Guide |
/approve | Built-in · Current reference | Approve one retry of a recent auto-review denial. | Guide |
/memories | Built-in · Current reference | Configure memory use and generation for Codex sessions. | Guide |
/skills | Built-in · Current reference | Browse and apply local skills for task-specific behavior. | Guide |
/import | Built-in · Conditional | Import Claude Code or Cursor setup, project files, and recent chats into Codex. Run it from a local TUI when no task is running. Release 0.157.0 enabled it in remote and local background-server sessions, while the official command page still lists those as unavailable. | Guide |
/feedback | Built-in · Current reference | Send feedback and diagnostics to Codex maintainers. | Guide |
/init | Built-in · Current reference | Generate an AGENTS.md scaffold for persistent repository instructions. | Guide |
/logout | Built-in · Current reference | Sign out of Codex and clear local credentials for the current user. | Guide |
/mcp | Built-in · Current reference | List configured MCP tools and inspect server diagnostics; the 0.161.0 release notes add /mcp login to sign in to a server from the session. | Guide |
/mention | Built-in · Current reference | Attach a file or path to the conversation. | Guide |
/model | Built-in · Current reference | Switch among GPT-6 Astra, GPT-6.1 Sol, and GPT-6 Luna, the earlier GPT-6 Sol and GPT-5.6 models, and supported reasoning effort levels. | Guide |
/fast | Built-in · Conditional | Turn Fast mode on or off, or report its status, to change the service tier without changing reasoning effort. Requires Fast support in the model catalog; check credit usage for the selected service tier. | Guide |
/plan | Built-in · Current reference | Switch to plan mode and optionally send a planning prompt. | Guide |
/goal | Built-in · Current reference | Set, inspect, pause, resume, or clear a persistent long-running task goal. | Guide |
/ps | Built-in · Current reference | Show background terminals and recent output. | Guide |
/stop | Built-in · Current reference | Stop all background terminals owned by the current Codex session. | Guide |
/fork | Built-in · Current reference | Branch the current conversation into a new thread. | Guide |
/app | Built-in · Conditional | Continue the current CLI session in the ChatGPT desktop app on macOS and Windows. Session handoff is available for supported macOS and Windows apps. | Guide |
/side, /btw | Built-in · Current reference | Start an ephemeral side conversation from the current thread. | Guide |
/raw | Built-in · Current reference | Toggle raw scrollback mode for easier terminal selection and copying. | Guide |
/resume | Built-in · Current reference | Reopen the saved-session picker to continue earlier Codex work across interruptions, remote app-server sessions, and large multi-thread task histories. | Guide |
/new | Built-in · Current reference | Start a new conversation inside the current CLI session. | Guide |
/quit | Built-in · Current reference | Exit the Codex CLI session cleanly, with /exit as the equivalent alias, after reviewing the diff and stopping background terminals. | Guide |
/review | Built-in · Current reference | Ask Codex to review the current working tree. | Guide |
/status | Built-in · Current reference | Inspect session configuration, token usage, model, and policy. | Guide |
/usage | Built-in · Current reference | Open the account usage analytics dashboard or apply an available rate-limit reset. | Guide |
/debug-config | Built-in · Current reference | Inspect Codex config layers, policy sources, and requirements diagnostics. | Guide |
/statusline | Built-in · Current reference | Configure TUI footer status-line fields. | Guide |
/title | Built-in · Current reference | Configure terminal window or tab title fields. | Guide |
/theme | Built-in · Current reference | Choose and persist the TUI syntax-highlighting theme. | Guide |
/pets, /pet | Built-in · Current reference | Choose or hide an ambient terminal pet in the Codex TUI. | Guide |
/tui | Built-in · Current reference | Choose the fullscreen UI for your next launch; fullscreen transcripts are the default from 0.157.0. | Guide |
/export | Built-in · Current reference | Export the complete TUI conversation as Markdown to the clipboard or a new file. | Guide |
/recap | Built-in · Current reference | Manual task recaps and the automatic recap setting | Guide |
/cd | Built-in · Current reference | Track the 0.149.0 working-directory commands and verify their live behavior in the installed slash-command help. | Guide |
/pwd, /cwd | Built-in · Current reference | Show the working directory (alias /cwd). | Guide |
/worktree | Built-in · Current reference | Run new or forked sessions in isolated Git checkouts, enabled by default from 0.156.0 | Guide |
/daemon | Built-in · Current reference | Menu for updating the local background server; eligible interactive sessions start it automatically from 0.157.0. | Guide |
/warnings | Built-in · Current reference | Revisit retained warnings and diagnostics. | Guide |
Release additions, aliases, and older commands
These entries track evidence outside the official table and names from older documents. For removed or renamed entries, use the current replacement given in the command guide.
| Command | Kind · status | Current guidance |
|---|---|---|
/sandbox-add-read-dir <absolute-directory-path> | Built-in · Not in current table | Older sandbox read-path command, absent from the current reference. |
/agent | Built-in · Not in current table | Older /agent spelling; use /agents for the command center and /subagents for child threads. |
/personality | Built-in · Not in current table | Older style command, absent from the current table; use AGENTS.md for response preferences. |
/approvals | Alias · Renamed | Legacy alias for the /permissions command. |
/voice | Built-in · Release-tracked | Voice conversations, enabled by default from 0.156.0, with the F8 toggle and /voice settings |
/config | Built-in · Release-tracked | Searchable settings panel (0.163.0). |
Command guides
Syntax, examples, and effects for commands without a page of their own, grouped by category. Select "Guide" in the tables above to jump to a command. Unless noted, the installed command menu and account or organization settings determine availability.
Conversation and context
/clear
Clear the terminal and current chat context, then start a fresh Codex chat.
/clearKind Built-in · Current reference.
Effects Starts a fresh conversation. Restate instructions that depended on the previous conversation when needed.
More sources Changelog
When to use it
- Inspect
/diff, then use/clearbefore beginning an unrelated task. - Run
/exportbefore/clearwhen the transcript is an audit artifact.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/clear | Clears the display and starts a fresh chat | Both the UI and conversation should reset |
/new [name] | Starts a new named chat | The new session needs a name immediately |
/compact | Summarizes the same chat | You must preserve the current context |
/exit | Exits the CLI | The terminal session itself is finished |
/clear clears the terminal and starts a fresh chat. The Developer Commands signature checked on
2026-08-30 has no name argument, so this handbook no longer documents /clear [name]. Use
/new [name] when the new chat needs a name at creation time.
Cautions
/cleardoes not revert Git changes or delete generated files.- Record a name, session ID, or export first when the old transcript must be recoverable.
- If the installed build differs, treat its slash popup and
/as the build-specific contract.
/rename
Rename the current saved Codex chat without changing its transcript or execution state.
/rename [name]Kind Built-in · Current reference.
Examples
/rename parser-migrationEffects Changes the current session's name while retaining its conversation.
More sources Slash_Command.Rs
When to use it
- Run
/rename AUTH-241 refresh-token raceto record the issue and purpose. - Run
/renamewithout arguments and edit the suggested title to match the team convention.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/rename | Renames the current chat | Existing work needs a searchable name |
/new [name] | Creates and names a new chat | You need a fresh context |
/title | Configures the terminal window title | You need to distinguish OS windows or tabs |
/rename [name] updates the saved name of the current chat without changing its transcript.
Cautions
- Renaming does not change the transcript or Git branch.
- Do not put secrets, customer data, or tokens in chat names.
- Prefer a short searchable prefix over a long description.
- Unnamed tasks receive automatic titles in 0.150.0+, but durable work should still use a reviewed team-readable name.
/delete
Permanently delete the current Codex session transcript and spawned descendant sessions.
/deleteKind Built-in · Current reference.
Effects Opens the permanent session-deletion flow. Use archive when you only want to put the session aside.
More sources Changelog
When to use it
- Delete a temporary test session that included sensitive prompt material.
- Remove an abandoned experiment and its spawned descendant sessions.
- Before deleting an audit-relevant session, capture required evidence in a ticket, PR, or export.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/delete | Permanently removes the transcript | The record should not be retained |
/archive | Keeps the transcript recoverable | You only want to clean the active list |
/quit | Exits without changing retention | You want to leave the session intact |
/delete is an official slash command for permanently deleting the current Codex session
transcript and exiting the TUI. Use it for sensitive or disposable sessions where archiving is not
enough.
Cautions
- Deletion is permanent; check retention, audit, and incident-response needs first.
/deleteis unavailable while a task is running or inside a side conversation.- If you only want to clean the resume list, use
/archive.
/compact
Summarize a long conversation to free context.
/compactKind Built-in · Current reference.
Effects Replaces older conversation context with a summary. Identify decisions and constraints that must survive before compacting.
When to use it
- Compact after a long investigation before moving into implementation.
- Compact before handing a session to another teammate, then run
/status.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/compact | Summarizes long transcript context | The session is long but still useful |
/clear | Clears and starts a fresh chat | You want a true reset |
/new | Starts a new conversation | You want a new task in the same CLI |
/compact summarizes the visible conversation so Codex can keep the critical points without
overloading the context window.
Cautions
- Review the summary if the task contains subtle requirements.
- Do not compact away unresolved blockers, IDs, test results, or acceptance criteria.
/memories
Configure memory use and generation for Codex sessions.
/memoriesKind Built-in · Current reference.
Effects Manages memory settings for future sessions; it does not erase the current conversation or all previously stored memories.
More sources Memories
When to use it
- Disable memory behavior before working with sensitive external context.
- Verify memory settings when a long-running project depends on team preferences.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/memories | Controls memory use and generation | Long-term context boundaries matter |
/compact | Summarizes the current transcript | You only need to reduce current context |
/clear | Starts fresh visible chat flow | You want a new conversation surface |
/memories controls whether Codex uses existing memories and whether new sessions contribute to memory generation.
Cautions
- Treat memories as a convenience layer with explicit privacy rules.
- Be conservative when web, MCP, or browser context is involved.
/init
Generate an AGENTS.md scaffold for persistent repository instructions.
/initKind Built-in · Current reference.
Effects Starts creation or updating of project instructions. Review the proposed file contents and project scope.
When to use it
- Run
/initat the repository root before writing team-specific Codex guidance. - Edit the generated
AGENTS.mdto include test commands, coding standards, and safety rules.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/init | Creates persistent instruction scaffolding | The repo does not yet have Codex guidance |
/status | Shows current session state | You need to verify loaded context |
/mention | Attaches files to the current turn | You need one-off context |
/init creates an AGENTS.md scaffold in the current directory so future Codex sessions can load
repository-specific instructions.
Cautions
- Treat the generated file as a scaffold, not a finished policy.
- Keep instructions concise and maintainable; stale instructions are worse than missing instructions.
/mention
Attach a file or path to the conversation.
/mention <path>Kind Built-in · Current reference.
Examples
/mention src/main.tsEffects References a selected file or path in the prompt without editing the file merely by mentioning it.
When to use it
- Mention the file that contains the failing behavior before asking for a fix.
- Mention a design doc or config file when the next request depends on it.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/mention | Attaches one-off file context | The next turn needs a specific path |
/init | Creates persistent repo instructions | The context should live across sessions |
/status | Shows current workspace state | You need to confirm roots and policy |
/mention highlights a file or folder for Codex so the next turns can reference that context
directly.
Cautions
- Mention only the files that matter; too much context can distract the model.
- Do not mention files containing secrets unless the task truly requires it and the policy allows it.
/fork
Branch the current conversation into a new thread.
/forkKind Built-in · Current reference.
Effects Branches the current conversation into a separate thread for another approach.
When to use it
- Fork before trying an alternate implementation path.
- Use
codex forkfrom the shell when you need to fork a saved session rather than the current one.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/fork | Creates a new branch of the conversation | You need a longer alternate path |
/side | Opens a short ephemeral detour | You need a focused question |
/resume | Reopens saved history | You need to continue previous work |
/fork clones the current conversation into a new thread with a fresh ID, preserving the original
transcript.
Cautions
- Forked work still needs review, diff inspection, and tests.
- Name or title related sessions so you can identify them later.
/side
Start an ephemeral side conversation from the current thread.
/sideKind Built-in · Current reference · Aliases /btw.
Effects Handles a side question separately from the main task flow.
More sources Changelog
When to use it
- Use
/side Check whether this plan has an obvious riskfor a short independent critique. - Ask a policy or documentation question without polluting the main transcript.
- Let the human decide whether the side result should influence the parent thread.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/side | Temporary side conversation | You need a short detour |
/fork | New longer-lived thread | You need alternate implementation work |
/subagents | Switches to a spawned agent thread | You need to inspect an existing agent |
/side (/btw) starts a focused side conversation without switching the main task away from the parent
thread.
Cautions
- You cannot open
/sidefrom inside another side conversation. /sideis unavailable in review mode.- Use
/forkfor longer alternate implementations.
/resume
Reopen the saved-session picker to continue earlier Codex work across interruptions, remote app-server sessions, and large multi-thread task histories.
/resumeKind Built-in · Current reference.
Effects Continues the selected saved conversation. From 0.160.0, saved permissions are restored unless you explicitly override them. Check its working directory, model, and permissions after resuming.
More sources Rust V0.160.0
When to use it
- Resume a prior migration thread, then run
/statusand/goalbefore continuing. - Use
/titleor/statuslineafter resume when many sessions have similar names. - After a long break, compare
/diffand the current branch state before editing again.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/resume | Reopens saved conversation history | You need to continue earlier work |
/new | Starts a fresh conversation | You want a clean task |
/fork | Branches a conversation | You want an alternate path |
/resume opens the saved-session picker so you can continue work from a previous CLI session. It is
the command for preserving continuity across interruptions, remote app-server sessions, and large
multi-thread task histories.
Cautions
- After resume, confirm model, permissions, working directory, and active goal.
- Do not assume old context is still correct after external code changes.
- If the repository changed outside the thread, inspect current Git state before relying on old assumptions.
/new
Start a new conversation inside the current CLI session.
/new [name]Kind Built-in · Current reference.
Examples
/new parser-migrationEffects Starts a fresh conversation. Restate instructions that depended on the previous conversation when needed.
When to use it
- Use
/newwhen switching to an unrelated task in the same repository. - Use
/planimmediately after/newwhen the new task has risk or ambiguity.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/new | Starts a fresh conversation | You want a clean prompt in the same CLI |
/clear | Clears the terminal and starts fresh | You also want the visible UI reset |
/quit | Exits the CLI | You are done with the terminal session |
/new [name] resets chat context inside the same CLI session and optionally persists a thread name.
Cautions
- Save important details before starting a new conversation.
/newdoes not replace Git hygiene; review changes before changing tasks.
/export
Export the complete TUI conversation as Markdown to the clipboard or a new file.
/exportKind Built-in · Current reference · Release evidence v0.148.0. This entry is absent from the current command table or tracked separately through releases. Check the evidence and installed build.
Effects Exports conversation content to the supported destination. Code and local paths in the conversation may be included.
More sources Changelog · Rust V0.148.0
Choose the clipboard or a new Markdown file as the destination.
When to use it
- Preserve a long investigation as evidence for a team document or issue.
- Save a reproducible work record as a Markdown artifact.
- Export a migration or incident-response conversation for retrospective review.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/export | Exports the complete TUI conversation | You need the whole work record |
/copy | Copies the latest completed response | You only need the latest result |
/raw | Simplifies terminal scrollback | You want to select part of the visible transcript manually |
/export exports the complete current TUI conversation as Markdown to the clipboard or a new file.
Cautions
- The exported file contains conversation content; check its destination and whether it belongs in the repository.
- Remove secrets, access tokens, customer data, and local absolute paths before external sharing.
- Do not treat conversation export as a replacement for structured audit logs or retention policy.
/recap
Manual task recaps and the automatic recap setting
/recapKind Built-in · Current reference · Release evidence v0.153.0. Tracked through releases outside the slash table. Manual /recap remains available with tui.auto_recap = false.
Effects Shows a short recap of the conversation. It serves a different purpose from context compaction.
More sources Changelog
Use /recap for a manual recap. Disable automatic recaps in user configuration with:
[tui]
auto_recap = false0.153.0 explicitly preserves manual /recap when automatic recaps are disabled. Add the key to an existing [tui] table rather than duplicating the table. /compact is a separate command for freeing context space.
Cautions
Tracked through releases outside the slash table. Manual /recap remains available with tui.auto_recap = false.
Planning and execution
/plan
Switch to plan mode and optionally send a planning prompt.
/planKind Built-in · Current reference.
Effects Switches to a planning workflow. Review the plan and scope before implementation starts.
More sources Rust V0.159.0
When to use it
- Use
/plan Propose a migration plan for this packagebefore editing a risky module. - Use
/planafter/statuswhen you need Codex to reason through scope before implementation.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/plan | Enters planning mode | You need a plan before edits |
/goal | Persists a long-running objective | The task will continue across turns or sessions |
/side | Starts a focused detour | You need a short separate risk check |
/plan switches the active conversation into plan mode. You can include inline text as the first
planning request.
From 0.159.0, you can scroll the transcript with the mouse wheel while the prompt asking whether to implement the plan is open, so earlier plan steps stay reviewable.
Cautions
/planis temporarily unavailable while a task is already running.- Planning is not verification; still run tests or reviews after implementation.
/ps
Show background terminals and recent output.
/psKind Built-in · Current reference.
Effects Lists background terminal work in the current session. From 0.158.0, multiline commands are shown in the preview.
More sources Rust V0.158.0
When to use it
- Run
/psbefore/stopso you know what will be cancelled. - Check
/psbefore exiting a session that started a dev server or long test run.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/ps | Shows background terminals | You need to inspect running work |
/stop | Stops background terminals | You need to cancel session-owned work |
/status | Shows session state | You need model, policy, or token state |
/ps lists experimental background terminals and shows recent output so you can understand what is
still running.
From 0.158.0, /ps also shows multiline commands in its preview.
Cautions
- Background terminals appear when the relevant exec mechanism is in use.
/psinspects session-owned background terminals, not every process on the machine.
/stop
Stop all background terminals owned by the current Codex session.
/stopKind Built-in · Current reference · Aliases /clean.
Effects Stops active background work in the current session.
When to use it
- Run
/psfirst, then/stopwhen a watcher or long test is no longer needed. - Use
/stopbefore leaving a session that started background work.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/stop | Cancels background terminal work | Session-owned commands should stop |
/ps | Lists background terminal work | You need to inspect before stopping |
/exit | Exits the CLI | You are done with the session itself |
/stop stops all background terminals for the current session. /clean remains available as an
alias.
Cautions
/stoptargets Codex background terminal work. It does not guarantee cleanup of unrelated external processes.- Inspect with
/psbefore stopping when there is any doubt.
Review and verification
/review
Ask Codex to review the current working tree.
/reviewKind Built-in · Current reference.
Effects Starts a dedicated review of changes. Decide which findings to apply after inspecting the review.
When to use it
- Run
/reviewafter implementation and before committing. - Follow with
/diffwhen you need to inspect the exact changed lines behind a finding.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/review | Reviews risk and correctness | You need a code-review pass |
/diff | Shows exact changes | You need to inspect the patch |
/status | Shows session state | You need context before review |
/review asks Codex to review local working tree changes, focusing on behavior changes, risks, and
missing tests.
Cautions
- Review findings are not a substitute for running tests.
- Make sure user edits and Codex edits are understood in a dirty worktree.
Models and settings
/fast
Turn Fast mode on or off, or report its status, to change the service tier without changing reasoning effort.
/fastKind Built-in · Conditional. Requires Fast support in the model catalog; check credit usage for the selected service tier.
Effects Switches the supported model's fast processing path. It is separate from reasoning effort and may have different billing or quota rules.
When to use it
- Use
/fast onwhen faster responses justify increased credit consumption. - Use
/fast offto switch back, and/fast statusto verify the setting.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/fast | Changes Fast/Standard service behavior | You want speed control without changing model family |
/model | Changes the active model | You need a different model |
/statusline | Displays footer status | You want Fast state visible all the time |
/fast turns Fast mode on or off, or reports the current Fast mode status.
Cautions
- The command is visible only when the active model catalog offers a Fast tier.
- Document when the team expects Fast mode to be allowed.
Permissions and integrations
/permissions
Change Codex approval and permission policy during a session.
/permissionsKind Built-in · Current reference · Aliases /approvals.
Effects Applies the chosen permission policy or rules to later tool calls. Managed organization settings can restrict the available choices.
More sources Rust V0.158.0 · Rust V0.160.0
When to use it
- Start a risky refactor in a stricter mode, then move to a more autonomous mode after the plan is clear.
- Use
/statusbefore and after the change to confirm the effective approval policy.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/permissions | Changes approval and permission behavior | You need to change autonomy mid-session |
/approvals | Legacy alias | You are handling an older playbook or habit |
/status | Inspects current state | You need to confirm the active policy |
/permissions adjusts what Codex can do without asking first. Use it to tighten or relax approval
requirements while the session is still running.
From 0.158.0, approval for sending terminal input to commands running with elevated permissions (write_stdin_approval) is on by default. From 0.160.0, a session started in a directory outside a project skips the folder-trust prompt and applies workspace-write permissions and granular approval defaults only when local execution, configuration, and managed policy allow them. Use /status to confirm the permissions in effect.
Cautions
- Treat
/permissionsas part of the safety boundary, not as a convenience toggle. - Re-check policy after side conversations, resumed sessions, or remote app-server flows.
/ide
Include open files, selections, and IDE context in the next prompt.
/ideKind Built-in · Current reference.
Effects Shows the current session's IDE connection and integration target. File edits occur through subsequent requests and tool calls.
More sources Ide
When to use it
- Ask Codex to refactor the function currently selected in your IDE.
- Reuse open-file context without restating every relevant path.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/ide | Adds editor context | The current IDE selection matters |
/mention | Adds paths manually | You are working from the CLI and know the exact path |
/status | Shows session state | You need model, permission, or root details |
/ide brings IDE context such as open files and the current selection into the next Codex prompt.
Cautions
- IDE context does not replace complete project context.
- Check open sensitive files before attaching editor state.
/setup-default-sandbox
Set up the elevated Windows agent sandbox when Codex is running in degraded restricted-token mode.
/setup-default-sandboxKind Built-in · Conditional. Native Windows only; distinguish this from Linux sandboxing under WSL.
Effects Runs the Windows default-sandbox setup flow.
More sources Slash_Command.Rs
When to use it
- Run it after Codex detects the degraded Windows sandbox and offers elevated setup.
- Verify the resulting sandbox and approval state with
/statusand/permissions.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/setup-default-sandbox | Installs the elevated Windows sandbox | You need to replace degraded mode |
/sandbox-add-read-dir | Grants one extra absolute read path | Only a specific external directory is blocked |
/permissions | Changes approval profiles | You need a session policy change without installation |
/setup-default-sandbox configures the elevated Windows agent sandbox when Codex detects degraded mode.
Cautions
- This is Windows-only and appears only in the degraded restricted-token state.
- Check organizational endpoint and security policy before the administrator flow.
- Re-check the effective mode and writable roots with
/statusafterward.
/sandbox-add-read-dir
Older sandbox read-path command, absent from the current reference.
/sandbox-add-read-dir <absolute-directory-path>Kind Built-in · Not in current table. Absent from the reference reviewed on 2026-10-23. Check the installed menu and use current permission or agent controls.
Examples
/permissionsEffects Preserved as an older sandbox read-path command. On current installations check /permissions and permission-profile paths, and verify support in the installed menu.
/approve
Approve one retry of a recent auto-review denial.
/approveKind Built-in · Current reference.
Effects Retries one selected recent auto-review denial once without changing future permission policy.
More sources Auto Review
When to use it
- Retry a local test command after you confirm the auto-review denial was too conservative.
- Keep the current permission policy while allowing one specific denied action to run again.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/approve | Retries one recent denied action | You verified the specific action is acceptable |
/permissions | Changes the permission policy | Future actions need different approval behavior |
/review | Reviews the working tree | You want Codex to inspect code changes |
/approve lets you review a recent auto-review denial and retry that specific action once.
Cautions
/approveis not a permanent permission-policy change.- Repeated denials usually mean the policy or task setup needs adjustment.
/skills
Browse and apply local skills for task-specific behavior.
/skillsKind Built-in · Current reference.
Effects Shows available skills. Executing a skill or changing its visibility is a separate action from opening the list.
More sources Build Skills · Figma Designs To Code · User Stories To Ui Mocks · Rust V0.159.0
When to use it
- Select the Figma skill to pull design context and screenshots from an exact node before implementation.
- Use
$imagegenfor UI mock directions or$playwrightto verify the implementation in a real browser. - Confirm that team-provided skills are visible in the current session.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/skills | Applies task-specific instructions | A workflow has a reusable skill |
/plugins | Manages bundled capabilities | You need plugin inventory or marketplace controls |
/apps | Inserts app connectors | You need external app context |
/skills lets you browse available Codex skills and apply the relevant skill context to a task.
Cautions
- Skills can load from project, user, or administrator locations.
- Skills that depend on scripts or MCP servers need the same approval policy review as other tools.
- The bundled
plugin-creatorskill was removed in 0.159.0 and no longer appears in the picker. - Figma, ImageGen, and Playwright are not built-in
/designcommands. Use the exact token exposed by the/skillspicker and installed bundle.
Status and diagnostics
/agent
Older /agent spelling; use /agents for the command center and /subagents for child threads.
/agentKind Built-in · Not in current table. Absent from the reference reviewed on 2026-10-23. Check the installed menu and use current permission or agent controls.
Examples
/agents
/subagentsEffects Current guidance separates /agents and /subagents. No alias or support contract is inferred for the older /agent spelling.
More sources Rust V0.160.0 · Rust V0.162.0
/apps
Browse apps and connectors, then insert app mentions into the prompt.
/appsKind Built-in · Current reference.
Effects Browses and manages available apps. App connection and approval of individual tool actions remain distinct.
When to use it
- Use
/appsbefore asking Codex to work with a connector so the app mention is explicit. - Pair
/appswith/permissionswhen the connector exposes actions with side effects.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/apps | Browses connectors/apps | You need to reference an app in a prompt |
/plugins | Manages plugin bundles | You need skills, apps, MCP, or hooks packaged together |
/mcp | Lists MCP tools | You need to inspect the actual tool surface |
/apps browses connected apps and inserts them into the composer as app mentions such as
$app-slug.
Cautions
- An app mention is not a substitute for reviewing tool permissions.
- Connector availability can differ by account, workspace, and installed plugin state.
/diff
Review staged, unstaged, and untracked Git changes from inside Codex.
/diffKind Built-in · Current reference.
Effects Displays code changes; opening the viewer does not commit or revert them.
When to use it
- Run
/diffbefore/reviewso you know the exact behavioral surface being reviewed. - Use
/diffafter applying a subagent result before merging it into the main thread.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/diff | Shows working tree changes | You need to inspect edits |
/review | Reviews risks in the working tree | You need a code-review pass |
/status | Shows session state | You need model, policy, or token state |
/diff shows the Git diff, including files Git is not tracking yet, so you can inspect Codex edits
before committing or testing.
Cautions
- Output includes staged and unstaged changes plus files Git isn't tracking yet. Exclude files that shouldn't be committed.
/diffis not a test. Run the relevant verification command after reviewing changes.- In dirty worktrees, separate user changes from Codex changes before judging the result.
/feedback
Send feedback and diagnostics to Codex maintainers.
/feedbackKind Built-in · Current reference.
Effects Opens feedback submission with diagnostic context. Review what will be sent.
When to use it
- Use
/feedbackafter a reproducible CLI issue while the session context is still fresh. - Pair it with
/debug-configwhen the issue involves config, policy, or tool availability.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/feedback | Sends support feedback | You want to report an issue |
/debug-config | Prints local diagnostics | You need to inspect config first |
/status | Shows session state | You need quick runtime facts |
/feedback collects feedback and, when requested, diagnostics or logs for maintainers.
Cautions
- Review what information you are comfortable sending.
- Remove secrets from prompts or local files before sharing repro material.
/personality
Older style command, absent from the current table; use AGENTS.md for response preferences.
/personalityKind Built-in · Not in current table. Absent from the reference reviewed on 2026-10-23. Check the installed menu and use current permission or agent controls.
Effects Since 0.156.0, friendly and pragmatic no longer select response styles; the command is also absent from the current table. Put response preferences in AGENTS.md.
More sources Rust V0.156.0
/raw
Toggle raw scrollback mode for easier terminal selection and copying.
/rawKind Built-in · Current reference.
Effects Opens a raw session view without executing code changes.
When to use it
- Copy a long build or test log exactly as it appeared.
- Paste an error trace into an issue without markdown rendering changes.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/raw | Changes scrollback selection behavior | You need exact terminal output |
/copy | Copies the latest Codex response | You only need the last assistant output |
/diff | Shows Git diff | You are reviewing file changes |
/raw toggles raw scrollback mode so terminal output is easier to select and copy without extra formatting.
Cautions
/rawdoes not clear or compact the conversation.- Document the default with team keybindings if terminal behavior changes are confusing.
/status
Inspect session configuration, token usage, model, and policy.
/statusKind Built-in · Current reference.
Effects Inspects current session state so you can check the effective model, permissions, and usage.
When to use it
- Run
/statusat the start of a task to verify model, directory, and permissions. - Run
/statusafter/permissions,/model,/resume, or/goal.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/status | Inspects runtime state | You need to know how Codex is configured |
/model | Changes model | You need to switch after checking state |
/debug-config | Explains config layers | You need deeper config diagnostics |
/status displays session configuration and token usage, including the active model, approval
policy, writable roots, and remaining context capacity.
Status display in 0.155.0–0.155.1
0.155.0 added live reasoning summaries in the status row and completion timestamps. In 0.155.1, new local TUI sessions default summaries to disabled while respecting explicit settings.
Cautions
/statustells you state; it does not change policy or fix configuration by itself.- In remote or resumed sessions, re-check state before editing.
/debug-config
Inspect Codex config layers, policy sources, and requirements diagnostics.
/debug-configKind Built-in · Current reference.
Effects Displays effective configuration and its sources without editing configuration files.
More sources Config Reference
When to use it
- Run
/debug-configwhenconfig.tomldoes not appear to match runtime behavior. - Use it before changing managed or project-scoped configuration.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/debug-config | Explains config layers and policy sources | You need root-cause diagnostics |
/status | Shows current session state | You need a quick snapshot |
/permissions | Changes approval policy | You need to adjust behavior |
/debug-config prints configuration layer diagnostics and policy details, including approval
policies, sandbox modes, MCP servers, rules, residency, and experimental network settings.
Cautions
- Diagnostics may expose paths or policy details; share output carefully.
- Do not change managed policy locally without understanding ownership.
/title
Configure terminal window or tab title fields.
/titleKind Built-in · Current reference.
Effects Adjusts the terminal title; use rename to change the session name.
More sources Changelog · Rust V0.117.0
When to use it
- Add branch, project, or thread fields when several Codex sessions are open.
- Use action-required title items so pending user intervention is easier to notice.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/title | Changes terminal title fields | You need to identify windows or tabs |
/statusline | Changes footer fields | You need persistent in-session status |
/status | Prints session state | You need a one-time snapshot |
/title opens a picker for terminal title fields such as app name, project, status, thread, branch,
model, and task progress.
Cautions
- Title fields are a visibility aid, not an operational source of truth.
- Use
/statuswhen policy or model state matters.
Display and input
/keymap
Inspect and remap TUI keyboard shortcuts.
/keymapKind Built-in · Current reference.
Effects Inspect and persist shortcuts, including a leader key. In 0.163.0 the default leader is Ctrl+X and hints remain until selection or cancellation. Voice mute moved to F9.
More sources Config Reference · Changelog · Codex CLI 0.163.0
When to use it
- Use
/keymapwhen tmux, SSH, VS Code terminal, or JetBrains terminal conflicts with default bindings. - Use
/keymap debugto inspect terminal key events when the changelog-supported debug flow is available. - Review Vim composer contexts before standardizing modal editing shortcuts.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/keymap | Remaps shortcuts | Input or navigation shortcuts conflict |
/statusline | Changes footer items | Visibility fields need adjustment |
/title | Changes terminal title items | Window identification needs adjustment |
/keymap edits TUI shortcut bindings by context and action, then persists custom bindings to
tui.keymap in config.toml.
Cautions
- Key names and contexts can expand by CLI version; document values observed in the UI.
- Avoid forcing personal preferences as team defaults unless they solve a real conflict.
/vim
Toggle Vim mode for the Codex TUI composer.
/vimKind Built-in · Current reference.
Effects Toggles Vim editing behavior for terminal input.
More sources Changelog
When to use it
- Use Vim normal and insert modes while drafting longer prompts.
- Test Vim composer behavior before setting it as the default for new sessions.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/vim | Changes composer editing mode | You prefer Vim-style input |
/keymap | Remaps shortcuts | Specific keys conflict with your terminal or team defaults |
/theme | Changes syntax colors | The issue is display, not input behavior |
/vim switches the Codex TUI composer between default editing and Vim normal/insert behavior.
Cautions
Review tui.vim_mode_default = true when making Vim the default editing mode. Inspect shortcut conflicts with /keymap.
/vimis now listed in the official slash commands documentation.- Confirm that paired or training sessions will not be confused by Vim default mode.
/experimental
Toggle experimental Codex features from the TUI.
/experimentalKind Built-in · Current reference.
Effects Lets you select experimental features offered by the installed build. Follow its activation and restart instructions.
When to use it
- On 0.155.x, enable voice conversations here before trying
/voice; from 0.156.0 voice is on by default. - Inspect experimental toggles during onboarding so team docs match actual feature flags.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/experimental | Toggles optional features | You need to enable or inspect feature gates |
/debug-config | Shows config layers | You need to understand why a flag is active |
/status | Shows session state | You need runtime confirmation |
/experimental opens controls for optional Codex features. Some changes may require a restart.
Voice conversations in 0.155.0
On 0.155.x, voice conversations were enabled through /experimental before running /voice. From 0.156.0, voice conversations and worktree support are enabled by default, so no /experimental step is needed.
Cautions
- Treat experimental toggles as version-sensitive.
- Do not put experimental behavior into team standards without a version and rollback note.
/theme
Choose and persist the TUI syntax-highlighting theme.
/themeKind Built-in · Current reference.
Effects Changes the terminal color theme without editing code or conversation content.
When to use it
- Improve diff contrast in a light or dark terminal.
- Standardize the theme used during team screen-sharing and reviews.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/theme | Changes code and diff highlighting | Readability needs tuning |
/statusline | Changes footer fields | You want different visible status data |
/title | Changes terminal title fields | You need better window identification |
/theme opens the theme picker so you can preview and save Codex TUI syntax-highlighting themes.
Cautions
- 0.156.0 added six terminal themes, and inline code and file paths now use syntax theme colors.
- Themes do not change model behavior or permissions.
- Document custom theme file installation if you distribute one.
/pets
Choose or hide an ambient terminal pet in the Codex TUI.
/pets [off]Kind Built-in · Current reference · Aliases /pet.
Examples
/pets
/pets offEffects Selects a displayed pet or hides it with off.
More sources Rust V0.131.0
When to use it
- Run
/petsto choose a built-in or compatible custom pet. - Run
/pets offbefore screen-sharing or in a constrained terminal.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/pets | Chooses or hides an ambient terminal pet | You want to personalize the TUI |
/theme | Changes code and diff highlighting | You need better color contrast |
/statusline | Changes footer fields | You need different operational status data |
/pets (/pet) opens the terminal pet picker or hides the pet with off.
Cautions
- Some terminals and execution environments may not display pets.
- Do not treat the animation as a reliable task-status signal.
- Prefer accessibility and screen-sharing requirements when setting a team default.
/daemon
Menu for updating the local background server; eligible interactive sessions start it automatically from 0.157.0.
/daemonKind Built-in · Current reference · Release evidence v0.156.0. Added in release 0.156.0 and not yet in the official slash table. Launch with codex --no-daemon to bypass the shared background server.
Effects Inspect the connection and manage or update the Codex-owned local background server. From 0.163.0, restarting warns about affected work and reconnects automatically. Other sessions sharing the server can be affected.
More sources Changelog · Rust V0.156.0 · Rust V0.157.0 · Codex CLI 0.163.0
/daemon was added in Codex CLI 0.156.0 as a menu for the local background server. Use it to update the daemon package or restore a pinned package to the latest stable.
- Run
/daemon. - Choose an update action from the menu.
- If other sessions share the server, check their state after the update.
From 0.157.0, eligible interactive sessions start the background server automatically and offer recovery choices when server settings are incompatible. To bypass the shared server, launch with --no-daemon.
codex --no-daemonCautions
- Several sessions share the daemon, so an update affects them too.
- From 0.156.0, daemon packages are managed separately from the standalone CLI installation.
- The command is now listed in the official slash table (2026-10-23), so confirm it appears in the installed
/menu.
Account and usage
/exit
Exit the Codex CLI session; equivalent to /quit.
/exitKind Built-in · Current reference.
Effects Exits the CLI conversation. Choose a saved session through resume to continue later.
When to use it
- Run
/diffor/statusbefore exiting a session with meaningful local changes. - Use
/exitwhen your team prefers explicit shell-like naming over/quit.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/exit | Exits the CLI | You prefer the shell-style spelling |
/quit | Exits the CLI | You use the primary slash command name |
/new | Starts a new conversation | You want to stay in the CLI |
/exit exits the CLI. It is the alternative spelling of /quit.
Cautions
- Save, commit, or intentionally discard important work before exiting.
/exitdoes not replace process cleanup for externally started commands.
/logout
Sign out of Codex and clear local credentials for the current user.
/logoutKind Built-in · Current reference.
Effects Signs out of the current account; later authenticated operations require sign-in again.
When to use it
- Run
/logoutbefore handing a workstation to another user. - Use it during auth troubleshooting before logging in again.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/logout | Clears the Codex login session | You need to change or remove credentials |
/status | Shows current session state | You need to confirm auth and policy state |
codex login | Starts login from the shell | You need to authenticate again |
/logout signs out of Codex. Use it when rotating accounts or leaving a shared machine.
Cautions
- Log out only after confirming no long-running work depends on the current account.
- Credential storage can differ by platform and configuration.
/quit
Exit the Codex CLI session cleanly, with /exit as the equivalent alias, after reviewing the diff and stopping background terminals.
/quitKind Built-in · Current reference.
Effects Exits the CLI conversation. Choose a saved session through resume to continue later.
When to use it
- Use
/quitafter reviewing/diffand cleaning background terminals with/psand/stop. - Use
/resumelater if you need to return to saved work.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/quit | Exits the CLI | You are done with the session |
/exit | Same behavior | You prefer the alternate spelling |
/new | Starts a new chat | You want to stay in the CLI |
/quit exits Codex CLI. /exit is equivalent.
Cautions
- Save, commit, or intentionally leave changes before exiting.
- Use
/stopfirst if Codex-owned background terminals should not continue.
Aliases and older commands
/approvals
Legacy alias for the /permissions command.
/approvalsKind Alias · Renamed. Legacy alias. Use /permissions in the current menu and new documentation.
Examples
/permissionsEffects Applies the chosen permission policy or rules to later tool calls. Managed organization settings can restrict the available choices.
More sources Changelog
When to use it
- Use
/approvalsonly when following old notes or muscle memory. - Rewrite team playbooks to point users to
/permissions.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/approvals | Legacy alias | You need compatibility with old usage |
/permissions | Current primary command | You are writing new docs or training |
/status | Shows current policy | You need confirmation after changes |
/approvals still works as an alias, but the official slash popup no longer lists it. Prefer
/permissions in new documentation.
Cautions
- Do not teach
/approvalsas the primary command in new material. - Use
/permissionsfor clearer alignment with current docs.
Current settings and conversation controls
/agents
Browse and switch chats in the server agent command center.
/agentsKind Built-in · Current reference. Check availability on the connected server and installed menu.
Effects Browse chats on the connected local or remote server. Use /subagents to switch child threads in the current session.
/subagents
Switch the active subagent thread in the current session.
/subagentsKind Built-in · Current reference. Check availability on the connected server and installed menu.
Effects Inspect a child transcript or continue work in that thread. Browse server-wide chats with /agents.
/pwd
Show the working directory (alias /cwd).
/pwdKind Built-in · Current reference · Aliases /cwd. Check availability on the connected server and installed menu.
Effects Shows the active session directory; use /cd to change it.
/warnings
Revisit retained warnings and diagnostics.
/warningsKind Built-in · Current reference. Check availability on the connected server and installed menu.
Effects Reopens warnings and diagnostics seen during the session so you can inspect the cause and related configuration.
/config
Searchable settings panel (0.163.0).
/configKind Built-in · Release-tracked · Release evidence v0.163.0. Check availability on the connected server and installed menu.
Effects Search settings by category and apply supported changes immediately. Follow the panel indication for changes requiring a restart.
More sources Codex CLI 0.163.0