GPT WORLD / INDEPENDENT CODEX FIELD MANUAL 出典レビュー · 2026-07-31

CODEX CLI / RELEASE 0.147.0 / 出典追跡

Codex CLI の完全リファレンス。

再帰 runtime help から生成し、現在の公式マニュアルと照合した検索可能な台帳です。Release の事実と preview source の証拠を明確に分離します。

完全運用ガイドを開く

RUNTIME / RECURSIVE HELP

コマンドパス

68 supported + 2 conditional
codex Codex CLI If no subcommand is specified, options will be forwarded to the interactive CLI. 22 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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
--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 · 繰り返し可
-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
--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: - untrusted: Only run "trusted" commands (e.g. ls, cat, sed) without asking for user approval. Will escalate to the user if the model proposes a command that is not in the "trusted" set - 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
-h, --help

Print help (see a summary with '-h')

boolean
-V, --version

Print version

boolean
codex
codex --profile deep-review
codex exec Run Codex non-interactively 26 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 · 繰り返し可
--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 · 繰り返し可
-i, --image, <FILE...>

Optional image(s) to attach to the initial prompt

path · 繰り返し可
-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
--add-dir <DIR>

Additional directories that should be writable alongside the primary workspace

path
--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 · 既定値: 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

Deprecated compatibility flag; prefer --sandbox workspace-write.

boolean · 既定値: false
codex 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

--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
--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 · 繰り返し可
--commit <SHA>

Review the changes introduced by a commit

string
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

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]

--with-api-key

Read the API key from stdin (e.g. `printenv OPENAI_API_KEY | codex login --with-api-key`)

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
--with-access-token

