Skip to main content
reopt Handbook
reopt Handbook
Codex Command MasterLabels and command selectionHow to read a detail guideComplete command listTerminal CLI Commands and Options

Task guides

Core Command GroupSession Command GroupCustom Command GuideMCP Command and Integration GuideDesign Workflows

Conversation and context

Cmd. /archiveCmd. /copyCmd. /importCmd. /cd

Planning and execution

Cmd. /goalCmd. /app

Models and settings

Cmd. /model

Permissions and integrations

Cmd. /pluginsCmd. /hooksCmd. /mcp

Display and input

Cmd. /statuslineCmd. /tuiCmd. /worktreeCmd. /voice

Account and usage

Cmd. /usage

Verification and history

Current verification scopeHandbook updatesRelease coverage historyEarlier verification recordsCommand change history
Handbook›Codex Command Master›Complete command list
한국어KOEnglishEN

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 / syntaxKind · statusPurpose and availabilityDetails
/permissionsBuilt-in · Current referenceChange Codex approval and permission policy during a session.Guide
/ideBuilt-in · Current referenceInclude open files, selections, and IDE context in the next prompt.Guide
/keymapBuilt-in · Current referenceInspect and remap TUI keyboard shortcuts.Guide
/vimBuilt-in · Current referenceToggle Vim mode for the Codex TUI composer.Guide
/setup-default-sandboxBuilt-in · ConditionalSet 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
/agentsBuilt-in · Current referenceBrowse and switch chats in the server agent command center.Guide
/subagentsBuilt-in · Current referenceSwitch the active subagent thread in the current session.Guide
/appsBuilt-in · Current referenceBrowse apps and connectors, then insert app mentions into the prompt.Guide
/pluginsBuilt-in · Current referenceBrowse installed and discoverable Codex plugins.Guide
/hooksBuilt-in · Current referenceReview lifecycle hooks and manage trust or disabled state.Guide
/clearBuilt-in · Current referenceClear the terminal and current chat context, then start a fresh Codex chat.Guide
/renameBuilt-in · Current referenceRename the current saved Codex chat without changing its transcript or execution state.Guide
/archiveBuilt-in · Current referenceArchive a completed or abandoned Codex session.Guide
/deleteBuilt-in · Current referencePermanently delete the current Codex session transcript and spawned descendant sessions.Guide
/compactBuilt-in · Current referenceSummarize a long conversation to free context.Guide
/copyBuilt-in · Current referencePick 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
/diffBuilt-in · Current referenceReview staged, unstaged, and untracked Git changes from inside Codex.Guide
/exitBuilt-in · Current referenceExit the Codex CLI session; equivalent to /quit.Guide
/experimentalBuilt-in · Current referenceToggle experimental Codex features from the TUI.Guide
/approveBuilt-in · Current referenceApprove one retry of a recent auto-review denial.Guide
/memoriesBuilt-in · Current referenceConfigure memory use and generation for Codex sessions.Guide
/skillsBuilt-in · Current referenceBrowse and apply local skills for task-specific behavior.Guide
/importBuilt-in · ConditionalImport 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
/feedbackBuilt-in · Current referenceSend feedback and diagnostics to Codex maintainers.Guide
/initBuilt-in · Current referenceGenerate an AGENTS.md scaffold for persistent repository instructions.Guide
/logoutBuilt-in · Current referenceSign out of Codex and clear local credentials for the current user.Guide
/mcpBuilt-in · Current referenceList 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
/mentionBuilt-in · Current referenceAttach a file or path to the conversation.Guide
/modelBuilt-in · Current referenceSwitch 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
/fastBuilt-in · ConditionalTurn 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
/planBuilt-in · Current referenceSwitch to plan mode and optionally send a planning prompt.Guide
/goalBuilt-in · Current referenceSet, inspect, pause, resume, or clear a persistent long-running task goal.Guide
/psBuilt-in · Current referenceShow background terminals and recent output.Guide
/stopBuilt-in · Current referenceStop all background terminals owned by the current Codex session.Guide
/forkBuilt-in · Current referenceBranch the current conversation into a new thread.Guide
/appBuilt-in · ConditionalContinue 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, /btwBuilt-in · Current referenceStart an ephemeral side conversation from the current thread.Guide
/rawBuilt-in · Current referenceToggle raw scrollback mode for easier terminal selection and copying.Guide
/resumeBuilt-in · Current referenceReopen the saved-session picker to continue earlier Codex work across interruptions, remote app-server sessions, and large multi-thread task histories.Guide
/newBuilt-in · Current referenceStart a new conversation inside the current CLI session.Guide
/quitBuilt-in · Current referenceExit the Codex CLI session cleanly, with /exit as the equivalent alias, after reviewing the diff and stopping background terminals.Guide
/reviewBuilt-in · Current referenceAsk Codex to review the current working tree.Guide
/statusBuilt-in · Current referenceInspect session configuration, token usage, model, and policy.Guide
/usageBuilt-in · Current referenceOpen the account usage analytics dashboard or apply an available rate-limit reset.Guide
/debug-configBuilt-in · Current referenceInspect Codex config layers, policy sources, and requirements diagnostics.Guide
/statuslineBuilt-in · Current referenceConfigure TUI footer status-line fields.Guide
/titleBuilt-in · Current referenceConfigure terminal window or tab title fields.Guide
/themeBuilt-in · Current referenceChoose and persist the TUI syntax-highlighting theme.Guide
/pets, /petBuilt-in · Current referenceChoose or hide an ambient terminal pet in the Codex TUI.Guide
/tuiBuilt-in · Current referenceChoose the fullscreen UI for your next launch; fullscreen transcripts are the default from 0.157.0.Guide
/exportBuilt-in · Current referenceExport the complete TUI conversation as Markdown to the clipboard or a new file.Guide
/recapBuilt-in · Current referenceManual task recaps and the automatic recap settingGuide
/cdBuilt-in · Current referenceTrack the 0.149.0 working-directory commands and verify their live behavior in the installed slash-command help.Guide
/pwd, /cwdBuilt-in · Current referenceShow the working directory (alias /cwd).Guide
/worktreeBuilt-in · Current referenceRun new or forked sessions in isolated Git checkouts, enabled by default from 0.156.0Guide
/daemonBuilt-in · Current referenceMenu for updating the local background server; eligible interactive sessions start it automatically from 0.157.0.Guide
/warningsBuilt-in · Current referenceRevisit 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.

