Claude Code vs OpenAI Codex CLI: slash commands compared

27 tasks · 27 with a documented equivalent in both · updated 2026-08-23

Claude Code and OpenAI Codex CLI are the two terminal agents whose command sets have converged hardest. Of the twenty-seven tasks in the table, twenty-one 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/new
Shrink the context window/compact instructions/compact
Switch model/model model/model
Set reasoning / effort level/effort level|auto/reasoning
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 pr#|branch|path/review
Initialize project instructions file/init/init
Edit memory / instructions/memory/memories
Manage MCP servers/mcp reconnect <server>|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, /btw
Import config from the other tool/import codex|gemini --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 /new where Claude Code uses /clear; /memories versus /memory; /ps versus /tasks for background work; /reasoning versus /effort for the thinking budget; /plugins versus /plugin. 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 sandbox commands (/setup-default-sandbox, /sandbox-add-read-dir) and 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 rebuilt from the vendors' current 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 (111) · OpenAI Codex CLI (58) · all comparisons