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
/review - Code Review Mode
/review - Code Review Mode
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
- Uses dedicated review prompt and model
- Can be configured with custom review model via
review_modelin config - Auto-approval enabled (no interruptions during review)
- Web search and collaborative tools disabled for focused review
/use - Load a Skill
/use - Load a Skill
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.
/apps - Manage App Connectors
/apps - Manage App Connectors
Lists available and installed ChatGPT app connectors.Shows:
- Connected apps (labeled as “connected”)
- Available apps that can be installed
Session Management
/clear - Clear Conversation History
/clear - Clear Conversation History
Clears the current conversation history while keeping configuration.Useful when you want to start fresh without restarting Codex.
/reset - Full Reset
/reset - Full Reset
Resets both conversation history and session state.More thorough than
/clear - resets all session state.Configuration
/model - Switch Model
/model - Switch Model
Switch to a different AI model mid-conversation.Changes the model for the current session without restarting.
/approval - Change Approval Mode
/approval - Change Approval Mode
Change the approval policy for the current session.Approval modes:
suggest- Agent asks for approval on all file writes and shell commandsauto-edit- Agent can write files but asks before running commandsfull-auto- Agent can write files and run commands (sandboxed)
/sandbox - Change Sandbox Mode
/sandbox - Change Sandbox Mode
Adjust the sandbox policy for the current session.See Security & Sandboxing for details on each mode.
Information
/help - Show Help
/help - Show Help
Display help information and available commands.
/status - Show Session Status
/status - Show Session Status
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:| Command | Alias |
|---|---|
/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 yourAGENTS.md project documentation:
Creating Custom Commands
While Codex doesn’t currently support custom slash commands, you can achieve similar behavior using:- Skills - Create a skill that triggers on specific phrases
- AGENTS.md - Add project-specific instructions
- Aliases - Use shell aliases to wrap common command patterns
Example: Custom Workflow Alias
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:| Shortcut | Action |
|---|---|
Ctrl+C | Cancel current operation (press twice to quit) |
Ctrl+D | Exit Codex (press twice if needed) |
Tab | Autocomplete slash commands |
↑ / ↓ | Navigate command history |
Ctrl+L | Clear screen (not history) |
Best Practices
Use /clear between unrelated tasks
Use /clear between unrelated tasks
Configure approval mode per task
Configure approval mode per task
For exploratory tasks, use
/approval suggest to review each action. For well-defined tasks in sandboxed environments, use /approval full-auto for speed.Explicitly load skills for complex tasks
Explicitly load skills for complex tasks
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.Check /status when debugging
Check /status when debugging
If Codex behaves unexpectedly, use
/status to verify your current configuration.Next Steps
Code Review
Learn more about the
/review commandSkills System
Understand how skills work with
/use