CommandKind · statusCurrent guidance
/sandbox-add-read-dir <absolute-directory-path>Built-in · Not in current tableOlder sandbox read-path command, absent from the current reference.
/agentBuilt-in · Not in current tableOlder /agent spelling; use /agents for the command center and /subagents for child threads.
/personalityBuilt-in · Not in current tableOlder style command, absent from the current table; use AGENTS.md for response preferences.
/approvalsAlias · RenamedLegacy alias for the /permissions command.
/voiceBuilt-in · Release-trackedVoice conversations, enabled by default from 0.156.0, with the F8 toggle and /voice settings
/configBuilt-in · Release-trackedSearchable 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.

/clear

Kind 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

  1. Inspect /diff, then use /clear before beginning an unrelated task.
  2. Run /export before /clear when the transcript is an audit artifact.

Choosing related commands

CommandDifferenceChoose It When
/clearClears the display and starts a fresh chatBoth the UI and conversation should reset
/new [name]Starts a new named chatThe new session needs a name immediately
/compactSummarizes the same chatYou must preserve the current context
/exitExits the CLIThe 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

  • /clear does 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-migration

Effects Changes the current session's name while retaining its conversation.

More sources Slash_Command.Rs

When to use it

  1. Run /rename AUTH-241 refresh-token race to record the issue and purpose.
  2. Run /rename without arguments and edit the suggested title to match the team convention.

Choosing related commands

CommandDifferenceChoose It When
/renameRenames the current chatExisting work needs a searchable name
/new [name]Creates and names a new chatYou need a fresh context
/titleConfigures the terminal window titleYou 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.

/delete

