Skip to main content
reopt Handbook
reopt Handbook
Codex Command MasterLabels and command selectionHow to read a detail guideComplete command listTerminal CLI Commands and Options

Task guides

Core Command GroupSession Command GroupCustom Command GuideMCP Command and Integration GuideDesign Workflows

Conversation and context

Cmd. /clearCmd. /renameCmd. /archiveCmd. /deleteCmd. /compactCmd. /copyCmd. /memoriesCmd. /importCmd. /initCmd. /mentionCmd. /forkCmd. /sideCmd. /resumeCmd. /newCmd. /cdCmd. /exportCmd. /recap

Planning and execution

Cmd. /planCmd. /goalCmd. /psCmd. /stopCmd. /app

Review and verification

Cmd. /review

Models and settings

Cmd. /modelCmd. /fast

Permissions and integrations

Cmd. /permissionsCmd. /ideCmd. /setup-default-sandboxCmd. /sandbox-add-read-dirCmd. /pluginsCmd. /hooksCmd. /approveCmd. /skillsCmd. /mcp

Status and diagnostics

Cmd. /agentCmd. /appsCmd. /diffCmd. /feedbackCmd. /personalityCmd. /rawCmd. /statusCmd. /debug-configCmd. /title

Display and input

Cmd. /keymapCmd. /vimCmd. /experimentalCmd. /statuslineCmd. /themeCmd. /petsCmd. /voiceCmd. /worktree

Account and usage

Cmd. /exitCmd. /logoutCmd. /quitCmd. /usage

Legacy

Cmd. /approvals

Verification and history

Current verification scopeHandbook updatesRelease coverage historyEarlier verification recordsCommand change history
Handbook›Codex Command Master›Terminal CLI Commands and Options
한국어English

Terminal CLI Commands and Options

All 27 official Codex CLI command entries, global and command-specific option tables, and release additions

Key takeaways

  • Includes 27 official command entries and scoped option tables.
  • Separates release additions such as daemon update through CLI 0.155.1.

Checked against the CLI tables in Developer Commands on September 22, 2026: 27 command entries plus global and command-specific option tables. Values below are documented types, accepted values, or argument forms; replace placeholders and check codex <command> --help before running. Release additions through 0.155.1 appear separately below.

Slash commands · Developer Commands

27 terminal commands

CommandUse
codexInteractive TUI
codex appLaunch the desktop app
codex app-serverIntegration server; experimental
codex applyApply a cloud diff
codex archiveArchive a saved session
codex cloudInspect/run cloud tasks; experimental
codex completionGenerate shell completions
codex debug app-server send-message-v2Diagnose a V2 protocol request
codex debug modelsModel catalog JSON
codex debug prompt-inputModel-visible prompt JSON
codex deletePermanently delete a session
codex doctorInstallation/config/runtime diagnostics
codex execNon-interactive task
codex execpolicyEvaluate execution rules; preview
codex featuresInspect/persist feature flags
codex forkFork a saved session
codex loginAccount/API authentication
codex logoutClear saved authentication
codex mcpManage external MCP servers
codex pluginManage plugins
codex plugin marketplaceManage marketplace sources
codex remote-controlRemote daemon/pairing; experimental
codex resumeResume a conversation
codex reviewNon-interactive code review
codex sandboxExecute within an OS sandbox
codex unarchiveRestore an archived session
codex updateSelf-update supported release builds

Global options

KeyType, value, or arguments
--add-dirpath
--ask-for-approval, -aon-request | never
--cd, -Cpath
--config, -ckey=value
--dangerously-bypass-approvals-and-sandbox, --yoloboolean
--dangerously-bypass-hook-trustboolean
--disablefeature
--enablefeature
--image, -ipath[,path...]
--local-providerlmstudio | ollama
--model, -mstring
--no-alt-screenboolean
--ossboolean
--profile, -pstring
--remotews://host:port | wss://host:port | unix:// | unix://PATH
--remote-auth-token-envENV_VAR
--sandbox, -sread-only | workspace-write | danger-full-access
--searchboolean
--strict-configboolean
PROMPTstring

--profile layers $CODEX_HOME/<profile>.config.toml. --remote-auth-token-env requires --remote and sends tokens only over WSS or local WS. --search selects live rather than cached search. --strict-config rejects unknown settings.

codex app-server