Read the access token from stdin (e.g. `printenv CODEX_ACCESS_TOKEN | codex login

boolean
--enable <FEATURE>

Enable a feature (repeatable). Equivalent to `-c features.<name>=true`

string · 繰り返し可
--device-auth

Show or set device auth.

boolean
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-h, --help

Print help (see a summary with '-h')

boolean
codex mcp-server Start Codex as an MCP server (stdio) 5 options

USAGEcodex mcp-server [OPTIONS]

--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
--enable <FEATURE>

Enable a feature (repeatable). Equivalent to `-c features.<name>=true`

string · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
--code-mode-host <WS_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 · 既定値: 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>

Websocket auth mode for non-loopback listeners [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 5 options

USAGEcodex remote-control [OPTIONS] [COMMAND]

--json

Emit machine-readable JSON

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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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.

--download-url <DOWNLOAD_URL_OVERRIDE>

Override the app installer download URL (advanced)

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
--enable <FEATURE>

Enable a feature (repeatable). Equivalent to `-c features.<name>=true`

string · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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]

--json

Emit a redacted machine-readable report

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
--summary

Only show grouped check rows and the final count summary

boolean
--all

Expand long lists in detailed human output

boolean
--enable <FEATURE>

Enable a feature (repeatable). Equivalent to `-c features.<name>=true`

string · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
--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]...

arguments

[COMMAND]...Full command args to run under seatbelt

--sandbox-state-json <JSON>

JSON value from `codex/sandbox-state-meta` to apply directly

object
-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-readable-root <SANDBOX_STATE_READABLE_ROOT>

Add a readable root to the supplied sandbox state. Repeat for multiple roots

path · 繰り返し可
--enable <FEATURE>

Enable a feature (repeatable). Equivalent to `-c features.<name>=true`

string · 繰り返し可
--sandbox-state-disable-network

Disable direct network access in the supplied sandbox state

boolean
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 · 繰り返し可
--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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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) 25 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

--last

Continue the most recent session without showing the picker

boolean
--all

Show all sessions (disables cwd filtering and shows CWD column)

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 · 繰り返し可
--include-non-interactive

Include non-interactive sessions in the resume picker and --last selection

boolean
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
--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 · 繰り返し可
-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
--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: - untrusted: Only run "trusted" commands (e.g. ls, cat, sed) without asking for user approval. Will escalate to the user if the model proposes a command that is not in the "trusted" set - 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
-h, --help

Print help (see a summary with '-h')

boolean
-V, --version

Print version

boolean
codex resume --last
codex archive Archive a saved session by id or session name 18 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
--remote-auth-token-env <ENV_VAR>

Name of the environment variable containing the bearer token to send to a remote app server websocket

string
--enable <FEATURE>

Enable a feature (repeatable). Equivalent to `-c features.<name>=true`

string · 繰り返し可
-i, --image, <FILE...>

Optional image(s) to attach to the initial prompt

path · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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
--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 19 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
--remote-auth-token-env <ENV_VAR>

Name of the environment variable containing the bearer token to send to a remote app server websocket

string
--enable <FEATURE>

Enable a feature (repeatable). Equivalent to `-c features.<name>=true`

string · 繰り返し可
-i, --image, <FILE...>

Optional image(s) to attach to the initial prompt

path · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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
--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 unarchive Unarchive a saved session by id or session name 18 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
--remote-auth-token-env <ENV_VAR>

Name of the environment variable containing the bearer token to send to a remote app server websocket

string
--enable <FEATURE>

Enable a feature (repeatable). Equivalent to `-c features.<name>=true`

string · 繰り返し可
-i, --image, <FILE...>

Optional image(s) to attach to the initial prompt

path · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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
--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) 24 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

--last

Fork the most recent session without showing the picker

boolean
--all

Show all sessions (disables cwd filtering and shows CWD column)

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 · 繰り返し可
--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 · 繰り返し可
--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 · 繰り返し可
-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
--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: - untrusted: Only run "trusted" commands (e.g. ls, cat, sed) without asking for user approval. Will escalate to the user if the model proposes a command that is not in the "trusted" set - 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
-h, --help

Print help (see a summary with '-h')

boolean
-V, --version

Print version

boolean
codex fork --last
codex cloud [EXPERIMENTAL] Browse tasks from Codex Cloud and apply changes locally 5 options

USAGEcodex cloud [OPTIONS] [COMMAND]

エイリアス: 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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 12 options

USAGEcodex exec-server [OPTIONS]

--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
--concurrent-requests <COUNT>

Maximum number of requests to process concurrently on each connection [default: 1]

integer · 既定値: 1
--enable <FEATURE>

Enable a feature (repeatable). Equivalent to `-c features.<name>=true`

string · 繰り返し可
--listen <URL>

Transport endpoint URL. Supported values: `ws://IP:PORT` (default), `stdio`, `stdio://`

url
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
--remote <URL>

Register this exec-server as a remote environment using the given base URL

url
--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
--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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 18 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

--last

Resume the most recent recorded session (newest) without specifying an id

boolean
--all

Show all sessions (disables cwd filtering)

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 · 繰り返し可
-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
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

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
--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 19 options

USAGEcodex exec review [OPTIONS] [PROMPT]

arguments

[PROMPT]Custom review instructions. If `-` is used, read from stdin

--uncommitted

Review staged, unstaged, and untracked changes

boolean
--base <BRANCH>

Review changes against the given base branch

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
--commit <SHA>

Review the changes introduced by a commit

string
--enable <FEATURE>

Enable a feature (repeatable). Equivalent to `-c features.<name>=true`

string · 繰り返し可
--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 · 繰り返し可
--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
--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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-h, --help

Print help (see a summary with '-h')

boolean
codex mcp add Codex CLI command. 9 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
--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
--enable <FEATURE>

Enable a feature (repeatable). Equivalent to `-c features.<name>=true`

string · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
--oauth-client-id <CLIENT_ID>

Optional OAuth client identifier to use for this MCP server

string
--oauth-resource <RESOURCE>

Optional OAuth resource parameter to include during MCP login

string
-h, --help

Print help (see a summary with '-h')

boolean
codex 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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-h, --help

Print help (see a summary with '-h')

boolean
codex mcp login Codex CLI command. 5 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
--scopes <SCOPE,SCOPE>

Comma-separated list of OAuth scopes to request

string · 繰り返し可
--enable <FEATURE>

Enable a feature (repeatable). Equivalent to `-c features.<name>=true`

string · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-h, --help

Print help (see a summary with '-h')

boolean
codex plugin add Install a plugin from a configured marketplace snapshot. 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>

Configured marketplace name to use when PLUGIN does not include @MARKETPLACE

string
--json

Output install result as JSON

boolean
--enable <FEATURE>

Enable a feature (repeatable). Equivalent to `-c features.<name>=true`

string · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-h, --help

Print help (see a summary with '-h')

boolean
codex plugin list List plugins available from configured marketplace snapshots 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 configured marketplace name

string
--json

Output plugin list as JSON

boolean
--available

Include uninstalled marketplace plugins in the JSON output

boolean
--enable <FEATURE>

Enable a feature (repeatable). Equivalent to `-c features.<name>=true`

string · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-h, --help

Print help (see a summary with '-h')

boolean
codex 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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-h, --help

Print help (see a summary with '-h')

boolean
codex plugin remove Remove an installed plugin from local config and 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
--json

Output remove result as JSON

boolean
--enable <FEATURE>

Enable a feature (repeatable). Equivalent to `-c features.<name>=true`

string · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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]

