Comparisons
Command Equivalents
How to do the same task in each tool. All commands below are verified from the official documentation.
| Task | Claude Code | Codex | Kimi Code |
|---|---|---|---|
| Start session | claude (or claude "query") | codex (or codex "PROMPT") | kimi |
| Resume session | claude -c (most recent in cwd); claude -r <id-or-name>; /resume | codex resume [SESSION_ID] or codex resume --last; /resume | kimi -c (most recent in cwd); kimi -S [id]; /sessions |
| Clear/new context | /clear [name] | /new [name] or /clear (clears terminal and starts a fresh chat) | /new (alias /clear) |
| Change model | /model [model]; claude --model <model> | /model; codex -m <model> | /model; kimi -m <model> |
| Compact context | /compact [instructions] | /compact | /compact [instruction] |
| Plan before coding | /plan [description]; Shift+Tab; claude --permission-mode plan | /plan [inline prompt] | /plan [on|off]; Shift-Tab; kimi --plan |
| Review changes / code review | /code-review [--fix] [target]; /review [PR]; /security-review | /review (working tree); codex review --uncommitted | --base <branch> | --commit <SHA> | No direct equivalent verified. |
| Change permissions | /permissions; Shift+Tab cycles modes | /permissions (approval presets) | /permission; /yolo; /auto |
| Add MCP server | claude mcp add --transport http <name> <url>; claude mcp add <name> -- <command> | codex mcp add <name> -- <command>; codex mcp add <name> --url <url> | /mcp-config (interactive); edit ~/.kimi-code/mcp.json or .kimi-code/mcp.json |
| Non-interactive run | claude -p "query" | codex exec "PROMPT" | kimi -p "prompt" |
| Generate project instructions file | /init → CLAUDE.md | /init → AGENTS.md | /init → AGENTS.md |
| Undo/rewind | /rewind (code + conversation checkpoint rollback; also Esc Esc) | Esc Esc (empty composer) edits previous message and forks | /undo [count] (prompts, todo list, plan state; not code); Esc Esc opens undo selector |
Behavior differences that matter
claude -cvscodex resume --lastvskimi -c— All three continue the most recent session scoped to the current working directory. Differences:codex resumewithout flags opens an interactive session picker (use--lastfor most recent,--allto search sessions from any directory), and if the cwd differs from the session’s saved directory Codex asks which directory to use.kimi -candclaude -cgo straight to the most recent session in the cwd. Kimi’s resume restores the bound agent and the saved permission/plan mode (mode flags may override — the docs conflict on whether--yolo/--plancombine with--continue; treat as unresolved). Claude additionally supports--fork-session(resume into a new session ID) and--from-pr(resume the session linked to a GitHub PR)./compact— Available in all three, but the trigger and knobs differ. Claude auto-compacts at ~95% of the context window (CLAUDE_AUTOCOMPACT_PCT_OVERRIDEto adjust) and firesPreCompacthooks with matchermanual/auto. Codex auto-compacts atmodel_auto_compact_token_limitand the summary prompt is customizable viacompact_prompt. Kimi auto-compacts based on[loop_control] reserved_context_size; after a compaction, prompts from before it cannot be undone. Claude and Kimi accept an optional instruction to guide what the summary preserves; the Codex docs do not describe an inline instruction for/compact.- Clear vs new — In Claude,
/clearclears conversation history (with optional name). In Codex,/newstarts a new chat in the same CLI session while/clearboth clears the terminal and starts a fresh chat (Ctrl+L only clears the view). In Kimi,/newand/clearare aliases that start a fresh session discarding the current context. - Review — Claude’s three review commands have different semantics:
/code-reviewis a multi-agent diff review with depth levels (up toultra, which runs in the cloud),/reviewis a fast single-pass read-only GitHub PR review, and/security-reviewchecks the diff for vulnerabilities. Codex’s/reviewcovers the working tree in the TUI, whilecodex reviewruns non-interactively against uncommitted changes, a base branch, a commit, or a custom prompt; it does not modify the working tree. Kimi Code has no documented code review command. - Undo/rewind is not the same feature in each tool — Claude’s
/rewindrolls both code and conversation back to a checkpoint (and can resume from before a/clear). Kimi’s/undorolls back prompts, the todo list, and plan-mode state, but explicitly not code changes. Codex has no undo command; Esc Esc with an empty composer lets you edit a previous message, which forks the chat. - Non-interactive defaults —
claude -psupports--output-format text|json|stream-json,--max-turns,--max-budget-usd, and--permission-prompt-tool; built-in/user slash commands are not available in this mode.codex execdefaults to a read-only sandbox, streams progress to stderr and prints only the final message to stdout, and requires a Git repo unless--skip-git-repo-checkis passed.kimi -pruns with theauto(Never Ask) permission policy by default — no human approval — though static deny rules still apply; output formats aretextandstream-json. - MCP server registration — Claude and Codex both have CLI subcommands (
claude mcp add,codex mcp add) plus in-session panels (/mcp). Kimi has no documented CLI add command; servers are configured interactively via/mcp-configor by editingmcp.jsonfiles directly.
Last verified: 2026-09-07
Official sources:
- https://code.claude.com/docs/en/cli-reference.md
- https://code.claude.com/docs/en/commands.md
- https://code.claude.com/docs/en/headless.md
- https://developers.openai.com/codex/cli/slash-commands
- https://developers.openai.com/codex/noninteractive
- https://developers.openai.com/codex/mcp
- https://www.kimi.com/code/docs/en/kimi-code-cli/reference/slash-commands.html
- https://www.kimi.com/code/docs/en/kimi-code-cli/reference/kimi-command.html
- https://www.kimi.com/code/docs/en/kimi-code-cli/guides/sessions.html
- https://www.kimi.com/code/docs/en/kimi-code-cli/customization/mcp.html
AI coding tools evolve quickly. If you find outdated information, please open an issue or pull request.