KeyType, value, or arguments
--analytics-default-enabledboolean
--code-mode-hostws://HOST/PATH | wss://HOST/PATH
--listenstdio:// | ws://IP:PORT | unix:// | unix://PATH | off
--stdioboolean
--ws-audiencestring
--ws-authcapability-token | signed-bearer-token
--ws-issuerstring
--ws-max-clock-skew-secondsnumber
--ws-shared-secret-fileabsolute path
--ws-token-fileabsolute path
--ws-token-sha256hexadecimal SHA-256 digest

Do not combine --stdio with --listen. Signed-bearer-token authentication requires --ws-shared-secret-file. --code-mode-host is a separate outbound connection.

codex app

KeyType, value, or arguments
--download-urlurl
PATHpath

codex debug app-server send-message-v2

KeyType, value, or arguments
USER_MESSAGEstring

codex debug models

KeyType, value, or arguments
--bundledboolean

--bundled inspects the binary’s catalog without a remote refresh.

codex debug prompt-input

KeyType, value, or arguments
--image, -ipath[,path...]
PROMPTstring

Inspect the output before sharing: it contains model-visible instructions and context.

codex apply

KeyType, value, or arguments
TASK_IDstring

codex review

KeyType, value, or arguments
--basebranch
--commitSHA
--strict-configboolean
--titlestring
--uncommittedboolean
PROMPTstring | - (read stdin)

Choose exactly one of --uncommitted, --base, --commit, or a custom PROMPT. Use --title with --commit.

codex archive and codex unarchive

KeyType, value, or arguments
--remotews://host:port | wss://host:port | unix:// | unix://PATH
--remote-auth-token-envENV_VAR
SESSIONsession ID | session name

codex delete

KeyType, value, or arguments
--forceboolean
--remotews://host:port | wss://host:port | unix:// | unix://PATH
--remote-auth-token-envENV_VAR
SESSIONsession ID | session name

--force applies only to session UUIDs. Named deletion still requires confirmation.

codex cloud

KeyType, value, or arguments
--attempts1-4
--envENV_ID
QUERYstring

This table describes task submission with codex cloud exec.

codex cloud list

KeyType, value, or arguments
--cursorstring
--envENV_ID
--jsonboolean
--limit1-20

codex completion

KeyType, value, or arguments
SHELLbash | zsh | fish | power-shell | elvish

codex doctor

KeyType, value, or arguments
--allboolean
--asciiboolean
--jsonboolean
--no-colorboolean
--summaryboolean

codex features

KeyType, value, or arguments
Disable subcommandcodex features disable <feature>
Enable subcommandcodex features enable <feature>
List subcommandcodex features list

Enable/disable persist in configuration. This command does not accept --profile.

codex exec

KeyType, value, or arguments
--cd, -Cpath
--coloralways | never | auto
--dangerously-bypass-approvals-and-sandbox, --yoloboolean
--dangerously-bypass-hook-trustboolean
--ephemeralboolean
--full-autoboolean
--ignore-rulesboolean
--ignore-user-configboolean
--image, -ipath[,path...]
--json, --experimental-jsonboolean
--local-providerlmstudio | ollama
--model, -mstring
--ossboolean
--output-last-message, -opath
--output-schemapath
--profile, -pstring
--sandbox, -sread-only | workspace-write | danger-full-access
--skip-git-repo-checkboolean
-c, --configkey=value
PROMPTstring | - (read stdin)
Resume subcommandcodex exec resume [SESSION_ID]

--json emits JSONL events, --output-last-message writes the final reply, and --output-schema specifies its schema. The reference retains --full-auto as deprecated, while the 0.147–148 release tracking records its removal. New examples use explicit --sandbox workspace-write.

codex exec resume

KeyType, value, or arguments
--allboolean
--image, -ipath[,path...]
--lastboolean
PROMPTstring | - (read stdin)
SESSION_IDuuid | session name

--last scopes selection to the current directory; --all searches across directories.

codex execpolicy

KeyType, value, or arguments
--prettyboolean
--rules, -rpath (repeatable)
COMMAND...var-args

codex login

KeyType, value, or arguments
--device-authboolean
--with-access-tokenboolean
--with-api-keyboolean
status subcommandcodex login status

Supply API keys and access tokens via stdin, not argument values. status exits 0 when logged in.

codex mcp

KeyType, value, or arguments
add <name>-- <command...> | --url <value>
get <name>--json
list--json
login <name>--scopes scope1,scope2
logout <name>—
remove <name>—

