Skip to main content
reopt Handbook
reopt Handbook
Advanced Codex Usage

Foundation

Setup and LoginConfigMemories

Safety and Operations

ApprovalsSecurity

Workflow

Slash CommandsPrompts and SkillsExec and AutomationThread LifecycleCloud TasksMulti-Agent Workflows

Extensions and IDE

Codex App and IDEMCP IntegrationModels and ReasoningGovernance and Rollout

Verification

VerificationUpdates
Handbook›Advanced Codex Usage›Slash Commands
한국어English

Slash Commands

Use Codex slash commands as an operating surface for sessions, review, models, and status.

Key takeaways

  • Slash commands are the control panel of an interactive Codex session, so teams should standardize the ones expected during planning, review, and handoff.
  • Group commands by purpose: Status, Review, Planning, Context, and Lifecycle (stop, resume, fork, compact, archive, hand off, or start a new thread).
  • Run review commands before requesting human review on risky changes, and keep slash-command output tied to actual verification rather than treating commands as magic words.
  • Track the current official inventory: /app, /copy, /rename, /pets (/pet), and Windows-only /setup-default-sandbox are documented commands; /subagents and /btw are aliases.
  • Codex 0.148.0 adds /export for the complete TUI conversation. In 0.150.0, /copy opens a picker for the whole response, code blocks, or blockquotes.
  • Codex 0.149.0 adds /cd, /pwd, and /cwd; 0.150.0 adds automatic task titles and editable /rename suggestions.
  • On 0.146.0, /new [name] and /clear [name] name fresh threads immediately, while /side can switch among open side conversations without closing them.
  • Follow a repeatable routine: inspect status, attach relevant files, request a plan, review the diff, then run verification and summarize evidence.

Slash commands are the control panel of an interactive Codex session. Teams should standardize the commands they expect developers to use during planning, review, and handoff.

Command Categories

CategoryPurpose
StatusInspect current session, model, permissions, or workspace
ReviewAsk Codex to examine diffs, risks, and tests
PlanningSwitch into planning, goal, or structured task mode
ContextAttach files, pages, images, or repository references
LifecycleStop, resume, fork, compact, archive, delete, hand off, or start a new thread

Team Practices

  • Use review commands before requesting human review on risky changes.
  • Record useful command sequences in repository docs.
  • Keep slash-command output tied to actual verification.
  • Avoid using commands as magic words; define what decision each one supports.
  • Treat /archive and /delete as different retention decisions: archive keeps a recoverable transcript, while delete permanently removes the transcript and spawned descendants.
  • Run /usage before long /goal or multi-agent sessions, and review /import results with /diff and /debug-config.
  • Treat /app as an officially documented handoff command, originally release-tracked from 0.138.0.
  • Treat /import as a migration review: 0.145.0 expands it across Cursor and Claude Code settings, MCP servers, plugins, sessions, commands, and project memories.
  • Review /export output for secrets and customer data before storing or sharing a full transcript.

Example Routine

  1. Inspect status and permissions.
  2. Attach or mention the files that matter.
  3. Ask for a plan or scoped implementation.
  4. Review the diff.
  5. Run verification and summarize evidence.

August 28 Command Inventory Re-check

CommandCurrent behaviorTeam note
/exportExports the complete TUI conversation as MarkdownChoose clipboard or file; review sensitive content
/copyOpens a picker for the whole response, code blocks, or blockquotesCheck clipboard content before external sharing
/rename [name]Renames the task; without a name, offers an editable suggested titleUse a short issue, branch, or purpose prefix
/cd, /pwd, /cwd0.149.0 release-note group for working-directory management; individual reference entries are pendingInspect the installed slash picker, then record cwd in handoffs and resumed tasks
/pets [name|off] (/pet)Chooses or hides an ambient terminal petTreat it as display-only personalization
/setup-default-sandboxSets up the elevated Windows sandboxAppears only in degraded restricted-token mode
/agent (/subagents)Opens the agent-thread pickerReview diffs and tests before integration
/side (/btw)Starts an ephemeral side chatUse /fork for longer alternate work

Related docs

Thread Lifecycle

Manage Codex sessions across start, resume, fork, compact, archive, delete, and handoff.

Cmd. /plan

Codex Command Master · Switch to plan mode and optionally send a planning prompt.

Cmd. /app

Codex Command Master · Hand off the current CLI thread to Codex Desktop.

Cmd. /cd

Codex Command Master · Track the 0.149.0 working-directory commands and verify their live behavior in the installed slash-command help.

Session Command Group

Codex Command Master · Commands for keeping long Codex sessions continuous and readable.

Security

Secure Codex usage across secrets, network access, telemetry, and auditability.

Prompts and Skills

Design prompts, repository instructions, and reusable skills for repeatable Codex work.

On this page

Command CategoriesTeam PracticesExample RoutineAugust 28 Command Inventory Re-check