Subcommands34 subcommands
codex exec
Run Codex non-interactively
codex exec resume
Resume a previous session by id or pick the most recent with --last
codex exec review
Run a code review against the current repository
codex exec help
Print help
codex review
Run a code review non-interactively
codex logout
Remove stored authentication credentials
codex mcp
Manage external MCP servers for Codex
codex mcp list
List configured MCP servers
codex mcp get
Get details about an MCP server
codex mcp add
Add an MCP server
codex mcp remove
Remove an MCP server
codex mcp login
Log in to an OAuth-enabled MCP server
codex mcp logout
Remove OAuth credentials for an MCP server
codex plugin
Manage Codex plugins
codex mcp-server
Start Codex as an MCP server (stdio)
codex app-server
[experimental] Run the app server or related tooling
codex app
Launch the Codex desktop app (opens installer if missing)
codex completion
Generate shell completion scripts
codex update
Update Codex to the latest version
codex sandbox
Run commands within a Codex-provided sandbox
codex sandbox macos
Run a command under Seatbelt (macOS only)
codex sandbox linux
Run a command under the Linux sandbox (bubblewrap by default)
codex sandbox windows
Run a command under Windows restricted token (Windows only)
codex sandbox help
Print help
codex debug
Debugging tools
codex apply
Apply the latest diff produced by Codex as a `git apply` to local working tree
codex resume
Resume a previous interactive session (picker by default; --last for most recent)
codex fork
Fork a previous interactive session (picker by default; --last for most recent)
codex cloud
[EXPERIMENTAL] Browse tasks from Codex Cloud and apply changes locally
codex exec-server
[EXPERIMENTAL] Run the standalone exec-server service
codex features
Inspect feature flags
OptionsOn codex itself
-c--config
Override a configuration value (dotted path, TOML-parsed value) <key=value>
--enable
Enable a feature (repeatable). Equivalent to `-c features.<name>=true` <feature>
--disable
Disable a feature (repeatable). Equivalent to `-c features.<name>=false` <feature>
-i--image
Optional image(s) to attach to the initial prompt <file>
-m--model
Model the agent should use <model>
--oss
Use open-source provider
--local-provider
Specify which local provider to use (with --oss) <provider>
-p--profile
Configuration profile from config.toml <profile>
-s--sandbox
Sandbox policy for model-generated shell commands <mode>
--dangerously-bypass-approvals-and-sandbox
Skip all confirmation prompts and run without sandboxing (EXTREMELY DANGEROUS)
-C--cd
Agent working root <dir>
--add-dir
Additional directories writable alongside primary workspace <dir>
-a--ask-for-approval
When the model requires human approval <policy>
--search
Enable live web search (Responses `web_search` tool)
--remote
Connect the TUI to a remote app server websocket endpoint (ws:// or wss://) <addr>
--remote-auth-token-env
Env var containing the bearer token for remote app server <env_var>
--no-alt-screen
Disable alternate screen mode (inline TUI)