OAuth login/logout apply only to streamable HTTP servers that support OAuth.

codex mcp add

KeyType, value, or arguments
--bearer-token-env-varENV_VAR
--env KEY=VALUErepeatable
--oauth-client-idCLIENT_ID
--oauth-resourceRESOURCE
--urlhttps://…
COMMAND...stdio transport

Do not combine --url with stdio COMMAND.... OAuth client/resource options require --url.

codex plugin

KeyType, value, or arguments
add <plugin[@marketplace]>[--marketplace, -m NAME] [--json]
list[--marketplace, -m NAME] [--available --json] [--json]
marketplace—
remove <plugin[@marketplace]>[--marketplace, -m NAME] [--json]

list --available requires --json; the JSON includes installed and available arrays.

codex plugin marketplace

KeyType, value, or arguments
add <source>[--ref REF] [--sparse PATH] [--json]
list[--json]
remove <marketplace-name>[--json]
upgrade [marketplace-name][--json]

--sparse is repeatable and applies only to Git sources.

codex resume

KeyType, value, or arguments
--allboolean
--include-non-interactiveboolean
--lastboolean
SESSION_IDuuid | session name

Persist the directory choice with tui.resume_cwd; explicit --cd takes precedence.

codex fork

KeyType, value, or arguments
--allboolean
--lastboolean
SESSION_IDuuid

macOS seatbelt

KeyType, value, or arguments
--allow-unix-socketpath
--cd, -CDIR
--config, -ckey=value
--include-managed-configboolean
--log-denialsboolean
--permission-profile, -PNAME
--profile, -pNAME
COMMAND...var-args

--cd and --include-managed-config require --permission-profile. --allow-unix-socket is macOS-specific.

Linux Landlock

KeyType, value, or arguments
--cd, -CDIR
--config, -ckey=value
--include-managed-configboolean
--permission-profile, -PNAME
--profile, -pNAME
COMMAND...var-args

--cd and --include-managed-config require --permission-profile.

Windows

KeyType, value, or arguments
--cd, -CDIR
--config, -ckey=value
--include-managed-configboolean
--permission-profile, -PNAME
--profile, -pNAME
COMMAND...var-args

--cd and --include-managed-config require --permission-profile.

Release additions and compatibility

CommandScope
codex app-server daemon update0.155.0 daemon update
codex agents / codex queue0.149–150 agent/queue operations
codex exec fork0.147–148 non-interactive fork
codex remote-control / codex remote-control start / codex remote-control stop / codex remote-control pairRemote foreground/daemon/pairing; supports --json
codex mcp-serverRemoved; see codex app-server

0.155.0 adds daemon update schedules and recovery of threads/goals after restarts. codex update updates the CLI installation; daemon update targets the daemon. Check installed help for platform/install-specific sub-options.

codex doctor --summary
codex debug models --bundled
codex features list
codex review --uncommitted
codex exec --sandbox workspace-write --json "Explain this repository"

The last two examples invoke a model. Distinguish shell commands such as codex review and codex resume from in-session /review and /resume.

Sources

  • Developer Commands
  • Changelog

Related docs

Advanced Codex Usage

An advanced operations and extension guide for teams standardizing Codex usage.

Cmd. /import

Import supported Claude Code setup, project files, and recent chats into Codex.

Cmd. /review

Ask Codex to review the current working tree.

Governance and Rollout

Advanced Codex Usage · Roll out Codex across teams with ownership, policy, training, and upgrade discipline.

Exec and Automation

Advanced Codex Usage · Use Codex exec for non-interactive scripts, CI checks, and structured automation.

Complete command list

Syntax, type, availability, and guide links for all 50 entries in the official Codex CLI slash table.

Core Command Group

The most frequently used Codex commands, including full conversation export, in one page.

On this page

27 terminal commandsGlobal optionscodex app-servercodex appcodex debug app-server send-message-v2codex debug modelscodex debug prompt-inputcodex applycodex reviewcodex archive and codex unarchivecodex deletecodex cloudcodex cloud listcodex completioncodex doctorcodex featurescodex execcodex exec resumecodex execpolicycodex logincodex mcpcodex mcp addcodex plugincodex plugin marketplacecodex resumecodex forkmacOS seatbeltLinux LandlockWindowsRelease additions and compatibilitySources