--sock <SOCKET_PATH>

Path to the app-server Unix domain socket to connect to

path
-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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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>

-o, --out, <DIR>

Output directory where .ts files will be written

path
-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
-p, --prettier, <PRETTIER_BIN>

Optional path to the Prettier executable to format generated files

string
--enable <FEATURE>

Enable a feature (repeatable). Equivalent to `-c features.<name>=true`

string · 繰り返し可
--experimental

Include experimental methods and fields in the generated output

boolean
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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>

-o, --out, <DIR>

Output directory where the schema bundle will be written

path
-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
--experimental

Include experimental methods and fields in the generated output

boolean
--enable <FEATURE>

Enable a feature (repeatable). Equivalent to `-c features.<name>=true`

string · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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]

--json

Emit machine-readable JSON

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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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]

--json

Emit machine-readable JSON

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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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]

--json

Emit machine-readable JSON

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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-h, --help

Print help (see a summary with '-h')

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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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

-i, --image, <FILE...>

Optional image(s) to attach to the user prompt

path · 繰り返し可
-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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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

--env <ENV_ID>

Target environment identifier (see `codex cloud` to browse)

string
--attempts <ATTEMPTS>

Number of assistant attempts (best-of-N) [default: 1]

integer · 既定値: 1
-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
--branch <BRANCH>

Git branch to run in Codex Cloud (defaults to current branch)

string
--enable <FEATURE>

Enable a feature (repeatable). Equivalent to `-c features.<name>=true`

string · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-h, --help

Print help (see a summary with '-h')

boolean
codex cloud list List Codex Cloud tasks 8 options

USAGEcodex cloud list [OPTIONS]

--env <ENV_ID>

Filter tasks by environment identifier

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
--limit <N>

Maximum number of tasks to return (1-20) [default: 20]

string · 既定値: 20
--cursor <CURSOR>

Pagination cursor returned by a previous call

string
--enable <FEATURE>

Enable a feature (repeatable). Equivalent to `-c features.<name>=true`

string · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
--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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-h, --help

Print help (see a summary with '-h') WARNING: proceeding, even though we could not create PATH aliases: No such file or directory (os error 2)

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
--sparse <PATH>

Sparse checkout path for Git marketplace sources. Can be repeated

path · 繰り返し可
--enable <FEATURE>

Enable a feature (repeatable). Equivalent to `-c features.<name>=true`

string · 繰り返し可
--json

Output add result as JSON

boolean
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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]

--remote-control

Launch the managed app-server with remote control enabled

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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-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 · 繰り返し可
--disable <FEATURE>

Disable a feature (repeatable). Equivalent to `-c features.<name>=false`

string · 繰り返し可
-h, --help

Print help (see a summary with '-h')

boolean

実験的 / 内部

codex execpolicy

Hidden runtime-working execpolicy surface; internal and unstable despite responding to --help.

conditional
codex execpolicy check

Hidden runtime-working execpolicy surface; internal and unstable despite responding to --help.

conditional

TUI / KEYBOARD FIRST

Slash commands

50 canonical / 53 accepted tokens
/permissions

Set what Codex can do without asking first. Relax or tighten approval requirements mid-session, such as switching between Auto and Read Only.

/ide

Include open files, current selection, and other IDE context. Pull editor context into the next prompt without re-explaining what's open in your IDE.

/keymap

