The command for each task, in each harness. Pick what you are working with, then read across: commands you type in your shell or a script and commands you type inside an open session are listed separately. Commands for renaming sessions are on Thread naming and importing from another harness on Migration.
From your shell
Commands you run in a terminal or script, outside a session.
| Task | Codex CLIchecked at 0.162.1 |
|---|---|
| Set up | |
| Add |
Register a stdio or streamable-HTTP MCP server. 1 note--env is stdio-only; --bearer-token-env-var, --oauth-client-id, --oauth-client-secret, --oauth-client-registration and --oauth-resource are HTTP-only. |
| Sign in or pair | Start an OAuth login for a configured streamable-HTTP MCP server. 1 note--no-browser prints the URL to paste the callback by hand; --scopes; --oauth-client-registration. |
| Use | |
| List | List configured MCP servers. |
| Show details | Show one MCP server's configuration. 1 note--json prints the raw config entry. |
| Remove | |
| Sign out | Remove stored OAuth credentials for an MCP server. |
| Remove | Delete a stored MCP server definition. |
Inside a session
Slash commands you type into an open session.
| Task | Codex CLIchecked at 0.162.1 |
|---|---|
| Set up | |
| Sign in or pair | |
| Use | |
| List | also /mcp verbose List the MCP servers and tools available in the session. 1 note/mcp verbose adds server diagnostics. |
Notes and sources
Codex CLI
- The shell CLI installs and removes plugins but has no enable, disable, update or validate command; the /plugins browser can switch plugins on or off.
- --worktree starts new sessions in a managed Git worktree and works with codex fork given an explicit session; resume, queue, archive, unarchive and delete reject it at run time.
- MCP protocol capabilities are recorded in mcp.json; these records cover the operator commands.
- 0.164.0 TUI: /presets opens ten numbered reusable-input slots (1–9 and 0) for prompts/slash commands, with a keyboard menu and saving through local settings. It is not a skill or model-callable tool.
- 0.164.0 TUI: /model [model] --reasoning=<level> --speed=<tier> validates available model/effort/tier choices before applying session settings. /permissions <profile-id> [--approval-policy=<policy>] [--reviewer=user|auto_review] discovers and validates the selected permission profile before releasing queued input. These commands are distinct from CLI launch flags.
- 0.166.0 adds
codex doctor --network-only, which runs only the config, network environment, provider HTTP and Responses WebSocket checks.
- codex-cli-0.162.1 help observation, live observation, checked 2026-10-14
- Codex developer commands, Documentation, checked 2026-10-15
- Codex 0.166.0: codex-rs/core-plugins/src/marketplace_policy.rs, Source code, checked 2026-10-30
- Codex 0.166.0: codex-rs/core-plugins/src/marketplace_policy.rs, Source code, checked 2026-10-30
- Codex 0.166.0: codex-rs/core-plugins/src/manager.rs, Source code, checked 2026-10-30
- Codex 0.166.0: codex-rs/app-server/src/startup_warnings.rs, Source code, checked 2026-10-30
- Codex 0.166.0: codex-rs/cli/src/queue_cmd.rs, Source code, checked 2026-10-30
- Codex 0.166.0: codex-rs/tui/src/session_queue_commands.rs, Source code, checked 2026-10-30
- Codex 0.166.0: codex-rs/cli/src/queue_cmd.rs, Source code, checked 2026-10-30
- Codex 0.166.0: codex-rs/app-server/src/request_processors/thread_processor.rs, Source code, checked 2026-10-30
- Codex 0.166.0: codex-rs/thread-store/src/local/unarchive_thread.rs, Source code, checked 2026-10-30
- Codex 0.166.0: codex-rs/tui/src/session_archive_commands.rs, Source code, checked 2026-10-30
- 2026-10-24 release review: codex permission, Source code, checked 2026-10-24
- Codex 0.164.0 worktrees: codex-rs/cli/src/main.rs, Source code, checked 2026-10-27
- Codex 0.164.0 worktrees: codex-rs/tui/src/chatwidget/worktree_picker.rs, Source code, checked 2026-10-27