Kind 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

  1. Delete a temporary test session that included sensitive prompt material.
  2. Remove an abandoned experiment and its spawned descendant sessions.
  3. Before deleting an audit-relevant session, capture required evidence in a ticket, PR, or export.

Choosing related commands

CommandDifferenceChoose It When
/deletePermanently removes the transcriptThe record should not be retained
/archiveKeeps the transcript recoverableYou only want to clean the active list
/quitExits without changing retentionYou 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.
  • /delete is 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.

/compact

Kind 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

  1. Compact after a long investigation before moving into implementation.
  2. Compact before handing a session to another teammate, then run /status.

Choosing related commands

CommandDifferenceChoose It When
/compactSummarizes long transcript contextThe session is long but still useful
/clearClears and starts a fresh chatYou want a true reset
/newStarts a new conversationYou 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.

/memories

Kind 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

  1. Disable memory behavior before working with sensitive external context.
  2. Verify memory settings when a long-running project depends on team preferences.

Choosing related commands

CommandDifferenceChoose It When
/memoriesControls memory use and generationLong-term context boundaries matter
/compactSummarizes the current transcriptYou only need to reduce current context
/clearStarts fresh visible chat flowYou 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.

/init

Kind Built-in · Current reference.

Effects Starts creation or updating of project instructions. Review the proposed file contents and project scope.

When to use it

  1. Run /init at the repository root before writing team-specific Codex guidance.
  2. Edit the generated AGENTS.md to include test commands, coding standards, and safety rules.

Choosing related commands

CommandDifferenceChoose It When
/initCreates persistent instruction scaffoldingThe repo does not yet have Codex guidance
/statusShows current session stateYou need to verify loaded context
/mentionAttaches files to the current turnYou 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.ts

Effects References a selected file or path in the prompt without editing the file merely by mentioning it.

When to use it

  1. Mention the file that contains the failing behavior before asking for a fix.
  2. Mention a design doc or config file when the next request depends on it.

Choosing related commands

CommandDifferenceChoose It When
/mentionAttaches one-off file contextThe next turn needs a specific path
/initCreates persistent repo instructionsThe context should live across sessions
/statusShows current workspace stateYou 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.

/fork

Kind Built-in · Current reference.

Effects Branches the current conversation into a separate thread for another approach.

When to use it

  1. Fork before trying an alternate implementation path.
  2. Use codex fork from the shell when you need to fork a saved session rather than the current one.

Choosing related commands

CommandDifferenceChoose It When
/forkCreates a new branch of the conversationYou need a longer alternate path
/sideOpens a short ephemeral detourYou need a focused question
/resumeReopens saved historyYou 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.

/side

Kind Built-in · Current reference · Aliases /btw.

Effects Handles a side question separately from the main task flow.

More sources Changelog

When to use it

  1. Use /side Check whether this plan has an obvious risk for a short independent critique.
  2. Ask a policy or documentation question without polluting the main transcript.
  3. Let the human decide whether the side result should influence the parent thread.

Choosing related commands

CommandDifferenceChoose It When
/sideTemporary side conversationYou need a short detour
/forkNew longer-lived threadYou need alternate implementation work
/subagentsSwitches to a spawned agent threadYou 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 /side from inside another side conversation.
  • /side is unavailable in review mode.
  • Use /fork for 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.

/resume

Kind 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

  1. Resume a prior migration thread, then run /status and /goal before continuing.
  2. Use /title or /statusline after resume when many sessions have similar names.
  3. After a long break, compare /diff and the current branch state before editing again.

Choosing related commands

CommandDifferenceChoose It When
/resumeReopens saved conversation historyYou need to continue earlier work
/newStarts a fresh conversationYou want a clean task
/forkBranches a conversationYou 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-migration

Effects Starts a fresh conversation. Restate instructions that depended on the previous conversation when needed.

When to use it

  1. Use /new when switching to an unrelated task in the same repository.
  2. Use /plan immediately after /new when the new task has risk or ambiguity.

Choosing related commands