Remap TUI keyboard shortcuts. Inspect and persist custom shortcut bindings in `config.toml`.

/vim

Toggle Vim mode for the composer. Switch between Vim normal/insert behavior and the default composer editing mode.

/setup-default-sandboxconditional

Set up the elevated agent sandbox (Windows only). Replace the degraded Windows sandbox after Codex offers the elevated setup.

/sandbox-add-read-dirconditional

Grant sandbox read access to an extra directory (Windows only). Unblock commands that need to read an absolute directory path outside the current readable roots.

/agent

Switch the active agent thread. Inspect or continue work in a spawned subagent thread.

エイリアス: /subagents
/appsconditional

Browse apps (connectors) and insert them into your prompt. Attach an app as `$app-slug` before asking Codex to use it.

/pluginsconditional

Browse installed and discoverable plugins. Inspect plugin tools, install suggested plugins, or manage plugin availability.

/hooks

View and manage lifecycle hooks. Inspect configured hooks, trust new or changed hooks, or disable non-managed hooks before they run.

/clear

Clear the terminal and start a fresh chat. Reset the visible UI and chat context together when you want a fresh start.

/rename

Rename the current chat. Give a saved session a recognizable name without leaving the TUI.

/archive

Archive the current session and exit Codex. Remove the current session from active session lists without deleting its transcript.

/delete

Permanently delete the current session and exit Codex. Remove the transcript and descendant sessions when archiving isn't enough.

/compact

Summarize the visible chat to free tokens. Use after long runs so Codex retains key points without blowing the context window.

/copy

Copy the latest completed Codex output. Grab the latest finished response or plan text without manually selecting it. You can also press `Ctrl+O`.

/diff

Show the Git diff, including files Git isn't tracking yet. Review Codex's edits before you commit or run tests.

/exit

Exit the CLI (same as `/quit`). Alternative spelling; both commands exit the session.

/experimental

Toggle experimental features. Enable options such as Network proxy or Prevent sleep while running.

/approve

Approve one retry of a recent auto review denial. Retry a command or action that the auto reviewer denied.

/memoriesconditional

Configure memory use and generation. Turn memory injection or memory generation on or off without leaving the TUI.

/skills

Browse and use skills. Improve task-specific behavior by selecting a relevant local skill.

/import

Import Claude Code setup, project files, and recent chats. Migrate supported external-agent artifacts into Codex configuration and local files.

/feedback

Send logs to the Codex maintainers. Report issues or share diagnostics with support.

/init

Generate an `AGENTS.md` scaffold in the current directory. Capture persistent instructions for the repository or subdirectory you're working in.

/logout

Sign out of Codex. Clear local credentials when using a shared machine.

/mcp

List configured Model Context Protocol (MCP) tools. Check which external tools Codex can call during the session; add `verbose` for server details.

/mention

Attach a file to the chat. Point Codex at specific files or folders you want it to inspect next.

/model

Choose the active model (and reasoning effort, when available). Switch between models such as `gpt-5.4-mini` and `gpt-5.5` before running a task.

/fastconditional

Toggle a Fast service tier when the model catalog exposes one. Turn the current model's Fast tier on or off and persist the selection.

/plan

Switch to plan mode and optionally send a prompt. Ask Codex to propose an execution plan before implementation work starts.

/goalconditional

Set, edit, pause, resume, view, or clear a task goal. Give Codex a persistent target to track while a larger task runs.

/personalityconditional

Choose a communication style for responses. Make Codex more concise, more explanatory, or more collaborative without changing your instructions.

/ps

Show background terminals and their recent output. Check long-running commands without leaving the main transcript.

/stop

Stop all background terminals. Cancel background terminal work started by the current session.

/fork

Fork the current chat into a new chat. Branch the active session to explore a new approach without losing the current transcript.

/appconditional

Continue the current session in the ChatGPT desktop app. Move from the TUI to the desktop app on macOS or Windows.

/side

Start an ephemeral side chat. Ask a focused follow-up without disrupting the main chat's transcript.

エイリアス: /btw
/raw

Toggle raw scrollback mode. Make terminal selection and copying less formatted while reviewing long output.

/resume

Resume a saved chat from your session list. Continue work from a previous CLI session without starting over.

/new

Start 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.

