Skip to main content

What are Slash Commands?

Slash commands are special commands that start with / and give you control over Codex’s behavior. They’re used to modify settings, manage conversation state, trigger specific features, and control the agent’s workflow.
Slash commands are entered in the Codex prompt and are processed before being sent to the AI model.

Available Commands

Workflow Control

Triggers a specialized code review of your changes.
What it does:
  • Spawns a sub-agent with specialized review instructions
  • Analyzes your code changes for bugs, security issues, and maintainability problems
  • Provides structured feedback with priority levels (P0-P3)
  • Outputs an overall correctness verdict
  • Exits automatically when review is complete
Features:
  • Uses dedicated review prompt and model
  • Can be configured with custom review model via review_model in config
  • Auto-approval enabled (no interruptions during review)
  • Web search and collaborative tools disabled for focused review
See Code Review for detailed usage.
Explicitly load a specific skill for the current task.
Examples:
This ensures the skill is loaded into context even if it wouldn’t trigger automatically.
Lists available and installed ChatGPT app connectors.
Shows:
  • Connected apps (labeled as “connected”)
  • Available apps that can be installed
See Apps & Connectors for more details.

Session Management

Clears the current conversation history while keeping configuration.
Useful when you want to start fresh without restarting Codex.
Resets both conversation history and session state.
More thorough than /clear - resets all session state.

Configuration

Switch to a different AI model mid-conversation.
Changes the model for the current session without restarting.
Change the approval policy for the current session.
Approval modes:
  • suggest - Agent asks for approval on all file writes and shell commands
  • auto-edit - Agent can write files but asks before running commands
  • full-auto - Agent can write files and run commands (sandboxed)
Adjust the sandbox policy for the current session.
See Security & Sandboxing for details on each mode.

Information

Display help information and available commands.
Display current configuration and session state.
Shows:
  • Current model
  • Approval mode
  • Sandbox mode
  • Active skills
  • Session information

Using Slash Commands

In the TUI

Slash commands are entered at the prompt:
Press Tab for autocomplete suggestions when typing slash commands.

In Scripts

You can pass slash commands in non-interactive mode:

Command Aliases

Some commands have shorter aliases for convenience:
CommandAlias
/review/r
/clear/c
/help/h
/status/s

Advanced Usage

Combining Commands

You can chain multiple commands in a single session:

Commands in AGENTS.md

You can include default slash commands in your AGENTS.md project documentation:
This sets project-specific defaults without requiring manual slash commands each time.

Creating Custom Commands

While Codex doesn’t currently support custom slash commands, you can achieve similar behavior using:
  1. Skills - Create a skill that triggers on specific phrases
  2. AGENTS.md - Add project-specific instructions
  3. Aliases - Use shell aliases to wrap common command patterns

Example: Custom Workflow Alias

Then use:

Command Reference

Workflow

  • /review - Code review mode
  • /use - Load a skill
  • /apps - Manage app connectors

Session

  • /clear - Clear history
  • /reset - Full reset

Configuration

  • /model - Switch model
  • /approval - Change approval mode
  • /sandbox - Change sandbox mode

Information

  • /help - Show help
  • /status - Show status

Keyboard Shortcuts

While not slash commands, these keyboard shortcuts work in the TUI:
ShortcutAction
Ctrl+CCancel current operation (press twice to quit)
Ctrl+DExit Codex (press twice if needed)
TabAutocomplete slash commands
/ Navigate command history
Ctrl+LClear screen (not history)

Best Practices

Starting a new task? Use /clear to remove irrelevant context from the previous task. This helps Codex focus on what matters.
For exploratory tasks, use /approval suggest to review each action. For well-defined tasks in sandboxed environments, use /approval full-auto for speed.
If you know you need a specific skill, use /use skill-name at the start to ensure it’s loaded, rather than relying on automatic triggering.
If Codex behaves unexpectedly, use /status to verify your current configuration.

Next Steps

Code Review

Learn more about the /review command

Skills System

Understand how skills work with /use