CommandDifferenceChoose It When
/newStarts a fresh conversationYou want a clean prompt in the same CLI
/clearClears the terminal and starts freshYou also want the visible UI reset
/quitExits the CLIYou 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.
  • /new does not replace Git hygiene; review changes before changing tasks.

/export

Export the complete TUI conversation as Markdown to the clipboard or a new file.

/export

Kind 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

  1. Preserve a long investigation as evidence for a team document or issue.
  2. Save a reproducible work record as a Markdown artifact.
  3. Export a migration or incident-response conversation for retrospective review.

Choosing related commands

CommandDifferenceChoose It When
/exportExports the complete TUI conversationYou need the whole work record
/copyCopies the latest completed responseYou only need the latest result
/rawSimplifies terminal scrollbackYou 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

/recap

Kind 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 = false

0.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.

/plan

Kind 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

  1. Use /plan Propose a migration plan for this package before editing a risky module.
  2. Use /plan after /status when you need Codex to reason through scope before implementation.

Choosing related commands

CommandDifferenceChoose It When
/planEnters planning modeYou need a plan before edits
/goalPersists a long-running objectiveThe task will continue across turns or sessions
/sideStarts a focused detourYou 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

  • /plan is 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.

/ps

Kind 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

  1. Run /ps before /stop so you know what will be cancelled.
  2. Check /ps before exiting a session that started a dev server or long test run.

Choosing related commands

CommandDifferenceChoose It When
/psShows background terminalsYou need to inspect running work
/stopStops background terminalsYou need to cancel session-owned work
/statusShows session stateYou 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.
  • /ps inspects session-owned background terminals, not every process on the machine.

/stop

Stop all background terminals owned by the current Codex session.

/stop

Kind Built-in · Current reference · Aliases /clean.

Effects Stops active background work in the current session.

When to use it

  1. Run /ps first, then /stop when a watcher or long test is no longer needed.
  2. Use /stop before leaving a session that started background work.

Choosing related commands

CommandDifferenceChoose It When
/stopCancels background terminal workSession-owned commands should stop
/psLists background terminal workYou need to inspect before stopping
/exitExits the CLIYou are done with the session itself

/stop stops all background terminals for the current session. /clean remains available as an alias.

Cautions

  • /stop targets Codex background terminal work. It does not guarantee cleanup of unrelated external processes.
  • Inspect with /ps before stopping when there is any doubt.

Review and verification

/review

Ask Codex to review the current working tree.

/review

Kind Built-in · Current reference.

Effects Starts a dedicated review of changes. Decide which findings to apply after inspecting the review.

When to use it

  1. Run /review after implementation and before committing.
  2. Follow with /diff when you need to inspect the exact changed lines behind a finding.

Choosing related commands

CommandDifferenceChoose It When
/reviewReviews risk and correctnessYou need a code-review pass
/diffShows exact changesYou need to inspect the patch
/statusShows session stateYou 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.

/fast

Kind 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.

More sources Releases · Speed

When to use it

  1. Use /fast on when faster responses justify increased credit consumption.
  2. Use /fast off to switch back, and /fast status to verify the setting.

Choosing related commands

CommandDifferenceChoose It When
/fastChanges Fast/Standard service behaviorYou want speed control without changing model family
/modelChanges the active modelYou need a different model
/statuslineDisplays footer statusYou 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.

/permissions

Kind 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

  1. Start a risky refactor in a stricter mode, then move to a more autonomous mode after the plan is clear.
  2. Use /status before and after the change to confirm the effective approval policy.

Choosing related commands

CommandDifferenceChoose It When
/permissionsChanges approval and permission behaviorYou need to change autonomy mid-session
/approvalsLegacy aliasYou are handling an older playbook or habit
/statusInspects current stateYou 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 /permissions as 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.

/ide

Kind 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

  1. Ask Codex to refactor the function currently selected in your IDE.
  2. Reuse open-file context without restating every relevant path.

Choosing related commands

CommandDifferenceChoose It When
/ideAdds editor contextThe current IDE selection matters
/mentionAdds paths manuallyYou are working from the CLI and know the exact path
/statusShows session stateYou 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-sandbox