/quit

Exit the CLI. Leave the session immediately.

/review

Ask Codex to review your working tree. Run after Codex completes work or when you want a second set of eyes on local changes.

/status

Display session configuration and token usage. Confirm the active model, approval policy, writable roots, and remaining context capacity.

/usage

View account token usage or use a rate-limit reset. Inspect daily, weekly, or cumulative ChatGPT token activity from inside the TUI.

/debug-config

Print config layer and requirements diagnostics. Debug precedence and policy requirements, including experimental network constraints.

/statusline

Configure TUI status-line fields interactively. Pick and reorder footer items (model/context/limits/git/tokens/session) and persist in config.toml.

/title

Configure terminal window or tab title fields interactively. Pick and reorder title items such as project, status, thread, branch, model, and task progress.

/theme

Choose a syntax-highlighting theme. Preview and persist a terminal syntax-highlighting theme.

/petsconditional

Choose or hide a terminal pet. Personalize the TUI with a built-in or custom ambient pet.

エイリアス: /pet

USER + PROJECT / CONFIGURATION

config.toml

274 keys
agentsobject

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. 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. `on-failure` is deprecated; use `on-request` for interactive runs or `never` for non-interactive runs.

untrusted · on-request · never
approval_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_review
apps._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_review
apps._default.default_tools_approval_modeenum

Default approval behavior for app tools without per-app or per-tool overrides.

auto · prompt · writes · approve
apps._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_review
apps..default_tools_approval_modeenum

Default approval behavior for tools in this app unless a per-tool override exists.

auto · prompt · writes · approve
apps..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 · approve
apps..tools..enabledboolean

Per-tool enabled override for an app tool (for example `repos/list`).

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.

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-based auth.json vs OS keychain).

file · keyring · auto
compact_promptstring

Inline override for the history compaction prompt.

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.

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_stdin
desktop.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

Disable burst-paste detection in the 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).

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.enable_request_compressionboolean

Compress streaming request bodies with zstd when supported (stable; on by default).

features.fast_modeboolean

Enable model-catalog service tier selection in the TUI, including Fast-tier commands when the active model advertises them (stable; on by default).

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

Enable sandboxed networking. Use a table form when setting network policy options such as `domains` (experimental; off by default).

boolean · table
features.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

Enable sandboxed networking. Defaults to `false`.

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

Enable personality selection controls (stable; on by default).

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 the default `shell` tool for running commands (stable; on by default).

features.skill_mcp_dependency_installboolean

Allow prompting and installing missing MCP dependencies for skills (stable; on by default).

features.unified_execboolean

Use the unified PTY-backed exec tool (stable; enabled by default except on Windows).

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 · none
forced_chatgpt_workspace_idstring

Limit ChatGPT logins to a specific workspace identifier.

forced_login_methodenum

Restrict Codex to a specific authentication method.

chatgpt · api
hide_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 · none
hooksobject

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`, or `Stop`.

hooks.[].hooksarray

Hook handlers for a matcher group. Command hooks are currently supported; 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[].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.

mcp_oauth_callback_portinteger

Optional fixed port for the local HTTP callback server used during MCP OAuth login. When unset, Codex binds to an ephemeral port chosen by the OS.

mcp_oauth_callback_urlstring

Optional base callback URL override for MCP OAuth login (for example, a devbox ingress URL). Codex appends a server-specific callback ID before sending the final OAuth `redirect_uri`, so register the full derived URI with your provider. `mcp_oauth_callback_port` still controls the callback listener port.

mcp_oauth_credentials_storeenum

Preferred store for MCP OAuth credentials.

auto · file · keyring
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 · chatgpt
mcp_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 · approve
mcp_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 · remote
mcp_servers..http_headersobject

Static HTTP headers included with each MCP HTTP request.

mcp_servers..oauth_resourcestring

Optional RFC 8707 OAuth resource parameter to include during MCP login.

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 · approve
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-5.5`).

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_prefix
model_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..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..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_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_effortenum

Adjust reasoning effort for supported models (Responses API only; `xhigh` is model-dependent).

minimal · low · medium · high · xhigh
model_reasoning_summaryenum

Select reasoning summary detail or disable summaries entirely.

