Codex CLI commands
Handy Codex CLI commands, kept current by the community. Add one you rely on.
/agent
Switch agent thread
Inspect or continue work in a spawned subagent thread.
/init
Initialize AGENTS.md
Generate an AGENTS.md scaffold in the current directory for persistent repo instructions.
/review
Review working tree
Ask Codex to review the current working tree, focusing on behavior changes and missing tests.
/experimental
Experimental features
Enable or disable experimental Codex features from the CLI.
/fork
Fork conversation
Branch the current conversation into a new thread without losing the original transcript.
/archive
Archive session
Archive the current session and exit Codex without deleting its transcript.
/sandbox-add-read-dir
Grant sandbox read directory
Grant the Windows sandbox read access to an additional absolute directory path.
/title
Terminal title
Configure which fields appear in the terminal window or tab title.
/feedback
Send feedback
Collect logs or diagnostics and send feedback to the Codex maintainers.
/stop
Stop background work
Stop all background terminals started by the current session.
/clear
Clear and start fresh
Clear the terminal and start a fresh chat in the same CLI session.
/model
Select model
Choose the active model and, when available, its reasoning effort.
/statusline
Status line
Configure which fields appear in the interactive footer and persist the layout.
/import
Import external setup
Import supported Claude Code setup, project files, or recent chats into Codex.
/new
New conversation
Start a new conversation in the same CLI session without leaving the terminal.
List background terminals and show recent output lines for each.
/hooks
Manage hooks
View configured lifecycle hooks, trust changes, or disable non-managed hooks.
Create a command
Please sign in to add a command.