Kind 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

  1. Run it after Codex detects the degraded Windows sandbox and offers elevated setup.
  2. Verify the resulting sandbox and approval state with /status and /permissions.

Choosing related commands

CommandDifferenceChoose It When
/setup-default-sandboxInstalls the elevated Windows sandboxYou need to replace degraded mode
/sandbox-add-read-dirGrants one extra absolute read pathOnly a specific external directory is blocked
/permissionsChanges approval profilesYou 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 /status afterward.

/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

/permissions

Effects 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.

/approve

Kind 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

  1. Retry a local test command after you confirm the auto-review denial was too conservative.
  2. Keep the current permission policy while allowing one specific denied action to run again.

Choosing related commands

CommandDifferenceChoose It When
/approveRetries one recent denied actionYou verified the specific action is acceptable
/permissionsChanges the permission policyFuture actions need different approval behavior
/reviewReviews the working treeYou want Codex to inspect code changes

/approve lets you review a recent auto-review denial and retry that specific action once.

Cautions

  • /approve is 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.

/skills

Kind 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

  1. Select the Figma skill to pull design context and screenshots from an exact node before implementation.
  2. Use $imagegen for UI mock directions or $playwright to verify the implementation in a real browser.
  3. Confirm that team-provided skills are visible in the current session.

Choosing related commands

CommandDifferenceChoose It When
/skillsApplies task-specific instructionsA workflow has a reusable skill
/pluginsManages bundled capabilitiesYou need plugin inventory or marketplace controls
/appsInserts app connectorsYou 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-creator skill was removed in 0.159.0 and no longer appears in the picker.
  • Figma, ImageGen, and Playwright are not built-in /design commands. Use the exact token exposed by the /skills picker and installed bundle.

Status and diagnostics

/agent

Older /agent spelling; use /agents for the command center and /subagents for child threads.

/agent

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

/agents
/subagents

Effects 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.

/apps

Kind Built-in · Current reference.

Effects Browses and manages available apps. App connection and approval of individual tool actions remain distinct.

When to use it

  1. Use /apps before asking Codex to work with a connector so the app mention is explicit.
  2. Pair /apps with /permissions when the connector exposes actions with side effects.

Choosing related commands

CommandDifferenceChoose It When
/appsBrowses connectors/appsYou need to reference an app in a prompt
/pluginsManages plugin bundlesYou need skills, apps, MCP, or hooks packaged together
/mcpLists MCP toolsYou 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.

/diff

Kind Built-in · Current reference.

Effects Displays code changes; opening the viewer does not commit or revert them.

When to use it

  1. Run /diff before /review so you know the exact behavioral surface being reviewed.
  2. Use /diff after applying a subagent result before merging it into the main thread.

Choosing related commands

CommandDifferenceChoose It When
/diffShows working tree changesYou need to inspect edits
/reviewReviews risks in the working treeYou need a code-review pass
/statusShows session stateYou 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.
  • /diff is 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.

/feedback

Kind Built-in · Current reference.

Effects Opens feedback submission with diagnostic context. Review what will be sent.

When to use it

  1. Use /feedback after a reproducible CLI issue while the session context is still fresh.
  2. Pair it with /debug-config when the issue involves config, policy, or tool availability.

Choosing related commands

CommandDifferenceChoose It When
/feedbackSends support feedbackYou want to report an issue
/debug-configPrints local diagnosticsYou need to inspect config first
/statusShows session stateYou 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.

/personality

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.

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.

/raw

Kind Built-in · Current reference.

Effects Opens a raw session view without executing code changes.

When to use it

  1. Copy a long build or test log exactly as it appeared.
  2. Paste an error trace into an issue without markdown rendering changes.

Choosing related commands

CommandDifferenceChoose It When
/rawChanges scrollback selection behaviorYou need exact terminal output
/copyCopies the latest Codex responseYou only need the last assistant output
/diffShows Git diffYou are reviewing file changes

/raw toggles raw scrollback mode so terminal output is easier to select and copy without extra formatting.

Cautions

  • /raw does 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.

/status

Kind Built-in · Current reference.