auto · concise · detailed · none
model_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 · high
notice.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 · ollama
otel.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-grpc
otel.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 · json
otel.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`).

none · statsig · otlp-http · otlp-grpc
otel.trace_exporterenum

Select the OpenTelemetry trace exporter and provide any endpoint metadata.

none · otlp-http · otlp-grpc
otel.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 · json
otel.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" · table
permissions..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 networking. Supports exact hosts, `*.example.com` for subdomains only, `.example.com` for apex plus subdomains, and global `*` allow rules. `deny` wins on conflicts.

permissions..network.domains.enum

Allow or deny an exact host or scoped wildcard pattern such as `*.example.com` or `.example.com`.

allow · deny
permissions..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 this named permissions profile. This changes the sandbox network policy; it does not start the network proxy by itself.

permissions..network.modeenum

Network proxy mode used for subprocess traffic.

limited · full
permissions..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 · deny
permissions..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

Default communication style for models that advertise `supportsPersonality`; can be overridden per thread/turn or via `/personality`.

none · friendly · pragmatic
plan_mode_reasoning_effortenum

Plan-mode-specific reasoning override. When unset, Plan mode uses its built-in preset default.

none · minimal · low · medium · high · xhigh
plugins..mcp_servers..default_tools_approval_modeenum

Default approval behavior for tools on a plugin-provided MCP server.

auto · prompt · writes · approve
plugins..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 · approve
project_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-access
sandbox_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

Glob patterns for removing environment variables after the defaults.

shell_environment_policy.experimental_use_profileboolean

Use the user shell profile when spawning subprocesses.

shell_environment_policy.ignore_default_excludesboolean

Keep variables containing KEY/SECRET/TOKEN before other filters run.

shell_environment_policy.include_onlyarray

Whitelist of patterns; when set only matching variables are kept.

shell_environment_policy.inheritenum

Baseline environment inheritance when spawning subprocesses.

all · core · none
shell_environment_policy.setobject

Explicit environment overrides injected into every subprocess.

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`.

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 legacy boolean form is still accepted, but the object form lets you set search context size, allowed domains, and approximate user location.

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 · never
tui.animationsboolean

Enable terminal animations (welcome screen, shimmer, spinner) (default: true).

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 · array
tui.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 · always
tui.notification_methodenum

Notification method for terminal notifications (default: auto).

auto · osc9 · bel
tui.notificationsenum

Enable TUI notifications; optionally restrict to specific event types.

boolean · array
tui.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 · session
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 · null
tui.terminal_titleenum

Ordered list of terminal window/tab title item identifiers. Defaults to `["spinner", "project"]`; `null` disables title updates.

array · null
tui.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 · live
windows_wsl_setup_acknowledgedboolean

Track Windows onboarding acknowledgement (Windows only).

windows.sandboxenum

Windows-only native sandbox mode when running Codex natively on Windows.

unelevated · elevated
windows.sandbox_private_desktopboolean

Run the final sandboxed child process on a private desktop by default on native Windows. Set `false` only for compatibility with the older `Winsta0\\Default` behavior.

ADMIN / ENFORCED REQUIREMENTS

requirements.toml

116 keys
allow_appshotsboolean

Set to `false` to disable Appshots for managed users. If omitted, Appshots remain unconstrained by requirements and follow normal product availability.

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 values for `approval_policy` (for example `untrusted`, `on-request`, `never`, and `granular`).

allowed_approvals_reviewersarray

