Claude Code vs OpenAI Codex CLI: slash commands compared

27 tasks · 27 with a documented equivalent in both · updated 2026-10-07

Claude Code and OpenAI Codex CLI are two terminal agents whose command sets have largely converged. Of the twenty-seven tasks in the table, twenty-two use the same or a near-identical slash command in both tools, including /compact, /model, /plan, /goal, /fork, /resume, /diff, /init, /mcp, /permissions, /hooks, /skills, /usage, /statusline and /theme. Both even ship an /import command that pulls configuration from the other.

TaskClaude CodeOpenAI Codex CLI
Start a fresh conversation/clear [name]/clear
Shrink the context window/compact [instructions]/compact
Switch model/model [model]/model
Set reasoning / effort level/effort [level|auto|status|ultracode [on|off]]/model
Fast mode/fast [on|off]/fast
Enter plan mode/plan [description]/plan
Set a long-lived goal/goal [condition|clear]/goal
Fork the session/fork [prompt]/fork
Resume a previous session/resume [session]/resume
Rename the session/rename [name]/rename
Review the current diff/diff/diff
Run a code review/code-review [low|medium|high|xhigh|max|ultra] [--fix] [--comment] [--max-findings n|all|default] [pr#|branch|path]/review
Initialize project instructions file/init/init
Memory settings/memory/memories
MCP servers and tools/mcp [reconnect (<server>|all)|enable|disable [<server>|all]]/mcp
Permissions / approvals/permissions/permissions
Hooks/hooks/hooks
Plugins/plugin [subcommand]/plugins
Skills/skills/skills
Background tasks/tasks/ps
Stop background work/stop/stop
Side question/btw [question]/side
Import config from the other tool/import [codex|gemini|cursor] [--dry-run] [--yes]/import
Usage and limits/usage/usage
Status line/statusline/statusline
Theme/theme/theme
Exit/exit/exit

Where they diverge, it is usually a name rather than a capability. Codex uses /memories where Claude Code uses /memory; /ps versus /tasks for background work; /plugins versus /plugin. The thinking budget is set differently: Claude Code has a separate /effort command, while the Codex CLI picks reasoning effort inside /model (the Codex IDE extension adds a /reasoning command). Both tools accept /clear and /new to start a fresh chat. Codex's /review is a simple second-look command, while Claude Code's /code-review takes an effort level and a target and can post comments or apply fixes. Codex also has Windows-only sandbox commands (/setup-default-sandbox, /sandbox-add-read-dir), and its IDE extension has cloud-versus-local switches (/cloud, /local, /worktree), that Claude Code expresses differently, through /remote-env, /teleport and plain directory commands.

Both tables on this site are built from the vendors' documentation, so the pairing here reflects the command names as documented at the time of the last update. Removed commands are kept on the per-tool pages with a note (for example Claude Code's /vim and /pr-comments) but are not listed here.

Full references: Claude Code (157) · OpenAI Codex CLI (49) · all comparisons

What the comparison covers

The rows pair the slash commands that do the same job in Claude Code and Codex CLI — starting and resuming sessions, controlling approvals, compacting context — using each tool's own names. Both are terminal agents that edit files and run commands, so the shape of a session is similar; the differences are in vocabulary (Claude Code's /tasks versus Codex's /ps) and in what /permissions opens: allow, ask and deny rules for tools in Claude Code, approval levels such as Auto and Read Only in Codex.

Reading the gaps

No row in this table has a dash: each task listed has a documented slash command in both tools. Some pairs are only approximately the same — Claude Code's /stop ends the background session you are attached to, while Codex's /stop stops the session's background terminals — and the paragraphs above name the larger differences. The per-tool pages linked above are updated separately and are the reference for the current command names.