Effects Inspects current session state so you can check the effective model, permissions, and usage.

When to use it

  1. Run /status at the start of a task to verify model, directory, and permissions.
  2. Run /status after /permissions, /model, /resume, or /goal.

Choosing related commands

CommandDifferenceChoose It When
/statusInspects runtime stateYou need to know how Codex is configured
/modelChanges modelYou need to switch after checking state
/debug-configExplains config layersYou 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.

Official changelog

Cautions

  • /status tells 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-config

Kind Built-in · Current reference.

Effects Displays effective configuration and its sources without editing configuration files.

More sources Config Reference

When to use it

  1. Run /debug-config when config.toml does not appear to match runtime behavior.
  2. Use it before changing managed or project-scoped configuration.

Choosing related commands

CommandDifferenceChoose It When
/debug-configExplains config layers and policy sourcesYou need root-cause diagnostics
/statusShows current session stateYou need a quick snapshot
/permissionsChanges approval policyYou 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.

/title

Kind 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

  1. Add branch, project, or thread fields when several Codex sessions are open.
  2. Use action-required title items so pending user intervention is easier to notice.

Choosing related commands

CommandDifferenceChoose It When
/titleChanges terminal title fieldsYou need to identify windows or tabs
/statuslineChanges footer fieldsYou need persistent in-session status
/statusPrints session stateYou 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 /status when policy or model state matters.

Display and input

/keymap

Inspect and remap TUI keyboard shortcuts.

/keymap

Kind 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

  1. Use /keymap when tmux, SSH, VS Code terminal, or JetBrains terminal conflicts with default bindings.
  2. Use /keymap debug to inspect terminal key events when the changelog-supported debug flow is available.
  3. Review Vim composer contexts before standardizing modal editing shortcuts.

Choosing related commands

CommandDifferenceChoose It When
/keymapRemaps shortcutsInput or navigation shortcuts conflict
/statuslineChanges footer itemsVisibility fields need adjustment
/titleChanges terminal title itemsWindow 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.

/vim

Kind Built-in · Current reference.

Effects Toggles Vim editing behavior for terminal input.

More sources Changelog

When to use it

  1. Use Vim normal and insert modes while drafting longer prompts.
  2. Test Vim composer behavior before setting it as the default for new sessions.

Choosing related commands

CommandDifferenceChoose It When
/vimChanges composer editing modeYou prefer Vim-style input
/keymapRemaps shortcutsSpecific keys conflict with your terminal or team defaults
/themeChanges syntax colorsThe 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.

  • /vim is 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.

/experimental

Kind 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

  1. On 0.155.x, enable voice conversations here before trying /voice; from 0.156.0 voice is on by default.
  2. Inspect experimental toggles during onboarding so team docs match actual feature flags.

Choosing related commands

CommandDifferenceChoose It When
/experimentalToggles optional featuresYou need to enable or inspect feature gates
/debug-configShows config layersYou need to understand why a flag is active
/statusShows session stateYou 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.

/theme

Kind Built-in · Current reference.

Effects Changes the terminal color theme without editing code or conversation content.

When to use it

  1. Improve diff contrast in a light or dark terminal.
  2. Standardize the theme used during team screen-sharing and reviews.

Choosing related commands

CommandDifferenceChoose It When
/themeChanges code and diff highlightingReadability needs tuning
/statuslineChanges footer fieldsYou want different visible status data
/titleChanges terminal title fieldsYou 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 off

Effects Selects a displayed pet or hides it with off.

More sources Rust V0.131.0

When to use it

  1. Run /pets to choose a built-in or compatible custom pet.
  2. Run /pets off before screen-sharing or in a constrained terminal.

Choosing related commands

CommandDifferenceChoose It When
/petsChooses or hides an ambient terminal petYou want to personalize the TUI
/themeChanges code and diff highlightingYou need better color contrast
/statuslineChanges footer fieldsYou 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.

/daemon

Kind 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.

  1. Run /daemon.
  2. Choose an update action from the menu.
  3. 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-daemon

Cautions

  • 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.

/exit

Kind Built-in · Current reference.