Allowed values for `approvals_reviewer`, such as `user` and `auto_review`.

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`.

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 · approve
check_for_update_on_startupboolean

Enforce whether Codex checks for updates when it starts.

computer_useobject

Computer Use requirements enforced from `requirements.toml`.

computer_use.allow_locked_computer_useboolean

Set to `false` to prevent Computer Use from operating after a managed macOS device locks. If omitted, locked use remains unconstrained by requirements.

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

Network access requirements enforced from `requirements.toml`. These constraints are separate from `features.network_proxy` and can configure sandboxed networking without the user feature flag.

experimental_network.allow_local_bindingboolean

Permit broader local/private-network access for sandboxed networking. Exact local IP literal or `localhost` allow rules can still permit specific local targets when this stays `false`.

experimental_network.allow_upstream_proxyboolean

Allow sandboxed networking to chain through an upstream proxy from the environment.

experimental_network.allowed_domainsarray

List-shaped administrator allow rules for sandboxed networking. 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. `deny` wins on conflicts. Do not combine this with `experimental_network.allowed_domains` or `experimental_network.denied_domains`.

experimental_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 `true`, only administrator-managed allow rules remain effective while sandboxed networking requirements are active; user allowlist additions are ignored. Without managed allow rules, user-added domain allow rules do not remain effective.

experimental_network.socks_portinteger

Loopback SOCKS5 listener port to use for `[experimental_network]` requirements.

experimental_network.unix_socketsobject

Administrator-managed Unix socket policy for sandboxed networking.

featuresobject

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 Computer Use in browsers and Browser Agent availability.

features.browser_use_externalboolean

Set to `false` in `requirements.toml` to disable Computer Use in external browsers.

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.

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.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_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 hooks are currently supported; 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[].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.

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 · local
marketplaces.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 user-configured marketplace sources to match `allowed_sources` for marketplace add, plugin install, and configured Git marketplace refresh operations. Codex-managed OpenAI marketplaces remain allowed when their reserved source and name match. This doesn't filter already configured user marketplaces at runtime.

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 · table
mcp_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 · regex
mcp_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 · table
mcp_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 · regex
mcp_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.

modelsobject

Managed model defaults for new threads. These values take priority over user and project defaults, but an explicit selection for the new thread can override them.

models.new_threadobject

Defaults to apply when a new local thread starts. Each model setting is optional.

models.new_thread.modelstring

Default model for new threads. An explicit `--model` or model/reasoning `--config` override takes precedence.

models.new_thread.model_reasoning_effortstring

Default reasoning effort for new threads. An explicit model or reasoning-effort override skips both managed model fields.

models.new_thread.service_tierstring

Default service tier for new threads. An explicit service-tier override takes precedence independently of the model fields.

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 · table
plugins..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 · regex
plugins..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 · table
plugins..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 · regex
plugins..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 · forbidden
rules.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.allowed_sandbox_implementationsarray

Allowed native Windows sandbox implementations for `windows.sandbox` (`elevated` and `unelevated`). The list must not be empty. When both are allowed and no mode is selected, Codex prefers `elevated`.

windows.sandbox_private_desktopboolean

Enforce whether the native Windows sandbox starts its child process on a private desktop.

PROCESS / STABLE PUBLIC VARIABLES

環境変数

9 variables
CODEX_HOME

Sets the root for Codex state, including config, auth, logs, sessions, skills, and standalone package metadata. If you set it, the directory must already exist.

既定値: `~/.codex`
CODEX_SQLITE_HOME

Sets where SQLite-backed state is stored. The `sqlite_home` config option takes precedence. Relative paths resolve from the current working directory.

既定値: `CODEX_HOME`
CODEX_NON_INTERACTIVE

Set 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.

既定値: `false`
CODEX_INSTALL_DIR

Changes where the visible `codex` command is installed. The standalone package cache still lives under `CODEX_HOME/packages/standalone`.

既定値: `~/.local/bin` on macOS/Linux; `%LOCALAPPDATA%\Programs\OpenAI\Codex\bin` on Windows
CODEX_API_KEY

Provides an API key for a single non-interactive run. This is only supported in `codex exec`; set it inline rather than job-wide when running repository-controlled code.

CODEX_ACCESS_TOKEN

Provides a ChatGPT or Codex access token for trusted automation. For persisted login, pipe it to `codex login --with-access-token`.

CODEX_CA_CERTIFICATE

Points to a PEM CA bundle for environments with corporate TLS interception or private root CAs. Takes precedence over `SSL_CERT_FILE`.

SSL_CERT_FILE

Fallback PEM CA bundle path when `CODEX_CA_CERTIFICATE` is unset.

RUST_LOG

Controls Rust log filtering and verbosity. `codex exec` defaults to `error` output unless you set a more verbose value.

PROVENANCE / DO NOT COLLAPSE

Release の証拠

runtime-helpCodex 0.147.0 recursive helpofficial-docsOfficial Codex CLI and slash-command manualofficial-docsOfficial Codex configuration and environment manual