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 (142) · OpenAI Codex CLI (58) · all comparisons

What the comparison covers

The rows pair the slash commands and CLI flags that do the same job in Claude Code and Codex CLI — starting and resuming sessions, controlling approvals, compacting context, running headless — 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 /compact versus Codex's context handling), in how permissions are expressed (approval modes versus sandbox profiles), and in the non-interactive forms used in scripts.

Reading the gaps

A dash means the feature exists in a different form or not at all in that tool at the time of checking, and both CLIs change monthly; the per-tool pages linked above are updated separately and are the reference for the current flag names. Where a row shows an equivalent that is only approximately the same — hooks versus notifications, for example — the note column says so rather than forcing a match.