Effects Exits the CLI conversation. Choose a saved session through resume to continue later.

When to use it

  1. Run /diff or /status before exiting a session with meaningful local changes.
  2. Use /exit when your team prefers explicit shell-like naming over /quit.

Choosing related commands

CommandDifferenceChoose It When
/exitExits the CLIYou prefer the shell-style spelling
/quitExits the CLIYou use the primary slash command name
/newStarts a new conversationYou 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.
  • /exit does not replace process cleanup for externally started commands.

/logout

Sign out of Codex and clear local credentials for the current user.

/logout

Kind Built-in · Current reference.

Effects Signs out of the current account; later authenticated operations require sign-in again.

When to use it

  1. Run /logout before handing a workstation to another user.
  2. Use it during auth troubleshooting before logging in again.

Choosing related commands

CommandDifferenceChoose It When
/logoutClears the Codex login sessionYou need to change or remove credentials
/statusShows current session stateYou need to confirm auth and policy state
codex loginStarts login from the shellYou 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.

/quit

Kind Built-in · Current reference.

Effects Exits the CLI conversation. Choose a saved session through resume to continue later.

When to use it

  1. Use /quit after reviewing /diff and cleaning background terminals with /ps and /stop.
  2. Use /resume later if you need to return to saved work.

Choosing related commands

CommandDifferenceChoose It When
/quitExits the CLIYou are done with the session
/exitSame behaviorYou prefer the alternate spelling
/newStarts a new chatYou want to stay in the CLI

/quit exits Codex CLI. /exit is equivalent.

Cautions

  • Save, commit, or intentionally leave changes before exiting.
  • Use /stop first if Codex-owned background terminals should not continue.

Aliases and older commands

/approvals

Legacy alias for the /permissions command.

/approvals

Kind Alias · Renamed. Legacy alias. Use /permissions in the current menu and new documentation.

Examples

/permissions

Effects 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

  1. Use /approvals only when following old notes or muscle memory.
  2. Rewrite team playbooks to point users to /permissions.

Choosing related commands

CommandDifferenceChoose It When
/approvalsLegacy aliasYou need compatibility with old usage
/permissionsCurrent primary commandYou are writing new docs or training
/statusShows current policyYou 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 /approvals as the primary command in new material.
  • Use /permissions for clearer alignment with current docs.

Current settings and conversation controls

/agents

Browse and switch chats in the server agent command center.

/agents

Kind 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.

/subagents

Kind 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).

/pwd

Kind 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.

/warnings

Kind 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).

/config

Kind 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

Official sources

  • Codex CLI command reference
  • Changelog

Related docs

Complete command list

Claude Code Command Master · Syntax, type, availability, and guide links for all 119 entries in the official Claude Code slash table.

Terminal CLI Commands and Options

All 29 official Codex CLI command entries, global and command-specific option tables, and release additions

MCP connections and commands

Claude Code Command Master · Choose the commands for mcp connections and commands and follow their availability rules and concrete examples.

Core command basics

Claude Code Command Master · Read help and session status, start a fresh conversation, and exit or detach from Claude Code.

Cmd. /todos

Claude Code Command Master · Interpret the older task-list command and inspect current background work.

How to read a detail guide

Codex CLI: Read detail guides in order: availability, concrete examples, persistence, and official evidence.

Terminal CLI Commands and Options

All 29 official Codex CLI command entries, global and command-specific option tables, and release additions

On this page

Official slash tableRelease additions, aliases, and older commandsCommand guidesConversation and context/clear/rename/delete/compact/memories/init/mention/fork/side/resume/new/export/recapPlanning and execution/plan/ps/stopReview and verification/reviewModels and settings/fastPermissions and integrations/permissions/ide/setup-default-sandbox/sandbox-add-read-dir/approve/skillsStatus and diagnostics/agent/apps/diff/feedback/personality/raw/status/debug-config/titleDisplay and input/keymap/vim/experimental/theme/pets/daemonAccount and usage/exit/logout/quitAliases and older commands/approvalsCurrent settings and conversation controls/agents/subagents/pwd/warnings/configOfficial sources