CODEX CLI / RELEASE 0.163.0 / SOURCE-TRACED
The complete Codex CLI reference.
One searchable ledger generated from recursive runtime help and reconciled with the current official manual. Release facts and preview source evidence stay visibly separate.
Open the complete operating guide→No records match this filter.
RUNTIME / RECURSIVE HELP
Command paths
74 supported + 2 conditional codex Codex CLI If no subcommand is specified, options will be forwarded to the interactive CLI. 24 options
USAGEcodex [OPTIONS] [PROMPT]
arguments
[PROMPT]Optional user prompt to start the session
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable--remote <ADDR> Connect the TUI to a remote app server endpoint. Accepted forms: `ws://host:port`, `wss://host:port`, `unix://`, or `unix://PATH`.
url--remote-auth-token-env <ENV_VAR> Name of the environment variable containing the bearer token to send to a remote app server websocket
string--strict-config Error out when config.toml contains fields that are not recognized by this version of Codex
boolean-i, --image, <FILE...> Optional image(s) to attach to the initial prompt
path · Repeatable-m, --model, <MODEL> Model the agent should use
string--oss Use open-source provider
boolean--local-provider <OSS_PROVIDER> Specify which local provider to use (lmstudio or ollama). If not specified with --oss, will use config default or show selection
string-p, --profile, <CONFIG_PROFILE_V2> Select a named configuration profile from $CODEX_HOME; -p is profile selection, not non-interactive mode.
string-s, --sandbox, <SANDBOX_MODE> Select the sandbox policy to use when executing model-generated shell commands [possible values: read-only, workspace-write, danger-full-access]
enum--approve-for-me Route approval requests through automatic review using the workspace-write sandbox
boolean--dangerously-bypass-approvals-and-sandbox Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed
boolean--dangerously-bypass-hook-trust Run enabled hooks without requiring persisted hook trust for this invocation. DANGEROUS. Intended only for automation that already vets hook sources
boolean-C, --cd, <DIR> Tell the agent to use the specified directory as its working root
path--worktree Run the session in a new managed Git worktree
boolean--add-dir <DIR> Additional directories that should be writable alongside the primary workspace
path-a, --ask-for-approval, <APPROVAL_POLICY> Configure when the model requires human approval before executing a command Possible values: - on-request: The model decides when to ask the user for approval - never: Never ask for user approval Execution failures are immediately returned to the model
string--search Enable live web search. When enabled, the native Responses `web_search` tool is available to the model (no per‑call approval)
boolean--no-alt-screen Disable alternate screen mode Runs the TUI in inline mode, preserving terminal scrollback history.
boolean--no-daemon Run without the shared background server, even if it is already running
boolean-h, --help Print help (see a summary with '-h')
boolean-V, --version Print version
booleancodex codex --profile deep-review
codex agents Browse all agent sessions on the shared local app-server daemon 8 options
USAGEcodex agents [OPTIONS]
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--remote <ADDR> Connect the TUI to a remote app server endpoint. Accepted forms: `ws://host:port`, `wss://host:port`, `unix://`, or `unix://PATH`.
url--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable--remote-auth-token-env <ENV_VAR> Name of the environment variable containing the bearer token to send to a remote app server websocket
string-C, --cd, <DIR> Use this directory for new tasks on a remote server
path--no-alt-screen Disable alternate screen mode
boolean-h, --help Print help (see a summary with '-h')
boolean codex exec Run Codex non-interactively 29 options
USAGEcodex exec [OPTIONS] [PROMPT]
arguments
[PROMPT]Initial instructions for the agent. If not provided as an argument (or if `-` is used), instructions are read from stdin. If stdin is piped and a prompt is also provided, stdin is appended as a `<stdin>` block
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable--strict-config Error out when config.toml contains fields that are not recognized by this version of Codex
boolean-i, --image, <FILE...> Optional image(s) to attach to the initial prompt
path · Repeatable-m, --model, <MODEL> Model the agent should use
string--oss Use open-source provider
boolean--local-provider <OSS_PROVIDER> Specify which local provider to use (lmstudio or ollama). If not specified with --oss, will use config default or show selection
string-p, --profile, <CONFIG_PROFILE_V2> Select a named configuration profile from $CODEX_HOME; -p is profile selection, not non-interactive mode.
string-s, --sandbox, <SANDBOX_MODE> Select the sandbox policy to use when executing model-generated shell commands [possible values: read-only, workspace-write, danger-full-access]
enum--approve-for-me Route approval requests through automatic review using the workspace-write sandbox
boolean--dangerously-bypass-approvals-and-sandbox Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed
boolean--dangerously-bypass-hook-trust Run enabled hooks without requiring persisted hook trust for this invocation. DANGEROUS. Intended only for automation that already vets hook sources
boolean-C, --cd, <DIR> Tell the agent to use the specified directory as its working root
path--worktree Run the session in a new managed Git worktree
boolean--add-dir <DIR> Additional directories that should be writable alongside the primary workspace
path--thread-source <SOURCE> Source classification for newly created or forked threads
string--cyber-access-program <PROGRAM> Request an experimental Cyber access program for this turn (OpenAI provider only). Omit to use server defaults. Not supported with review; fork requires a prompt [possible values: standard, daybreak_blue, daybreak_red]
enum--skip-git-repo-check Allow running Codex outside a Git repository
boolean--ephemeral Run without persisting session files to disk
boolean--ignore-user-config Do not load `$CODEX_HOME/config.toml`; auth still uses `CODEX_HOME`
boolean--ignore-rules Do not load user or project execpolicy `.rules` files
boolean--output-schema <FILE> Path to a JSON Schema file describing the model's final response shape
path--color <COLOR> Specifies color settings for use in the output [default: auto] [possible values: always, never, auto]
enum · Default: auto--json Print events to stdout as JSONL
boolean-o, --output-last-message, <FILE> Specifies file where the last message from the agent should be written
path-h, --help Print help (see a summary with '-h')
boolean-V, --version Print version
boolean--full-auto Removed: no longer supported. Use --sandbox workspace-write, or --approve-for-me to route approvals through automatic review.
boolean · Default: falsecodex exec "Run the affected tests" codex exec --json --output-schema schema.json "Return the audit result"
codex review Run a code review non-interactively 9 options
USAGEcodex review [OPTIONS] [PROMPT]
arguments
[PROMPT]Custom review instructions. If `-` is used, read from stdin
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--strict-config Error out when config.toml contains fields that are not recognized by this version of Codex
boolean--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--uncommitted Review staged, unstaged, and untracked changes
boolean--base <BRANCH> Review changes against the given base branch
string--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable--commit <SHA> Review the changes introduced by a commit
string--title <TITLE> Optional commit title to display in the review summary
string-h, --help Print help (see a summary with '-h')
boolean codex login Manage login 7 options
USAGEcodex login [OPTIONS] [COMMAND]
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--with-api-key Read the API key from stdin (e.g. `printenv OPENAI_API_KEY | codex login --with-api-key`)
boolean--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--with-access-token Read the access token from stdin (e.g. `printenv CODEX_ACCESS_TOKEN | codex login
boolean--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable--device-auth Show or set device auth.
boolean-h, --help Print help (see a summary with '-h')
boolean codex logout Remove stored authentication credentials 4 options
USAGEcodex logout [OPTIONS]
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex mcp Manage external MCP servers for Codex 4 options
USAGEcodex mcp [OPTIONS] <COMMAND>
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex plugin Manage Codex plugins 4 options
USAGEcodex plugin [OPTIONS] <COMMAND>
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex app-server [experimental] Run the app server or related tooling 16 options
USAGEcodex app-server [OPTIONS] [COMMAND]
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable--code-mode-host <URL> Connect to a remote code-mode host instead of starting a local host
url--strict-config Error out when config.toml contains fields that are not recognized by this version of Codex
boolean--listen <URL> Transport endpoint URL. Supported values: `stdio://` (default), `unix://`, `unix://PATH`, `ws://IP:PORT`, `off` [default: stdio://]
url · Default: stdio://--stdio Use stdio as the transport (equivalent to `--listen stdio://`)
boolean--analytics-default-enabled Controls whether analytics are enabled by default. Analytics are disabled by default for app-server. Users have to explicitly opt in via the `analytics` section in the config.toml file. However, for first-party use cases like the VSCode IDE extension, we default analytics to be enabled by default by setting this flag. Users can still opt out by setting this in their config.toml: ```toml [analytics] enabled = false ``` See https://developers.openai.com/codex/config-advanced/#metrics for more details.
boolean--ws-auth <MODE> Authentication mode for incoming WebSocket connections [possible values: capability-token, signed-bearer-token]
enum--ws-token-file <PATH> Absolute path to the capability-token file
path--ws-token-sha256 <HEX> Hex-encoded SHA-256 digest of the capability token
string--ws-shared-secret-file <PATH> Absolute path to the shared secret file for signed JWT bearer tokens
path--ws-issuer <ISSUER> Expected issuer for signed JWT bearer tokens
string--ws-audience <AUDIENCE> Expected audience for signed JWT bearer tokens
string--ws-max-clock-skew-seconds <SECONDS> Maximum clock skew when validating signed JWT bearer tokens
integer-h, --help Print help (see a summary with '-h')
boolean codex remote-control [experimental] Manage the app-server daemon with remote control enabled 6 options
USAGEcodex remote-control [OPTIONS] [COMMAND]
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--json Emit machine-readable JSON
boolean--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--no-daemon Run an embedded app-server in the foreground until Ctrl-C
boolean--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex app Launch the Desktop app (opens the app installer if missing) 5 options
USAGEcodex app [OPTIONS] [PATH]
arguments
[PATH]Workspace path to open in the Desktop app
[default: .]Positional command argument.
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--download-url <DOWNLOAD_URL_OVERRIDE> Override the app installer download URL (advanced)
url--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex completion Generate shell completion scripts 4 options
USAGEcodex completion [OPTIONS] [SHELL]
arguments
[SHELL]Shell to generate completions for
[default: bash]Positional command argument.
[possible values: bash, elvish, fish, powershell, zsh]Positional command argument.
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex update Update Codex to the latest version 4 options
USAGEcodex update [OPTIONS]
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex doctor Diagnose local Codex installation, config, auth, and runtime health 9 options
USAGEcodex doctor [OPTIONS]
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--json Emit a redacted machine-readable report
boolean--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable--summary Only show grouped check rows and the final count summary
boolean--all Expand long lists in detailed human output
boolean--no-color Disable ANSI color in human output
boolean--ascii Use ASCII status labels and separators in human output
boolean-h, --help Print help (see a summary with '-h')
boolean codex sandbox Run commands within a Codex-provided sandbox 13 options
USAGEcodex sandbox [OPTIONS] [COMMAND]... [COMMAND]
arguments
[COMMAND]...Full command args to run under seatbelt
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--sandbox-state-json <JSON> Opaque JSON value from `codex/sandbox-state` to apply directly
object--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--sandbox-state-readable-root <SANDBOX_STATE_READABLE_ROOT> Add a readable root to the supplied sandbox state. Repeat for multiple roots
path · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable--sandbox-state-disable-network Disable direct network access in the supplied sandbox state
boolean-P, --permission-profile, <NAME> Named permissions profile to apply from the active configuration stack
string-p, --profile, <CONFIG_PROFILE> Select a named configuration profile from $CODEX_HOME; -p is profile selection, not non-interactive mode.
string-C, --cd, <DIR> Working directory used for profile resolution and command execution
path--include-managed-config Include managed requirements while resolving an explicit permissions profile
boolean--allow-unix-socket <ALLOW_UNIX_SOCKETS> Allow the sandboxed command to bind/connect AF_UNIX sockets rooted at this path. Relative paths are resolved against the current directory. Repeat to allow multiple paths
string · Repeatable--log-denials While the command runs, capture macOS sandbox denials via `log stream` and print them after exit
boolean-h, --help Print help (see a summary with '-h')
boolean codex debug Debugging tools 4 options
USAGEcodex debug [OPTIONS] <COMMAND>
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex apply Apply the latest diff produced by Codex agent as a `git apply` to your local working tree 4 options
USAGEcodex apply [OPTIONS] <TASK_ID>
arguments
<TASK_ID>Positional command argument.
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex resume Resume a previous interactive session (picker by default; use --last to continue the most recent) 27 options
USAGEcodex resume [OPTIONS] [SESSION_ID] [PROMPT]
arguments
[SESSION_ID]Session id (UUID) or session name. UUIDs take precedence if it parses. If omitted, use --last to pick the most recent recorded session
[PROMPT]Optional user prompt to start the session
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--last Continue the most recent session without showing the picker
boolean--all Show all sessions (disables cwd filtering and shows CWD column)
boolean--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable--include-non-interactive Include non-interactive sessions in the resume picker and --last selection
boolean--remote <ADDR> Connect the TUI to a remote app server endpoint. Accepted forms: `ws://host:port`, `wss://host:port`, `unix://`, or `unix://PATH`.
url--remote-auth-token-env <ENV_VAR> Name of the environment variable containing the bearer token to send to a remote app server websocket
string--strict-config Error out when config.toml contains fields that are not recognized by this version of Codex
boolean-i, --image, <FILE...> Optional image(s) to attach to the initial prompt
path · Repeatable-m, --model, <MODEL> Model the agent should use
string--oss Use open-source provider
boolean--local-provider <OSS_PROVIDER> Specify which local provider to use (lmstudio or ollama). If not specified with --oss, will use config default or show selection
string-p, --profile, <CONFIG_PROFILE_V2> Select a named configuration profile from $CODEX_HOME; -p is profile selection, not non-interactive mode.
string-s, --sandbox, <SANDBOX_MODE> Select the sandbox policy to use when executing model-generated shell commands [possible values: read-only, workspace-write, danger-full-access]
enum--approve-for-me Route approval requests through automatic review using the workspace-write sandbox
boolean--dangerously-bypass-approvals-and-sandbox Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed
boolean--dangerously-bypass-hook-trust Run enabled hooks without requiring persisted hook trust for this invocation. DANGEROUS. Intended only for automation that already vets hook sources
boolean-C, --cd, <DIR> Tell the agent to use the specified directory as its working root
path--worktree Run the session in a new managed Git worktree
boolean--add-dir <DIR> Additional directories that should be writable alongside the primary workspace
path-a, --ask-for-approval, <APPROVAL_POLICY> Configure when the model requires human approval before executing a command Possible values: - on-request: The model decides when to ask the user for approval - never: Never ask for user approval Execution failures are immediately returned to the model
string--search Enable live web search. When enabled, the native Responses `web_search` tool is available to the model (no per‑call approval)
boolean--no-alt-screen Disable alternate screen mode Runs the TUI in inline mode, preserving terminal scrollback history.
boolean--no-daemon Run without the shared background server, even if it is already running
boolean-h, --help Print help (see a summary with '-h')
boolean-V, --version Print version
booleancodex resume --last
codex queue Queue a message for an existing session 21 options
USAGEcodex queue [OPTIONS] --thread <THREAD> --message <TEXT>
--thread <THREAD> Session UUID or exact session name
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--message <TEXT> Message text to queue
string--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable--remote <ADDR> Connect the TUI to a remote app server endpoint. Accepted forms: `ws://host:port`, `wss://host:port`, `unix://`, or `unix://PATH`.
url--remote-auth-token-env <ENV_VAR> Name of the environment variable containing the bearer token to send to a remote app server websocket
string-i, --image, <FILE...> Optional image(s) to attach to the initial prompt
path · Repeatable-m, --model, <MODEL> Model the agent should use
string--oss Use open-source provider
boolean--local-provider <OSS_PROVIDER> Specify which local provider to use (lmstudio or ollama). If not specified with --oss, will use config default or show selection
string-p, --profile, <CONFIG_PROFILE_V2> Select a named configuration profile from $CODEX_HOME; -p is profile selection, not non-interactive mode.
string-s, --sandbox, <SANDBOX_MODE> Select the sandbox policy to use when executing model-generated shell commands [possible values: read-only, workspace-write, danger-full-access]
enum--approve-for-me Route approval requests through automatic review using the workspace-write sandbox
boolean--dangerously-bypass-approvals-and-sandbox Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed
boolean--dangerously-bypass-hook-trust Run enabled hooks without requiring persisted hook trust for this invocation. DANGEROUS. Intended only for automation that already vets hook sources
boolean-C, --cd, <DIR> Tell the agent to use the specified directory as its working root
path--worktree Run the session in a new managed Git worktree
boolean--add-dir <DIR> Additional directories that should be writable alongside the primary workspace
path--strict-config Error out when config.toml contains fields that are not recognized by this version of Codex
boolean-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string-h, --help Print help (see a summary with '-h')
boolean codex archive Archive a saved session by id or session name 19 options
USAGEcodex archive [OPTIONS] <SESSION>
arguments
<SESSION>Session id (UUID) or session name. UUIDs take precedence if it parses
--remote <ADDR> Connect the TUI to a remote app server endpoint. Accepted forms: `ws://host:port`, `wss://host:port`, `unix://`, or `unix://PATH`.
url--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--remote-auth-token-env <ENV_VAR> Name of the environment variable containing the bearer token to send to a remote app server websocket
string--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-i, --image, <FILE...> Optional image(s) to attach to the initial prompt
path · Repeatable-m, --model, <MODEL> Model the agent should use
string--oss Use open-source provider
boolean--local-provider <OSS_PROVIDER> Specify which local provider to use (lmstudio or ollama). If not specified with --oss, will use config default or show selection
string-p, --profile, <CONFIG_PROFILE_V2> Select a named configuration profile from $CODEX_HOME; -p is profile selection, not non-interactive mode.
string-s, --sandbox, <SANDBOX_MODE> Select the sandbox policy to use when executing model-generated shell commands [possible values: read-only, workspace-write, danger-full-access]
enum--approve-for-me Route approval requests through automatic review using the workspace-write sandbox
boolean--dangerously-bypass-approvals-and-sandbox Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed
boolean--dangerously-bypass-hook-trust Run enabled hooks without requiring persisted hook trust for this invocation. DANGEROUS. Intended only for automation that already vets hook sources
boolean-C, --cd, <DIR> Tell the agent to use the specified directory as its working root
path--worktree Run the session in a new managed Git worktree
boolean--add-dir <DIR> Additional directories that should be writable alongside the primary workspace
path--strict-config Error out when config.toml contains fields that are not recognized by this version of Codex
boolean-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string-h, --help Print help (see a summary with '-h')
boolean codex delete Permanently delete a saved session by id or session name 20 options
USAGEcodex delete [OPTIONS] <SESSION>
arguments
<SESSION>Session id (UUID) or session name. UUIDs take precedence if it parses
--remote <ADDR> Connect the TUI to a remote app server endpoint. Accepted forms: `ws://host:port`, `wss://host:port`, `unix://`, or `unix://PATH`.
url--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--remote-auth-token-env <ENV_VAR> Name of the environment variable containing the bearer token to send to a remote app server websocket
string--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-i, --image, <FILE...> Optional image(s) to attach to the initial prompt
path · Repeatable-m, --model, <MODEL> Model the agent should use
string--oss Use open-source provider
boolean--local-provider <OSS_PROVIDER> Specify which local provider to use (lmstudio or ollama). If not specified with --oss, will use config default or show selection
string-p, --profile, <CONFIG_PROFILE_V2> Select a named configuration profile from $CODEX_HOME; -p is profile selection, not non-interactive mode.
string-s, --sandbox, <SANDBOX_MODE> Select the sandbox policy to use when executing model-generated shell commands [possible values: read-only, workspace-write, danger-full-access]
enum--approve-for-me Route approval requests through automatic review using the workspace-write sandbox
boolean--dangerously-bypass-approvals-and-sandbox Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed
boolean--dangerously-bypass-hook-trust Run enabled hooks without requiring persisted hook trust for this invocation. DANGEROUS. Intended only for automation that already vets hook sources
boolean-C, --cd, <DIR> Tell the agent to use the specified directory as its working root
path--worktree Run the session in a new managed Git worktree
boolean--add-dir <DIR> Additional directories that should be writable alongside the primary workspace
path--strict-config Error out when config.toml contains fields that are not recognized by this version of Codex
boolean-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--force Delete without prompting. SESSION must be a UUID
boolean-h, --help Print help (see a summary with '-h')
boolean codex migrate-rollouts Inspect or migrate legacy local sessions to paginated thread history 9 options
USAGEcodex migrate-rollouts [OPTIONS]
--apply Publish the migration. Without this flag the command only reports eligible sessions
boolean-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--thread <THREAD_ID> Restrict inspection or migration to one or more thread IDs
string--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable--max-mib-per-second <MIB> Limit aggregate rollout read and write throughput, in MiB per second
string--json Emit the complete per-thread report as JSON
boolean--verbose Print one line for every inspected rollout
boolean-h, --help Print help (see a summary with '-h')
boolean codex unarchive Unarchive a saved session by id or session name 19 options
USAGEcodex unarchive [OPTIONS] <SESSION>
arguments
<SESSION>Session id (UUID) or session name. UUIDs take precedence if it parses
--remote <ADDR> Connect the TUI to a remote app server endpoint. Accepted forms: `ws://host:port`, `wss://host:port`, `unix://`, or `unix://PATH`.
url--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--remote-auth-token-env <ENV_VAR> Name of the environment variable containing the bearer token to send to a remote app server websocket
string--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-i, --image, <FILE...> Optional image(s) to attach to the initial prompt
path · Repeatable-m, --model, <MODEL> Model the agent should use
string--oss Use open-source provider
boolean--local-provider <OSS_PROVIDER> Specify which local provider to use (lmstudio or ollama). If not specified with --oss, will use config default or show selection
string-p, --profile, <CONFIG_PROFILE_V2> Select a named configuration profile from $CODEX_HOME; -p is profile selection, not non-interactive mode.
string-s, --sandbox, <SANDBOX_MODE> Select the sandbox policy to use when executing model-generated shell commands [possible values: read-only, workspace-write, danger-full-access]
enum--approve-for-me Route approval requests through automatic review using the workspace-write sandbox
boolean--dangerously-bypass-approvals-and-sandbox Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed
boolean--dangerously-bypass-hook-trust Run enabled hooks without requiring persisted hook trust for this invocation. DANGEROUS. Intended only for automation that already vets hook sources
boolean-C, --cd, <DIR> Tell the agent to use the specified directory as its working root
path--worktree Run the session in a new managed Git worktree
boolean--add-dir <DIR> Additional directories that should be writable alongside the primary workspace
path--strict-config Error out when config.toml contains fields that are not recognized by this version of Codex
boolean-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string-h, --help Print help (see a summary with '-h')
boolean codex fork Fork a previous interactive session (picker by default; use --last to fork the most recent) 26 options
USAGEcodex fork [OPTIONS] [SESSION_ID] [PROMPT]
arguments
[SESSION_ID]Conversation/session id (UUID). When provided, forks this session. If omitted, use --last to pick the most recent recorded session
[PROMPT]Optional user prompt to start the session
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--last Fork the most recent session without showing the picker
boolean--all Show all sessions (disables cwd filtering and shows CWD column)
boolean--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable--remote <ADDR> Connect the TUI to a remote app server endpoint. Accepted forms: `ws://host:port`, `wss://host:port`, `unix://`, or `unix://PATH`.
url--remote-auth-token-env <ENV_VAR> Name of the environment variable containing the bearer token to send to a remote app server websocket
string--strict-config Error out when config.toml contains fields that are not recognized by this version of Codex
boolean-i, --image, <FILE...> Optional image(s) to attach to the initial prompt
path · Repeatable-m, --model, <MODEL> Model the agent should use
string--oss Use open-source provider
boolean--local-provider <OSS_PROVIDER> Specify which local provider to use (lmstudio or ollama). If not specified with --oss, will use config default or show selection
string-p, --profile, <CONFIG_PROFILE_V2> Select a named configuration profile from $CODEX_HOME; -p is profile selection, not non-interactive mode.
string-s, --sandbox, <SANDBOX_MODE> Select the sandbox policy to use when executing model-generated shell commands [possible values: read-only, workspace-write, danger-full-access]
enum--approve-for-me Route approval requests through automatic review using the workspace-write sandbox
boolean--dangerously-bypass-approvals-and-sandbox Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed
boolean--dangerously-bypass-hook-trust Run enabled hooks without requiring persisted hook trust for this invocation. DANGEROUS. Intended only for automation that already vets hook sources
boolean-C, --cd, <DIR> Tell the agent to use the specified directory as its working root
path--worktree Run the session in a new managed Git worktree
boolean--add-dir <DIR> Additional directories that should be writable alongside the primary workspace
path-a, --ask-for-approval, <APPROVAL_POLICY> Configure when the model requires human approval before executing a command Possible values: - on-request: The model decides when to ask the user for approval - never: Never ask for user approval Execution failures are immediately returned to the model
string--search Enable live web search. When enabled, the native Responses `web_search` tool is available to the model (no per‑call approval)
boolean--no-alt-screen Disable alternate screen mode Runs the TUI in inline mode, preserving terminal scrollback history.
boolean--no-daemon Run without the shared background server, even if it is already running
boolean-h, --help Print help (see a summary with '-h')
boolean-V, --version Print version
booleancodex fork --last
codex cloud [EXPERIMENTAL] Browse tasks from Codex Cloud and apply changes locally 5 options
USAGEcodex cloud [OPTIONS] [COMMAND]
Aliases: codex cloud-tasks
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean-V, --version Print version
boolean codex exec-server [EXPERIMENTAL] Run the standalone exec-server service 26 options
USAGEcodex exec-server [OPTIONS] [COMMAND]
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--strict-config Error out when config.toml contains fields that are not recognized by this version of Codex
boolean--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable--linux-sandbox-pid-namespace <MODE> Linux PID namespace: isolate (default) or inherit. Inherit allows signals to other same-UID processes; enable only when provisioning a dedicated environment [default: isolate]
string · Default: isolate--proxy-private-ips-via-upstream Allow permitted private IP destinations to use the configured upstream proxy. If no valid upstream proxy applies to the request protocol, connect directly. Loopback stays local. This flag does not require upstream routing [env: CODEX_EXEC_SERVER_PROXY_PRIVATE_IPS_VIA_UPSTREAM=]
boolean--concurrent-requests <COUNT> Maximum number of requests to process concurrently on each connection [default: 1]
integer · Default: 1--listen <URL> Transport endpoint URL. Supported values: `ws://IP:PORT` (default), `stdio`, `stdio://`
url--ws-auth <MODE> Authentication mode for incoming WebSocket connections [possible values: capability-token, signed-bearer-token]
enum--ws-token-file <PATH> Absolute path to the capability-token file
path--ws-token-sha256 <HEX> Hex-encoded SHA-256 digest of the capability token
string--ws-shared-secret-file <PATH> Absolute path to the shared secret file for signed JWT bearer tokens
path--ws-issuer <ISSUER> Expected issuer for signed JWT bearer tokens
string--ws-audience <AUDIENCE> Expected audience for signed JWT bearer tokens
string--ws-max-clock-skew-seconds <SECONDS> Maximum clock skew when validating signed JWT bearer tokens
integer--remote <URL> Register this exec-server as a remote environment using the given base URL
url--remote-transport <REMOTE_TRANSPORT> Transport used for the remote executor connection [default: noise] [possible values: noise, direct]
enum · Default: noise--environment-id <ID> Environment id to attach to when registering remotely
string--name <NAME> Human-readable environment name
string--use-agent-identity-auth Use Agent Identity auth from CODEX_ACCESS_TOKEN for remote registration
boolean--aws-sigv4 Sign Direct registration and WebSocket handshake requests with AWS SigV4
boolean--aws-profile <PROFILE> AWS profile used for SigV4 authentication
path--aws-region <REGION> AWS signing region. Uses the SDK region chain when omitted
string--aws-service <SERVICE> AWS signing service [default: execute-api]
string · Default: execute-api--exit-on-stdin-close Exit when the parent-owned standard-input pipe closes [env: CODEX_EXEC_SERVER_EXIT_ON_STDIN_CLOSE=]
boolean-h, --help Print help (see a summary with '-h')
boolean codex features Inspect feature flags 4 options
USAGEcodex features [OPTIONS] <COMMAND>
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex exec resume Resume a previous session by id or pick the most recent with --last 21 options
USAGEcodex exec resume [OPTIONS] [SESSION_ID] [PROMPT]
arguments
[SESSION_ID]Conversation/session id (UUID) or thread name. UUIDs take precedence if it parses. If omitted, use --last to pick the most recent recorded session
[PROMPT]Prompt to send after resuming the session. If `-` is used, read from stdin
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--last Resume the most recent recorded session (newest) without specifying an id
boolean--all Show all sessions (disables cwd filtering)
boolean--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-i, --image, <FILE> Optional image(s) to attach to the prompt sent after resuming
path--strict-config Error out when config.toml contains fields that are not recognized by this version of Codex
boolean-m, --model, <MODEL> Model the agent should use
string--dangerously-bypass-approvals-and-sandbox Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed
boolean--dangerously-bypass-hook-trust Run enabled hooks without requiring persisted hook trust for this invocation. DANGEROUS. Intended only for automation that already vets hook sources
boolean--worktree Run the session in a new managed Git worktree
boolean--thread-source <SOURCE> Source classification for newly created or forked threads
string--cyber-access-program <PROGRAM> Request an experimental Cyber access program for this turn (OpenAI provider only). Omit to use server defaults. Not supported with review; fork requires a prompt [possible values: standard, daybreak_blue, daybreak_red]
enum--skip-git-repo-check Allow running Codex outside a Git repository
boolean--ephemeral Run without persisting session files to disk
boolean--ignore-user-config Do not load `$CODEX_HOME/config.toml`; auth still uses `CODEX_HOME`
boolean--ignore-rules Do not load user or project execpolicy `.rules` files
boolean--output-schema <FILE> Path to a JSON Schema file describing the model's final response shape
path--json Print events to stdout as JSONL
boolean-o, --output-last-message, <FILE> Specifies file where the last message from the agent should be written
path-h, --help Print help (see a summary with '-h')
boolean codex exec fork Fork a previous session by id into a new session 19 options
USAGEcodex exec fork [OPTIONS] <SESSION_ID> [PROMPT]
arguments
<SESSION_ID>Conversation/session id (UUID) or thread name to fork
[PROMPT]Optional prompt to send after forking. If `-` is used, read from stdin
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string-i, --image, <FILE> Optional image(s) to attach to the prompt sent after forking
path--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable--strict-config Error out when config.toml contains fields that are not recognized by this version of Codex
boolean-m, --model, <MODEL> Model the agent should use
string--dangerously-bypass-approvals-and-sandbox Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed
boolean--dangerously-bypass-hook-trust Run enabled hooks without requiring persisted hook trust for this invocation. DANGEROUS. Intended only for automation that already vets hook sources
boolean--worktree Run the session in a new managed Git worktree
boolean--thread-source <SOURCE> Source classification for newly created or forked threads
string--cyber-access-program <PROGRAM> Request an experimental Cyber access program for this turn (OpenAI provider only). Omit to use server defaults. Not supported with review; fork requires a prompt [possible values: standard, daybreak_blue, daybreak_red]
enum--skip-git-repo-check Allow running Codex outside a Git repository
boolean--ephemeral Run without persisting session files to disk
boolean--ignore-user-config Do not load `$CODEX_HOME/config.toml`; auth still uses `CODEX_HOME`
boolean--ignore-rules Do not load user or project execpolicy `.rules` files
boolean--output-schema <FILE> Path to a JSON Schema file describing the model's final response shape
path--json Print events to stdout as JSONL
boolean-o, --output-last-message, <FILE> Specifies file where the last message from the agent should be written
path-h, --help Print help (see a summary with '-h')
boolean codex exec review Run a code review against the current repository 22 options
USAGEcodex exec review [OPTIONS] [PROMPT]
arguments
[PROMPT]Custom review instructions. If `-` is used, read from stdin
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--uncommitted Review staged, unstaged, and untracked changes
boolean--base <BRANCH> Review changes against the given base branch
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--commit <SHA> Review the changes introduced by a commit
string--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable--strict-config Error out when config.toml contains fields that are not recognized by this version of Codex
boolean--title <TITLE> Optional commit title to display in the review summary
string-m, --model, <MODEL> Model the agent should use
string--dangerously-bypass-approvals-and-sandbox Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed
boolean--dangerously-bypass-hook-trust Run enabled hooks without requiring persisted hook trust for this invocation. DANGEROUS. Intended only for automation that already vets hook sources
boolean--worktree Run the session in a new managed Git worktree
boolean--thread-source <SOURCE> Source classification for newly created or forked threads
string--cyber-access-program <PROGRAM> Request an experimental Cyber access program for this turn (OpenAI provider only). Omit to use server defaults. Not supported with review; fork requires a prompt [possible values: standard, daybreak_blue, daybreak_red]
enum--skip-git-repo-check Allow running Codex outside a Git repository
boolean--ephemeral Run without persisting session files to disk
boolean--ignore-user-config Do not load `$CODEX_HOME/config.toml`; auth still uses `CODEX_HOME`
boolean--ignore-rules Do not load user or project execpolicy `.rules` files
boolean--output-schema <FILE> Path to a JSON Schema file describing the model's final response shape
path--json Print events to stdout as JSONL
boolean-o, --output-last-message, <FILE> Specifies file where the last message from the agent should be written
path-h, --help Print help (see a summary with '-h')
boolean codex login status Show login status 4 options
USAGEcodex login status [OPTIONS]
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex mcp list Codex CLI command. 5 options
USAGEcodex mcp list [OPTIONS]
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--json Output the configured servers as JSON
boolean--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex mcp get Codex CLI command. 5 options
USAGEcodex mcp get [OPTIONS] <NAME>
arguments
<NAME>Name of the MCP server to display
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--json Output the server configuration as JSON
boolean--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex mcp add Codex CLI command. 11 options
USAGEcodex mcp add [OPTIONS] <NAME> (--url <URL> | -- <COMMAND>...)
arguments
<NAME>Name for the MCP server configuration
[COMMAND]...Command to launch the MCP server. Use --url for a streamable HTTP server
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--env <KEY=VALUE> Environment variables to set when launching the server. Only valid with stdio servers
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--url <URL> URL for a streamable HTTP MCP server
url--bearer-token-env-var <ENV_VAR> Optional environment variable to read for a bearer token. Only valid with streamable HTTP servers
string--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable--oauth-client-id <CLIENT_ID> Optional OAuth client identifier to use for this MCP server
string--oauth-client-secret <CLIENT_SECRET> Optional OAuth client secret for the pre-registered client
string--oauth-client-registration <AUTO|CIMD|DCR> OAuth client-registration strategy for the immediate login only [possible values: auto, cimd, dcr]
enum--oauth-resource <RESOURCE> Optional OAuth resource parameter to include during MCP login
string-h, --help Print help (see a summary with '-h')
booleancodex mcp add docs --url https://developers.openai.com/mcp
codex mcp remove Codex CLI command. 4 options
USAGEcodex mcp remove [OPTIONS] <NAME>
arguments
<NAME>Name of the MCP server configuration to remove
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex mcp login Codex CLI command. 7 options
USAGEcodex mcp login [OPTIONS] <NAME>
arguments
<NAME>Name of the MCP server to authenticate with oauth
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--no-browser Print the authorization URL and accept the callback URL without opening a browser
boolean--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--scopes <SCOPE,SCOPE> Comma-separated list of OAuth scopes to request
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable--oauth-client-registration <AUTO|CIMD|DCR> OAuth client-registration strategy for this login only [possible values: auto, cimd, dcr]
enum-h, --help Print help (see a summary with '-h')
boolean codex mcp logout Codex CLI command. 4 options
USAGEcodex mcp logout [OPTIONS] <NAME>
arguments
<NAME>Name of the MCP server to deauthenticate
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex plugin add Install a plugin from a configured or remote marketplace. Pass either `PLUGIN@MARKETPLACE` or pass `PLUGIN` with `--marketplace MARKETPLACE`. 6 options
USAGEcodex plugin add [OPTIONS] <PLUGIN[@MARKETPLACE]>
arguments
<PLUGIN[@MARKETPLACE]>Plugin selector to install: either PLUGIN@MARKETPLACE or PLUGIN with --marketplace
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string-m, --marketplace, <MARKETPLACE> Marketplace name to use when PLUGIN does not include @MARKETPLACE
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--json Output install result as JSON
boolean--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex plugin list List plugins available from configured and remote marketplaces 7 options
USAGEcodex plugin list [OPTIONS]
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string-m, --marketplace, <MARKETPLACE> Only list plugins from this marketplace name
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--json Output plugin list as JSON
boolean--available Include uninstalled marketplace plugins in the JSON output
boolean--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
booleancodex plugin list --available --json
codex plugin marketplace Add, list, upgrade, or remove configured plugin marketplaces 4 options
USAGEcodex plugin marketplace [OPTIONS] <COMMAND>
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex plugin remove Uninstall a plugin and remove its local cache. Pass either `PLUGIN@MARKETPLACE` or pass `PLUGIN` with `--marketplace MARKETPLACE`. 6 options
USAGEcodex plugin remove [OPTIONS] <PLUGIN[@MARKETPLACE]>
arguments
<PLUGIN[@MARKETPLACE]>Plugin selector to remove: either PLUGIN@MARKETPLACE or PLUGIN with --marketplace
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string-m, --marketplace, <MARKETPLACE> Marketplace name to use when PLUGIN does not include @MARKETPLACE
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--json Output remove result as JSON
boolean--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex app-server daemon Manage the local app-server daemon 4 options
USAGEcodex app-server daemon [OPTIONS] <COMMAND>
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex app-server proxy Proxy stdio bytes to the running app-server control socket 5 options
USAGEcodex app-server proxy [OPTIONS]
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--sock <SOCKET_PATH> Path to the app-server Unix domain socket to connect to
path--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex app-server generate-ts [experimental] Generate TypeScript bindings for the app server protocol 7 options
USAGEcodex app-server generate-ts [OPTIONS] --out <DIR>
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string-o, --out, <DIR> Output directory where .ts files will be written
path--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable-p, --prettier, <PRETTIER_BIN> Optional path to the Prettier executable to format generated files
string--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable--experimental Include experimental methods and fields in the generated output
boolean-h, --help Print help (see a summary with '-h')
boolean codex app-server generate-json-schema [experimental] Generate JSON Schema for the app server protocol 6 options
USAGEcodex app-server generate-json-schema [OPTIONS] --out <DIR>
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string-o, --out, <DIR> Output directory where the schema bundle will be written
path--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--experimental Include experimental methods and fields in the generated output
boolean--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex remote-control start Start the app-server daemon with remote control enabled 5 options
USAGEcodex remote-control start [OPTIONS]
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--json Emit machine-readable JSON
boolean--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex remote-control stop Stop the app-server daemon 5 options
USAGEcodex remote-control stop [OPTIONS]
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--json Emit machine-readable JSON
boolean--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex remote-control pair Create and print a short-lived manual pairing code 5 options
USAGEcodex remote-control pair [OPTIONS]
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--json Emit machine-readable JSON
boolean--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex sandbox uninstall Remove the legacy Windows sandbox's machine-wide accounts and network rules 4 options
USAGEcodex sandbox uninstall [OPTIONS]
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h') Run as administrator after stopping apps using the legacy sandbox and its provisioning service, if installed. Preserves Codex home, including sandbox directories and filesystem permissions.
boolean codex debug models Render the raw model catalog as JSON 5 options
USAGEcodex debug models [OPTIONS]
--bundled Skip refresh and dump only the bundled catalog shipped with this binary
boolean-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex debug app-server Tooling: helps debug the app server 4 options
USAGEcodex debug app-server [OPTIONS] <COMMAND>
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex debug prompt-input Render the model-visible prompt input list as JSON 5 options
USAGEcodex debug prompt-input [OPTIONS] [PROMPT]
arguments
[PROMPT]Optional user prompt to append after session context
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string-i, --image, <FILE...> Optional image(s) to attach to the user prompt
path · Repeatable--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex cloud exec Submit a new Codex Cloud task without launching the TUI 7 options
USAGEcodex cloud exec [OPTIONS] --env <ENV_ID> [QUERY]
arguments
[QUERY]Task prompt to run in Codex Cloud
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--env <ENV_ID> Target environment identifier (see `codex cloud` to browse)
string--attempts <ATTEMPTS> Number of assistant attempts (best-of-N) [default: 1]
integer · Default: 1--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--branch <BRANCH> Git branch to run in Codex Cloud (defaults to current branch)
string--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex cloud status Show the status of a Codex Cloud task 4 options
USAGEcodex cloud status [OPTIONS] <TASK_ID>
arguments
<TASK_ID>Codex Cloud task identifier to inspect
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex cloud list List Codex Cloud tasks 8 options
USAGEcodex cloud list [OPTIONS]
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--env <ENV_ID> Filter tasks by environment identifier
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--limit <N> Maximum number of tasks to return (1-20) [default: 20]
string · Default: 20--cursor <CURSOR> Pagination cursor returned by a previous call
string--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable--json Emit JSON instead of plain text
boolean-h, --help Print help (see a summary with '-h')
boolean codex cloud apply Apply the diff for a Codex Cloud task locally 5 options
USAGEcodex cloud apply [OPTIONS] <TASK_ID>
arguments
<TASK_ID>Codex Cloud task identifier to apply
--attempt <N> Attempt number to apply (1-based)
string-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex cloud diff Show the unified diff for a Codex Cloud task 5 options
USAGEcodex cloud diff [OPTIONS] <TASK_ID>
arguments
<TASK_ID>Codex Cloud task identifier to display
--attempt <N> Attempt number to display (1-based)
string-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex exec-server forward Register an existing WebSocket exec-server as a remote environment 18 options
USAGEcodex exec-server forward [OPTIONS] --remote <URL> --environment-id <ID> --connect <URL>
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--connect <URL> Destination exec-server WebSocket URL
url--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--strict-config Error out when config.toml contains fields that are not recognized by this version of Codex
boolean--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable--linux-sandbox-pid-namespace <MODE> Linux PID namespace: isolate (default) or inherit. Inherit allows signals to other same-UID processes; enable only when provisioning a dedicated environment [default: isolate]
string · Default: isolate--proxy-private-ips-via-upstream Allow permitted private IP destinations to use the configured upstream proxy. If no valid upstream proxy applies to the request protocol, connect directly. Loopback stays local. This flag does not require upstream routing [env: CODEX_EXEC_SERVER_PROXY_PRIVATE_IPS_VIA_UPSTREAM=]
boolean--remote <URL> Register this exec-server as a remote environment using the given base URL
url--remote-transport <REMOTE_TRANSPORT> Transport used for the remote executor connection [default: noise] [possible values: noise, direct]
enum · Default: noise--environment-id <ID> Environment id to attach to when registering remotely
string--name <NAME> Human-readable environment name
string--use-agent-identity-auth Use Agent Identity auth from CODEX_ACCESS_TOKEN for remote registration
boolean--aws-sigv4 Sign Direct registration and WebSocket handshake requests with AWS SigV4
boolean--aws-profile <PROFILE> AWS profile used for SigV4 authentication
path--aws-region <REGION> AWS signing region. Uses the SDK region chain when omitted
string--aws-service <SERVICE> AWS signing service [default: execute-api]
string · Default: execute-api--exit-on-stdin-close Exit when the parent-owned standard-input pipe closes [env: CODEX_EXEC_SERVER_EXIT_ON_STDIN_CLOSE=]
boolean-h, --help Print help (see a summary with '-h')
boolean codex features list List known features with their stage and effective state 4 options
USAGEcodex features list [OPTIONS]
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex features enable Enable a feature in config.toml 4 options
USAGEcodex features enable [OPTIONS] <FEATURE>
arguments
<FEATURE>Feature key to update (for example: unified_exec)
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex features disable Disable a feature in config.toml 4 options
USAGEcodex features disable [OPTIONS] <FEATURE>
arguments
<FEATURE>Feature key to update (for example: unified_exec)
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex plugin marketplace add Add a local or Git marketplace to the configured marketplace sources 7 options
USAGEcodex plugin marketplace add [OPTIONS] <SOURCE>
arguments
<SOURCE>Marketplace source: a local path, owner/repo[@ref], HTTPS Git URL, or SSH Git URL
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--ref <REF> Git ref to fetch for Git marketplace sources
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--sparse <PATH> Sparse checkout path for Git marketplace sources. Can be repeated
path · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable--json Output add result as JSON
boolean-h, --help Print help (see a summary with '-h')
boolean codex plugin marketplace list List plugin marketplaces Codex is currently considering and their roots 5 options
USAGEcodex plugin marketplace list [OPTIONS]
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--json Output marketplace list as JSON
boolean--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex plugin marketplace upgrade Refresh configured Git marketplace snapshots. Omit MARKETPLACE_NAME to upgrade all configured Git marketplaces. 5 options
USAGEcodex plugin marketplace upgrade [OPTIONS] [MARKETPLACE_NAME]
arguments
[MARKETPLACE_NAME]Optional configured marketplace name to upgrade. Omit to upgrade all Git marketplaces
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--json Output upgrade result as JSON
boolean--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex plugin marketplace remove Remove a configured marketplace source by name 5 options
USAGEcodex plugin marketplace remove [OPTIONS] <MARKETPLACE_NAME>
arguments
<MARKETPLACE_NAME>Configured marketplace name to remove
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--json Output remove result as JSON
boolean--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h') Example: codex plugin marketplace remove debug
boolean codex app-server daemon bootstrap Install durable local app-server management for SSH-driven use 5 options
USAGEcodex app-server daemon bootstrap [OPTIONS]
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--remote-control Launch the managed app-server with remote control enabled
boolean--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex app-server daemon start Start the local app server daemon if it is not already running 4 options
USAGEcodex app-server daemon start [OPTIONS]
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex app-server daemon restart Restart the local app server daemon 4 options
USAGEcodex app-server daemon restart [OPTIONS]
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex app-server daemon update Update the daemon package (may interrupt running work) 6 options
USAGEcodex app-server daemon update [OPTIONS]
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--from-cli Copy and pin this CLI package
boolean--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable-y, --yes Confirm replacing the daemon package without an interactive prompt
boolean--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex app-server daemon enable-remote-control Enable remote control for future starts and a currently running managed daemon 4 options
USAGEcodex app-server daemon enable-remote-control [OPTIONS]
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex app-server daemon disable-remote-control Disable remote control for future starts and a currently running managed daemon 4 options
USAGEcodex app-server daemon disable-remote-control [OPTIONS]
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex app-server daemon stop Stop the local app server daemon 4 options
USAGEcodex app-server daemon stop [OPTIONS]
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex app-server daemon version Print local CLI and running app-server versions as JSON 4 options
USAGEcodex app-server daemon version [OPTIONS]
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
boolean codex debug app-server send-message-v2 Codex CLI command. 4 options
USAGEcodex debug app-server send-message-v2 [OPTIONS] <USER_MESSAGE>
arguments
<USER_MESSAGE>Positional command argument.
-c, --config, <key=value> Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal. Examples: - `-c model="o3"` - `-c 'sandbox_permissions=["disk-full-read-access"]'` - `-c shell_environment_policy.inherit=all`
string--enable <FEATURE> Enable a feature (repeatable). Equivalent to `-c features.<name>=true`
string · Repeatable--disable <FEATURE> Disable a feature (repeatable). Equivalent to `-c features.<name>=false`
string · Repeatable-h, --help Print help (see a summary with '-h')
booleanExperimental / internal
codex execpolicyHidden runtime-working execpolicy surface; internal and unstable despite responding to --help.
conditionalcodex execpolicy checkHidden runtime-working execpolicy surface; internal and unstable despite responding to --help.
conditionalTUI / KEYBOARD FIRST
Slash commands
57 canonical / 60 accepted tokens/permissionsSet what Codex can do without asking first. Relax or tighten approval requirements mid-session, such as switching between Auto and Read Only.
/ideInclude open files, current selection, and other IDE context. Pull editor context into the next prompt without re-explaining what's open in your IDE.
/keymapRemap TUI keyboard shortcuts. Inspect and persist custom shortcut bindings in `config.toml`.
/vimToggle Vim mode for the composer. Switch between Vim normal/insert behavior and the default composer editing mode.
/setup-default-sandboxconditionalSet up the elevated agent sandbox (Windows only). Replace the degraded Windows sandbox after Codex offers the elevated setup.
/agentsOpen the agent command center. Browse chats and switch between agents on the connected server.
/subagentsSwitch the active subagent thread. Inspect or continue work in a subagent from the current session.
/appsconditionalBrowse apps (connectors) and insert them into your prompt. Attach an app as `$app-slug` before asking Codex to use it.
/pluginsconditionalBrowse installed and discoverable plugins. Inspect plugin tools, install suggested plugins, or manage plugin availability.
/hooksView and manage lifecycle hooks. Inspect configured hooks, trust new or changed hooks, or disable non-managed hooks before they run.
/clearClear the terminal and start a fresh chat. Reset the visible UI and chat context together when you want a fresh start.
/renameRename the current chat. Give a saved session a recognizable name without leaving the TUI.
/archiveArchive the current session. Remove the current session from active session lists without deleting its transcript.
/deletePermanently delete the current session. Remove the transcript and descendant sessions when archiving isn't enough.
/compactSummarize the visible chat to free tokens. Use after long runs so Codex retains key points without blowing the context window.
/copyCopy the latest completed Codex output. Grab the latest finished response or plan text without manually selecting it. You can also press `Ctrl+O`.
/diffShow the Git diff, including files Git isn't tracking yet. Review Codex's edits before you commit or run tests.
/exitExit the CLI (same as `/quit`). Alternative spelling; both commands exit the session.
/experimentalToggle experimental features. Enable options such as Network proxy or Prevent sleep while running.
/approveApprove one retry of a recent auto review denial. Retry a command or action that the auto reviewer denied.
/memoriesconditionalConfigure memory use and generation. Turn memory injection or memory generation on or off without leaving the TUI.
/skillsBrowse and use skills. Improve task-specific behavior by selecting a relevant local skill.
/importImport Claude Code or Cursor setup, projects, and chats. Migrate supported external-agent artifacts into Codex configuration and local files.
/feedbackSend logs to the Codex maintainers. Report issues or share diagnostics with support.
/initGenerate an `AGENTS.md` scaffold in the current directory. Capture persistent instructions for the repository or subdirectory you're working in.
/logoutSign out of Codex. Clear local credentials when using a shared machine.
/mcpList configured Model Context Protocol (MCP) tools. Check which external tools Codex can call during the session; add `verbose` for server details.
/mentionAttach a file to the chat. Point Codex at specific files or folders you want it to inspect next.
/modelChoose the active model (and reasoning effort, when available). Use `gpt-6-luna` or `gpt-6.1-sol` if shown.
/fastconditionalToggle a Fast service tier when the model catalog exposes one. Turn the current model's Fast tier on or off and persist the selection.
/planSwitch to plan mode and optionally send a prompt. Ask Codex to propose an execution plan before implementation work starts.
/goalconditionalSet, edit, pause, resume, view, or clear a task goal. Give Codex a persistent target to track while a larger task runs.
/psShow background terminals and their recent output. Check long-running commands without leaving the main transcript.
/stopStop all background terminals. Cancel background terminal work started by the current session.
/forkFork the current chat into a new chat. Branch the active session to explore a new approach without losing the current transcript.
/appconditionalContinue the current session in the ChatGPT desktop app. Move from the TUI to the desktop app on macOS or Windows.
/sideStart an ephemeral side chat. Ask a focused follow-up without disrupting the main chat's transcript.
Aliases: /btw/rawToggle raw scrollback mode. Make terminal selection and copying less formatted while reviewing long output.
/resumeResume a saved chat from your session list. Continue work from a previous CLI session without starting over.
/newStart a new chat inside the same CLI session. Reset the chat context without leaving the CLI when you want a fresh prompt in the same repo.
/quitExit the CLI. Leave the session immediately.
/reviewAsk Codex to review your working tree. Run after Codex completes work or when you want a second set of eyes on local changes.
/statusDisplay session configuration and token usage. Confirm the active model, approval policy, writable roots, and remaining context capacity.
/usageView account token usage or use a rate-limit reset. Inspect daily, weekly, or cumulative ChatGPT token activity from inside the TUI.
/debug-configPrint config layer and requirements diagnostics. Debug precedence and policy requirements, including experimental network constraints.
/statuslineConfigure TUI status-line fields interactively. Pick and reorder footer items (model/context/limits/git/tokens/session) and persist in config.toml.
/titleConfigure terminal window or tab title fields interactively. Pick and reorder title items such as project, status, thread, branch, model, and task progress.
/themeChoose a syntax-highlighting theme. Preview and persist a terminal syntax-highlighting theme.
/petsconditionalChoose or hide a terminal pet. Personalize the TUI with a built-in or custom ambient pet.
Aliases: /pet/tuiChoose the terminal mode for the next launch. Switch between terminal scrollback and a fullscreen transcript.
/exportExport the conversation as Markdown. Save a complete transcript to a file or copy it to the clipboard.
/recapGenerate a summary of the current conversation. Catch up on the chat without compacting its context.
/cdChange the session's working directory. Continue an idle primary chat in another directory.
/pwdShow the working directory. Check the directory the active session uses.
Aliases: /cwd/worktreeStart or continue a chat in a managed Git worktree. Work in a separate checkout of a local repository.
/daemonOpen background server controls. Inspect the connection and manage a local server owned by Codex.
/warningsView retained warnings and diagnostics. Revisit warnings that appeared during the session.
USER + PROJECT / CONFIGURATION
config.toml
306 keysagentsobject
Multi-agent settings and custom role declarations. Scalar setting names are reserved and can't be used as custom role names.
agents..config_filepath
Path to a TOML config layer for that role; relative paths resolve from the config file that declares the role.
agents..descriptionstring
Role guidance shown to Codex when choosing and spawning that agent type.
agents.default_subagent_modelstring
Default model for spawned agents. An explicit spawn model takes precedence.
agents.default_subagent_reasoning_effortstring
Default reasoning effort for spawned agents. An explicit spawn effort takes precedence.
agents.enabledboolean
Enable or disable multi-agent tools (default: true).
agents.interrupt_messageboolean
Record a model-visible message when an agent turn is interrupted (default: true).
agents.max_concurrent_threads_per_sessionnumber
Maximum number of spawned-agent threads that can be open concurrently, excluding the primary thread. When unset, Codex chooses the default.
agents.max_threadsnumber
Legacy alias for `agents.max_concurrent_threads_per_session`.
allow_login_shellboolean
Allow shell-based tools to use login-shell semantics. Defaults to `true`; when `false`, `login = true` requests are rejected and omitted `login` defaults to non-login shells.
analytics.enabledboolean
Enable or disable analytics for this machine/profile. In Codex CLI, `false` also disables custom OTLP metrics exporters. When unset, the client default applies.
approval_policyenum
Controls when Codex pauses for approval before executing commands. You can also use `approval_policy = { granular = { ... } }` to allow or auto-reject specific prompt categories while keeping other prompts interactive. `untrusted` is unsupported, and `on-failure` is deprecated; use `on-request` for interactive runs or `never` for non-interactive runs.
on-request · neverapproval_policy.granular.mcp_elicitationsboolean
When `true`, MCP elicitation prompts are allowed to surface instead of being auto-rejected.
approval_policy.granular.request_permissionsboolean
When `true`, prompts from the `request_permissions` tool are allowed to surface.
approval_policy.granular.rulesboolean
When `true`, approvals triggered by execpolicy `prompt` rules are allowed to surface.
approval_policy.granular.sandbox_approvalboolean
When `true`, sandbox escalation approval prompts are allowed to surface.
approval_policy.granular.skill_approvalboolean
When `true`, skill-script approval prompts are allowed to surface.
approvals_reviewerenum
Who reviews eligible approval prompts under `on-request` or granular approval policies. Defaults to `user`; `auto_review` uses the reviewer subagent. This setting doesn't change sandboxing or review actions already allowed inside the sandbox.
user · auto_reviewapps._default.approvals_reviewerenum
Default reviewer for app tool approval prompts unless overridden per app. When omitted, apps inherit the top-level `approvals_reviewer` value.
user · auto_reviewapps._default.default_tools_approval_modeenum
Default approval behavior for app tools without per-app or per-tool overrides.
auto · prompt · writes · approveapps._default.destructive_enabledboolean
Default allow/deny for app tools with `destructive_hint = true`.
apps._default.enabledboolean
Default app enabled state for all apps unless overridden per app.
apps._default.open_world_enabledboolean
Default allow/deny for app tools with `open_world_hint = true`.
apps..approvals_reviewerenum
Reviewer for this app's tool approval prompts. Overrides `apps._default.approvals_reviewer`.
user · auto_reviewapps..default_tools_approval_modeenum
Default approval behavior for tools in this app unless a per-tool override exists.
auto · prompt · writes · approveapps..default_tools_enabledboolean
Default enabled state for tools in this app unless a per-tool override exists.
apps..destructive_enabledboolean
Allow or block tools in this app that advertise `destructive_hint = true`.
apps..enabledboolean
Enable or disable a specific app/connector by id (default: true).
apps..open_world_enabledboolean
Allow or block tools in this app that advertise `open_world_hint = true`.
apps..tools..approval_modeenum
Per-tool approval behavior override for a single app tool.
auto · prompt · writes · approveapps..tools..enabledboolean
Per-tool enabled override for an app tool (for example `repos/list`).
auto_review.extra_policystring
Additional local Markdown policy for automatic review, included alongside the main policy. Managed `guardian_extra_policy` takes precedence. Blank values are ignored.
auto_review.policystring
Local Markdown policy instructions for automatic review. Managed `guardian_policy_config` takes precedence. Blank values are ignored.
background_terminal_max_timeoutnumber
Maximum poll window in milliseconds for empty `write_stdin` polls (background terminal polling). Default: `300000` (5 minutes). Replaces the older `background_terminal_timeout` key.
browser_use.allow_history_accessboolean
Set to `false` to restrict browser-history access. Managed requirements can enforce this restriction.
browser_use.default_origin_policyobject
Fallback browser-origin restrictions. Supports `access`, `uploads`, `downloads`, and `full_cdp_access`, each set to `allow` or `deny`.
browser_use.origins.object
Per-origin browser restrictions with the same fields as `browser_use.default_origin_policy`. Include an HTTP or HTTPS scheme and optional port; omit paths, queries, and fragments. Local values cannot relax managed denies.
chatgpt_base_urlstring
Override the base URL used during the ChatGPT login flow.
check_for_update_on_startupboolean
Check for Codex updates on startup (set to false only when updates are centrally managed).
cli_auth_credentials_storeenum
Control where the CLI stores cached credentials.
file · keyring · auto · ephemeralcompact_promptstring
Inline override for the history compaction prompt.
computer_use.default_app_accessenum
Fallback native-app access policy for Computer Use. App-specific entries can supply a policy; local configuration cannot relax managed restrictions.
allow · denycomputer_use.macos.bundle_idsobject
Native macOS app access keyed by bundle identifier.
computer_use.windows.always_allowed_app_idsarray
Windows app identifiers that Computer Use can open without prompting. Apps not in the list require approval; remove saved entries from the ChatGPT desktop app's Computer Use settings.
computer_use.windows.aumidsobject
Packaged Windows app access keyed by Application User Model ID (AUMID).
computer_use.windows.exesarray
Windows executable access rules. Each rule requires `publisher_name`, `product_name`, and `access` (`allow` or `deny`); `binary_name` is optional.
default_permissionsstring
Name of the default permissions profile to apply to sandboxed tool calls. Built-ins are `:read-only`, `:workspace`, and `:danger-full-access`; custom profile names require matching `[permissions.]` tables. Don't combine with `sandbox_mode` or `[sandbox_workspace_write]`.
desktop.custom_file_handlers.object
User-level only. Defines an additional Open in target for the ChatGPT desktop app. See Add custom file handlers for examples and handler ID constraints.
desktop.custom_file_handlers..argsarray
Arguments inserted between the command and file input (default: `[]`).
desktop.custom_file_handlers..commandstring
Executable path or command name to detect and launch. Required.
desktop.custom_file_handlers..iconstring
Bundled asset path, Base64-encoded `data:image/...` URL, file URI, or absolute local path for the handler icon. Required; unsupported sources use the default VS Code icon.
desktop.custom_file_handlers..inputenum
How the app sends file input to the handler (default: `path`).
path · json_argument · json_stdindesktop.custom_file_handlers..labelstring
Display name shown in Open in menus. Required.
desktop.custom_file_handlers..supports_sshboolean
Offer the handler for files in SSH workspaces (default: `false`).
developer_instructionsstring
Additional developer instructions injected into the session (optional).
disable_paste_burstboolean
Legacy fallback for `tui.disable_paste_burst`. Prefer the setting under `[tui]`.
experimental_compact_prompt_filepath
Load the compaction prompt override from a file (experimental).
experimental_use_unified_exec_toolboolean
Legacy name for enabling unified exec; prefer `[features].unified_exec` or `codex --enable unified_exec`.
features.appsboolean
Enable app (connector) integrations (stable; on by default). App and connector traffic is not controlled by the sandboxed-command network proxy or its domain allowlist.
features.code_mode.direct_only_tool_namespacesarray
Tool namespaces code mode can use only through direct tool calls.
features.code_mode.enabledboolean
Enable code mode feature configuration. This feature is under development and off by default.
features.code_mode.excluded_tool_namespacesarray
Tool namespaces code mode excludes from nested code-mode tool guidance and executor exposure.
features.context_management.experimental_modeboolean
Experimental context-management setting. The feature is not currently available.
features.enable_request_compressionboolean
Compress streaming request bodies with zstd when supported (stable; on by default).
features.fast_modeboolean
Enable Fast mode controls advertised by the active model (stable; on by default), independently of `features.ultrafast_mode`. Availability still depends on the model and account.
features.goalsboolean
Enable persisted goals and automatic continuation (stable; on by default).
features.hooksboolean
Enable lifecycle hooks loaded from `hooks.json` or inline `[hooks]` config. `features.codex_hooks` is a deprecated alias.
features.memoriesboolean
Enable Memories (off by default).
features.multi_agentboolean
Enable multi-agent collaboration tools (`spawn_agent`, `send_input`, `resume_agent`, `wait_agent`, and `close_agent`) (stable; on by default).
features.network_proxyenum
Start the network proxy for sandboxed commands (experimental; off by default). Required to enforce permission-profile domain rules unless enabled administrator-managed `experimental_network` requirements start the proxy. Use a table when setting feature-level policy options such as `domains`. Does not filter web search, apps, MCP, or other hosted tools.
boolean · tablefeatures.network_proxy.allow_local_bindingboolean
Allow broader local/private-network access. Defaults to `false`; exact local IP literal or `localhost` allow rules can still permit specific local targets.
features.network_proxy.allow_upstream_proxyboolean
Allow chaining through an upstream proxy from the environment. Defaults to `true`.
features.network_proxy.dangerously_allow_all_unix_socketsboolean
Permit arbitrary Unix socket destinations instead of allowlist-only access. Defaults to `false`; use only in tightly controlled environments.
features.network_proxy.dangerously_allow_non_loopback_proxyboolean
Permit non-loopback listener addresses. Defaults to `false`; enabling it can expose proxy listeners beyond localhost.
features.network_proxy.domainsobject
Domain policy for sandboxed networking. Unset by default, which means no external destinations are allowed until you add `allow` rules. Supports exact hosts, `*.example.com` for subdomains only, `.example.com` for apex plus subdomains, and global `*` allow rules. Prefer scoped rules because `*` broadly opens public outbound access. Add `deny` rules for blocked destinations; `deny` wins on conflicts.
features.network_proxy.enable_socks5boolean
Expose SOCKS5 support. Defaults to `true`.
features.network_proxy.enable_socks5_udpboolean
Allow UDP over SOCKS5. Defaults to `true`.
features.network_proxy.enabledboolean
Start the sandboxed-command network proxy when command network access is enabled. Defaults to `false`; permission-profile domain rules are not enforced while the proxy is off.
features.network_proxy.proxy_urlstring
HTTP listener URL for sandboxed networking. Defaults to `"http://127.0.0.1:3128"`.
features.network_proxy.socks_urlstring
SOCKS5 listener URL. Defaults to `"http://127.0.0.1:8081"`.
features.network_proxy.unix_socketsobject
Unix socket policy for sandboxed networking. Unset by default; add `allow` entries for permitted sockets.
features.personalityboolean
Removed feature flag. Accepted for compatibility and ignored.
features.prefer_mxcboolean
Prefer MXC for local Windows execution when native capabilities and policy allow it; otherwise retain the configured legacy sandbox and setup. Disabled by default in the standalone CLI; the desktop app can enable it through rollout configuration. Command failures don't trigger fallback.
features.prevent_idle_sleepboolean
Prevent the machine from sleeping while a turn is actively running (experimental; off by default).
features.remote_pluginboolean
Enable the remote plugin catalog (stable; on by default).
features.rollout_budget.enabledboolean
Enable rollout budget tracking. This feature is under development and off by default. When enabled, `features.rollout_budget.limit_tokens` is required.
features.rollout_budget.limit_tokensinteger
Positive token limit for rollout budget tracking. Required when rollout budget is enabled.
features.rollout_budget.prefill_token_weightnumber
Finite non-negative multiplier for prefill tokens in rollout budget accounting. Defaults to `1.0`.
features.rollout_budget.reminder_interval_tokensinteger
Positive token interval between rollout budget reminders. Defaults to 10% of `limit_tokens`, with a minimum of 1 token.
features.rollout_budget.sampling_token_weightnumber
Finite non-negative multiplier for sampled tokens in rollout budget accounting. Defaults to `1.0`.
features.shell_snapshotboolean
Snapshot shell environment to speed up repeated commands (stable; on by default).
features.shell_toolboolean
Enable command execution tools (stable; on by default).
features.skill_mcp_dependency_installboolean
Allow prompting and installing missing MCP dependencies for skills (stable; on by default).
features.ultrafast_modeboolean
Enable Ultrafast mode controls (stable; on by default), independently of `features.fast_mode`. Availability still depends on the model and account.
features.unified_execboolean
Use resumable command execution (stable; enabled on all platforms). User opt-outs are ignored. Managed requirements can disable resumable processes and `write_stdin`, leaving one-shot `exec_command` available.
features.web_searchboolean
Deprecated legacy toggle; prefer the top-level `web_search` setting.
features.web_search_cachedboolean
Deprecated legacy toggle. When `web_search` is unset, true maps to `web_search = "cached"`.
features.web_search_requestboolean
Deprecated legacy toggle. When `web_search` is unset, true maps to `web_search = "live"`.
feedback.enabledboolean
Enable feedback submission via `/feedback` across local clients (default: true).
file_openerenum
URI scheme used to open citations from Codex output (default: `vscode`).
vscode · vscode-insiders · windsurf · cursor · noneforced_chatgpt_workspace_idstring
Limit ChatGPT logins to a specific workspace identifier.
forced_login_methodenum
Restrict Codex to a specific authentication method.
chatgpt · apihide_agent_reasoningboolean
Suppress reasoning events in both the TUI and `codex exec` output.
history.max_bytesnumber
If set, caps the history file size in bytes by dropping oldest entries.
history.persistenceenum
Control whether Codex saves session transcripts to history.jsonl.
save-all · nonehooksobject
Lifecycle hooks configured inline in `config.toml`. Uses the same event schema as `hooks.json`; see the Hooks guide for examples and supported events.
hooks.array
Matcher groups for hook events such as `PreToolUse`, `PermissionRequest`, `PostToolUse`, `PreCompact`, `PostCompact`, `SessionStart`, `SessionEnd`, `SubagentStart`, `SubagentStop`, `UserPromptSubmit`, `Stop`, or `Interrupt`.
hooks.[].hooksarray
Hook handlers for a matcher group. Command and MCP tool hooks are supported while prompt and agent hook handlers are parsed but skipped.
hooks.[].hooks[].additionalContextLimitinteger
Approximate per-handler token threshold for saving oversized `additionalContext` to disk and showing the model a shorter preview. Defaults to `2500`; `0` passes the full context directly to the model. See Large hook output.
hooks.[].hooks[].asyncboolean
Run a command hook in the background without delaying the triggering operation. Defaults to `false`; `SessionEnd` always runs synchronously. See Run hooks in the background.
hooks.[].hooks[].commandWindowsstring
Windows-only command override for command hooks. The TOML alias `command_windows` is also accepted.
instructionsstring
Reserved for future use; prefer `model_instructions_file` or `AGENTS.md`.
log_dirpath
Directory where Codex writes log files; defaults to `$CODEX_HOME/log`. Setting this explicitly also enables the opt-in plaintext TUI log, `codex-tui.log`, in that directory.
marketplaces..refstring
Optional Git branch, tag, or commit for the marketplace.
marketplaces..sourcestring
Git repository location or local marketplace root directory. Use an absolute path for a local source; the directory contains .agents/plugins/marketplace.json.
marketplaces..source_typeenum
Source kind for a configured plugin marketplace. Marketplaces can be defined in system, cloud-managed, user, or trusted-project config.toml.
git · localmarketplaces..sparse_pathsarray
Optional sparse checkout paths for a Git marketplace. Include the marketplace catalog and any local plugin directories it references.
mcp_oauth_callback_portinteger
Optional global fixed port for the local HTTP callback server used during MCP OAuth login. A server-specific `oauth.callback_port` takes precedence. When neither is set, Codex binds to an ephemeral port chosen by the OS.
mcp_oauth_callback_urlstring
Optional base callback URL for MCP OAuth login, such as a devbox ingress URL. Newly added pre-registered clients use this URL unchanged when the authorization server supports issuer identification; existing clients without a saved callback append a server-specific callback ID. Without issuer support, any pre-registered MCP server whose configured callback lacks the required ID falls back to this URL with the ID appended. Callback URL ports don't select the listener port.
mcp_oauth_credentials_storeenum
Preferred store for MCP OAuth credentials.
auto · file · keyringmcp_optional_startup_grace_msinteger
Shared wait for optional MCP servers when building the initial tool catalog. Defaults to `1000`. Set to `0` to wait for each server's `startup_timeout_sec` instead.
mcp_servers..argsarray
Arguments passed to the MCP stdio server command.
mcp_servers..authenum
Authentication fallback for an MCP HTTP server after configured bearer tokens and authorization headers. `oauth` (default) uses stored MCP OAuth credentials when available. `chatgpt` uses the current ChatGPT session for the trusted first-party ChatGPT origin, then falls back to stored OAuth. Both modes can connect without authentication if no credential source resolves.
oauth · chatgptmcp_servers..bearer_token_env_varstring
Environment variable sourcing the bearer token for an MCP HTTP server.
mcp_servers..commandstring
Launcher command for an MCP stdio server.
mcp_servers..cwdstring
Working directory for the MCP stdio server process.
mcp_servers..default_tools_approval_modeenum
Default approval behavior for MCP tools on this server unless a per-tool override exists.
auto · prompt · writes · approvemcp_servers..disabled_toolsarray
Deny list applied after `enabled_tools` for the MCP server.
mcp_servers..enabledboolean
Disable an MCP server without removing its configuration.
mcp_servers..enabled_toolsarray
Allow list of tool names exposed by the MCP server.
mcp_servers..envobject
Environment variables forwarded to the MCP stdio server.
mcp_servers..env_http_headersobject
HTTP headers populated from environment variables for an MCP HTTP server.
mcp_servers..env_varsarray
Additional environment variables to whitelist for an MCP stdio server. String entries default to `source = "local"`; use `source = "remote"` only with executor-backed remote stdio.
mcp_servers..experimental_environmentenum
Experimental placement for an MCP server. `remote` starts stdio servers through a remote executor environment; streamable HTTP remote placement is not implemented.
local · remotemcp_servers..http_headersobject
Static HTTP headers included with each MCP HTTP request.
mcp_servers..http_headers_helperstring
Local command that prints a JSON object of HTTP header names and values. Supported only for locally connected HTTP MCP servers. Explicit bearer tokens and OAuth credentials take precedence over helper-provided Authorization headers.
mcp_servers..oauth_resourcestring
Optional RFC 8707 OAuth resource parameter to include during MCP login.
mcp_servers..oauth.callback_portinteger
Fixed OAuth callback listener port for this MCP server. Overrides `mcp_oauth_callback_port`. For a direct loopback callback with an explicit URL port, configure the same listener port.
mcp_servers..oauth.callback_urlstring
Server-specific OAuth callback. Pre-registered clients reuse it when issuer identification is supported or the URL already ends in the server-specific callback ID. Otherwise, Codex uses the global or default callback with that ID appended. Clients without a pre-registered ID use this callback during client registration.
mcp_servers..oauth.client_idstring
Pre-registered OAuth client ID used for authorization and token exchange with this MCP server.
mcp_servers..oauth.client_secretstring
OAuth client secret for token exchange with a pre-registered client. Requires a nonempty `oauth.client_id`; the secret must also be nonempty. Stored in configuration.
mcp_servers..requiredboolean
When true, fail startup/resume if this enabled MCP server cannot initialize.
mcp_servers..scopesarray
OAuth scopes to request when authenticating to that MCP server.
mcp_servers..startup_timeout_msnumber
Alias for `startup_timeout_sec` in milliseconds.
mcp_servers..startup_timeout_secnumber
Override the default 10s startup timeout for an MCP server.
mcp_servers..tool_timeout_secnumber
Override the default 60s per-tool timeout for an MCP server.
mcp_servers..tools..approval_modeenum
Per-tool approval behavior override for one MCP tool on this server.
auto · prompt · writes · approvemcp_servers..tools..output_token_limitinteger
Token budget for one MCP tool's output, before the standard 20% serialization allowance. Overrides the model's default output truncation budget for that tool.
mcp_servers..urlstring
Endpoint for an MCP streamable HTTP server.
memories.consolidation_modelstring
Optional model override for global memory consolidation.
memories.disable_on_external_contextboolean
When `true`, threads that use external context such as MCP tool calls, web search, or tool search are kept out of memory generation. Defaults to `false`. Legacy alias: `memories.no_memories_if_mcp_or_web_search`.
memories.extract_modelstring
Optional model override for per-thread memory extraction.
memories.generate_memoriesboolean
When `false`, newly created threads are not stored as memory-generation inputs. Defaults to `true`.
memories.max_raw_memories_for_consolidationnumber
Maximum recent raw memories retained for global consolidation. Defaults to `256` and is capped at `4096`.
memories.max_rollout_age_daysnumber
Maximum age of threads considered for memory generation. Defaults to `30` and is clamped to `0`-`90`.
memories.max_rollouts_per_startupnumber
Maximum rollout candidates processed per startup pass. Defaults to `16` and is capped at `128`.
memories.max_unused_daysnumber
Maximum days since a memory was last used before it becomes ineligible for consolidation. Defaults to `30` and is clamped to `0`-`365`.
memories.min_rate_limit_remaining_percentnumber
Minimum remaining percentage required in Codex rate-limit windows before memory generation starts. Defaults to `25` and is clamped to `0`-`100`.
memories.min_rollout_idle_hoursnumber
Minimum idle time before a thread is considered for memory generation. Defaults to `6` and is clamped to `1`-`48`.
memories.use_memoriesboolean
When `false`, Codex skips injecting existing memories into future sessions. Defaults to `true`.
modelstring
Model to use (e.g., `gpt-6.1-sol`).
model_auto_compact_token_limitnumber
Token threshold that triggers automatic history compaction (unset uses model defaults).
model_auto_compact_token_limit_scopeenum
Controls whether the auto-compaction threshold counts the full active context (`total`, the default) or only growth after the carried compaction-window prefix (`body_after_prefix`).
total · body_after_prefixmodel_catalog_jsonpath
Optional path to a JSON model catalog loaded on startup. A selected `$CODEX_HOME/profile-name.config.toml` profile file can override this per profile.
model_context_windownumber
Context window tokens available to the active model.
model_instructions_filepath
Replacement for built-in instructions instead of `AGENTS.md`.
model_providerstring
Provider id from `model_providers` (default: `openai`).
model_providers.object
Custom provider definition. Built-in provider IDs (`openai`, `ollama`, and `lmstudio`) are reserved and cannot be overridden.
model_providers..authobject
Command-backed bearer token configuration for a custom provider. Do not combine with `env_key`, `experimental_bearer_token`, or `requires_openai_auth`.
model_providers..auth.argsarray
Arguments passed to the token command.
model_providers..auth.commandstring
Command to run when Codex needs a bearer token. The command must print the token to stdout.
model_providers..auth.cwdpath
Working directory for the token command.
model_providers..auth.refresh_interval_msnumber
How often Codex proactively refreshes the token in milliseconds (default: 300000). Set to `0` to refresh only after an authentication retry.
model_providers..auth.timeout_msnumber
Maximum token command runtime in milliseconds (default: 5000).
model_providers..base_urlstring
API base URL for the model provider.
model_providers..capabilities.external_web_accessboolean
Whether the provider's hosted web search can access the live web. Omit to keep provider defaults; model and turn settings may restrict access further.
model_providers..capabilities.remote_compactionenum
Provider compaction protocol. `unsupported` uses local compaction; `v2` sends compaction triggers through Responses. Omit to keep provider defaults; model and turn settings may restrict support further.
unsupported · v2model_providers..env_http_headersobject
HTTP headers populated from environment variables when present.
model_providers..env_keystring
Environment variable supplying the provider API key.
model_providers..env_key_instructionsstring
Optional setup guidance for the provider API key.
model_providers..experimental_bearer_tokenstring
Direct bearer token for the provider (discouraged; use `env_key`).
model_providers..http_headersobject
Static HTTP headers added to provider requests.
model_providers..model_catalog_urlstring
Full URL for a Codex-native model catalog. Omit to keep the provider's default model discovery.
model_providers..namestring
Display name for a custom model provider.
model_providers..query_paramsobject
Extra query parameters appended to provider requests.
model_providers..request_max_retriesnumber
Retry count for HTTP requests to the provider (default: 4).
model_providers..requires_openai_authboolean
The provider uses OpenAI authentication (defaults to false).
model_providers..stream_idle_timeout_msnumber
Idle timeout for SSE streams in milliseconds (default: 300000).
model_providers..stream_max_retriesnumber
Retry count for SSE streaming interruptions (default: 5).
model_providers..supports_standalone_web_searchboolean
Advertise support for a compatible standalone web search endpoint (default: false). Standalone search remains under development and off by default; provider compatibility alone doesn't enable it.
model_providers..supports_websocketsboolean
Whether that provider supports the Responses API WebSocket transport.
model_providers..wire_apistring
Protocol used by the provider. `responses` is the only supported value, and it is the default when omitted.
model_providers.amazon-bedrock.aws.profilestring
AWS profile name used by the built-in `amazon-bedrock` provider.
model_providers.amazon-bedrock.aws.regionstring
AWS region used by the built-in `amazon-bedrock` provider.
model_reasoning_effortstring
Reasoning effort advertised by the selected model, such as `low`, `medium`, `high`, `xhigh`, `max`, or `ultra`. Available levels depend on the model and client.
model_reasoning_summaryenum
Select reasoning summary detail or disable summaries entirely.
auto · concise · detailed · nonemodel_supports_reasoning_summariesboolean
Force Codex to send or not send reasoning metadata.
model_verbosityenum
Optional GPT-5 Responses API verbosity override; when unset, the selected model/preset default is used.
low · medium · highnotice.hide_full_access_warningboolean
Track acknowledgement of the full access warning prompt.
notice.hide_gpt-5.1-codex-max_migration_promptboolean
Track acknowledgement of the gpt-5.1-codex-max migration prompt.
notice.hide_gpt5_1_migration_promptboolean
Track acknowledgement of the GPT-5.1 migration prompt.
notice.hide_rate_limit_model_nudgeboolean
Track opt-out of the rate limit model switch reminder.
notice.hide_world_writable_warningboolean
Track acknowledgement of the Windows world-writable directories warning.
notice.model_migrationsobject
Track acknowledged model migrations as old->new mappings.
notifyarray
Command invoked for notifications; receives a JSON payload from Codex.
openai_base_urlstring
Base URL override for the built-in `openai` model provider.
oss_providerenum
Default local provider used when running with `--oss` (defaults to prompting if unset).
lmstudio · ollamaotel.environmentstring
Environment tag applied to emitted OpenTelemetry events (default: `dev`).
otel.exporterenum
Select the OpenTelemetry exporter and provide any endpoint metadata.
none · otlp-http · otlp-grpcotel.exporter..endpointstring
Exporter endpoint for OTEL logs.
otel.exporter..headersobject
Static headers included with OTEL exporter requests.
otel.exporter..protocolenum
Protocol used by the OTLP/HTTP exporter.
binary · jsonotel.exporter..tls.ca-certificatestring
CA certificate path for OTEL exporter TLS.
otel.exporter..tls.client-certificatestring
Client certificate path for OTEL exporter TLS.
otel.exporter..tls.client-private-keystring
Client private key path for OTEL exporter TLS.
otel.log_user_promptboolean
Opt in to exporting raw user prompts with OpenTelemetry logs.
otel.metrics_exporterenum
Select the OpenTelemetry metrics exporter (defaults to `statsig`). In Codex CLI, `analytics.enabled = false` disables this exporter, including custom OTLP exporters. Set to `none` to disable metrics export independently.
none · statsig · otlp-http · otlp-grpcotel.trace_exporterenum
Select the OpenTelemetry trace exporter and provide any endpoint metadata.
none · otlp-http · otlp-grpcotel.trace_exporter..endpointstring
Trace exporter endpoint for OTEL logs.
otel.trace_exporter..headersobject
Static headers included with OTEL trace exporter requests.
otel.trace_exporter..protocolenum
Protocol used by the OTLP/HTTP trace exporter.
binary · jsonotel.trace_exporter..tls.ca-certificatestring
CA certificate path for OTEL trace exporter TLS.
otel.trace_exporter..tls.client-certificatestring
Client certificate path for OTEL trace exporter TLS.
otel.trace_exporter..tls.client-private-keystring
Client private key path for OTEL trace exporter TLS.
permissions..descriptionstring
Human-readable description for this named profile. A profile does not inherit its parent's description through `extends`.
permissions..extendsstring
Optional parent profile applied before this named profile. Set it to another named profile, `:read-only`, or `:workspace`; `:danger-full-access`, undefined parents, and cycles are rejected.
permissions..filesystemobject
Named filesystem permission profile. Each key is an absolute path or special token such as `:minimal` or `:workspace_roots`.
permissions..filesystem.":workspace_roots".enum
Scoped filesystem access relative to each effective workspace root. Use `"."` for the root itself; glob subpaths such as `"/*.env"` can deny reads with `"deny"`.
"read" · "write" · "deny"permissions..filesystem.enum
Grant direct access for a path, glob pattern, or special token, or scope nested entries under that root. Use `"deny"` to deny reads for matching paths.
"read" · "write" · "deny" · tablepermissions..filesystem.glob_scan_max_depthnumber
Maximum depth for expanding deny-read glob patterns on platforms that snapshot matches before sandbox startup. Must be at least `1` when set.
permissions..network.allow_local_bindingboolean
Permit broader local/private-network access through sandboxed networking. Exact local IP literal or `localhost` allow rules can still permit specific local targets when this stays `false`.
permissions..network.allow_upstream_proxyboolean
Allow sandboxed networking to chain through another upstream proxy.
permissions..network.dangerously_allow_all_unix_socketsboolean
Allow arbitrary Unix socket destinations instead of the default restricted set. Use only in tightly controlled environments.
permissions..network.dangerously_allow_non_loopback_proxyboolean
Permit non-loopback bind addresses for sandboxed networking listeners. Enabling it can expose listeners beyond localhost.
permissions..network.domainsobject
Domain rules for sandboxed commands. Enforced only when `features.network_proxy` or enabled administrator-managed networking requirements activate the proxy. Supports exact hosts, `*.example.com`, `.example.com`, and global `*` allow rules; `deny` wins. Does not restrict web search, apps, or MCP servers.
permissions..network.domains.enum
Allow or deny an exact host or scoped wildcard pattern such as `*.example.com` or `.example.com`.
allow · denypermissions..network.enable_socks5boolean
Expose SOCKS5 support when this permissions profile enables sandboxed networking.
permissions..network.enable_socks5_udpboolean
Allow UDP over the SOCKS5 listener when enabled.
permissions..network.enabledboolean
Enable network access for commands in this permission profile. This does not start the network proxy. Without `features.network_proxy` or enabled administrator-managed networking requirements, command network access is direct and profile domain rules are not enforced.
permissions..network.modeenum
Network proxy mode used for subprocess traffic.
limited · fullpermissions..network.proxy_urlstring
HTTP listener URL used when this permissions profile enables sandboxed networking.
permissions..network.socks_urlstring
SOCKS5 proxy endpoint used by this permissions profile.
permissions..network.unix_socketsobject
Unix socket allowlist overrides for sandboxed networking. Use socket paths as keys; `allow` adds a path, and `deny` rejects it.
permissions..network.unix_sockets.enum
Add an absolute Unix socket path to the effective allowlist with `allow`, or reject it with `deny`. Denied entries are omitted from the effective allowlist.
allow · denypermissions..workspace_rootsobject
Profile-defined workspace roots that receive `:workspace_roots` filesystem rules alongside the session's runtime workspace roots.
permissions..workspace_roots.boolean
Opt a path into the profile's workspace root set when `true`. Disabled entries remain inactive.
personalityenum
Deprecated compatibility setting. `friendly` and `pragmatic` no longer select a style. `none` omits the built-in Personality section from model instructions; explicit instruction overrides are unchanged.
none · friendly · pragmaticplan_mode_reasoning_effortstring
Plan-mode-specific reasoning override using a level supported by the selected model. When unset, Plan mode uses its built-in preset default.
plugins..enabledboolean
Enable or disable a local-marketplace plugin using a `plugin-name@marketplace-name` key. Read from the effective merged config; trusted-project settings can override user, cloud-managed, and system defaults. Marketplace refresh can install or refresh configured plugins even when disabled. This does not override workspace-managed enabled states.
plugins..mcp_servers..default_tools_approval_modeenum
Default approval behavior for tools on a plugin-provided MCP server.
auto · prompt · writes · approveplugins..mcp_servers..disabled_toolsarray
Deny list applied after `enabled_tools` for a plugin-provided MCP server.
plugins..mcp_servers..enabledboolean
Enable or disable an MCP server bundled by an installed plugin without changing the plugin manifest.
plugins..mcp_servers..enabled_toolsarray
Allow list of tools exposed from a plugin-provided MCP server.
plugins..mcp_servers..tools..approval_modeenum
Per-tool approval behavior override for a plugin-provided MCP tool.
auto · prompt · writes · approveproject_doc_fallback_filenamesarray
Additional filenames to try when `AGENTS.md` is missing.
project_doc_max_bytesnumber
Maximum bytes read from `AGENTS.md` when building project instructions.
project_root_markersarray
List of project root marker filenames; used when searching parent directories for the project root.
projects..trust_levelstring
Mark a project or worktree as trusted or untrusted (`"trusted"` | `"untrusted"`). Untrusted projects skip project-scoped `.codex/` layers, including project-local config, hooks, and rules.
review_modelstring
Optional model override used by `/review` (defaults to the current session model).
sandbox_modeenum
Sandbox policy for filesystem and network access during command execution.
read-only · workspace-write · danger-full-accesssandbox_workspace_write.exclude_slash_tmpboolean
Exclude `/tmp` from writable roots in workspace-write mode.
sandbox_workspace_write.exclude_tmpdir_env_varboolean
Exclude `$TMPDIR` from writable roots in workspace-write mode.
sandbox_workspace_write.network_accessboolean
Allow outbound network access inside the workspace-write sandbox.
sandbox_workspace_write.writable_rootsarray
Additional writable roots when `sandbox_mode = "workspace-write"`.
service_tierstring
Preferred service tier for new turns. Use `fast` or another tier advertised by the active model; `fast` maps to the request value `priority`.
shell_environment_policy.excludearray
Legacy environment-variable exclusion patterns. Use `shell_environment_policy.filters` for new configuration; don't combine both forms in the same layer.
shell_environment_policy.experimental_use_profileboolean
Use the user shell profile when spawning subprocesses.
shell_environment_policy.filtersobject
Canonical case-insensitive environment-variable pattern filters. Include entries create an allowlist and can't restore excluded values. Explicit `set` values apply after exclusions. Don't combine filters with legacy `exclude` or `include_only` arrays in the same layer.
shell_environment_policy.ignore_default_excludesboolean
Keep variables containing KEY, SECRET, or TOKEN before other filters run (default: true). Set to false to apply automatic secret-name exclusions.
shell_environment_policy.include_onlyarray
Legacy allowlist of environment-variable patterns. Use `shell_environment_policy.filters` for new configuration; don't combine both forms in the same layer.
shell_environment_policy.inheritenum
Baseline environment inheritance when spawning subprocesses.
all · core · noneshell_environment_policy.setobject
Explicit environment values injected after exclusions; include filters can still remove them.
show_raw_agent_reasoningboolean
Surface raw reasoning content when the active model emits it.
skills.configarray
Per-skill enablement overrides stored in config.toml.
skills.config..enabledboolean
Enable or disable the referenced skill.
skills.config..pathpath
Path to a skill folder containing `SKILL.md`.
skills.max_context_tokensinteger
Token budget for the available-skills catalog. Defaults to 2% of the model's context window. Explicit values are capped at `10000` tokens.
sqlite_homepath
Directory where Codex stores the SQLite-backed state DB used by agent jobs and other resumable runtime state.
suppress_unstable_features_warningboolean
Suppress the warning that appears when under-development feature flags are enabled.
tool_output_token_limitnumber
Token budget for storing individual tool/function outputs in history.
tool_suggest.disabled_toolsarray
Disable suggestions for specific discoverable connectors or plugins. Each entry uses `type = "connector"` or `"plugin"` and an `id`.
tool_suggest.discoverablesarray
Allow tool suggestions for additional discoverable connectors or plugins. Each entry uses `type = "connector"` or `"plugin"` and an `id`.
tools.view_imageboolean
Enable the local-image attachment tool `view_image`.
tools.web_searchenum
Optional web search tool configuration. The object form can set search context size, allowed search domains, and approximate user location. These search-domain filters are separate from sandboxed-command network domain rules and do not restrict connectors or MCP servers.
boolean · { context_size = "low · medium · high", allowed_domains = [string], location = { country, region, city, timezone } }tuiobject
TUI-specific options such as enabling inline desktop notifications.
tui.alternate_screenenum
Control alternate screen usage for the TUI (default: auto; auto skips it in Zellij to preserve scrollback).
auto · always · nevertui.animationsboolean
Enable terminal animations (welcome screen, shimmer, spinner) (default: true).
tui.auto_recapboolean
Generate automatic conversation recaps while the terminal is unfocused (default: true). Set to `false` to disable automatic recaps; `/recap` remains available.
tui.disable_paste_burstboolean
Disable burst-paste detection in the TUI (default: false). Takes precedence over the legacy top-level `disable_paste_burst` setting.
tui.keymap..enum
Keyboard shortcut binding for a TUI action. Supported contexts include `global`, `chat`, `composer`, `editor`, `vim_normal`, `vim_operator`, `vim_text_object`, `pager`, `list`, and `approval`. Selected composer actions fall back to matching `tui.keymap.global` bindings; context-specific bindings take precedence when supported.
string · arraytui.keymap.. = []array
Unbind the action in that keymap context. Key names use normalized strings such as `ctrl-a`, `shift-enter`, `page-down`, or `minus`.
tui.model_availability_nux.integer
Internal startup-tooltip state keyed by model slug.
tui.notification_conditionenum
Control whether TUI notifications fire only when the terminal is unfocused or regardless of focus. Defaults to `unfocused`.
unfocused · alwaystui.notification_methodenum
Notification method for terminal notifications (default: auto).
auto · osc9 · beltui.notificationsenum
Enable TUI notifications; optionally restrict to specific event types.
boolean · arraytui.raw_output_modeboolean
Start the TUI in raw scrollback mode for copy-friendly terminal selection (default: false). You can toggle it with `/raw` or the default `alt-r` key binding.
tui.resume_cwdenum
Working directory to use when resuming or forking a session. When unset, Codex asks you to choose if your current directory differs from the session's saved directory.
current · sessiontui.show_server_version_noticeboolean
Show informational notices about connected app-server version differences (default: true). Does not hide compatibility errors or version status.
tui.show_tooltipsboolean
Show onboarding tooltips in the TUI welcome screen (default: true).
tui.status_lineenum
Ordered list of TUI footer status-line item identifiers. `null` disables the status line.
array · nulltui.terminal_titleenum
Ordered list of terminal window/tab title item identifiers. Defaults to `["spinner", "project"]`; `null` disables title updates.
array · nulltui.themestring
Syntax-highlighting theme override (kebab-case theme name).
tui.vim_mode_defaultboolean
Start the composer in Vim normal mode instead of insert mode (default: false). You can still toggle it per session with `/vim`.
web_searchenum
Web search mode (default: `"cached"`; cached uses an OpenAI-maintained index without external web access; indexed permits external access only when gated by the search index; if you use `--yolo` or another full access sandbox setting, it defaults to `"live"`). Use `"live"` for unrestricted live retrieval, or `"disabled"` to remove the tool.
disabled · cached · indexed · livewindows_wsl_setup_acknowledgedboolean
Track Windows onboarding acknowledgement (Windows only).
windows.sandboxenum
Native Windows sandbox implementation. Explicit `mxc` selection fails when MXC is unavailable or prohibited by managed requirements. Use `features.prefer_mxc` with a legacy selection for automatic MXC selection with fallback.
mxc · elevated · unelevatedADMIN / ENFORCED REQUIREMENTS
requirements.toml
178 keysadditional_developer_instructionsstring
Managed developer instructions added as a separate developer message. Codex rejects instructions that exceed a limit of 10,000 estimated tokens, including context markers.
allow_appshotsboolean
Set to `false` to disable Appshots for managed users. If omitted, Appshots remain unconstrained by requirements and follow normal product availability.
allow_browser_and_computer_useboolean
Set to `false` to block both agent-driven Browser Use and native-app Computer Use. Setting it to `true` or omitting it does not enable either feature; the remaining feature, policy, and approval checks still apply.
allow_login_shellboolean
Enforce whether shell tools can start a login shell.
allow_managed_hooks_onlyboolean
When `true`, Codex skips user, project, session, and plugin hooks while still allowing managed hooks from `requirements.toml` and other managed config layers.
allow_remote_controlboolean
Set to `false` to disable device remote control for managed users. If omitted, device remote control remains unconstrained by requirements and follows normal product availability.
allowed_approval_policiesarray
Allowed approval policies, such as `on-request`, `never`, and `granular`. Include `untrusted` to permit the stricter policy derived from an untrusted project; it cannot be selected directly with `approval_policy`.
allowed_approvals_reviewersarray
Allowed values for `approvals_reviewer`, such as `user` and `auto_review`.
allowed_chatgpt_workspacesarray
Restrict ChatGPT login, including Codex access tokens, to the listed workspace IDs. An empty list disables ChatGPT login; API authentication remains available when permitted. Set through the local system requirements file or macOS MDM; cloud-managed values are ignored.
allowed_login_methodsarray
Allow `chatgpt`, `api`, or both. If omitted, this setting doesn't restrict login methods. If set, the list must contain at least one method. `api` permits API authentication, including Amazon Bedrock. Set through the local system requirements file or macOS MDM. Cloud-managed values are ignored.
allowed_permission_profilesobject
Complete list of allowed permission profiles. Profiles set to `true` are allowed. Profiles that are omitted or set to `false` are denied, including profiles added in future versions. When requirements sources are combined, entries are matched by profile name.
allowed_permission_profiles.boolean
Allow or deny a built-in or custom permission profile defined in a loaded config or requirements source. A later, higher-precedence requirements source can use `false` to turn off a profile allowed by an earlier, lower-precedence source.
allowed_sandbox_modesarray
Allowed values for `sandbox_mode`.
allowed_web_search_modesarray
Allowed values for `web_search` (`disabled`, `cached`, `indexed`, `live`). `disabled` is always allowed; an empty list effectively allows only `disabled`.
applicationobject
Managed desktop application requirements.
application.networkobject
Destination restrictions for desktop app network requests, separate from command networking and browser origin rules. This doesn't impose destination restrictions on native modules or spawned processes.
application.network.domainsobject
Exact domain rules for desktop app requests. Enabled policies allow HTTPS and WSS requests only to explicitly allowed domains; subdomains aren't implicitly allowed.
application.network.domains.enum
Allow or deny an exact domain. Use domain names without URL schemes, ports, or wildcards.
allow · denyapplication.network.enabledboolean
Defaults to true when the table is present. When true, external desktop app requests require an explicitly allowed domain. An empty domain map allows no external destinations. An absent application network policy or false value doesn't restrict destinations through this policy.
appsobject
Managed app requirements keyed by app identifier. Requirements can disable an app or constrain approval behavior for individual tools.
apps..enabledboolean
Set to `false` to disable an app. A disabled requirement remains restrictive when multiple requirements sources are merged.
apps..tools..approval_modeenum
Set the managed approval mode for one app tool.
auto · prompt · writes · approveauto_reviewobject
Managed automatic-review requirements.
auto_review.ignore_rulesarray
Full model slugs for which Codex ignores `allow` prefix rules in command execution policy. Match the slug exactly, including its provider namespace when present; unlike `required_on_models`, this does not accept a namespace-free alias. Deny and network rules still apply.
auto_review.required_on_modelsarray
Model slugs that must use automatic review. Slugs must be non-empty, omit provider namespaces, and have no surrounding whitespace. Lists from multiple requirements sources are combined.
browser_useobject
Managed requirements for agent-driven Browser Use.
browser_use.allow_global_persistent_approvalboolean
Set to `false` to prevent Browser Use from creating or honoring `Always allow` approvals that cover every site, such as allowing downloads from any site. Existing saved approvals are ignored, not deleted. Setting it to `true` or omitting it does not create an approval.
browser_use.allow_history_accessboolean
Set to `false` to prevent Browser Use from reading browser history. Setting it to `true` or omitting it leaves normal history settings and availability checks in place.
browser_use.allow_webmcpboolean
Set to `true` to opt the desktop app's built-in browser into site tools (WebMCP). Setting it to `false` or omitting it leaves normal feature availability checks in place; `false` does not enforce a block. User preferences and site permissions still apply.
browser_use.default_origin_policyobject
Fallback for each Browser Use setting when no matching entry under `browser_use.origins` defines it. A matching origin rule replaces the fallback for that source. Codex then applies the stricter result from managed requirements and user configuration.
browser_use.default_origin_policy.accessenum
Use `deny` to block Browser Use on origins that use the fallback. A denied origin also blocks uploads, downloads, full browser debugging access, and automatic review there. `allow` only lets normal approval and policy checks continue.
allow · denybrowser_use.default_origin_policy.access_approval_lifetimeenum
Set how long a non-persistent site-access approval lasts: `turn` limits it to the current turn, and `thread` keeps it for the rest of the current thread. `persistent_approval` separately controls whether `Always allow` is available. The product default is `thread`.
turn · threadbrowser_use.default_origin_policy.auto_reviewenum
Use `deny` to skip automatic review on origins that use the fallback and ask the user for approval instead. `allow` leaves automatic review available when other settings allow it.
allow · denybrowser_use.default_origin_policy.downloadsenum
Use `deny` to block Browser Use downloads on origins that use the fallback. `allow` only lets normal approval and policy checks continue.
allow · denybrowser_use.default_origin_policy.full_cdp_accessenum
Use `deny` to block full Chrome DevTools Protocol (CDP) access on origins that use the fallback. `allow` only lets normal opt-in and approval checks continue.
allow · denybrowser_use.default_origin_policy.persistent_approvalboolean
Set to `false` to prevent Browser Use from saving or honoring an `Always allow` approval on origins that use the fallback. Approvals for the current turn or thread can still apply. `true` makes `Always allow` available when otherwise permitted but does not create an approval.
browser_use.default_origin_policy.uploadsenum
Use `deny` to block Browser Use uploads on origins that use the fallback. `allow` only lets normal approval and policy checks continue.
allow · denybrowser_use.disable_auto_reviewboolean
Set to `true` to skip automatic review for Browser Use and ask the user for approval instead. Setting it to `false` or omitting it leaves automatic review available when other settings allow it.
browser_use.originsobject
Origin-specific Browser Use policies. Keys use `://[:]` with `http` or `https`. Use an exact host, `*.example.com` for subdomains only, or `.example.com` for the base domain and its subdomains. Other `*` wildcards can span dots, so `region*.example.com` also matches `region.api.example.com`; a host of `*` matches every host for that scheme. Schemes and nondefault ports are significant; explicit default ports are normalized away. Paths, queries, embedded usernames or passwords, and wildcard schemes or ports are invalid. Quote the pattern in TOML, for example `[browser_use.origins."https://.example.com"]`.
browser_use.origins.object
Policy for origins matching this pattern. If several patterns match, Codex uses the most restrictive value for each capability: `deny` over `allow`, `false` over `true`, and `turn` over `thread`.
browser_use.origins..accessenum
Use `deny` to block Browser Use on matching origins. Denial also blocks uploads, downloads, full browser debugging access, and automatic review there. `allow` only lets normal approval and policy checks continue.
allow · denybrowser_use.origins..access_approval_lifetimeenum
Set how long a non-persistent site-access approval for matching origins lasts: `turn` limits it to the current turn, and `thread` keeps it for the rest of the current thread. `persistent_approval` separately controls whether `Always allow` is available.
turn · threadbrowser_use.origins..auto_reviewenum
Use `deny` to skip automatic review on matching origins and ask the user for approval instead. `allow` leaves automatic review available when other settings allow it.
allow · denybrowser_use.origins..downloadsenum
Use `deny` to block Browser Use downloads on matching origins. `allow` only lets normal approval and policy checks continue.
allow · denybrowser_use.origins..full_cdp_accessenum
Use `deny` to block full Chrome DevTools Protocol (CDP) access on matching origins. `allow` only lets normal opt-in and approval checks continue.
allow · denybrowser_use.origins..persistent_approvalboolean
Set to `false` to prevent Browser Use from saving or honoring an `Always allow` approval on matching origins. Approvals for the current turn or thread can still apply. `true` makes `Always allow` available when otherwise permitted but does not create an approval.
browser_use.origins..uploadsenum
Use `deny` to block Browser Use uploads on matching origins. `allow` only lets normal approval and policy checks continue.
allow · denychatgpt_base_urlstring
Enforce the ChatGPT service base URL before authentication and cloud-policy retrieval. This doesn't configure every Codex network destination. Set through the local system requirements file or macOS MDM; cloud-managed values are ignored.
check_for_update_on_startupboolean
Enforce whether Codex checks for updates when it starts.
cli_auth_credentials_storeenum
Enforce the CLI credential store before authentication loads. `file` uses `CODEX_HOME/auth.json`; `keyring` requires the OS credential store; `auto` falls back to a file if the credential store is unavailable; `ephemeral` keeps credentials in memory for the current process. Set through the local system requirements file or macOS MDM; cloud-managed values are ignored.
file · keyring · auto · ephemeralcomputer_useobject
Managed requirements for agent-driven work in native desktop apps. Managed app rules and `config.toml` app rules are both enforced; an app must be allowed by each policy source.
computer_use.allow_locked_computer_useboolean
Set to `false` to prevent users from enabling Locked Use on a managed macOS device. This requirement removes the enablement controls; it does not turn off Locked Use if it is already enabled. If omitted, normal product availability applies.
computer_use.allow_persistent_approvalboolean
Set to `false` to remove the option to save app approvals across sessions. Approvals for the current session remain available. Setting it to `true` or omitting it does not approve an app.
computer_use.default_app_accessenum
Fallback access for native apps that do not match a platform-specific rule. `deny` blocks access. `allow` only lets normal approval and policy checks continue. The product default is `allow`.
allow · denycomputer_use.macosobject
Computer Use app rules for macOS.
computer_use.macos.bundle_idsobject
Map exact macOS bundle identifiers to `allow` or `deny`. A matching rule replaces `computer_use.default_app_access` within the same policy source. A deny from either managed requirements or user configuration still blocks access.
computer_use.macos.bundle_ids.enum
Use `deny` to block the exact bundle identifier. `allow` overrides only this policy source's default and still requires any other policy source and the normal approval flow to allow the app.
allow · denycomputer_use.windowsobject
Computer Use app rules for packaged and unpackaged Windows apps.
computer_use.windows.aumidsobject
Map exact, registered Application User Model IDs (AUMIDs) for signed packaged apps to `allow` or `deny`. A matching rule replaces `computer_use.default_app_access` within the same policy source.
computer_use.windows.aumids.enum
Use `deny` to block the exact packaged-app identity. `allow` overrides only this policy source's default and still requires any other policy source and the normal approval flow to allow the app.
allow · denycomputer_use.windows.exesarray
Rules for signed, unpackaged Windows executables. Rules match the executable's verified publisher and signed version information, not its path or current file name. A matching deny takes precedence over matching allows. Unsigned executables use `computer_use.default_app_access`; executables whose signed identity cannot be verified unambiguously are blocked.
computer_use.windows.exes[].accessenum
Required access decision for matching executables. `deny` blocks access. `allow` overrides only this policy source's default and still requires any other policy source and the normal approval flow to allow the app.
allow · denycomputer_use.windows.exes[].binary_namestring
Optional `OriginalFilename` from the executable's signed version information. Matching is case-insensitive. If a matching publisher and product rule requires this value but the executable does not provide it, Computer Use blocks the executable.
computer_use.windows.exes[].product_namestring
Required exact `ProductName` from the executable's signed version information.
computer_use.windows.exes[].publisher_namestring
Required exact publisher name from the executable's trusted signing certificate, formatted as a Windows X.500 distinguished name.
default_permissionsstring
Managed default permission profile. The profile must be allowed by `allowed_permission_profiles`. Set this explicitly for predictable behavior; if omitted, Codex defaults to `:workspace` only when both `:workspace` and `:read-only` are explicitly allowed.
enforce_residencystring
Require Codex service traffic to use a supported data residency. Currently accepts `us`.
experimental_networkobject
Administrator-managed network requirements for sandboxed local commands, enforced from `requirements.toml`. When enabled, these requirements can start the command network proxy without `features.network_proxy`. Browser tools separately check managed network denies and exclusive allowlists. These requirements do not route browser traffic through the proxy or control web search, apps, MCP servers, native-app traffic, or other capability-specific traffic. On supported managed Codex Cloud paths, these requirements constrain command networking alongside separate Cloud environment internet settings. Approved full sandbox escalation can bypass the command proxy where policy permits it. Work Cloud does not inherit these requirements.
experimental_network.allow_local_bindingboolean
Permit broader local/private-network access for sandboxed networking. On the supported Codex Cloud proxy path, an explicit false can prevent upstream-proxy access even if a domain is allowed. It defaults to true only if no applicable requirement, selected network profile, or proxy feature setting provides a value. Inherited false remains explicit. A supported higher-priority Cloud override can change it without broadening Global for Local or adding domain Allow entries. Verify executor support. Do not apply this Cloud default to Local.
experimental_network.allow_upstream_proxyboolean
Allow sandboxed networking to chain through an upstream proxy from the environment.
experimental_network.allowed_domainsarray
Administrator allow rules for sandboxed-command networking while the managed network proxy is enabled. These rules do not apply to web search, apps, or MCP servers. Do not combine this with `experimental_network.domains`.
experimental_network.dangerously_allow_all_unix_socketsboolean
Permit arbitrary Unix socket destinations instead of allowlist-only access. Use only in tightly controlled environments.
experimental_network.dangerously_allow_non_loopback_proxyboolean
Permit non-loopback listener addresses for `[experimental_network]` requirements. Enabling it can expose listeners beyond localhost.
experimental_network.denied_domainsarray
List-shaped administrator deny rules for sandboxed networking. Do not combine this with `experimental_network.domains`.
experimental_network.domainsobject
Map-shaped administrator domain policy for sandboxed networking. Supports exact hosts, `*.example.com` for subdomains only, `.example.com` for apex plus subdomains, and global `*` allow rules. Prefer scoped rules because `*` broadly opens public outbound access. Environment rules can replace the same Global domain key within a policy. Higher-priority values replace the same key, while other inherited keys remain. After composition, a different matching `deny`, including an inherited wildcard, still blocks a request. Empty environment maps do not clear Global rules. Verify executor support. Do not combine this with `experimental_network.allowed_domains` or `experimental_network.denied_domains`.
experimental_network.domains.enum
Allow or deny sandboxed network access for the matching domain pattern. A deny rule wins when several patterns match.
allow · denyexperimental_network.enabledboolean
Enable sandboxed networking requirements. This does not grant network access when the active sandbox keeps command networking off.
experimental_network.http_portinteger
Loopback HTTP listener port to use for `[experimental_network]` requirements.
experimental_network.managed_allowed_domains_onlyboolean
When networking requirements are enabled and this is true, ordinary user configuration and per-domain approvals cannot expand the managed proxy allowlist. With no effective configured or inherited Allow entries, ordinary managed commands have no allowed destinations. A deny-only policy does not allow the rest of the internet. This does not cover every tool or approved full sandbox escalation.
experimental_network.socks_portinteger
Loopback SOCKS5 listener port to use for `[experimental_network]` requirements.
experimental_network.unix_socketsobject
Administrator-managed Unix socket allowlist for sandboxed networking on macOS. Paths must be absolute.
experimental_network.unix_sockets.enum
On macOS, `allow` adds an absolute Unix socket path to the allowlist; `deny` leaves it out. A `deny` entry cannot block a socket when allow-all Unix sockets is enabled.
allow · denyfeaturesobject
Pinned feature values. Use canonical names from `config.toml` for runtime features; documented app-only requirement keys are also supported here.
features.boolean
Require a documented runtime or app feature to stay enabled or disabled.
features.appsboolean
Pin Apps integration availability on or off for managed users.
features.browser_useboolean
Set to `false` in `requirements.toml` to disable agent-driven Browser Use.
features.browser_use_externalboolean
Set to `false` in `requirements.toml` to prevent Codex from operating supported browsers through the ChatGPT browser extension, including existing tabs and signed-in sessions.
features.browser_use_full_cdp_accessboolean
Set to `false` in `requirements.toml` to disable full Chrome DevTools Protocol access in the local runtime, including Browser Developer mode, and prevent the ChatGPT desktop app from enabling the corresponding setting. If omitted, normal product availability applies.
features.computer_useboolean
Set to `false` in `requirements.toml` to disable Computer Use, Record & Replay, and related install or enablement flows.
features.fast_modeboolean
Pin the canonical `fast_mode` feature on or off for managed users.
features.guardian_approvalboolean
Pin Guardian approval availability on or off for managed users.
features.in_app_browserboolean
Set to `false` in `requirements.toml` to disable the built-in browser pane that users open and control directly.
features.in_app_chatboolean
Set to `false` to hide ChatGPT and ChatGPT Work conversation screens and related cloud automation UI in the ChatGPT desktop app. This setting does not block ChatGPT Voice or stop existing cloud tasks. Setting it to `true` does not bypass account, workspace-permission, or rollout checks.
features.in_app_dictationboolean
Set to `false` to disable in-app dictation in the desktop app. Setting it to `true` does not bypass other availability checks.
features.in_app_local_automationboolean
Set to `false` to disable local scheduled tasks in the desktop app. Setting it to `true` does not bypass other availability checks.
features.in_app_updatesboolean
Set to `false` in `requirements.toml` to disable in-app updates. Updates remain enabled by default when this requirement is omitted.
features.memoriesboolean
Pin Memories availability on or off for managed users.
features.multi_agentboolean
Pin multi-agent availability on or off for managed users.
features.plugin_sharingboolean
Set to `false` in cloud-managed `requirements.toml` to disable workspace sharing for locally built plugins.
features.pluginsboolean
Pin plugin availability on or off for managed users.
features.realtime_conversationboolean
Set to `false` to disable the experimental `/voice` command in the Codex CLI. Do not rely on this setting to block ChatGPT Voice in the desktop app or app-server voice sessions. Setting it to `true` does not bypass client or rollout checks.
features.remote_pluginboolean
Pin remote plugin catalog availability on or off for managed users.
features.workspace_dependenciesboolean
Pin bundled workspace-dependency runtime availability on or off for managed users.
feedbackobject
Managed feedback settings.
feedback.enabledboolean
Enforce whether users can submit feedback across Codex clients.
guardian_extra_policystring
Additional managed Markdown policy for automatic review, included alongside the main policy. This takes precedence over local `[auto_review].extra_policy`. Blank values are ignored.
guardian_policy_configstring
Managed Markdown policy instructions for automatic review. This takes precedence over local `[auto_review].policy`. Blank values are ignored.
hooksobject
Admin-enforced managed lifecycle hooks. Requires a managed hook directory and uses the same event schema as inline `[hooks]` in `config.toml`.
hooks.array
Matcher groups for a hook event such as `PreToolUse`, `PermissionRequest`, `PostToolUse`, `PreCompact`, `PostCompact`, `SessionStart`, `SessionEnd`, `SubagentStart`, `SubagentStop`, `UserPromptSubmit`, or `Stop`.
hooks.[].hooksarray
Hook handlers for a matcher group. Command and MCP tool hooks are supported while prompt and agent hook handlers are parsed but skipped.
hooks.[].hooks[].additionalContextLimitinteger
Approximate per-handler token threshold for saving oversized `additionalContext` to disk and showing the model a shorter preview. Defaults to `2500`; `0` passes the full context directly to the model. See Large hook output.
hooks.[].hooks[].asyncboolean
Run a command hook in the background without delaying the triggering operation. Defaults to `false`; `SessionEnd` always runs synchronously. See Run hooks in the background.
hooks.[].hooks[].commandWindowsstring
Windows-only command override for command hooks. The TOML alias `command_windows` is also accepted.
hooks.managed_dirpath
Directory containing managed hook scripts on macOS and Linux. Codex validates that it is absolute and exists before loading managed hooks.
hooks.windows_managed_dirpath
Directory containing managed hook scripts on Windows. Codex validates that it is absolute and exists before loading managed hooks.
in_app_browserobject
Requirements for the built-in browser pane. These settings do not control agent-driven Browser Use.
in_app_browser.allow_external_browser_settings_importboolean
Set to `false` to prevent users from importing settings or browsing data from an external browser into the built-in browser. Setting it to `true` or omitting it leaves the import available when other product checks allow it. This is a managed-only setting with no `config.toml` override.
log_dirpath
Enforce the directory where Codex writes local log files.
marketplacesobject
Admin requirements for plugin marketplace sources. Rules take effect when `restrict_to_allowed_sources` is `true`.
marketplaces.allowed_sourcesobject
Allowed marketplace sources keyed by administrator-chosen rule name. Distinct names accumulate across requirements layers; fields under the same name use normal layer precedence.
marketplaces.allowed_sources.object
One allowed source rule. The final `source` value after requirements merge determines which sibling fields Codex interprets.
marketplaces.allowed_sources..host_patternstring
Regular expression required when `source = "host_pattern"`. Codex matches it against the lowercase hostname parsed from an HTTPS, SSH, or SCP-style Git source. Use `^` and `$` to require a whole-host match.
marketplaces.allowed_sources..pathpath
Local marketplace directory required when `source = "local"`. Codex requires an absolute path and compares paths after normalization.
marketplaces.allowed_sources..refstring
Optional exact Git ref for a `git` rule. When omitted, the rule allows any ref for the matching repository.
marketplaces.allowed_sources..sourceenum
Marketplace source matcher type. Use `git` for one repository, `host_pattern` for Git hosts matched by regular expression, or `local` for one directory.
git · host_pattern · localmarketplaces.allowed_sources..urlstring
Git repository URL required when `source = "git"`. Codex normalizes the configured and allowed URLs before requiring an exact repository match.
marketplaces.restrict_to_allowed_sourcesboolean
When `true`, require configured marketplace sources to match `allowed_sources` for marketplace add, plugin install, refresh, and runtime loading. OpenAI-curated Git catalogs, including the API-key catalog, must also match the allowlist. Bundled and remotely installed workspace plugins are separate from this curated Git source policy.
mcp_serversobject
Allowlist of MCP servers that may be enabled. Both the server name (``) and its identity must match for the MCP server to be enabled. Any configured MCP server not in the allowlist (or with a mismatched identity) is disabled.
mcp_servers..identityobject
Identity rule for a single MCP server. Set either `command` (stdio) or `url` (streamable HTTP).
mcp_servers..identity.commandenum
Allow an MCP stdio server by exact command string, or use a matcher table to require an exact executable and ordered argument matchers. The string form doesn't inspect arguments, `cwd`, `env`, or `env_vars`.
string · tablemcp_servers..identity.command.argsarray
Ordered argument matchers for a stdio server. The configured argument list must have the same length, and every position must match. Command matchers don't inspect `cwd`, `env`, or `env_vars`.
mcp_servers..identity.command.args[].expressionstring
Regular expression used by a `regex` argument matcher. The expression must be valid and match the complete argument value.
mcp_servers..identity.command.args[].matchenum
Match operation for this argument position.
exact · prefix · regexmcp_servers..identity.command.args[].valuestring
Value used by an `exact` or `prefix` argument matcher.
mcp_servers..identity.command.executablestring
Executable that the stdio server's configured `command` must match exactly.
mcp_servers..identity.urlenum
Allow an MCP streamable HTTP server by exact URL string, or use an `exact`, `prefix`, or `regex` value matcher table.
string · tablemcp_servers..identity.url.expressionstring
Regular expression used by a `regex` URL matcher. The expression must be valid and match the complete URL value.
mcp_servers..identity.url.matchenum
Match operation for the configured MCP server URL.
exact · prefix · regexmcp_servers..identity.url.valuestring
Value used by an `exact` or `prefix` URL matcher.
model_catalog_jsonpath
Enforce the JSON model catalog Codex uses at startup.
model_providerstring
Enforce the model provider ID, overriding local and session configuration.
model_providersobject
Managed model provider definitions. Each entry replaces the complete configured provider with the same ID; fields aren't merged with the user's definition. Providers with other IDs remain available.
model_providers.object
Complete managed provider definition. Uses the same provider fields as `config.toml`, including `name`, `base_url`, authentication, and transport settings.
modelsobject
Contains the `[models.new_thread]` table.
models.new_threadobject
Optional defaults to apply when a new local thread starts. They take priority over user and project defaults, but can be superseded by explicit overrides.
models.new_thread.modelstring
Default model for new threads. An explicit override of either the model or reasoning effort causes both fields to be ignored.
models.new_thread.model_reasoning_effortstring
Default reasoning effort for new threads. An explicit override of either the model or reasoning effort causes both fields to be ignored.
models.new_thread.service_tierstring
Default service tier for new threads. An explicit service-tier override causes this field to be ignored.
permissionsobject
Admin-defined permission profiles keyed by profile name. Uses the same profile fields as `config.toml`.
permissions.object
Admin-defined permission profile. The name can't start with `:`, use the reserved name `filesystem`, or duplicate a profile from a loaded config. Uses the same profile fields as `config.toml`; see the Permissions guide for the complete profile schema.
permissions.filesystem.deny_readarray
Admin-enforced filesystem read denials. Entries can be paths or glob patterns, and users cannot weaken them with local config.
pluginsobject
Plugin-specific MCP server allowlists keyed by plugin identifier. When this table is present, plugin-bundled servers without a matching plugin and server entry are disabled.
plugins..mcp_serversobject
Allowlist for MCP servers bundled with one plugin. Plugin server requirements use the same exact identity and matcher forms as top-level `mcp_servers` requirements.
plugins..mcp_servers..identityobject
Identity rule for one plugin-bundled MCP server. Set either `command` (stdio) or `url` (streamable HTTP).
plugins..mcp_servers..identity.commandenum
Allow a plugin's stdio MCP server by exact command string, or use a matcher table to require an exact executable and ordered argument matchers.
string · tableplugins..mcp_servers..identity.command.argsarray
Ordered argument matchers for a plugin-bundled stdio server. The configured argument list must have the same length, and every position must match.
plugins..mcp_servers..identity.command.args[].expressionstring
Regular expression used by a `regex` argument matcher. The expression must match the complete argument value.
plugins..mcp_servers..identity.command.args[].matchenum
Match operation for this argument position.
exact · prefix · regexplugins..mcp_servers..identity.command.args[].valuestring
Value used by an `exact` or `prefix` argument matcher.
plugins..mcp_servers..identity.command.executablestring
Executable that the plugin-bundled stdio server's configured command must match exactly.
plugins..mcp_servers..identity.urlenum
Allow a plugin's streamable HTTP MCP server by exact URL string, or use an `exact`, `prefix`, or `regex` value matcher table.
string · tableplugins..mcp_servers..identity.url.expressionstring
Regular expression used by a `regex` URL matcher. The expression must match the complete URL value.
plugins..mcp_servers..identity.url.matchenum
Match operation for the plugin-bundled MCP server URL.
exact · prefix · regexplugins..mcp_servers..identity.url.valuestring
Value used by an `exact` or `prefix` URL matcher.
remote_sandbox_configarray
Host-specific sandbox requirements. The first entry whose `hostname_patterns` match the resolved host name overrides top-level `allowed_sandbox_modes` for that requirements source. Host-specific entries currently override sandbox modes only.
remote_sandbox_config[].allowed_sandbox_modesarray
Allowed sandbox modes to apply when this host-specific entry matches.
remote_sandbox_config[].hostname_patternsarray
Case-insensitive host name patterns. Supports `*` for any sequence of characters and `?` for one character.
rulesobject
Admin-enforced command rules merged with `.rules` files. Requirements rules must be restrictive.
rules.prefix_rulesarray
List of enforced prefix rules. Each rule must include `pattern` and `decision`.
rules.prefix_rules[].decisionenum
Required. Requirements rules can only prompt or forbid (not allow).
prompt · forbiddenrules.prefix_rules[].justificationstring
Optional non-empty rationale surfaced in approval prompts or rejection messages.
rules.prefix_rules[].patternarray
Command prefix expressed as pattern tokens. Each token sets either `token` or `any_of`.
rules.prefix_rules[].pattern[].any_ofarray
A list of allowed alternative tokens at this position.
rules.prefix_rules[].pattern[].tokenstring
A single literal token at this position.
sqlite_homepath
Enforce the directory where Codex stores SQLite-backed runtime state.
windowsobject
Native Windows sandbox requirements.
windows.allow_mxcboolean
Set to `false` to prohibit both explicit MXC selection and automatic selection through `features.prefer_mxc`. Omitting this requirement or setting it to `true` permits MXC but doesn't enable it or require it. Legacy implementation restrictions still apply to fallback.
windows.allowed_sandbox_implementationsarray
Allowed legacy native Windows sandbox implementations (`elevated` and `unelevated`). The list must not be empty. When both are allowed and no mode is selected, Codex prefers `elevated`. This list does not restrict the `mxc` sandbox when it is available.
PROCESS / STABLE PUBLIC VARIABLES
Environment
12 variablesCODEX_HOMESets the root for Codex state, including config, auth, logs, sessions, skills, and standalone package metadata. If you set it, the directory must already exist.
Default: `~/.codex`CODEX_SQLITE_HOMESets where SQLite-backed state is stored. The `sqlite_home` config option takes precedence. Relative paths resolve from the current working directory.
Default: `CODEX_HOME`CODEX_NON_INTERACTIVESet to `1`, `true`, or `yes` to skip installer prompts. Prompts use their default response, so use this for scripted installs and updates, not first-run setup.
Default: `false`CODEX_INSTALL_DIRChanges where the visible `codex` command is installed. The standalone package cache still lives under `CODEX_HOME/packages/standalone`.
Default: `~/.local/bin` on macOS/Linux; `%LOCALAPPDATA%\Programs\OpenAI\Codex\bin` on WindowsCODEX_API_KEYProvides an API key to a non-interactive Codex process. Set it inline rather than job-wide when running repository-controlled code.
CODEX_ACCESS_TOKENProvides a ChatGPT or Codex access token for trusted automation. For persisted login, pipe it to `codex login --with-access-token`.
OPENAI_FEDERATION_RULE_IDSelects the federation rule configured for the workload.
OPENAI_IDENTITY_TOKEN_FILEPoints to the absolute path of the file that contains the current OIDC token or SPIFFE JWT-SVID.
OPENAI_WORKLOAD_IDENTITY_CONTEXTOptionally supplies bounded JSON identifiers for client-reported audit attribution. It does not affect authentication or authorization.
CODEX_CA_CERTIFICATEPoints to a PEM CA bundle for environments with corporate TLS interception or private root certificates. Takes precedence over `SSL_CERT_FILE`.
SSL_CERT_FILEFallback PEM CA bundle path when `CODEX_CA_CERTIFICATE` is unset.
RUST_LOGControls Rust log filtering and verbosity. `codex exec` defaults to `error` output unless you set a more verbose value.
PROVENANCE / DO NOT COLLAPSE