1. Codex CLI slash commands
Here are the important commands documented for Codex.
| Command | What it does |
|---|---|
/help | Show help |
/init | Create AGENTS.md project instructions |
/model | Change AI model and reasoning effort |
/config | Configure Codex settings |
/status | Show current session configuration |
/permissions | Control file and command permissions |
/plan | Plan a task before implementation |
/review | Review code changes |
/skills | Browse and select skills |
/mcp | Manage MCP connections |
/agents | Manage and inspect agents |
/hooks | Manage hooks |
/clear | Start a fresh conversation |
/compact | Compress conversation context |
/resume | Resume a previous session |
/fork | Create a separate session from an existing one |
/rename | Rename current session |
/copy | Copy the last response |
/export | Export conversation |
/diff | Inspect code changes |
/feedback | Submit feedback |
/fast | Toggle fast mode, where available |
/goal | Set a task completion goal |
Availability can vary by Codex version and enabled features. The / command menu inside your installation is the best way to check.
2. Codex terminal commands
Unlike slash commands, these are executed directly in your Mac terminal.
| Command | Purpose |
|---|---|
codex | Start interactive coding agent |
codex login | Authenticate |
codex logout | Sign out |
codex login status | Check authentication |
codex resume | Resume previous session |
codex fork | Fork a session |
codex exec | Run an agent task non-interactively |
codex review | Run code review |
codex mcp | Manage MCP servers |
codex agents | Open agent command center |
codex plugin | Manage plugins |
codex cloud | Work with cloud tasks |
codex doctor | Diagnose installation |
codex update | Update Codex |
codex completion | Generate shell completions |
codex features | Manage feature flags |
codex sandbox | Run commands in a sandbox |
Important configuration files
Codex uses these files:
~/.codex/ config.toml AGENTS.mdyour-project/ AGENTS.md .codex/ skills/ rules/ agents/
Example config.toml:
model = "gpt-6.1"model_reasoning_effort = "high"approval_policy = "on-request"sandbox_mode = "workspace-write"
You can also override settings when launching Codex:
codex --model gpt-6.1codex --sandbox workspace-writecodex --searchcodex --image screenshot.png
