Codex CLI slash commands

1. Codex CLI slash commands

Here are the important commands documented for Codex.

CommandWhat it does
/helpShow help
/initCreate AGENTS.md project instructions
/modelChange AI model and reasoning effort
/configConfigure Codex settings
/statusShow current session configuration
/permissionsControl file and command permissions
/planPlan a task before implementation
/reviewReview code changes
/skillsBrowse and select skills
/mcpManage MCP connections
/agentsManage and inspect agents
/hooksManage hooks
/clearStart a fresh conversation
/compactCompress conversation context
/resumeResume a previous session
/forkCreate a separate session from an existing one
/renameRename current session
/copyCopy the last response
/exportExport conversation
/diffInspect code changes
/feedbackSubmit feedback
/fastToggle fast mode, where available
/goalSet 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.

CommandPurpose
codexStart interactive coding agent
codex loginAuthenticate
codex logoutSign out
codex login statusCheck authentication
codex resumeResume previous session
codex forkFork a session
codex execRun an agent task non-interactively
codex reviewRun code review
codex mcpManage MCP servers
codex agentsOpen agent command center
codex pluginManage plugins
codex cloudWork with cloud tasks
codex doctorDiagnose installation
codex updateUpdate Codex
codex completionGenerate shell completions
codex featuresManage feature flags
codex sandboxRun commands in a sandbox

Important configuration files

Codex uses these files:

~/.codex/
config.toml
AGENTS.md
your-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.1
codex --sandbox workspace-write
codex --search
codex --image screenshot.png

Leave a Reply