Skip to main content
Watch: I Built an AI App Without Leaving Databricks

CLI reference - 778 items

Codex CLI reference

Codex CLI documents 58 slash commands, 136 CLI flags, 54 subcommands, 14 keyboard shortcuts, 484 settings keys, 14 environment variables and 18 config files. This page lists all 778 with what each one does, the values it accepts and a working example where the docs give one.

Last verified 8 official pagesRun as codex

Codex CLI slash commands
CommandDescriptionExample
/permissions

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

Docs: /permissions
-no example
/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.

Docs: /ide
-no example
/keymap

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

Docs: /keymap
-no example
/vim

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

Docs: /vim
-no example
/setup-default-sandbox

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

Docs: /setup-default-sandbox
-no example
/agents

Open the agent command center. Browse chats and switch between agents on the connected server.

Docs: /agents
-no example
/subagents

Switch the active subagent thread. Inspect or continue work in a subagent from the current session.

Docs: /subagents
-no example
/apps

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

Docs: /apps
-no example
/plugins

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

Docs: /plugins
-no example
/hooks

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

Docs: /hooks
-no example
/clear

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

/clear [name]

Docs: /clear
/clear release prep
/rename

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

Docs: /rename
/rename <name>
/archive

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

Docs: /archive
-no example
/delete

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

Docs: /delete
-no example
/compact

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

Docs: /compact
-no example
/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.

Docs: /copy
-no example
/diff

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

Docs: /diff
-no example
/exit

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

same as /quit

Docs: /exit
-no example
/experimental

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

Docs: /experimental
-no example
/approve

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

Docs: /approve
-no example
/memories

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

Docs: /memories
-no example
/skills

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

Docs: /skills
-no example
/import

Import Claude Code or Cursor setup, projects, and chats. Migrate supported external-agent artifacts into Codex configuration and local files.

Docs: /import
-no example
/feedback

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

Docs: /feedback
-no example
/init

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

Docs: /init
-no example
/logout

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

Docs: /logout
-no example
/mcp

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

/mcp verbose; /mcp login <name>

Docs: /mcp
/mcp verbose
/mention

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

Docs: /mention
/mention src/lib/api.ts
/model

Choose the active model (and reasoning effort, when available). Use gpt-6-luna or gpt-6.1-sol if shown.

Docs: /model
-no example
/fast

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.

Docs: /fast
-no example
/plan

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

/plan [prompt]

Docs: /plan
/plan Propose a migration plan for this service
/goal

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

/goal <objective>, /goal edit, /goal pause, /goal resume, /goal clear; objectives must be non-empty and at most 4,000 characters

Docs: /goal
/goal Finish the migration and keep tests green
/ps

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

Docs: /ps
-no example
/stop

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

alias: /clean

Docs: /stop
-no example
/fork

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

Docs: /fork
-no example
/app

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

Docs: /app
-no example
/side

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

alias: /btw

Docs: /side
/side Check whether this plan has an obvious risk
/raw

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

/raw, /raw on, /raw off

Docs: /raw
/raw on
/resume

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

Docs: /resume
-no example
/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.

/new [name]

Docs: /new
/new bug bash
/quit

Exit the CLI. Leave the session immediately.

Docs: /quit
-no example
/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.

Docs: /review
-no example
/status

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

Docs: /status
-no example
/usage

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

/usage daily | weekly | cumulative

Docs: /usage
/usage daily
/debug-config

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

Docs: /debug-config
-no example
/statusline

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

Docs: /statusline
-no example
/title

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

Docs: /title
-no example
/theme

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

Docs: /theme
-no example
/pets

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

alias: /pet; /pets off

Docs: /pets
/pets off
/tui

Choose the terminal mode for the next launch. Switch between terminal scrollback and a fullscreen transcript.

Docs: /tui
-no example
/export

Export the conversation as Markdown. Save a complete transcript to a file or copy it to the clipboard.

/export [file]

Docs: /export
/export session.md
/recap

Generate a summary of the current conversation. Catch up on the chat without compacting its context.

Docs: /recap
-no example
/cd

Change the session’s working directory. Continue an idle primary chat in another directory.

/cd <path>; /cd alone uses your home directory

Docs: /cd
/cd <path>
/pwd

Show the working directory. Check the directory the active session uses.

alias: /cwd

Docs: /pwd
-no example
/worktree

Start or continue a chat in a managed Git worktree. Work in a separate checkout of a local repository.

Docs: /worktree
-no example
/daemon

Open background server controls. Inspect the connection and manage a local server owned by Codex.

Docs: /daemon
-no example
/warnings

View retained warnings and diagnostics. Revisit warnings that appeared during the session.

Docs: /warnings
-no example
/voice

Experimental /voice command in the Codex CLI. Admins can disable it by setting features.realtime_conversation to false in requirements.toml.

Docs: /voice
-no example
Codex CLI CLI flags
FlagDescriptionExample
--add-dir

Grant additional directories write access alongside the main workspace. Repeat for multiple paths.

path

Docs: --add-dir
-no example
--approve-for-me, --not-so-yolo

Use automatic approval review with on-request approvals and the workspace-write sandbox. Conflicts with --sandbox and --yolo; the interactive CLI also rejects --ask-for-approval.

boolean

Docs: --approve-for-me, --not-so-yolo
-no example
--ask-for-approval, -a

Control when Codex pauses for human approval before running a command.

on-request | never

Docs: --ask-for-approval, -a
codex --ask-for-approval never "Summarize the current instructions."
--cd, -C

Set the working directory for the agent before it starts processing your request.

path

Docs: --cd, -C
codex --cd services/payments --ask-for-approval never "List the instruction sources you loaded."
--config, -c

Override configuration values. Values parse as TOML if possible; otherwise the literal string is used.

key=value

Docs: --config, -c
codex --config model='"gpt-6.1-sol"'
--dangerously-bypass-approvals-and-sandbox, --yolo

Run every command without approvals or sandboxing. Only use inside an externally hardened environment.

boolean

Docs: --dangerously-bypass-approvals-and-sandbox, --yolo
-no example
--dangerously-bypass-hook-trust

Run enabled hooks without requiring persisted hook trust for this invocation. Intended only for automation that already vets hook sources.

boolean

Docs: --dangerously-bypass-hook-trust
-no example
--disable

Force-disable a feature flag (translates to -c features.<name>=false). Repeatable.

feature

Docs: --disable
-no example
--enable

Force-enable a feature flag (translates to -c features.<name>=true). Repeatable.

feature

Docs: --enable
codex --enable feature_a --enable feature_b
--image, -i

Attach one or more image files to the initial prompt. Separate multiple paths with commas or repeat the flag.

path[,path...]

Docs: --image, -i
-no example
--local-provider

Choose the local provider used with --oss, overriding oss_provider for this run.

lmstudio | ollama

Docs: --local-provider
-no example
--model, -m

Override the model set in configuration (for example gpt-6.1-sol).

string

Docs: --model, -m
codex --model gpt-6.1-sol
--no-alt-screen

Disable alternate screen mode for the TUI (overrides tui.alternate_screen for this run).

boolean

Docs: --no-alt-screen
-no example
--no-daemon

Run the interactive CLI without the shared background server. Can't be combined with --remote or codex agents.

boolean

Docs: --no-daemon
-no example
--oss

Use a local open source model provider. Codex uses --local-provider, your configured oss_provider, or prompts you to choose between LM Studio and Ollama.

boolean

Docs: --oss
-no example
--profile, -p

Layer $CODEX_HOME/profile-name.config.toml on top of the base user config.

string

Docs: --profile, -p
codex --profile deep-review
--remote

Connect to a remote app-server endpoint over WebSocket or a Unix socket. Supported for codex, codex agents, codex queue, codex resume, codex fork, codex archive, codex delete, and codex unarchive; other subcommands reject remote mode.

ws://host:port | wss://host:port | unix:// | unix://PATH

Docs: --remote
--remote ws://host:port
--remote-auth-token-env

Read a bearer token from this environment variable and send it when connecting with --remote. Requires --remote; tokens are only sent over wss:// URLs or local-only ws:// URLs.

ENV_VAR

Docs: --remote-auth-token-env
-no example
--sandbox, -s

Select the sandbox policy for model-generated shell commands.

read-only | workspace-write | danger-full-access

Docs: --sandbox, -s
--sandbox workspace-write --ask-for-approval on-request
--strict-config

Error when config.toml contains fields this Codex version does not recognize. Supported by runtime commands such as codex, exec, review, resume, fork, app-server, and exec-server.

boolean

Docs: --strict-config
-no example
--worktree

Start in a new managed Git worktree. Supports new interactive sessions, codex fork <SESSION_ID>, codex exec, and codex exec fork; requires local execution.

boolean

Docs: --worktree
-no example
PROMPT

Positional arg of codex: Optional text instruction to start the session. Omit to launch the TUI without a pre-filled message.

string

Docs: PROMPT
-no example
--analytics-default-enabled

codex app-server: Defaults analytics to enabled for first-party app-server clients unless the user opts out in config.

boolean

Docs: --analytics-default-enabled
-no example
--code-mode-host

codex app-server: Connect to a remote Code Mode host instead of starting a local host. This outbound connection is shared across threads and is separate from --listen; use wss:// for remote hosts.

ws://HOST/PATH | wss://HOST/PATH

Docs: --code-mode-host
--code-mode-host wss://code-mode.example.com/host
--listen

codex app-server: Transport listener URL. Use stdio:// for JSONL, ws://IP:PORT for a TCP WebSocket endpoint, unix:// for the default Unix socket, unix://PATH for a custom Unix socket, or off to disable the local transport.

stdio:// | ws://IP:PORT | unix:// | unix://PATH | off

Docs: --listen
codex app-server --listen ws://IP:PORT
--stdio

codex app-server: Use stdio transport. Equivalent to --listen stdio:// and mutually exclusive with --listen.

boolean

Docs: --stdio
-no example
--ws-audience

codex app-server: Expected aud claim for signed bearer tokens. Requires --ws-auth signed-bearer-token.

string

Docs: --ws-audience
-no example
--ws-auth

codex app-server: Authentication mode for app-server WebSocket clients. If omitted, WebSocket auth is disabled; non-local listeners warn during startup.

capability-token | signed-bearer-token

Docs: --ws-auth
-no example
--ws-issuer

codex app-server: Expected iss claim for signed bearer tokens. Requires --ws-auth signed-bearer-token.

string

Docs: --ws-issuer
-no example
--ws-max-clock-skew-seconds

codex app-server: Clock skew allowance when validating signed bearer token exp and nbf claims. Requires --ws-auth signed-bearer-token.

number

Docs: --ws-max-clock-skew-seconds
-no example
--ws-shared-secret-file

codex app-server: File containing the HMAC shared secret used to validate signed JWT bearer tokens. Required with --ws-auth signed-bearer-token.

absolute path

Docs: --ws-shared-secret-file
-no example
--ws-token-file

codex app-server: File containing the shared capability token. Use with --ws-auth capability-token unless you provide --ws-token-sha256 instead.

absolute path

Docs: --ws-token-file
-no example
--ws-token-sha256

codex app-server: Expected SHA-256 digest for capability-token authentication. Use instead of --ws-token-file when the client token comes from another source.

hexadecimal SHA-256 digest

Docs: --ws-token-sha256
-no example
--download-url

codex app: Advanced override for the ChatGPT desktop app installer URL used during install.

url

Docs: --download-url
-no example
PATH

Positional arg of codex app: Workspace path for the ChatGPT desktop app. On macOS, Codex opens this path; on Windows, Codex prints the path.

path

Docs: PATH
-no example
USER_MESSAGE

Positional arg of codex debug app-server send-message-v2: Message text sent to app-server through the built-in V2 test-client flow.

string

Docs: USER_MESSAGE
-no example
--bundled

codex debug models: Skip refresh and print only the model catalog bundled with the current Codex binary.

boolean

Docs: --bundled
-no example
--image, -i

codex debug prompt-input: Attach one or more images to the user prompt. Separate multiple paths with commas or repeat the flag.

path[,path...]

Docs: --image, -i
-no example
PROMPT

Positional arg of codex debug prompt-input: Optional user prompt appended after the session context.

string

Docs: PROMPT
-no example
TASK_ID

Positional arg of codex apply: Identifier of the Codex cloud chat whose diff should be applied.

string

Docs: TASK_ID
-no example
--base

codex review: Review changes against the specified base branch.

branch

Docs: --base
-no example
--commit

codex review: Review the changes introduced by the specified commit.

SHA

Docs: --commit
-no example
--strict-config

codex review: Error when config.toml contains fields this Codex version does not recognize.

boolean

Docs: --strict-config
-no example
--title

codex review: Set the commit title shown in the review summary. Requires --commit.

string

Docs: --title
-no example
--uncommitted

codex review: Review staged, unstaged, and untracked changes.

boolean

Docs: --uncommitted
-no example
PROMPT

Positional arg of codex review: Custom review instructions. Use - to read the instructions from stdin.

string | - (read stdin)

Docs: PROMPT
-no example
--remote

codex archive / codex unarchive: Connect to a remote app-server endpoint before changing archive state.

ws://host:port | wss://host:port | unix:// | unix://PATH

Docs: --remote
-no example
--remote-auth-token-env

codex archive / codex unarchive: Read a bearer token from this environment variable when --remote requires authentication.

ENV_VAR

Docs: --remote-auth-token-env
-no example
SESSION

Positional arg of codex archive / codex unarchive: Saved session to archive or restore. Session IDs take precedence over session names.

session ID | session name

Docs: SESSION
codex archive <SESSION> codex unarchive <SESSION>
--force

codex delete: Delete without prompting. The session argument must be a UUID; names still require interactive confirmation.

boolean

Docs: --force
codex delete <SESSION_UUID> --force
--remote

codex delete: Connect to a remote app-server endpoint before deleting the session.

ws://host:port | wss://host:port | unix:// | unix://PATH

Docs: --remote
-no example
--remote-auth-token-env

codex delete: Read a bearer token from this environment variable when --remote requires authentication.

ENV_VAR

Docs: --remote-auth-token-env
-no example
SESSION

Positional arg of codex delete: Saved session to delete. Session IDs take precedence over session names.

session ID | session name

Docs: SESSION
codex delete <SESSION>
--attempts

codex cloud: Number of assistant attempts (best-of-N) Codex cloud should run.

1-4

Docs: --attempts
-no example
--env

codex cloud: Target Codex cloud environment identifier (required). Use codex cloud to list options.

ENV_ID

Docs: --env
-no example
QUERY

Positional arg of codex cloud: Task prompt. If omitted, Codex prompts interactively for details.

string

Docs: QUERY
-no example
--cursor

codex cloud list: Pagination cursor returned by a previous request.

string

Docs: --cursor
-no example
--env

codex cloud list: Filter tasks by environment identifier.

ENV_ID

Docs: --env
-no example
--json

codex cloud list: Emit machine-readable JSON instead of plain text.

boolean

Docs: --json
-no example
--limit

codex cloud list: Maximum number of tasks to return.

1-20

Docs: --limit
-no example
SHELL

Positional arg of codex completion: Shell to generate completions for. Output prints to stdout.

bash | zsh | fish | power-shell | elvish

Docs: SHELL
codex completion zsh > "${fpath[1]}/_codex"
--all

codex doctor: Expand long lists in the detailed human-readable report.

boolean

Docs: --all
-no example
--ascii

codex doctor: Use ASCII status labels and separators in human-readable output.

boolean

Docs: --ascii
-no example
--json

codex doctor: Emit a redacted machine-readable support report.

boolean

Docs: --json
-no example
--no-color

codex doctor: Disable ANSI color in human-readable output.

boolean

Docs: --no-color
-no example
--summary

codex doctor: Show grouped check rows and the final count summary only.

boolean

Docs: --summary
-no example
--approve-for-me, --not-so-yolo

codex exec: Use automatic approval review with on-request approvals and the workspace-write sandbox. Conflicts with --sandbox and --yolo; the interactive CLI also rejects --ask-for-approval.

boolean

Docs: --approve-for-me, --not-so-yolo
-no example
--cd, -C

codex exec: Set the workspace root before executing the task.

path

Docs: --cd, -C
-no example
--color

codex exec: Control ANSI color in stdout.

always | never | auto

Docs: --color
-no example
--dangerously-bypass-approvals-and-sandbox, --yolo

codex exec: Bypass approval prompts and sandboxing. Dangerous - only use inside an isolated runner.

boolean

Docs: --dangerously-bypass-approvals-and-sandbox, --yolo
-no example
--dangerously-bypass-hook-trust

codex exec: Run enabled hooks without requiring persisted hook trust for this invocation. Intended only for automation that already vets hook sources.

boolean

Docs: --dangerously-bypass-hook-trust
-no example
--ephemeral

codex exec: Run without persisting session rollout files to disk.

boolean

Docs: --ephemeral
-no example
--ignore-rules

codex exec: Do not load user or project execpolicy .rules files for this run.

boolean

Docs: --ignore-rules
-no example
--ignore-user-config

codex exec: Do not load $CODEX_HOME/config.toml. Authentication still uses CODEX_HOME.

boolean

Docs: --ignore-user-config
-no example
--image, -i

codex exec: Attach images to the first message. Repeatable; supports comma-separated lists.

path[,path...]

Docs: --image, -i
-no example
--json, --experimental-json

codex exec: Print newline-delimited JSON events instead of formatted text.

boolean

Docs: --json, --experimental-json
-no example
--local-provider

codex exec: Choose the local provider used with --oss, overriding oss_provider for this run.

lmstudio | ollama

Docs: --local-provider
-no example
--model, -m

codex exec: Override the configured model for this run.

string

Docs: --model, -m
-no example
--oss

codex exec: Use a local open source provider. Codex uses --local-provider or your configured oss_provider, and exits with an error if neither is set.

boolean

Docs: --oss
-no example
--output-last-message, -o

codex exec: Write the assistant’s final message to a file. Useful for downstream scripting.

path

Docs: --output-last-message, -o
-no example
--output-schema

codex exec: JSON Schema file describing the expected final response shape. Codex validates tool output against it.

path

Docs: --output-schema
-no example
--profile, -p

codex exec: Layer $CODEX_HOME/profile-name.config.toml on top of the base user config.

string

Docs: --profile, -p
codex exec --profile deep-review "review this change"
--sandbox, -s

codex exec: Sandbox policy for model-generated commands. Defaults to configuration.

read-only | workspace-write | danger-full-access

Docs: --sandbox, -s
-no example
--skip-git-repo-check

codex exec: Allow running outside a Git repository (useful for one-off directories).

boolean

Docs: --skip-git-repo-check
-no example
--worktree

codex exec: Run a new or forked session in a managed Git worktree. Requires local execution; can't be combined with resume, review, --ephemeral, or --ignore-user-config.

boolean

Docs: --worktree
-no example
-c, --config

codex exec: Inline configuration override for the non-interactive run (repeatable).

key=value

Docs: -c, --config
-no example
PROMPT

Positional arg of codex exec: Initial instruction for the task. Use - to pipe the prompt from stdin.

string | - (read stdin)

Docs: PROMPT
-no example
--all

codex exec resume: Include sessions outside the current working directory when selecting the most recent session.

boolean

Docs: --all
-no example
--image, -i

codex exec resume: Attach one or more images to the follow-up prompt. Separate multiple paths with commas or repeat the flag.

path[,path...]

Docs: --image, -i
-no example
--last

codex exec resume: Resume the most recent chat from the current working directory.

boolean

Docs: --last
-no example
PROMPT

Positional arg of codex exec resume: Optional follow-up instruction sent immediately after resuming.

string | - (read stdin)

Docs: PROMPT
-no example
SESSION_ID

Positional arg of codex exec resume: Resume the specified session. Omit and use --last to continue the most recent session.

uuid | session name

Docs: SESSION_ID
-no example
--pretty

codex execpolicy: Pretty-print the JSON result.

boolean

Docs: --pretty
codex execpolicy check --pretty \ --rules ~/.codex/rules/default.rules \ -- gh pr view 7888 --json title,body,comments
--rules, -r

codex execpolicy: Path to an execpolicy rule file to evaluate. Provide multiple flags to combine rules across files.

path (repeatable)

Docs: --rules, -r
codex execpolicy check --pretty \ --rules ~/.codex/rules/default.rules \ -- gh pr view 7888 --json title,body,comments
COMMAND...

Positional arg of codex execpolicy: Command to be checked against the specified policies.

var-args

Docs: COMMAND...
-no example
--device-auth

codex login: Use OAuth device code flow instead of launching a browser window.

boolean

Docs: --device-auth
-no example
--with-access-token

codex login: Read an access token from stdin (for example printenv CODEX_ACCESS_TOKEN | codex login --with-access-token).

boolean

Docs: --with-access-token
printenv CODEX_ACCESS_TOKEN | codex login --with-access-token
--with-api-key

codex login: Read an API key from stdin (for example printenv OPENAI_API_KEY | codex login --with-api-key).

boolean

Docs: --with-api-key
printenv OPENAI_API_KEY | codex login --with-api-key
--bearer-token-env-var

codex mcp add: Environment variable whose value is sent as a bearer token when connecting to a streamable HTTP server.

ENV_VAR

Docs: --bearer-token-env-var
-no example
--env KEY=VALUE

codex mcp add: Environment variable assignments applied when launching a stdio server.

repeatable

Docs: --env KEY=VALUE
-no example
--oauth-client-id

codex mcp add: OAuth client identifier for a streamable HTTP MCP server. Requires --url.

CLIENT_ID

Docs: --oauth-client-id
-no example
--oauth-resource

codex mcp add: OAuth resource parameter to include during login for a streamable HTTP MCP server. Requires --url.

RESOURCE

Docs: --oauth-resource
-no example
--url

codex mcp add: Register a streamable HTTP server instead of stdio. Mutually exclusive with COMMAND....

https://…

Docs: --url
-no example
COMMAND...

Positional arg of codex mcp add: Executable plus arguments to launch the MCP server. Provide after --.

stdio transport

Docs: COMMAND...
-no example
--all

codex resume: Include sessions outside the current working directory when selecting the most recent session.

boolean

Docs: --all
-no example
--include-non-interactive

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

boolean

Docs: --include-non-interactive
-no example
--last

codex resume: Skip the picker and resume the most recent chat from the current working directory.

boolean

Docs: --last
-no example
SESSION_ID

Positional arg of codex resume: Resume the specified session. Omit and use --last to continue the most recent session.

uuid | session name

Docs: SESSION_ID
-no example
--all

codex fork: Show sessions beyond the current working directory in the picker.

boolean

Docs: --all
-no example
--last

codex fork: Skip the picker and fork the most recent chat automatically.

boolean

Docs: --last
-no example
SESSION_ID

Positional arg of codex fork: Fork the specified session. Omit and use --last to fork the most recent session.

uuid

Docs: SESSION_ID
-no example
--allow-unix-socket

codex sandbox (macOS seatbelt): Allow the sandboxed command to bind or connect Unix sockets rooted at this path. Repeat to allow multiple paths.

path

Docs: --allow-unix-socket
-no example
--cd, -C

codex sandbox (macOS seatbelt): Working directory used for profile resolution and command execution. Requires --permission-profile.

DIR

Docs: --cd, -C
-no example
--config, -c

codex sandbox (macOS seatbelt): Pass configuration overrides into the sandboxed run (repeatable).

key=value

Docs: --config, -c
-no example
--include-managed-config

codex sandbox (macOS seatbelt): Include managed requirements while resolving an explicit permissions profile. Requires --permission-profile.

boolean

Docs: --include-managed-config
-no example
--log-denials

codex sandbox (macOS seatbelt): Capture macOS sandbox denials with log stream while the command runs and print them after exit.

boolean

Docs: --log-denials
-no example
--permission-profile, -P

codex sandbox (macOS seatbelt): Apply a named permissions profile from the active configuration stack.

NAME

Docs: --permission-profile, -P
-no example
--profile, -p

codex sandbox (macOS seatbelt): Layer $CODEX_HOME/NAME.config.toml on top of the base user config.

NAME

Docs: --profile, -p
-no example
COMMAND...

Positional arg of codex sandbox (macOS seatbelt): Shell command to execute under macOS Seatbelt. Everything after -- is forwarded.

var-args

Docs: COMMAND...
-no example
--cd, -C

codex sandbox (Linux sandbox): Working directory used for profile resolution and command execution. Requires --permission-profile.

DIR

Docs: --cd, -C
-no example
--config, -c

codex sandbox (Linux sandbox): Configuration overrides applied before launching the sandbox (repeatable).

key=value

Docs: --config, -c
-no example
--include-managed-config

codex sandbox (Linux sandbox): Include managed requirements while resolving an explicit permissions profile. Requires --permission-profile.

boolean

Docs: --include-managed-config
-no example
--permission-profile, -P

codex sandbox (Linux sandbox): Apply a named permissions profile from the active configuration stack.

NAME

Docs: --permission-profile, -P
-no example
--profile, -p

codex sandbox (Linux sandbox): Layer $CODEX_HOME/NAME.config.toml on top of the base user config.

NAME

Docs: --profile, -p
-no example
COMMAND...

Positional arg of codex sandbox (Linux sandbox): Command to execute with bubblewrap filesystem isolation and seccomp filtering. Provide the executable after --.

var-args

Docs: COMMAND...
-no example
--cd, -C

codex sandbox (Windows): Working directory used for profile resolution and command execution. Requires --permission-profile.

DIR

Docs: --cd, -C
-no example
--config, -c

codex sandbox (Windows): Configuration overrides applied before launching the sandbox (repeatable).

key=value

Docs: --config, -c
-no example
--include-managed-config

codex sandbox (Windows): Include managed requirements while resolving an explicit permissions profile. Requires --permission-profile.

boolean

Docs: --include-managed-config
-no example
--permission-profile, -P

codex sandbox (Windows): Apply a named permissions profile from the active configuration stack.

NAME

Docs: --permission-profile, -P
-no example
--profile, -p

codex sandbox (Windows): Layer $CODEX_HOME/NAME.config.toml on top of the base user config.

NAME

Docs: --profile, -p
-no example
COMMAND...

Positional arg of codex sandbox (Windows): Command to execute under the native Windows sandbox. Provide the executable after --.

var-args

Docs: COMMAND...
-no example
--thread

codex queue: Session to queue the message for; accepts a UUID or exact session name. Use a UUID when sessions share the same name.

UUID | exact session name

Docs: --thread
codex queue --thread <SESSION_ID> --message "Run the remaining checks"
--message

codex queue: Text message to queue for the existing session; image attachments are not supported.

string

Docs: --message
codex queue --thread <SESSION_ID> --message "Run the remaining checks"
--json

codex remote-control: Machine-readable output for any remote-control command.

boolean

Docs: --json
-no example
--no-daemon

codex remote-control: Run remote control in the foreground explicitly. Applies only to the bare remote-control command; do not combine it with start, stop, or pair.

boolean

Docs: --no-daemon
codex remote-control --no-daemon
Codex CLI subcommands
CommandDescriptionExample
codex

Launch the terminal UI. Accepts the global flags above plus an optional prompt or image attachments.

Maturity: Stable

Docs: codex
-no example
codex agents

Open the agent command center on a shared local or remote server.

Maturity: Stable

Docs: codex agents
-no example
codex app

Launch the ChatGPT desktop app on macOS or Windows. On macOS, Codex can open a workspace path; on Windows, Codex prints the path to open.

Maturity: Stable

Docs: codex app
-no example
codex app-server

Launch the Codex app server for local development or debugging over stdio, WebSocket, or a Unix socket.

Maturity: Experimental

Docs: codex app-server
codex app-server --listen ws://IP:PORT
codex apply

Apply the latest diff generated by a Codex cloud chat to your local working tree. Alias: codex a.

Maturity: Stable; alias: codex a

Docs: codex apply
-no example
codex archive

Archive a saved interactive session by session ID or session name.

Maturity: Stable

Docs: codex archive
codex archive <SESSION>
codex cloud

Browse or execute Codex cloud chats from the terminal without opening the TUI. Alias: codex cloud-tasks.

Maturity: Experimental; alias: codex cloud-tasks

Docs: codex cloud
-no example
codex completion

Generate shell completion scripts for Bash, Zsh, Fish, or PowerShell.

Maturity: Stable

Docs: codex completion
codex completion zsh
codex debug app-server send-message-v2

Debug app-server by sending a single V2 message through the built-in test client.

Maturity: Experimental

Docs: codex debug app-server send-message-v2
-no example
codex debug models

Print the raw model catalog Codex sees, including an option to inspect only the bundled catalog.

Maturity: Experimental

Docs: codex debug models
-no example
codex debug prompt-input

Render the model-visible prompt input list as JSON, optionally with a prompt and images.

Maturity: Experimental

Docs: codex debug prompt-input
-no example
codex delete

Permanently delete a saved interactive session by session ID or session name.

Maturity: Stable

Docs: codex delete
codex delete <SESSION> codex delete <SESSION_UUID> --force
codex doctor

Generate a diagnostic report for local installation, config, auth, runtime, Git, terminal, app-server, and thread inventory issues.

Maturity: Stable

Docs: codex doctor
-no example
codex exec

Run Codex non-interactively. Alias: codex e.

Maturity: Stable; alias: codex e

Docs: codex exec
-no example
codex execpolicy

Evaluate execpolicy rule files and see whether a command would be allowed, prompted, or blocked.

Maturity: Experimental

Docs: codex execpolicy
codex execpolicy check --pretty \ --rules ~/.codex/rules/default.rules \ -- gh pr view 7888 --json title,body,comments
codex features

List feature flags and persistently enable or disable them in config.toml.

Maturity: Stable

Docs: codex features
-no example
codex fork

Fork a previous interactive session into a new chat, preserving the original transcript.

Maturity: Stable

Docs: codex fork
-no example
codex login

Authenticate Codex using ChatGPT OAuth, device auth, an API key, or an access token piped over stdin.

Maturity: Stable

Docs: codex login
-no example
codex logout

Remove stored authentication credentials.

Maturity: Stable

Docs: codex logout
-no example
codex mcp

Manage Model Context Protocol servers (list, add, remove, authenticate).

Maturity: Stable

Docs: codex mcp
-no example
codex plugin

Install, list, and remove plugins from configured marketplace sources.

Maturity: Stable

Docs: codex plugin
-no example
codex plugin marketplace

Add, list, upgrade, or remove plugin marketplaces from Git or local sources.

Maturity: Stable

Docs: codex plugin marketplace
-no example
codex queue

Queue a text message for an existing session by UUID or exact name.

Maturity: Stable

Docs: codex queue
codex queue --thread <SESSION_ID> --message "Run the remaining checks"
codex remote-control

Run or manage remote control for the local app-server, or create a short-lived pairing code.

Maturity: Experimental

Docs: codex remote-control
-no example
codex resume

Continue a previous interactive session by ID or resume the most recent chat.

Maturity: Stable

Docs: codex resume
-no example
codex review

Run a non-interactive review of uncommitted changes, a base branch diff, a commit, or custom review instructions.

Maturity: Stable

Docs: codex review
-no example
codex sandbox

Run arbitrary commands inside Codex-provided macOS, Linux, or Windows sandboxes.

Maturity: Stable

Docs: codex sandbox
-no example
codex unarchive

Restore an archived interactive session by session ID or session name.

Maturity: Stable

Docs: codex unarchive
codex unarchive <SESSION>
codex update

Check for and apply a Codex CLI update when the installed release supports self-update.

Maturity: Stable

Docs: codex update
-no example
codex features disable

Persistently disable a feature flag in $CODEX_HOME/config.toml.

codex features disable <feature>

Docs: codex features disable
-no example
codex features enable

Persistently enable a feature flag in $CODEX_HOME/config.toml.

codex features enable <feature>

Docs: codex features enable
-no example
codex features list

Show known feature flags, their maturity stage, and their effective state.

codex features list

Docs: codex features list
-no example
codex exec resume

Resume an exec session by ID or add --last to continue the most recent session from the current working directory. Add --all to consider sessions from any directory.

codex exec resume [SESSION_ID]

Docs: codex exec resume
-no example
codex login status

Print the active authentication mode and exit with 0 when logged in.

codex login status

Docs: codex login status
-no example
codex mcp add

Register a server using a stdio launcher command or a streamable HTTP URL. Supports --env KEY=VALUE for stdio transports.

add <name> -- <command...> | --url <value>

Docs: codex mcp add
-no example
codex mcp get

Show a specific server configuration. --json prints the raw config entry.

get <name> --json

Docs: codex mcp get
-no example
codex mcp list

List configured MCP servers. Add --json for machine-readable output.

list --json

Docs: codex mcp list
-no example
codex mcp login

Start an OAuth login for a streamable HTTP server (servers that support OAuth only).

login <name> --scopes scope1,scope2

Docs: codex mcp login
-no example
codex mcp logout

Remove stored OAuth credentials for a streamable HTTP server.

logout <name>

Docs: codex mcp logout
-no example
codex mcp remove

Delete a stored MCP server definition.

remove <name>

Docs: codex mcp remove
-no example
codex plugin add

Install a plugin from a configured marketplace. Use --marketplace or -m when the plugin argument omits @marketplace.

add <plugin[@marketplace]> [--marketplace, -m NAME] [--json]

Docs: codex plugin add
-no example
codex plugin list

List installed plugins. With --json, output has installed and available arrays; --available includes uninstalled marketplace plugins and requires --json.

list [--marketplace, -m NAME] [--available --json] [--json]

Docs: codex plugin list
-no example
codex plugin remove

Remove an installed plugin from local config and cache. Use --json for automation-friendly output.

remove <plugin[@marketplace]> [--marketplace, -m NAME] [--json]

Docs: codex plugin remove
-no example
codex plugin marketplace add

Install a plugin marketplace from GitHub shorthand, a Git URL, an SSH URL, or a local marketplace root directory. --sparse is supported only for Git sources and can be repeated.

add <source> [--ref REF] [--sparse PATH] [--json]

Docs: codex plugin marketplace add
-no example
codex plugin marketplace list

Show plugin marketplaces Codex is currently considering and the root path for each marketplace.

list [--json]

Docs: codex plugin marketplace list
-no example
codex plugin marketplace remove

Remove a configured plugin marketplace.

remove <marketplace-name> [--json]

Docs: codex plugin marketplace remove
-no example
codex plugin marketplace upgrade

Refresh one configured Git marketplace, or all configured Git marketplaces when no name is provided.

upgrade [marketplace-name] [--json]

Docs: codex plugin marketplace upgrade
-no example
codex cloud exec

Submits a Codex cloud task directly from the terminal (the default codex cloud command opens an interactive picker).

Docs: codex cloud exec
-no example
codex cloud list

List recent cloud chats with optional filtering and pagination.

Docs: codex cloud list
-no example
codex remote-control start

Start the local app-server daemon with remote control enabled.

Docs: codex remote-control start
-no example
codex remote-control stop

Stop the local app-server daemon started for remote control.

Docs: codex remote-control stop
-no example
codex remote-control pair

After the daemon is running, create and print a short-lived manual pairing code. With --json, the response includes pairingCode, manualPairingCode, environmentId, and expiresAt.

Docs: codex remote-control pair
-no example
codex execpolicy check

Evaluate one or more --rules files against a command and emit JSON showing the strictest decision and any matching rules. The execpolicy command is currently in preview.

[--pretty] --rules <path> -- <command...>

Docs: codex execpolicy check
codex execpolicy check --pretty \ --rules ~/.codex/rules/default.rules \ -- gh pr view 7888 --json title,body,comments
codex exec fork

codex exec can resume sessions or fork them into new sessions; codex exec fork is listed among the commands that support --worktree (requires local execution).

Docs: codex exec fork
-no example
Codex CLI keyboard shortcuts
ShortcutDescription
@

Type @ to search for a file in the workspace and add its path to the prompt.

Docs: @
Up / Down

Press Up or Down to restore draft history.

Docs: Up / Down
Ctrl+R

Search prompt history, then press Enter to use a match or Escape to cancel.

Docs: Ctrl+R
Ctrl+O

Copy the latest completed Codex output from the main TUI (same as /copy).

Docs: Ctrl+O
!

Prefix a line with ! to run a local shell command under the current approval and sandbox settings.

Docs: !
Tab (while Codex is working)

Queue a follow-up prompt, slash command, or shell command for the next turn.

Docs: Tab (while Codex is working)
Enter (while Codex is working)

Inject new instructions into the current turn.

Docs: Enter (while Codex is working)
Escape Escape

Press Escape twice with an empty composer to edit the previous user message and fork the chat from that point.

Docs: Escape Escape
Ctrl+C

Close the session (same as /exit).

Docs: Ctrl+C
Ctrl+L

Clears only the terminal view and keeps the current chat (unlike /clear, which starts a new chat). Disabled while a task is in progress.

Docs: Ctrl+L
Alt+R

Default binding to toggle raw scrollback mode (same as /raw).

Docs: Alt+R
/

Type / in the composer to open the slash command popup.

Docs: /
Space (in /plugins)

Press Space on an installed plugin in the plugin browser to toggle its enabled state.

Docs: Space (in /plugins)
Ctrl+G

Open the editor configured by VISUAL (or EDITOR when VISUAL is not set) to write a longer prompt; save and close to return the text to the composer.

Docs: Ctrl+G
Codex CLI settings keys
KeyDescriptionExample
agents

Multi-agent settings and custom role declarations.

table

Docs: agents
-no example
agents.<name>.config_file

Path to a TOML config layer for that role; relative paths resolve from the config file that declares the role.

string (path)

Docs: agents.<name>.config_file
-no example
agents.<name>.description

Role guidance shown to Codex when choosing and spawning that agent type.

string

Docs: agents.<name>.description
-no example
agents.default_subagent_model

Default model for spawned agents. An explicit spawn model takes precedence.

string

Docs: agents.default_subagent_model
-no example
agents.default_subagent_reasoning_effort

Default reasoning effort for spawned agents.

string

Docs: agents.default_subagent_reasoning_effort
-no example
agents.enabled

Enable or disable multi-agent tools (default: true).

boolean

Docs: agents.enabled
-no example
agents.interrupt_message

Record a model-visible message when an agent turn is interrupted (default: true).

boolean

Docs: agents.interrupt_message
-no example
agents.max_concurrent_threads_per_session

Maximum number of spawned-agent threads that can be open concurrently, excluding the primary thread.

number

Docs: agents.max_concurrent_threads_per_session
-no example
agents.max_threads

Legacy alias for agents.max_concurrent_threads_per_session.

number

Docs: agents.max_threads
-no example
allow_login_shell

Allow shell-based tools to use login-shell semantics.

boolean

Docs: allow_login_shell
-no example
analytics.enabled

Enable or disable analytics for this machine/profile.

boolean

Docs: analytics.enabled
-no example
approval_policy

Controls when Codex pauses for approval before executing commands.

on-request | never | { granular = { sandbox_approval = bool, rules = bool, mcp_elicitations = bool, request_permissions = bool, skill_approval = bool } }

Docs: approval_policy
approval_policy = "on-request"
approval_policy.granular.mcp_elicitations

When true, MCP elicitation prompts are allowed to surface instead of being auto-rejected.

boolean

Docs: approval_policy.granular.mcp_elicitations
-no example
approval_policy.granular.request_permissions

When true, prompts from the request_permissions tool are allowed to surface.

boolean

Docs: approval_policy.granular.request_permissions
-no example
approval_policy.granular.rules

When true, approvals triggered by execpolicy prompt rules are allowed to surface.

boolean

Docs: approval_policy.granular.rules
-no example
approval_policy.granular.sandbox_approval

When true, sandbox escalation approval prompts are allowed to surface.

boolean

Docs: approval_policy.granular.sandbox_approval
-no example
approval_policy.granular.skill_approval

When true, skill-script approval prompts are allowed to surface.

boolean

Docs: approval_policy.granular.skill_approval
-no example
approvals_reviewer

Who reviews eligible approval prompts under on-request or granular approval policies.

user | auto_review

Docs: approvals_reviewer
-no example
apps._default.approvals_reviewer

Default reviewer for app tool approval prompts unless overridden per app.

user | auto_review

Docs: apps._default.approvals_reviewer
-no example
apps._default.default_tools_approval_mode

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

auto | prompt | writes | approve

Docs: apps._default.default_tools_approval_mode
-no example
apps._default.destructive_enabled

Default allow/deny for app tools with destructive_hint = true.

boolean

Docs: apps._default.destructive_enabled
-no example
apps._default.enabled

Default app enabled state for all apps unless overridden per app.

boolean

Docs: apps._default.enabled
-no example
apps._default.open_world_enabled

Default allow/deny for app tools with open_world_hint = true.

boolean

Docs: apps._default.open_world_enabled
-no example
apps.<id>.approvals_reviewer

Reviewer for this app's tool approval prompts.

user | auto_review

Docs: apps.<id>.approvals_reviewer
-no example
apps.<id>.default_tools_approval_mode

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

auto | prompt | writes | approve

Docs: apps.<id>.default_tools_approval_mode
-no example
apps.<id>.default_tools_enabled

Default enabled state for tools in this app unless a per-tool override exists.

boolean

Docs: apps.<id>.default_tools_enabled
-no example
apps.<id>.destructive_enabled

Allow or block tools in this app that advertise destructive_hint = true.

boolean

Docs: apps.<id>.destructive_enabled
-no example
apps.<id>.enabled

Enable or disable a specific app/connector by id (default: true).

boolean

Docs: apps.<id>.enabled
-no example
apps.<id>.open_world_enabled

Allow or block tools in this app that advertise open_world_hint = true.

boolean

Docs: apps.<id>.open_world_enabled
-no example
apps.<id>.tools.<tool>.approval_mode

Per-tool approval behavior override for a single app tool.

auto | prompt | writes | approve

Docs: apps.<id>.tools.<tool>.approval_mode
-no example
apps.<id>.tools.<tool>.enabled

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

boolean

Docs: apps.<id>.tools.<tool>.enabled
-no example
auto_review.extra_policy

Additional local Markdown policy for automatic review, included alongside the main policy.

string

Docs: auto_review.extra_policy
-no example
auto_review.policy

Local Markdown policy instructions for automatic review.

string

Docs: auto_review.policy
-no example
background_terminal_max_timeout

Maximum poll window in milliseconds for empty write_stdin polls (background terminal polling).

number

Docs: background_terminal_max_timeout
-no example
browser_use.allow_history_access

Set to false to restrict browser-history access.

boolean

Docs: browser_use.allow_history_access
-no example
browser_use.default_origin_policy

Fallback browser-origin restrictions. Supports access, uploads, downloads, and full_cdp_access, each set to allow or deny.

table

Docs: browser_use.default_origin_policy
-no example
browser_use.origins.<origin>

Per-origin browser restrictions with the same fields as browser_use.default_origin_policy.

table

Docs: browser_use.origins.<origin>
-no example
chatgpt_base_url

Override the base URL used during the ChatGPT login flow.

string

Docs: chatgpt_base_url
-no example
check_for_update_on_startup

Check for Codex updates on startup (set to false only when updates are centrally managed).

boolean

Docs: check_for_update_on_startup
-no example
cli_auth_credentials_store

Control where the CLI stores cached credentials.

file | keyring | auto | ephemeral

Docs: cli_auth_credentials_store
-no example
compact_prompt

Inline override for the history compaction prompt.

string

Docs: compact_prompt
-no example
computer_use.default_app_access

Fallback native-app access policy for Computer Use.

allow | deny

Docs: computer_use.default_app_access
-no example
computer_use.macos.bundle_ids

Native macOS app access keyed by bundle identifier.

map<string, allow | deny>

Docs: computer_use.macos.bundle_ids
-no example
computer_use.windows.always_allowed_app_ids

Windows app identifiers that Computer Use can open without prompting.

array<string>

Docs: computer_use.windows.always_allowed_app_ids
-no example
computer_use.windows.aumids

Packaged Windows app access keyed by Application User Model ID (AUMID).

map<string, allow | deny>

Docs: computer_use.windows.aumids
-no example
computer_use.windows.exes

Windows executable access rules. Each rule requires publisher_name, product_name, and access (allow or deny); binary_name is optional.

array<table>

Docs: computer_use.windows.exes
-no example
default_permissions

Name of the default permissions profile to apply to sandboxed tool calls.

string

Docs: default_permissions
-no example
desktop.custom_file_handlers.<id>

User-level only. Defines an additional **Open in** target for the ChatGPT desktop app.

table

Docs: desktop.custom_file_handlers.<id>
-no example
desktop.custom_file_handlers.<id>.args

Arguments inserted between the command and file input (default: []).

array<string>

Docs: desktop.custom_file_handlers.<id>.args
-no example
desktop.custom_file_handlers.<id>.command

Executable path or command name to detect and launch.

string

Docs: desktop.custom_file_handlers.<id>.command
-no example
desktop.custom_file_handlers.<id>.icon

Bundled asset path, Base64-encoded data:image/... URL, file URI, or absolute local path for the handler icon.

string

Docs: desktop.custom_file_handlers.<id>.icon
-no example
desktop.custom_file_handlers.<id>.input

How the app sends file input to the handler (default: path).

path | json_argument | json_stdin

Docs: desktop.custom_file_handlers.<id>.input
-no example
desktop.custom_file_handlers.<id>.label

Display name shown in **Open in** menus.

string

Docs: desktop.custom_file_handlers.<id>.label
-no example
desktop.custom_file_handlers.<id>.supports_ssh

Offer the handler for files in SSH workspaces (default: false).

boolean

Docs: desktop.custom_file_handlers.<id>.supports_ssh
-no example
developer_instructions

Additional developer instructions injected into the session (optional).

string

Docs: developer_instructions
-no example
disable_paste_burst

Legacy fallback for tui.disable_paste_burst.

boolean

Docs: disable_paste_burst
-no example
experimental_compact_prompt_file

Load the compaction prompt override from a file (experimental).

string (path)

Docs: experimental_compact_prompt_file
-no example
experimental_use_unified_exec_tool

Legacy name for enabling unified exec; prefer [features].unified_exec or codex --enable unified_exec.

boolean

Docs: experimental_use_unified_exec_tool
-no example
features.apps

Enable app (connector) integrations (stable; on by default).

boolean

Docs: features.apps
-no example
features.code_mode.direct_only_tool_namespaces

Tool namespaces code mode can use only through direct tool calls.

array<string>

Docs: features.code_mode.direct_only_tool_namespaces
-no example
features.code_mode.enabled

Enable code mode feature configuration. This feature is under development and off by default.

boolean

Docs: features.code_mode.enabled
-no example
features.code_mode.excluded_tool_namespaces

Tool namespaces code mode excludes from nested code-mode tool guidance and executor exposure.

array<string>

Docs: features.code_mode.excluded_tool_namespaces
-no example
features.context_management.experimental_mode

Experimental context-management setting.

boolean

Docs: features.context_management.experimental_mode
-no example
features.enable_request_compression

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

boolean

Docs: features.enable_request_compression
-no example
features.fast_mode

Enable Fast mode controls advertised by the active model (stable; on by default), independently of features.ultrafast_mode.

boolean

Docs: features.fast_mode
-no example
features.goals

Enable persisted goals and automatic continuation (stable; on by default).

boolean

Docs: features.goals
-no example
features.hooks

Enable lifecycle hooks loaded from hooks.json or inline [hooks] config.

boolean

Docs: features.hooks
-no example
features.memories

Enable Memories (off by default).

boolean

Docs: features.memories
-no example
features.multi_agent

Enable multi-agent collaboration tools (spawn_agent, send_input, resume_agent, wait_agent, and close_agent) (stable; on by default).

boolean

Docs: features.multi_agent
-no example
features.network_proxy

Start the network proxy for sandboxed commands (experimental; off by default).

boolean | table

Docs: features.network_proxy
-no example
features.network_proxy.allow_local_binding

Allow broader local/private-network access.

boolean

Docs: features.network_proxy.allow_local_binding
-no example
features.network_proxy.allow_upstream_proxy

Allow chaining through an upstream proxy from the environment.

boolean

Docs: features.network_proxy.allow_upstream_proxy
-no example
features.network_proxy.dangerously_allow_all_unix_sockets

Permit arbitrary Unix socket destinations instead of allowlist-only access.

boolean

Docs: features.network_proxy.dangerously_allow_all_unix_sockets
-no example
features.network_proxy.dangerously_allow_non_loopback_proxy

Permit non-loopback listener addresses. Defaults to false; enabling it can expose proxy listeners beyond localhost.

boolean

Docs: features.network_proxy.dangerously_allow_non_loopback_proxy
-no example
features.network_proxy.domains

Domain policy for sandboxed networking. Unset by default, which means no external destinations are allowed until you add allow rules.

map<string, allow | deny>

Docs: features.network_proxy.domains
-no example
features.network_proxy.enable_socks5

Expose SOCKS5 support. Defaults to true.

boolean

Docs: features.network_proxy.enable_socks5
-no example
features.network_proxy.enable_socks5_udp

Allow UDP over SOCKS5. Defaults to true.

boolean

Docs: features.network_proxy.enable_socks5_udp
-no example
features.network_proxy.enabled

Start the sandboxed-command network proxy when command network access is enabled.

boolean

Docs: features.network_proxy.enabled
-no example
features.network_proxy.proxy_url

HTTP listener URL for sandboxed networking.

string

Docs: features.network_proxy.proxy_url
-no example
features.network_proxy.socks_url

SOCKS5 listener URL. Defaults to "http://127.0.0.1:8081".

string

Docs: features.network_proxy.socks_url
-no example
features.network_proxy.unix_sockets

Unix socket policy for sandboxed networking.

map<string, allow | deny>

Docs: features.network_proxy.unix_sockets
-no example
features.personality

Removed feature flag. Accepted for compatibility and ignored.

boolean

Docs: features.personality
-no example
features.prefer_mxc

Prefer MXC for local Windows execution when native capabilities and policy allow it; otherwise retain the configured legacy sandbox and setup.

boolean

Docs: features.prefer_mxc
[windows] sandbox = "elevated" # Legacy fallback [features] prefer_mxc = true
features.prevent_idle_sleep

Prevent the machine from sleeping while a turn is actively running (experimental; off by default).

boolean

Docs: features.prevent_idle_sleep
-no example
features.remote_plugin

Enable the remote plugin catalog (stable; on by default).

boolean

Docs: features.remote_plugin
-no example
features.rollout_budget.enabled

Enable rollout budget tracking. This feature is under development and off by default.

boolean

Docs: features.rollout_budget.enabled
-no example
features.rollout_budget.limit_tokens

Positive token limit for rollout budget tracking.

integer

Docs: features.rollout_budget.limit_tokens
-no example
features.rollout_budget.prefill_token_weight

Finite non-negative multiplier for prefill tokens in rollout budget accounting.

number

Docs: features.rollout_budget.prefill_token_weight
-no example
features.rollout_budget.reminder_interval_tokens

Positive token interval between rollout budget reminders.

integer

Docs: features.rollout_budget.reminder_interval_tokens
-no example
features.rollout_budget.sampling_token_weight

Finite non-negative multiplier for sampled tokens in rollout budget accounting.

number

Docs: features.rollout_budget.sampling_token_weight
-no example
features.shell_snapshot

Snapshot shell environment to speed up repeated commands (stable; on by default).

boolean

Docs: features.shell_snapshot
-no example
features.shell_tool

Enable command execution tools (stable; on by default).

boolean

Docs: features.shell_tool
-no example
features.skill_mcp_dependency_install

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

boolean

Docs: features.skill_mcp_dependency_install
-no example
features.ultrafast_mode

Enable Ultrafast mode controls (stable; on by default), independently of features.fast_mode.

boolean

Docs: features.ultrafast_mode
-no example
features.unified_exec

Use resumable command execution (stable; enabled on all platforms).

boolean

Docs: features.unified_exec
-no example
features.web_search_cached

Deprecated legacy toggle. When web_search is unset, true maps to web_search = "cached".

boolean

Docs: features.web_search_cached
-no example
features.web_search_request

Deprecated legacy toggle. When web_search is unset, true maps to web_search = "live".

boolean

Docs: features.web_search_request
-no example
feedback.enabled

Enable feedback submission via /feedback across local clients (default: true).

boolean

Docs: feedback.enabled
-no example
file_opener

URI scheme used to open citations from Codex output (default: vscode).

vscode | vscode-insiders | windsurf | cursor | none

Docs: file_opener
file_opener = "vscode" # or cursor, windsurf, vscode-insiders, none
forced_chatgpt_workspace_id

Limit ChatGPT logins to a specific workspace identifier.

string (uuid)

Docs: forced_chatgpt_workspace_id
-no example
forced_login_method

Restrict Codex to a specific authentication method.

chatgpt | api

Docs: forced_login_method
-no example
hide_agent_reasoning

Suppress reasoning events in both the TUI and codex exec output.

boolean

Docs: hide_agent_reasoning
-no example
history.max_bytes

If set, caps the history file size in bytes by dropping oldest entries.

number

Docs: history.max_bytes
[history] max_bytes = 104857600 # 100 MiB
history.persistence

Control whether Codex saves session transcripts to history.jsonl.

save-all | none

Docs: history.persistence
[history] persistence = "none"
hooks

Lifecycle hooks configured inline in config.toml.

table

Docs: hooks
-no example
hooks.<Event>

Matcher groups for hook events such as PreToolUse, PermissionRequest, PostToolUse, PreCompact, PostCompact, SessionStart, SessionEnd, SubagentStart, SubagentStop, UserPromptSubmit, Stop, or Interrupt.

array<table>

Docs: hooks.<Event>
-no example
hooks.<Event>[].hooks

Hook handlers for a matcher group. Command and MCP tool hooks are supported while prompt and agent hook handlers are parsed but skipped.

array<table>

Docs: hooks.<Event>[].hooks
-no example
hooks.<Event>[].hooks[].additionalContextLimit

Approximate per-handler token threshold for saving oversized additionalContext to disk and showing the model a shorter preview.

integer

Docs: hooks.<Event>[].hooks[].additionalContextLimit
-no example
hooks.<Event>[].hooks[].async

Run a command hook in the background without delaying the triggering operation.

boolean

Docs: hooks.<Event>[].hooks[].async
-no example
hooks.<Event>[].hooks[].commandWindows

Windows-only command override for command hooks.

string

Docs: hooks.<Event>[].hooks[].commandWindows
-no example
instructions

Reserved for future use; prefer model_instructions_file or AGENTS.md.

string

Docs: instructions
-no example
log_dir

Directory where Codex writes log files; defaults to $CODEX_HOME/log.

string (path)

Docs: log_dir
log_dir = "/absolute/path/to/codex-logs"
marketplaces.<name>.ref

Optional Git branch, tag, or commit for the marketplace.

string

Docs: marketplaces.<name>.ref
-no example
marketplaces.<name>.source

Git repository location or local marketplace root directory.

string

Docs: marketplaces.<name>.source
-no example
marketplaces.<name>.source_type

Source kind for a configured plugin marketplace.

git | local

Docs: marketplaces.<name>.source_type
-no example
marketplaces.<name>.sparse_paths

Optional sparse checkout paths for a Git marketplace.

array<string>

Docs: marketplaces.<name>.sparse_paths
-no example
mcp_oauth_callback_port

Optional global fixed port for the local HTTP callback server used during MCP OAuth login.

integer

Docs: mcp_oauth_callback_port
-no example
mcp_oauth_callback_url

Optional base callback URL for MCP OAuth login, such as a devbox ingress URL.

string

Docs: mcp_oauth_callback_url
-no example
mcp_oauth_credentials_store

Preferred store for MCP OAuth credentials.

auto | file | keyring

Docs: mcp_oauth_credentials_store
-no example
mcp_optional_startup_grace_ms

Shared wait for optional MCP servers when building the initial tool catalog.

integer (milliseconds)

Docs: mcp_optional_startup_grace_ms
-no example
mcp_servers.<id>.args

Arguments passed to the MCP stdio server command.

array<string>

Docs: mcp_servers.<id>.args
-no example
mcp_servers.<id>.auth

Authentication fallback for an MCP HTTP server after configured bearer tokens and authorization headers.

oauth | chatgpt

Docs: mcp_servers.<id>.auth
-no example
mcp_servers.<id>.bearer_token_env_var

Environment variable sourcing the bearer token for an MCP HTTP server.

string

Docs: mcp_servers.<id>.bearer_token_env_var
-no example
mcp_servers.<id>.command

Launcher command for an MCP stdio server.

string

Docs: mcp_servers.<id>.command
-no example
mcp_servers.<id>.cwd

Working directory for the MCP stdio server process.

string

Docs: mcp_servers.<id>.cwd
-no example
mcp_servers.<id>.default_tools_approval_mode

Default approval behavior for MCP tools on this server unless a per-tool override exists.

auto | prompt | writes | approve

Docs: mcp_servers.<id>.default_tools_approval_mode
-no example
mcp_servers.<id>.disabled_tools

Deny list applied after enabled_tools for the MCP server.

array<string>

Docs: mcp_servers.<id>.disabled_tools
-no example
mcp_servers.<id>.enabled

Disable an MCP server without removing its configuration.

boolean

Docs: mcp_servers.<id>.enabled
-no example
mcp_servers.<id>.enabled_tools

Allow list of tool names exposed by the MCP server.

array<string>

Docs: mcp_servers.<id>.enabled_tools
-no example
mcp_servers.<id>.env

Environment variables forwarded to the MCP stdio server.

map<string,string>

Docs: mcp_servers.<id>.env
-no example
mcp_servers.<id>.env_http_headers

HTTP headers populated from environment variables for an MCP HTTP server.

map<string,string>

Docs: mcp_servers.<id>.env_http_headers
-no example
mcp_servers.<id>.env_vars

Additional environment variables to whitelist for an MCP stdio server.

array<string | { name = string, source = "local" | "remote" }>

Docs: mcp_servers.<id>.env_vars
-no example
mcp_servers.<id>.experimental_environment

Experimental placement for an MCP server.

local | remote

Docs: mcp_servers.<id>.experimental_environment
-no example
mcp_servers.<id>.http_headers

Static HTTP headers included with each MCP HTTP request.

map<string,string>

Docs: mcp_servers.<id>.http_headers
-no example
mcp_servers.<id>.http_headers_helper

Local command that prints a JSON object of HTTP header names and values.

string (command)

Docs: mcp_servers.<id>.http_headers_helper
-no example
mcp_servers.<id>.oauth_resource

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

string

Docs: mcp_servers.<id>.oauth_resource
-no example
mcp_servers.<id>.oauth.callback_port

Fixed OAuth callback listener port for this MCP server.

integer

Docs: mcp_servers.<id>.oauth.callback_port
-no example
mcp_servers.<id>.oauth.callback_url

Server-specific OAuth callback. Pre-registered clients reuse it when issuer identification is supported or the URL already ends in the server-specific callback ID.

string

Docs: mcp_servers.<id>.oauth.callback_url
-no example
mcp_servers.<id>.oauth.client_id

Pre-registered OAuth client ID used for authorization and token exchange with this MCP server.

string

Docs: mcp_servers.<id>.oauth.client_id
-no example
mcp_servers.<id>.oauth.client_secret

OAuth client secret for token exchange with a pre-registered client.

string

Docs: mcp_servers.<id>.oauth.client_secret
-no example
mcp_servers.<id>.required

When true, fail startup/resume if this enabled MCP server cannot initialize.

boolean

Docs: mcp_servers.<id>.required
-no example
mcp_servers.<id>.scopes

OAuth scopes to request when authenticating to that MCP server.

array<string>

Docs: mcp_servers.<id>.scopes
-no example
mcp_servers.<id>.startup_timeout_ms

Alias for startup_timeout_sec in milliseconds.

number

Docs: mcp_servers.<id>.startup_timeout_ms
-no example
mcp_servers.<id>.startup_timeout_sec

Override the default 10s startup timeout for an MCP server.

number

Docs: mcp_servers.<id>.startup_timeout_sec
-no example
mcp_servers.<id>.tool_timeout_sec

Override the default 60s per-tool timeout for an MCP server.

number

Docs: mcp_servers.<id>.tool_timeout_sec
-no example
mcp_servers.<id>.tools.<tool>.approval_mode

Per-tool approval behavior override for one MCP tool on this server.

auto | prompt | writes | approve

Docs: mcp_servers.<id>.tools.<tool>.approval_mode
-no example
mcp_servers.<id>.tools.<tool>.output_token_limit

Token budget for one MCP tool's output, before the standard 20% serialization allowance.

integer (positive)

Docs: mcp_servers.<id>.tools.<tool>.output_token_limit
-no example
mcp_servers.<id>.url

Endpoint for an MCP streamable HTTP server.

string

Docs: mcp_servers.<id>.url
-no example
memories.consolidation_model

Optional model override for global memory consolidation.

string

Docs: memories.consolidation_model
-no example
memories.disable_on_external_context

When true, threads that use external context such as MCP tool calls, web search, or tool search are kept out of memory generation.

boolean

Docs: memories.disable_on_external_context
-no example
memories.extract_model

Optional model override for per-thread memory extraction.

string

Docs: memories.extract_model
-no example
memories.generate_memories

When false, newly created threads are not stored as memory-generation inputs.

boolean

Docs: memories.generate_memories
-no example
memories.max_raw_memories_for_consolidation

Maximum recent raw memories retained for global consolidation.

number

Docs: memories.max_raw_memories_for_consolidation
-no example
memories.max_rollout_age_days

Maximum age of threads considered for memory generation.

number

Docs: memories.max_rollout_age_days
-no example
memories.max_rollouts_per_startup

Maximum rollout candidates processed per startup pass.

number

Docs: memories.max_rollouts_per_startup
-no example
memories.max_unused_days

Maximum days since a memory was last used before it becomes ineligible for consolidation.

number

Docs: memories.max_unused_days
-no example
memories.min_rate_limit_remaining_percent

Minimum remaining percentage required in Codex rate-limit windows before memory generation starts.

number

Docs: memories.min_rate_limit_remaining_percent
-no example
memories.min_rollout_idle_hours

Minimum idle time before a thread is considered for memory generation.

number

Docs: memories.min_rollout_idle_hours
-no example
memories.use_memories

When false, Codex skips injecting existing memories into future sessions.

boolean

Docs: memories.use_memories
-no example
model

Model to use (e.g., gpt-6.1-sol).

string

Docs: model
model = "gpt-6.1-sol"
model_auto_compact_token_limit

Token threshold that triggers automatic history compaction (unset uses model defaults).

number

Docs: model_auto_compact_token_limit
-no example
model_auto_compact_token_limit_scope

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

Docs: model_auto_compact_token_limit_scope
-no example
model_catalog_json

Optional path to a JSON model catalog loaded on startup.

string (path)

Docs: model_catalog_json
model_catalog_json = "/Users/me/.codex/model-catalogs/deep-review.json"
model_context_window

Context window tokens available to the active model.

number

Docs: model_context_window
-no example
model_instructions_file

Replacement for built-in instructions instead of AGENTS.md.

string (path)

Docs: model_instructions_file
-no example
model_provider

Provider id from model_providers (default: openai).

string

Docs: model_provider
-no example
model_providers.<id>

Custom provider definition. Built-in provider IDs (openai, ollama, and lmstudio) are reserved and cannot be overridden.

table

Docs: model_providers.<id>
-no example
model_providers.<id>.auth

Command-backed bearer token configuration for a custom provider.

table

Docs: model_providers.<id>.auth
-no example
model_providers.<id>.auth.args

Arguments passed to the token command.

array<string>

Docs: model_providers.<id>.auth.args
-no example
model_providers.<id>.auth.command

Command to run when Codex needs a bearer token.

string

Docs: model_providers.<id>.auth.command
-no example
model_providers.<id>.auth.cwd

Working directory for the token command.

string (path)

Docs: model_providers.<id>.auth.cwd
-no example
model_providers.<id>.auth.refresh_interval_ms

How often Codex proactively refreshes the token in milliseconds (default: 300000).

number

Docs: model_providers.<id>.auth.refresh_interval_ms
-no example
model_providers.<id>.auth.timeout_ms

Maximum token command runtime in milliseconds (default: 5000).

number

Docs: model_providers.<id>.auth.timeout_ms
-no example
model_providers.<id>.base_url

API base URL for the model provider.

string

Docs: model_providers.<id>.base_url
-no example
model_providers.<id>.capabilities.external_web_access

Whether the provider's hosted web search can access the live web.

boolean

Docs: model_providers.<id>.capabilities.external_web_access
-no example
model_providers.<id>.capabilities.remote_compaction

Provider compaction protocol. unsupported uses local compaction; v2 sends compaction triggers through Responses.

unsupported | v2

Docs: model_providers.<id>.capabilities.remote_compaction
-no example
model_providers.<id>.env_http_headers

HTTP headers populated from environment variables when present.

map<string,string>

Docs: model_providers.<id>.env_http_headers
-no example
model_providers.<id>.env_key

Environment variable supplying the provider API key.

string

Docs: model_providers.<id>.env_key
-no example
model_providers.<id>.env_key_instructions

Optional setup guidance for the provider API key.

string

Docs: model_providers.<id>.env_key_instructions
-no example
model_providers.<id>.experimental_bearer_token

Direct bearer token for the provider (discouraged; use env_key).

string

Docs: model_providers.<id>.experimental_bearer_token
-no example
model_providers.<id>.http_headers

Static HTTP headers added to provider requests.

map<string,string>

Docs: model_providers.<id>.http_headers
-no example
model_providers.<id>.model_catalog_url

Full URL for a Codex-native model catalog.

string

Docs: model_providers.<id>.model_catalog_url
-no example
model_providers.<id>.name

Display name for a custom model provider.

string

Docs: model_providers.<id>.name
-no example
model_providers.<id>.query_params

Extra query parameters appended to provider requests.

map<string,string>

Docs: model_providers.<id>.query_params
-no example
model_providers.<id>.request_max_retries

Retry count for HTTP requests to the provider (default: 4).

number

Docs: model_providers.<id>.request_max_retries
-no example
model_providers.<id>.requires_openai_auth

The provider uses OpenAI authentication (defaults to false).

boolean

Docs: model_providers.<id>.requires_openai_auth
-no example
model_providers.<id>.stream_idle_timeout_ms

Idle timeout for SSE streams in milliseconds (default: 300000).

number

Docs: model_providers.<id>.stream_idle_timeout_ms
-no example
model_providers.<id>.stream_max_retries

Retry count for SSE streaming interruptions (default: 5).

number

Docs: model_providers.<id>.stream_max_retries
-no example
model_providers.<id>.supports_websockets

Whether that provider supports the Responses API WebSocket transport.

boolean

Docs: model_providers.<id>.supports_websockets
-no example
model_providers.<id>.wire_api

Protocol used by the provider. responses is the only supported value, and it is the default when omitted.

responses

Docs: model_providers.<id>.wire_api
-no example
model_providers.amazon-bedrock.aws.profile

AWS profile name used by the built-in amazon-bedrock provider.

string

Docs: model_providers.amazon-bedrock.aws.profile
-no example
model_providers.amazon-bedrock.aws.region

AWS region used by the built-in amazon-bedrock provider.

string

Docs: model_providers.amazon-bedrock.aws.region
-no example
model_reasoning_effort

Reasoning effort advertised by the selected model, such as low, medium, high, xhigh, max, or ultra.

string

Docs: model_reasoning_effort
model_reasoning_effort = "medium"
model_reasoning_summary

Select reasoning summary detail or disable summaries entirely.

auto | concise | detailed | none

Docs: model_reasoning_summary
-no example
model_supports_reasoning_summaries

Force Codex to send or not send reasoning metadata.

boolean

Docs: model_supports_reasoning_summaries
-no example
model_verbosity

Optional GPT-5 Responses API verbosity override; when unset, the selected model/preset default is used.

low | medium | high

Docs: model_verbosity
-no example
notice.hide_full_access_warning

Track acknowledgement of the full access warning prompt.

boolean

Docs: notice.hide_full_access_warning
-no example
notice.hide_gpt-5.1-codex-max_migration_prompt

Track acknowledgement of the gpt-5.1-codex-max migration prompt.

boolean

Docs: notice.hide_gpt-5.1-codex-max_migration_prompt
-no example
notice.hide_gpt5_1_migration_prompt

Track acknowledgement of the GPT-5.1 migration prompt.

boolean

Docs: notice.hide_gpt5_1_migration_prompt
-no example
notice.hide_rate_limit_model_nudge

Track opt-out of the rate limit model switch reminder.

boolean

Docs: notice.hide_rate_limit_model_nudge
-no example
notice.hide_world_writable_warning

Track acknowledgement of the Windows world-writable directories warning.

boolean

Docs: notice.hide_world_writable_warning
-no example
notice.model_migrations

Track acknowledged model migrations as old->new mappings.

map<string,string>

Docs: notice.model_migrations
-no example
notify

Command invoked for notifications; receives a JSON payload from Codex.

array<string>

Docs: notify
-no example
openai_base_url

Base URL override for the built-in openai model provider.

string

Docs: openai_base_url
openai_base_url = "https://us.api.openai.com/v1"
oss_provider

Default local provider used when running with --oss (defaults to prompting if unset).

lmstudio | ollama

Docs: oss_provider
-no example
otel.environment

Environment tag applied to emitted OpenTelemetry events (default: dev).

string

Docs: otel.environment
-no example
otel.exporter

Select the OpenTelemetry exporter and provide any endpoint metadata.

none | otlp-http | otlp-grpc

Docs: otel.exporter
-no example
otel.exporter.<id>.endpoint

Exporter endpoint for OTEL logs.

string

Docs: otel.exporter.<id>.endpoint
-no example
otel.exporter.<id>.headers

Static headers included with OTEL exporter requests.

map<string,string>

Docs: otel.exporter.<id>.headers
-no example
otel.exporter.<id>.protocol

Protocol used by the OTLP/HTTP exporter.

binary | json

Docs: otel.exporter.<id>.protocol
-no example
otel.exporter.<id>.tls.ca-certificate

CA certificate path for OTEL exporter TLS.

string

Docs: otel.exporter.<id>.tls.ca-certificate
-no example
otel.exporter.<id>.tls.client-certificate

Client certificate path for OTEL exporter TLS.

string

Docs: otel.exporter.<id>.tls.client-certificate
-no example
otel.exporter.<id>.tls.client-private-key

Client private key path for OTEL exporter TLS.

string

Docs: otel.exporter.<id>.tls.client-private-key
-no example
otel.log_user_prompt

Opt in to exporting raw user prompts with OpenTelemetry logs.

boolean

Docs: otel.log_user_prompt
-no example
otel.metrics_exporter

Select the OpenTelemetry metrics exporter (defaults to statsig).

none | statsig | otlp-http | otlp-grpc

Docs: otel.metrics_exporter
-no example
otel.trace_exporter

Select the OpenTelemetry trace exporter and provide any endpoint metadata.

none | otlp-http | otlp-grpc

Docs: otel.trace_exporter
-no example
otel.trace_exporter.<id>.endpoint

Trace exporter endpoint for OTEL logs.

string

Docs: otel.trace_exporter.<id>.endpoint
-no example
otel.trace_exporter.<id>.headers

Static headers included with OTEL trace exporter requests.

map<string,string>

Docs: otel.trace_exporter.<id>.headers
-no example
otel.trace_exporter.<id>.protocol

Protocol used by the OTLP/HTTP trace exporter.

binary | json

Docs: otel.trace_exporter.<id>.protocol
-no example
otel.trace_exporter.<id>.tls.ca-certificate

CA certificate path for OTEL trace exporter TLS.

string

Docs: otel.trace_exporter.<id>.tls.ca-certificate
-no example
otel.trace_exporter.<id>.tls.client-certificate

Client certificate path for OTEL trace exporter TLS.

string

Docs: otel.trace_exporter.<id>.tls.client-certificate
-no example
otel.trace_exporter.<id>.tls.client-private-key

Client private key path for OTEL trace exporter TLS.

string

Docs: otel.trace_exporter.<id>.tls.client-private-key
-no example
permissions.<name>.description

Human-readable description for this named profile.

string

Docs: permissions.<name>.description
-no example
permissions.<name>.extends

Optional parent profile applied before this named profile.

string

Docs: permissions.<name>.extends
-no example
permissions.<name>.filesystem

Named filesystem permission profile. Each key is an absolute path or special token such as :minimal or :workspace_roots.

table

Docs: permissions.<name>.filesystem
-no example
permissions.<name>.filesystem.":workspace_roots".<subpath-or-glob>

Scoped filesystem access relative to each effective workspace root.

"read" | "write" | "deny"

Docs: permissions.<name>.filesystem.":workspace_roots".<subpath-or-glob>
-no example
permissions.<name>.filesystem.<path-or-glob>

Grant direct access for a path, glob pattern, or special token, or scope nested entries under that root.

"read" | "write" | "deny" | table

Docs: permissions.<name>.filesystem.<path-or-glob>
-no example
permissions.<name>.filesystem.glob_scan_max_depth

Maximum depth for expanding deny-read glob patterns on platforms that snapshot matches before sandbox startup.

number

Docs: permissions.<name>.filesystem.glob_scan_max_depth
-no example
permissions.<name>.network.allow_local_binding

Permit broader local/private-network access through sandboxed networking.

boolean

Docs: permissions.<name>.network.allow_local_binding
-no example
permissions.<name>.network.allow_upstream_proxy

Allow sandboxed networking to chain through another upstream proxy.

boolean

Docs: permissions.<name>.network.allow_upstream_proxy
-no example
permissions.<name>.network.dangerously_allow_all_unix_sockets

Allow arbitrary Unix socket destinations instead of the default restricted set.

boolean

Docs: permissions.<name>.network.dangerously_allow_all_unix_sockets
-no example
permissions.<name>.network.dangerously_allow_non_loopback_proxy

Permit non-loopback bind addresses for sandboxed networking listeners.

boolean

Docs: permissions.<name>.network.dangerously_allow_non_loopback_proxy
-no example
permissions.<name>.network.domains

Domain rules for sandboxed commands. Enforced only when features.network_proxy or enabled administrator-managed networking requirements activate the proxy.

table

Docs: permissions.<name>.network.domains
-no example
permissions.<name>.network.domains.<pattern>

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

allow | deny

Docs: permissions.<name>.network.domains.<pattern>
-no example
permissions.<name>.network.enable_socks5

Expose SOCKS5 support when this permissions profile enables sandboxed networking.

boolean

Docs: permissions.<name>.network.enable_socks5
-no example
permissions.<name>.network.enable_socks5_udp

Allow UDP over the SOCKS5 listener when enabled.

boolean

Docs: permissions.<name>.network.enable_socks5_udp
-no example
permissions.<name>.network.enabled

Enable network access for commands in this permission profile.

boolean

Docs: permissions.<name>.network.enabled
-no example
permissions.<name>.network.mode

Network proxy mode used for subprocess traffic.

limited | full

Docs: permissions.<name>.network.mode
-no example
permissions.<name>.network.proxy_url

HTTP listener URL used when this permissions profile enables sandboxed networking.

string

Docs: permissions.<name>.network.proxy_url
-no example
permissions.<name>.network.socks_url

SOCKS5 proxy endpoint used by this permissions profile.

string

Docs: permissions.<name>.network.socks_url
-no example
permissions.<name>.network.unix_sockets

Unix socket allowlist overrides for sandboxed networking.

table

Docs: permissions.<name>.network.unix_sockets
-no example
permissions.<name>.network.unix_sockets.<path>

Add an absolute Unix socket path to the effective allowlist with allow, or reject it with deny.

allow | deny

Docs: permissions.<name>.network.unix_sockets.<path>
-no example
permissions.<name>.workspace_roots

Profile-defined workspace roots that receive :workspace_roots filesystem rules alongside the session's runtime workspace roots.

table

Docs: permissions.<name>.workspace_roots
-no example
permissions.<name>.workspace_roots.<path>

Opt a path into the profile's workspace root set when true.

boolean

Docs: permissions.<name>.workspace_roots.<path>
-no example
personality

Deprecated compatibility setting. friendly and pragmatic no longer select a style.

none | friendly | pragmatic

Docs: personality
personality = "none"
plan_mode_reasoning_effort

Plan-mode-specific reasoning override using a level supported by the selected model.

string

Docs: plan_mode_reasoning_effort
-no example
plugins.<plugin>.enabled

Enable or disable a local-marketplace plugin using a plugin-name@marketplace-name key.

boolean

Docs: plugins.<plugin>.enabled
-no example
plugins.<plugin>.mcp_servers.<server>.default_tools_approval_mode

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

auto | prompt | writes | approve

Docs: plugins.<plugin>.mcp_servers.<server>.default_tools_approval_mode
-no example
plugins.<plugin>.mcp_servers.<server>.disabled_tools

Deny list applied after enabled_tools for a plugin-provided MCP server.

array<string>

Docs: plugins.<plugin>.mcp_servers.<server>.disabled_tools
-no example
plugins.<plugin>.mcp_servers.<server>.enabled

Enable or disable an MCP server bundled by an installed plugin without changing the plugin manifest.

boolean

Docs: plugins.<plugin>.mcp_servers.<server>.enabled
-no example
plugins.<plugin>.mcp_servers.<server>.enabled_tools

Allow list of tools exposed from a plugin-provided MCP server.

array<string>

Docs: plugins.<plugin>.mcp_servers.<server>.enabled_tools
-no example
plugins.<plugin>.mcp_servers.<server>.tools.<tool>.approval_mode

Per-tool approval behavior override for a plugin-provided MCP tool.

auto | prompt | writes | approve

Docs: plugins.<plugin>.mcp_servers.<server>.tools.<tool>.approval_mode
-no example
project_doc_fallback_filenames

Additional filenames to try when AGENTS.md is missing.

array<string>

Docs: project_doc_fallback_filenames
project_doc_fallback_filenames = ["TEAM_GUIDE.md", ".agents.md"]
project_doc_max_bytes

Maximum bytes read from AGENTS.md when building project instructions.

number

Docs: project_doc_max_bytes
project_doc_max_bytes = 65536
project_root_markers

List of project root marker filenames; used when searching parent directories for the project root.

array<string>

Docs: project_root_markers
project_root_markers = [".git", ".hg", ".sl"]
projects.<path>.trust_level

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.

string

Docs: projects.<path>.trust_level
-no example
review_model

Optional model override used by /review (defaults to the current session model).

string

Docs: review_model
-no example
sandbox_mode

Sandbox policy for filesystem and network access during command execution.

read-only | workspace-write | danger-full-access

Docs: sandbox_mode
sandbox_mode = "workspace-write"
sandbox_workspace_write.exclude_slash_tmp

Exclude /tmp from writable roots in workspace-write mode.

boolean

Docs: sandbox_workspace_write.exclude_slash_tmp
-no example
sandbox_workspace_write.exclude_tmpdir_env_var

Exclude $TMPDIR from writable roots in workspace-write mode.

boolean

Docs: sandbox_workspace_write.exclude_tmpdir_env_var
-no example
sandbox_workspace_write.network_access

Allow outbound network access inside the workspace-write sandbox.

boolean

Docs: sandbox_workspace_write.network_access
codex --config sandbox_workspace_write.network_access=true
sandbox_workspace_write.writable_roots

Additional writable roots when sandbox_mode = "workspace-write".

array<string>

Docs: sandbox_workspace_write.writable_roots
-no example
service_tier

Preferred service tier for new turns. Use fast or another tier advertised by the active model; fast maps to the request value priority.

string

Docs: service_tier
-no example
shell_environment_policy.exclude

Legacy environment-variable exclusion patterns.

array<string>

Docs: shell_environment_policy.exclude
-no example
shell_environment_policy.experimental_use_profile

Use the user shell profile when spawning subprocesses.

boolean

Docs: shell_environment_policy.experimental_use_profile
-no example
shell_environment_policy.filters

Canonical case-insensitive environment-variable pattern filters.

map<string, include | exclude>

Docs: shell_environment_policy.filters
[shell_environment_policy] ignore_default_excludes = false [shell_environment_policy.filters] "PATH" = "include" "HOME" = "include"
shell_environment_policy.ignore_default_excludes

Keep variables containing KEY, SECRET, or TOKEN before other filters run (default: true).

boolean

Docs: shell_environment_policy.ignore_default_excludes
-no example
shell_environment_policy.include_only

Legacy allowlist of environment-variable patterns.

array<string>

Docs: shell_environment_policy.include_only
codex --config 'shell_environment_policy.include_only=["PATH","HOME"]'
shell_environment_policy.inherit

Baseline environment inheritance when spawning subprocesses.

all | core | none

Docs: shell_environment_policy.inherit
-no example
shell_environment_policy.set

Explicit environment values injected after exclusions; include filters can still remove them.

map<string,string>

Docs: shell_environment_policy.set
-no example
show_raw_agent_reasoning

Surface raw reasoning content when the active model emits it.

boolean

Docs: show_raw_agent_reasoning
-no example
skills.config

Per-skill enablement overrides stored in config.toml.

array<object>

Docs: skills.config
-no example
skills.config.<index>.enabled

Enable or disable the referenced skill.

boolean

Docs: skills.config.<index>.enabled
-no example
skills.config.<index>.path

Path to a skill folder containing SKILL.md.

string (path)

Docs: skills.config.<index>.path
-no example
skills.max_context_tokens

Token budget for the available-skills catalog.

integer (positive)

Docs: skills.max_context_tokens
-no example
sqlite_home

Directory where Codex stores the SQLite-backed state DB used by agent jobs and other resumable runtime state.

string (path)

Docs: sqlite_home
-no example
suppress_unstable_features_warning

Suppress the warning that appears when under-development feature flags are enabled.

boolean

Docs: suppress_unstable_features_warning
-no example
tool_output_token_limit

Token budget for storing individual tool/function outputs in history.

number

Docs: tool_output_token_limit
-no example
tool_suggest.disabled_tools

Disable suggestions for specific discoverable connectors or plugins.

array<table>

Docs: tool_suggest.disabled_tools
-no example
tool_suggest.discoverables

Allow tool suggestions for additional discoverable connectors or plugins.

array<table>

Docs: tool_suggest.discoverables
-no example
tools.view_image

Enable the local-image attachment tool view_image.

boolean

Docs: tools.view_image
-no example
tui

TUI-specific options such as enabling inline desktop notifications.

table

Docs: tui
-no example
tui.alternate_screen

Control alternate screen usage for the TUI (default: auto; auto skips it in Zellij to preserve scrollback).

auto | always | never

Docs: tui.alternate_screen
-no example
tui.animations

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

boolean

Docs: tui.animations
-no example
tui.auto_recap

Generate automatic conversation recaps while the terminal is unfocused (default: true).

boolean

Docs: tui.auto_recap
-no example
tui.disable_paste_burst

Disable burst-paste detection in the TUI (default: false).

boolean

Docs: tui.disable_paste_burst
-no example
tui.keymap.<context>.<action>

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.

string | array<string>

Docs: tui.keymap.<context>.<action>
[tui.keymap.global] open_transcript = "ctrl-t" [tui.keymap.composer] submit = ["enter", "ctrl-m"] [tui.keymap.chat] interrupt_turn = "f12"
tui.keymap.<context>.<action> = []

Unbind the action in that keymap context. Key names use normalized strings such as ctrl-a, shift-enter, page-down, or minus.

empty array

Docs: tui.keymap.<context>.<action> = []
-no example
tui.model_availability_nux.<model>

Internal startup-tooltip state keyed by model slug.

integer

Docs: tui.model_availability_nux.<model>
-no example
tui.notification_condition

Control whether TUI notifications fire only when the terminal is unfocused or regardless of focus.

unfocused | always

Docs: tui.notification_condition
-no example
tui.notification_method

Notification method for terminal notifications (default: auto).

auto | osc9 | bel

Docs: tui.notification_method
-no example
tui.notifications

Enable TUI notifications; optionally restrict to specific event types.

boolean | array<string>

Docs: tui.notifications
-no example
tui.raw_output_mode

Start the TUI in raw scrollback mode for copy-friendly terminal selection (default: false).

boolean

Docs: tui.raw_output_mode
-no example
tui.resume_cwd

Working directory to use when resuming or forking a session.

current | session

Docs: tui.resume_cwd
-no example
tui.show_server_version_notice

Show informational notices about connected app-server version differences (default: true).

boolean

Docs: tui.show_server_version_notice
-no example
tui.show_tooltips

Show onboarding tooltips in the TUI welcome screen (default: true).

boolean

Docs: tui.show_tooltips
-no example
tui.status_line

Ordered list of TUI footer status-line item identifiers. null disables the status line.

array<string> | null

Docs: tui.status_line
-no example
tui.terminal_title

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

array<string> | null

Docs: tui.terminal_title
-no example
tui.theme

Syntax-highlighting theme override (kebab-case theme name).

string

Docs: tui.theme
-no example
tui.vim_mode_default

Start the composer in Vim normal mode instead of insert mode (default: false). You can still toggle it per session with /vim.

boolean

Docs: tui.vim_mode_default
-no example
windows_wsl_setup_acknowledged

Track Windows onboarding acknowledgement (Windows only).

boolean

Docs: windows_wsl_setup_acknowledged
-no example
windows.sandbox

Native Windows sandbox implementation. Explicit mxc selection fails when MXC is unavailable or prohibited by managed requirements.

mxc | elevated | unelevated

Docs: windows.sandbox
[windows] sandbox = "elevated" # Legacy fallback [features] prefer_mxc = true
additional_developer_instructions

requirements.toml: Managed developer instructions added as a separate developer message. Codex rejects instructions that exceed a limit of 10,000 estimated tokens, including context markers.

string

Docs: additional_developer_instructions
-no example
allow_appshots

requirements.toml: Set to false to disable Appshots for managed users.

boolean

Docs: allow_appshots
-no example
allow_browser_and_computer_use

requirements.toml: Set to false to block both agent-driven Browser Use and native-app Computer Use.

boolean

Docs: allow_browser_and_computer_use
-no example
allow_login_shell

requirements.toml: Enforce whether shell tools can start a login shell.

boolean

Docs: allow_login_shell
-no example
allow_managed_hooks_only

requirements.toml: When true, Codex skips user, project, session, and plugin hooks while still allowing managed hooks from requirements.toml and other managed config layers.

boolean

Docs: allow_managed_hooks_only
-no example
allow_remote_control

requirements.toml: Set to false to disable device remote control for managed users.

boolean

Docs: allow_remote_control
-no example
allowed_approval_policies

requirements.toml: Allowed approval policies, such as on-request, never, and granular.

array<string>

Docs: allowed_approval_policies
-no example
allowed_approvals_reviewers

requirements.toml: Allowed values for approvals_reviewer, such as user and auto_review.

array<string>

Docs: allowed_approvals_reviewers
-no example
allowed_chatgpt_workspaces

requirements.toml: Restrict ChatGPT login, including Codex access tokens, to the listed workspace IDs.

array<string>

Docs: allowed_chatgpt_workspaces
-no example
allowed_login_methods

requirements.toml: Allow chatgpt, api, or both. If omitted, this setting doesn't restrict login methods.

array<string>

Docs: allowed_login_methods
-no example
allowed_permission_profiles

requirements.toml: Complete list of allowed permission profiles.

table<boolean>

Docs: allowed_permission_profiles
-no example
allowed_permission_profiles.<name>

requirements.toml: Allow or deny a built-in or custom permission profile defined in a loaded config or requirements source.

boolean

Docs: allowed_permission_profiles.<name>
-no example
allowed_sandbox_modes

requirements.toml: Allowed values for sandbox_mode.

array<string>

Docs: allowed_sandbox_modes
-no example
allowed_web_search_modes

requirements.toml: Allowed values for web_search (disabled, cached, indexed, live).

array<string>

Docs: allowed_web_search_modes
-no example
application

requirements.toml: Managed desktop application requirements.

table

Docs: application
-no example
application.network

requirements.toml: Destination restrictions for desktop app network requests, separate from command networking and browser origin rules.

table

Docs: application.network
-no example
application.network.domains

requirements.toml: Exact domain rules for desktop app requests.

table<allow | deny>

Docs: application.network.domains
-no example
application.network.domains.<domain>

requirements.toml: Allow or deny an exact domain. Use domain names without URL schemes, ports, or wildcards.

allow | deny

Docs: application.network.domains.<domain>
-no example
application.network.enabled

requirements.toml: Defaults to true when the table is present. When true, external desktop app requests require an explicitly allowed domain.

boolean

Docs: application.network.enabled
-no example
apps

requirements.toml: Managed app requirements keyed by app identifier.

table

Docs: apps
-no example
apps.<id>.enabled

requirements.toml: Set to false to disable an app. A disabled requirement remains restrictive when multiple requirements sources are merged.

boolean

Docs: apps.<id>.enabled
-no example
apps.<id>.tools.<tool>.approval_mode

requirements.toml: Set the managed approval mode for one app tool.

auto | prompt | writes | approve

Docs: apps.<id>.tools.<tool>.approval_mode
-no example
auto_review

requirements.toml: Managed automatic-review requirements.

table

Docs: auto_review
-no example
auto_review.ignore_rules

requirements.toml: Full model slugs for which Codex ignores allow prefix rules in command execution policy.

array<string>

Docs: auto_review.ignore_rules
-no example
auto_review.required_on_models

requirements.toml: Model slugs that must use automatic review.

array<string>

Docs: auto_review.required_on_models
-no example
browser_use

requirements.toml: Managed requirements for agent-driven Browser Use.

table

Docs: browser_use
-no example
browser_use.allow_global_persistent_approval

requirements.toml: Set to false to prevent Browser Use from creating or honoring Always allow approvals that cover every site, such as allowing downloads from any site.

boolean

Docs: browser_use.allow_global_persistent_approval
-no example
browser_use.allow_history_access

requirements.toml: Set to false to prevent Browser Use from reading browser history.

boolean

Docs: browser_use.allow_history_access
-no example
browser_use.allow_webmcp

requirements.toml: Set to true to opt the desktop app's built-in browser into site tools (WebMCP).

boolean

Docs: browser_use.allow_webmcp
-no example
browser_use.default_origin_policy

requirements.toml: Fallback for each Browser Use setting when no matching entry under browser_use.origins defines it.

table

Docs: browser_use.default_origin_policy
-no example
browser_use.default_origin_policy.access

requirements.toml: Use deny to block Browser Use on origins that use the fallback.

allow | deny

Docs: browser_use.default_origin_policy.access
-no example
browser_use.default_origin_policy.access_approval_lifetime

requirements.toml: Set how long a non-persistent site-access approval lasts: turn limits it to the current turn, and thread keeps it for the rest of the current thread.

turn | thread

Docs: browser_use.default_origin_policy.access_approval_lifetime
-no example
browser_use.default_origin_policy.auto_review

requirements.toml: Use deny to skip automatic review on origins that use the fallback and ask the user for approval instead.

allow | deny

Docs: browser_use.default_origin_policy.auto_review
-no example
browser_use.default_origin_policy.downloads

requirements.toml: Use deny to block Browser Use downloads on origins that use the fallback.

allow | deny

Docs: browser_use.default_origin_policy.downloads
-no example
browser_use.default_origin_policy.full_cdp_access

requirements.toml: Use deny to block full Chrome DevTools Protocol (CDP) access on origins that use the fallback.

allow | deny

Docs: browser_use.default_origin_policy.full_cdp_access
-no example
browser_use.default_origin_policy.persistent_approval

requirements.toml: Set to false to prevent Browser Use from saving or honoring an Always allow approval on origins that use the fallback.

boolean

Docs: browser_use.default_origin_policy.persistent_approval
-no example
browser_use.default_origin_policy.uploads

requirements.toml: Use deny to block Browser Use uploads on origins that use the fallback.

allow | deny

Docs: browser_use.default_origin_policy.uploads
-no example
browser_use.disable_auto_review

requirements.toml: Set to true to skip automatic review for Browser Use and ask the user for approval instead.

boolean

Docs: browser_use.disable_auto_review
-no example
browser_use.origins

requirements.toml: Origin-specific Browser Use policies. Keys use <scheme>://<host-pattern>[:<port>] with http or https.

map<string, table>

Docs: browser_use.origins
-no example
browser_use.origins.<pattern>

requirements.toml: Policy for origins matching this pattern.

table

Docs: browser_use.origins.<pattern>
-no example
browser_use.origins.<pattern>.access

requirements.toml: Use deny to block Browser Use on matching origins.

allow | deny

Docs: browser_use.origins.<pattern>.access
-no example
browser_use.origins.<pattern>.access_approval_lifetime

requirements.toml: Set how long a non-persistent site-access approval for matching origins lasts: turn limits it to the current turn, and thread keeps it for the rest of the current thread.

turn | thread

Docs: browser_use.origins.<pattern>.access_approval_lifetime
-no example
browser_use.origins.<pattern>.auto_review

requirements.toml: Use deny to skip automatic review on matching origins and ask the user for approval instead.

allow | deny

Docs: browser_use.origins.<pattern>.auto_review
-no example
browser_use.origins.<pattern>.downloads

requirements.toml: Use deny to block Browser Use downloads on matching origins.

allow | deny

Docs: browser_use.origins.<pattern>.downloads
-no example
browser_use.origins.<pattern>.full_cdp_access

requirements.toml: Use deny to block full Chrome DevTools Protocol (CDP) access on matching origins.

allow | deny

Docs: browser_use.origins.<pattern>.full_cdp_access
-no example
browser_use.origins.<pattern>.persistent_approval

requirements.toml: Set to false to prevent Browser Use from saving or honoring an Always allow approval on matching origins.

boolean

Docs: browser_use.origins.<pattern>.persistent_approval
-no example
browser_use.origins.<pattern>.uploads

requirements.toml: Use deny to block Browser Use uploads on matching origins.

allow | deny

Docs: browser_use.origins.<pattern>.uploads
-no example
chatgpt_base_url

requirements.toml: Enforce the ChatGPT service base URL before authentication and cloud-policy retrieval.

string

Docs: chatgpt_base_url
-no example
check_for_update_on_startup

requirements.toml: Enforce whether Codex checks for updates when it starts.

boolean

Docs: check_for_update_on_startup
-no example
cli_auth_credentials_store

requirements.toml: Enforce the CLI credential store before authentication loads.

file | keyring | auto | ephemeral

Docs: cli_auth_credentials_store
-no example
computer_use

requirements.toml: Managed requirements for agent-driven work in native desktop apps.

table

Docs: computer_use
-no example
computer_use.allow_locked_computer_use

requirements.toml: Set to false to prevent users from enabling Locked Use on a managed macOS device.

boolean

Docs: computer_use.allow_locked_computer_use
-no example
computer_use.allow_persistent_approval

requirements.toml: Set to false to remove the option to save app approvals across sessions.

boolean

Docs: computer_use.allow_persistent_approval
-no example
computer_use.default_app_access

requirements.toml: Fallback access for native apps that do not match a platform-specific rule.

allow | deny

Docs: computer_use.default_app_access
-no example
computer_use.macos

requirements.toml: Computer Use app rules for macOS.

table

Docs: computer_use.macos
-no example
computer_use.macos.bundle_ids

requirements.toml: Map exact macOS bundle identifiers to allow or deny.

map<string, allow | deny>

Docs: computer_use.macos.bundle_ids
-no example
computer_use.macos.bundle_ids.<bundle-id>

requirements.toml: Use deny to block the exact bundle identifier.

allow | deny

Docs: computer_use.macos.bundle_ids.<bundle-id>
-no example
computer_use.windows

requirements.toml: Computer Use app rules for packaged and unpackaged Windows apps.

table

Docs: computer_use.windows
-no example
computer_use.windows.aumids

requirements.toml: Map exact, registered Application User Model IDs (AUMIDs) for signed packaged apps to allow or deny.

map<string, allow | deny>

Docs: computer_use.windows.aumids
-no example
computer_use.windows.aumids.<aumid>

requirements.toml: Use deny to block the exact packaged-app identity.

allow | deny

Docs: computer_use.windows.aumids.<aumid>
-no example
computer_use.windows.exes

requirements.toml: Rules for signed, unpackaged Windows executables.

array<table>

Docs: computer_use.windows.exes
-no example
computer_use.windows.exes[].access

requirements.toml: Required access decision for matching executables.

allow | deny

Docs: computer_use.windows.exes[].access
-no example
computer_use.windows.exes[].binary_name

requirements.toml: Optional OriginalFilename from the executable's signed version information.

string

Docs: computer_use.windows.exes[].binary_name
-no example
computer_use.windows.exes[].product_name

requirements.toml: Required exact ProductName from the executable's signed version information.

string

Docs: computer_use.windows.exes[].product_name
-no example
computer_use.windows.exes[].publisher_name

requirements.toml: Required exact publisher name from the executable's trusted signing certificate, formatted as a Windows X.500 distinguished name.

string

Docs: computer_use.windows.exes[].publisher_name
-no example
default_permissions

requirements.toml: Managed default permission profile. The profile must be allowed by allowed_permission_profiles.

string

Docs: default_permissions
-no example
enforce_residency

requirements.toml: Require Codex service traffic to use a supported data residency.

string

Docs: enforce_residency
-no example
experimental_network

requirements.toml: Administrator-managed network requirements for sandboxed local commands, enforced from requirements.toml.

table

Docs: experimental_network
-no example
experimental_network.allow_local_binding

requirements.toml: Permit broader local/private-network access for sandboxed networking.

boolean

Docs: experimental_network.allow_local_binding
-no example
experimental_network.allow_upstream_proxy

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

boolean

Docs: experimental_network.allow_upstream_proxy
-no example
experimental_network.allowed_domains

requirements.toml: Administrator allow rules for sandboxed-command networking while the managed network proxy is enabled.

array<string>

Docs: experimental_network.allowed_domains
-no example
experimental_network.dangerously_allow_all_unix_sockets

requirements.toml: Permit arbitrary Unix socket destinations instead of allowlist-only access.

boolean

Docs: experimental_network.dangerously_allow_all_unix_sockets
-no example
experimental_network.dangerously_allow_non_loopback_proxy

requirements.toml: Permit non-loopback listener addresses for [experimental_network] requirements.

boolean

Docs: experimental_network.dangerously_allow_non_loopback_proxy
-no example
experimental_network.denied_domains

requirements.toml: List-shaped administrator deny rules for sandboxed networking.

array<string>

Docs: experimental_network.denied_domains
-no example
experimental_network.domains

requirements.toml: Map-shaped administrator domain policy for sandboxed networking.

map<string, allow | deny>

Docs: experimental_network.domains
-no example
experimental_network.domains.<pattern>

requirements.toml: Allow or deny sandboxed network access for the matching domain pattern.

allow | deny

Docs: experimental_network.domains.<pattern>
-no example
experimental_network.enabled

requirements.toml: Enable sandboxed networking requirements.

boolean

Docs: experimental_network.enabled
-no example
experimental_network.http_port

requirements.toml: Loopback HTTP listener port to use for [experimental_network] requirements.

integer

Docs: experimental_network.http_port
-no example
experimental_network.managed_allowed_domains_only

requirements.toml: When networking requirements are enabled and this is true, ordinary user configuration and per-domain approvals cannot expand the managed proxy allowlist.

boolean

Docs: experimental_network.managed_allowed_domains_only
-no example
experimental_network.socks_port

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

integer

Docs: experimental_network.socks_port
-no example
experimental_network.unix_sockets

requirements.toml: Administrator-managed Unix socket allowlist for sandboxed networking on macOS.

map<string, allow | deny>

Docs: experimental_network.unix_sockets
-no example
experimental_network.unix_sockets.<path>

requirements.toml: On macOS, allow adds an absolute Unix socket path to the allowlist; deny leaves it out.

allow | deny

Docs: experimental_network.unix_sockets.<path>
-no example
features

requirements.toml: Pinned feature values. Use canonical names from config.toml for runtime features; documented app-only requirement keys are also supported here.

table

Docs: features
-no example
features.<name>

requirements.toml: Require a documented runtime or app feature to stay enabled or disabled.

boolean

Docs: features.<name>
-no example
features.apps

requirements.toml: Pin Apps integration availability on or off for managed users.

boolean

Docs: features.apps
-no example
features.browser_use

requirements.toml: Set to false in requirements.toml to disable agent-driven Browser Use.

boolean

Docs: features.browser_use
-no example
features.browser_use_external

requirements.toml: Set to false in requirements.toml to prevent Codex from operating supported browsers through the ChatGPT browser extension, including existing tabs and signed-in sessions.

boolean

Docs: features.browser_use_external
-no example
features.browser_use_full_cdp_access

requirements.toml: 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.

boolean

Docs: features.browser_use_full_cdp_access
-no example
features.computer_use

requirements.toml: Set to false in requirements.toml to disable Computer Use, Record & Replay, and related install or enablement flows.

boolean

Docs: features.computer_use
-no example
features.fast_mode

requirements.toml: Pin the canonical fast_mode feature on or off for managed users.

boolean

Docs: features.fast_mode
-no example
features.guardian_approval

requirements.toml: Pin Guardian approval availability on or off for managed users.

boolean

Docs: features.guardian_approval
-no example
features.in_app_browser

requirements.toml: Set to false in requirements.toml to disable the built-in browser pane that users open and control directly.

boolean

Docs: features.in_app_browser
-no example
features.in_app_chat

requirements.toml: Set to false to hide ChatGPT and ChatGPT Work conversation screens and related cloud automation UI in the ChatGPT desktop app.

boolean

Docs: features.in_app_chat
-no example
features.in_app_dictation

requirements.toml: Set to false to disable in-app dictation in the desktop app.

boolean

Docs: features.in_app_dictation
-no example
features.in_app_local_automation

requirements.toml: Set to false to disable local scheduled tasks in the desktop app.

boolean

Docs: features.in_app_local_automation
-no example
features.in_app_updates

requirements.toml: Set to false in requirements.toml to disable in-app updates.

boolean

Docs: features.in_app_updates
-no example
features.memories

requirements.toml: Pin Memories availability on or off for managed users.

boolean

Docs: features.memories
-no example
features.multi_agent

requirements.toml: Pin multi-agent availability on or off for managed users.

boolean

Docs: features.multi_agent
-no example
features.plugin_sharing

requirements.toml: Set to false in cloud-managed requirements.toml to disable workspace sharing for locally built plugins.

boolean

Docs: features.plugin_sharing
-no example
features.plugins

requirements.toml: Pin plugin availability on or off for managed users.

boolean

Docs: features.plugins
-no example
features.realtime_conversation

requirements.toml: Set to false to disable the experimental /voice command in the Codex CLI.

boolean

Docs: features.realtime_conversation
-no example
features.remote_plugin

requirements.toml: Pin remote plugin catalog availability on or off for managed users.

boolean

Docs: features.remote_plugin
-no example
features.workspace_dependencies

requirements.toml: Pin bundled workspace-dependency runtime availability on or off for managed users.

boolean

Docs: features.workspace_dependencies
-no example
feedback

requirements.toml: Managed feedback settings.

table

Docs: feedback
-no example
feedback.enabled

requirements.toml: Enforce whether users can submit feedback across Codex clients.

boolean

Docs: feedback.enabled
-no example
guardian_extra_policy

requirements.toml: Additional managed Markdown policy for automatic review, included alongside the main policy.

string

Docs: guardian_extra_policy
-no example
guardian_policy_config

requirements.toml: Managed Markdown policy instructions for automatic review.

string

Docs: guardian_policy_config
-no example
hooks

requirements.toml: Admin-enforced managed lifecycle hooks. Requires a managed hook directory and uses the same event schema as inline [hooks] in config.toml.

table

Docs: hooks
-no example
hooks.<Event>

requirements.toml: Matcher groups for a hook event such as PreToolUse, PermissionRequest, PostToolUse, PreCompact, PostCompact, SessionStart, SessionEnd, SubagentStart, SubagentStop, UserPromptSubmit, or Stop.

array<table>

Docs: hooks.<Event>
-no example
hooks.<Event>[].hooks

requirements.toml: Hook handlers for a matcher group. Command and MCP tool hooks are supported while prompt and agent hook handlers are parsed but skipped.

array<table>

Docs: hooks.<Event>[].hooks
-no example
hooks.<Event>[].hooks[].additionalContextLimit

requirements.toml: Approximate per-handler token threshold for saving oversized additionalContext to disk and showing the model a shorter preview.

integer

Docs: hooks.<Event>[].hooks[].additionalContextLimit
-no example
hooks.<Event>[].hooks[].async

requirements.toml: Run a command hook in the background without delaying the triggering operation.

boolean

Docs: hooks.<Event>[].hooks[].async
-no example
hooks.<Event>[].hooks[].commandWindows

requirements.toml: Windows-only command override for command hooks.

string

Docs: hooks.<Event>[].hooks[].commandWindows
-no example
hooks.managed_dir

requirements.toml: Directory containing managed hook scripts on macOS and Linux.

string (absolute path)

Docs: hooks.managed_dir
-no example
hooks.windows_managed_dir

requirements.toml: Directory containing managed hook scripts on Windows.

string (absolute path)

Docs: hooks.windows_managed_dir
-no example
in_app_browser

requirements.toml: Requirements for the built-in browser pane.

table

Docs: in_app_browser
-no example
in_app_browser.allow_external_browser_settings_import

requirements.toml: Set to false to prevent users from importing settings or browsing data from an external browser into the built-in browser.

boolean

Docs: in_app_browser.allow_external_browser_settings_import
-no example
log_dir

requirements.toml: Enforce the directory where Codex writes local log files.

string (path)

Docs: log_dir
-no example
marketplaces

requirements.toml: Admin requirements for plugin marketplace sources.

table

Docs: marketplaces
-no example
marketplaces.allowed_sources

requirements.toml: Allowed marketplace sources keyed by administrator-chosen rule name.

table

Docs: marketplaces.allowed_sources
-no example
marketplaces.allowed_sources.<name>

requirements.toml: One allowed source rule. The final source value after requirements merge determines which sibling fields Codex interprets.

table

Docs: marketplaces.allowed_sources.<name>
-no example
marketplaces.allowed_sources.<name>.host_pattern

requirements.toml: Regular expression required when source = "host_pattern".

string

Docs: marketplaces.allowed_sources.<name>.host_pattern
-no example
marketplaces.allowed_sources.<name>.path

requirements.toml: Local marketplace directory required when source = "local".

string (absolute path)

Docs: marketplaces.allowed_sources.<name>.path
-no example
marketplaces.allowed_sources.<name>.ref

requirements.toml: Optional exact Git ref for a git rule.

string

Docs: marketplaces.allowed_sources.<name>.ref
-no example
marketplaces.allowed_sources.<name>.source

requirements.toml: 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

Docs: marketplaces.allowed_sources.<name>.source
-no example
marketplaces.allowed_sources.<name>.url

requirements.toml: Git repository URL required when source = "git".

string

Docs: marketplaces.allowed_sources.<name>.url
-no example
marketplaces.restrict_to_allowed_sources

requirements.toml: When true, require configured marketplace sources to match allowed_sources for marketplace add, plugin install, refresh, and runtime loading.

boolean

Docs: marketplaces.restrict_to_allowed_sources
-no example
mcp_servers

requirements.toml: Allowlist of MCP servers that may be enabled.

table

Docs: mcp_servers
-no example
mcp_servers.<id>.identity

requirements.toml: Identity rule for a single MCP server. Set either command (stdio) or url (streamable HTTP).

table

Docs: mcp_servers.<id>.identity
-no example
mcp_servers.<id>.identity.command

requirements.toml: Allow an MCP stdio server by exact command string, or use a matcher table to require an exact executable and ordered argument matchers.

string | table

Docs: mcp_servers.<id>.identity.command
-no example
mcp_servers.<id>.identity.command.args

requirements.toml: Ordered argument matchers for a stdio server.

array<table>

Docs: mcp_servers.<id>.identity.command.args
-no example
mcp_servers.<id>.identity.command.args[].expression

requirements.toml: Regular expression used by a regex argument matcher.

string

Docs: mcp_servers.<id>.identity.command.args[].expression
-no example
mcp_servers.<id>.identity.command.args[].match

requirements.toml: Match operation for this argument position.

exact | prefix | regex

Docs: mcp_servers.<id>.identity.command.args[].match
-no example
mcp_servers.<id>.identity.command.args[].value

requirements.toml: Value used by an exact or prefix argument matcher.

string

Docs: mcp_servers.<id>.identity.command.args[].value
-no example
mcp_servers.<id>.identity.command.executable

requirements.toml: Executable that the stdio server's configured command must match exactly.

string

Docs: mcp_servers.<id>.identity.command.executable
-no example
mcp_servers.<id>.identity.url

requirements.toml: Allow an MCP streamable HTTP server by exact URL string, or use an exact, prefix, or regex value matcher table.

string | table

Docs: mcp_servers.<id>.identity.url
-no example
mcp_servers.<id>.identity.url.expression

requirements.toml: Regular expression used by a regex URL matcher.

string

Docs: mcp_servers.<id>.identity.url.expression
-no example
mcp_servers.<id>.identity.url.match

requirements.toml: Match operation for the configured MCP server URL.

exact | prefix | regex

Docs: mcp_servers.<id>.identity.url.match
-no example
mcp_servers.<id>.identity.url.value

requirements.toml: Value used by an exact or prefix URL matcher.

string

Docs: mcp_servers.<id>.identity.url.value
-no example
model_catalog_json

requirements.toml: Enforce the JSON model catalog Codex uses at startup.

string (path)

Docs: model_catalog_json
-no example
model_provider

requirements.toml: Enforce the model provider ID, overriding local and session configuration.

string

Docs: model_provider
-no example
model_providers

requirements.toml: Managed model provider definitions. Each entry replaces the complete configured provider with the same ID; fields aren't merged with the user's definition.

map<string, table>

Docs: model_providers
-no example
model_providers.<id>

requirements.toml: Complete managed provider definition. Uses the same provider fields as config.toml, including name, base_url, authentication, and transport settings.

table

Docs: model_providers.<id>
-no example
models

requirements.toml: Contains the [models.new_thread] table.

table

Docs: models
-no example
models.new_thread

requirements.toml: Optional defaults to apply when a new local thread starts.

table

Docs: models.new_thread
-no example
models.new_thread.model

requirements.toml: Default model for new threads. An explicit override of either the model or reasoning effort causes both fields to be ignored.

string

Docs: models.new_thread.model
-no example
models.new_thread.model_reasoning_effort

requirements.toml: Default reasoning effort for new threads.

string

Docs: models.new_thread.model_reasoning_effort
-no example
models.new_thread.service_tier

requirements.toml: Default service tier for new threads. An explicit service-tier override causes this field to be ignored.

string

Docs: models.new_thread.service_tier
-no example
permissions

requirements.toml: Admin-defined permission profiles keyed by profile name.

table

Docs: permissions
-no example
permissions.<name>

requirements.toml: Admin-defined permission profile. The name can't start with :, use the reserved name filesystem, or duplicate a profile from a loaded config.

table

Docs: permissions.<name>
-no example
permissions.filesystem.deny_read

requirements.toml: Admin-enforced filesystem read denials. Entries can be paths or glob patterns, and users cannot weaken them with local config.

array<string>

Docs: permissions.filesystem.deny_read
-no example
plugins

requirements.toml: Plugin-specific MCP server allowlists keyed by plugin identifier.

table

Docs: plugins
-no example
plugins.<plugin>.mcp_servers

requirements.toml: Allowlist for MCP servers bundled with one plugin.

table

Docs: plugins.<plugin>.mcp_servers
-no example
plugins.<plugin>.mcp_servers.<server>.identity

requirements.toml: Identity rule for one plugin-bundled MCP server. Set either command (stdio) or url (streamable HTTP).

table

Docs: plugins.<plugin>.mcp_servers.<server>.identity
-no example
plugins.<plugin>.mcp_servers.<server>.identity.command

requirements.toml: 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

Docs: plugins.<plugin>.mcp_servers.<server>.identity.command
-no example
plugins.<plugin>.mcp_servers.<server>.identity.command.args

requirements.toml: Ordered argument matchers for a plugin-bundled stdio server.

array<table>

Docs: plugins.<plugin>.mcp_servers.<server>.identity.command.args
-no example
plugins.<plugin>.mcp_servers.<server>.identity.command.args[].expression

requirements.toml: Regular expression used by a regex argument matcher.

string

Docs: plugins.<plugin>.mcp_servers.<server>.identity.command.args[].expression
-no example
plugins.<plugin>.mcp_servers.<server>.identity.command.args[].match

requirements.toml: Match operation for this argument position.

exact | prefix | regex

Docs: plugins.<plugin>.mcp_servers.<server>.identity.command.args[].match
-no example
plugins.<plugin>.mcp_servers.<server>.identity.command.args[].value

requirements.toml: Value used by an exact or prefix argument matcher.

string

Docs: plugins.<plugin>.mcp_servers.<server>.identity.command.args[].value
-no example
plugins.<plugin>.mcp_servers.<server>.identity.command.executable

requirements.toml: Executable that the plugin-bundled stdio server's configured command must match exactly.

string

Docs: plugins.<plugin>.mcp_servers.<server>.identity.command.executable
-no example
plugins.<plugin>.mcp_servers.<server>.identity.url

requirements.toml: Allow a plugin's streamable HTTP MCP server by exact URL string, or use an exact, prefix, or regex value matcher table.

string | table

Docs: plugins.<plugin>.mcp_servers.<server>.identity.url
-no example
plugins.<plugin>.mcp_servers.<server>.identity.url.expression

requirements.toml: Regular expression used by a regex URL matcher.

string

Docs: plugins.<plugin>.mcp_servers.<server>.identity.url.expression
-no example
plugins.<plugin>.mcp_servers.<server>.identity.url.match

requirements.toml: Match operation for the plugin-bundled MCP server URL.

exact | prefix | regex

Docs: plugins.<plugin>.mcp_servers.<server>.identity.url.match
-no example
plugins.<plugin>.mcp_servers.<server>.identity.url.value

requirements.toml: Value used by an exact or prefix URL matcher.

string

Docs: plugins.<plugin>.mcp_servers.<server>.identity.url.value
-no example
remote_sandbox_config

requirements.toml: 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.

array<table>

Docs: remote_sandbox_config
-no example
remote_sandbox_config[].allowed_sandbox_modes

requirements.toml: Allowed sandbox modes to apply when this host-specific entry matches.

array<string>

Docs: remote_sandbox_config[].allowed_sandbox_modes
-no example
remote_sandbox_config[].hostname_patterns

requirements.toml: Case-insensitive host name patterns. Supports * for any sequence of characters and ? for one character.

array<string>

Docs: remote_sandbox_config[].hostname_patterns
-no example
rules

requirements.toml: Admin-enforced command rules merged with .rules files. Requirements rules must be restrictive.

table

Docs: rules
-no example
rules.prefix_rules

requirements.toml: List of enforced prefix rules. Each rule must include pattern and decision.

array<table>

Docs: rules.prefix_rules
-no example
rules.prefix_rules[].decision

requirements.toml: Required. Requirements rules can only prompt or forbid (not allow).

prompt | forbidden

Docs: rules.prefix_rules[].decision
-no example
rules.prefix_rules[].justification

requirements.toml: Optional non-empty rationale surfaced in approval prompts or rejection messages.

string

Docs: rules.prefix_rules[].justification
-no example
rules.prefix_rules[].pattern

requirements.toml: Command prefix expressed as pattern tokens. Each token sets either token or any_of.

array<table>

Docs: rules.prefix_rules[].pattern
-no example
rules.prefix_rules[].pattern[].any_of

requirements.toml: A list of allowed alternative tokens at this position.

array<string>

Docs: rules.prefix_rules[].pattern[].any_of
-no example
rules.prefix_rules[].pattern[].token

requirements.toml: A single literal token at this position.

string

Docs: rules.prefix_rules[].pattern[].token
-no example
sqlite_home

requirements.toml: Enforce the directory where Codex stores SQLite-backed runtime state.

string (path)

Docs: sqlite_home
-no example
windows

requirements.toml: Native Windows sandbox requirements.

table

Docs: windows
-no example
windows.allow_mxc

requirements.toml: Set to false to prohibit both explicit MXC selection and automatic selection through features.prefer_mxc.

boolean

Docs: windows.allow_mxc
-no example
windows.allowed_sandbox_implementations

requirements.toml: Allowed legacy native Windows sandbox implementations (elevated and unelevated). The list must not be empty.

array<string>

Docs: windows.allowed_sandbox_implementations
-no example
Codex CLI environment variables
VariableDescriptionExample
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.

Default: ~/.codex

Docs: CODEX_HOME
CODEX_HOME=$(pwd)/.codex codex exec "List active instruction sources"
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.

Default: CODEX_HOME

Docs: CODEX_SQLITE_HOME
-no example
CODEX_NON_INTERACTIVE

Skip prompts in the standalone install scripts; prompts use their default response, so use it for scripted installs and updates, not first-run setup.

Set to 1, true, or yes; default false

Docs: CODEX_NON_INTERACTIVE
curl -fsSL https://chatgpt.com/codex/install.sh | CODEX_NON_INTERACTIVE=1 sh
CODEX_INSTALL_DIR

Changes where the standalone installer puts the visible codex command. The standalone package cache still lives under CODEX_HOME/packages/standalone.

Default: ~/.local/bin on macOS/Linux; %LOCALAPPDATA%\Programs\OpenAI\Codex\bin on Windows

Docs: CODEX_INSTALL_DIR
-no example
CODEX_API_KEY

Provides an API key to a non-interactive Codex process (exec, review, TypeScript SDK, remote exec-server). Set it inline rather than job-wide when running repository-controlled code.

Docs: CODEX_API_KEY
-no example
CODEX_ACCESS_TOKEN

Provides a ChatGPT or Codex access token for trusted automation (CLI, app-server). For persisted login, pipe it to codex login --with-access-token.

Docs: CODEX_ACCESS_TOKEN
printenv CODEX_ACCESS_TOKEN | codex login --with-access-token
OPENAI_FEDERATION_RULE_ID

Workload identity: selects the federation rule configured for the workload.

Docs: OPENAI_FEDERATION_RULE_ID
-no example
OPENAI_IDENTITY_TOKEN_FILE

Workload identity: points to the absolute path of the file that contains the current OIDC token or SPIFFE JWT-SVID.

Docs: OPENAI_IDENTITY_TOKEN_FILE
-no example
OPENAI_WORKLOAD_IDENTITY_CONTEXT

Workload identity: optionally supplies bounded JSON identifiers for client-reported audit attribution. It does not affect authentication or authorization.

Docs: OPENAI_WORKLOAD_IDENTITY_CONTEXT
-no example
CODEX_CA_CERTIFICATE

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

Docs: CODEX_CA_CERTIFICATE
-no example
SSL_CERT_FILE

Fallback PEM CA bundle path for HTTPS, login, and WebSocket clients when CODEX_CA_CERTIFICATE is unset.

Docs: SSL_CERT_FILE
-no example
RUST_LOG

Controls Rust log filtering and verbosity for the CLI and app-server. codex exec defaults to error output unless you set a more verbose value.

error, warn, info, debug, trace, or targeted filters such as codex_core=debug,codex_tui=debug

Docs: RUST_LOG
RUST_LOG=debug codex -c log_dir=./.codex-log tail -F ./.codex-log/codex-tui.log
VISUAL

Editor opened by Ctrl + G in the composer for longer prompts.

Docs: VISUAL
-no example
EDITOR

Editor opened by Ctrl + G in the composer when VISUAL is not set.

Docs: EDITOR
-no example
Codex CLI config files
PathDescriptionExample
~/.codex/config.toml

User-level configuration file; personal defaults live here. Precedence is below CLI flags, project config, and profile files.

Docs: ~/.codex/config.toml
-no example
.codex/config.toml

Project-scoped config overrides; Codex walks from the project root to the working directory and the closest file wins. Loaded only when the project is trusted.

Docs: .codex/config.toml
-no example
$CODEX_HOME/profile-name.config.toml

Profile file layered on top of the base user config when you pass --profile profile-name. Use top-level keys, not [profiles.profile-name] (no longer read in Codex 0.134.0 and later).

Docs: $CODEX_HOME/profile-name.config.toml
codex --profile deep-review
/etc/codex/config.toml

System config on Unix (if present); ranks below user config and cloud-managed defaults, above built-in defaults.

Docs: /etc/codex/config.toml
-no example
requirements.toml

Admin-enforced configuration file that constrains security-sensitive settings users cannot override.

Docs: requirements.toml
-no example
$CODEX_HOME/auth.json

Stores credentials when you use file-based credential storage (otherwise the OS keychain/keyring is used).

Docs: $CODEX_HOME/auth.json
-no example
~/.codex/history.jsonl

Local session transcript history under CODEX_HOME when history persistence is enabled; configure with [history].

Docs: ~/.codex/history.jsonl
-no example
~/.codex/hooks.json

User-level lifecycle hooks file; hooks can also be defined inline as [hooks] tables in config.toml.

Docs: ~/.codex/hooks.json
-no example
<repo>/.codex/hooks.json

Project-local lifecycle hooks; load only when the project .codex/ layer is trusted.

Docs: <repo>/.codex/hooks.json
-no example
~/.codex/AGENTS.md

Global guidance file in the Codex home directory, read before any work and inherited by every repository.

Docs: ~/.codex/AGENTS.md
-no example
~/.codex/AGENTS.override.md

Temporary global override read instead of ~/.codex/AGENTS.md when it exists; remove it to restore the shared guidance.

Docs: ~/.codex/AGENTS.override.md
-no example
AGENTS.md

Project instructions file; Codex walks from the project root to the working directory and includes at most one file per directory, checking AGENTS.override.md, then AGENTS.md, then project_doc_fallback_filenames. Combined size is capped by project_doc_max_bytes (32 KiB by default).

Docs: AGENTS.md
-no example
AGENTS.override.md

Per-directory override checked before AGENTS.md; when present, the AGENTS.md in the same directory is ignored.

Docs: AGENTS.override.md
-no example
~/.codex/rules/default.rules

User-layer execpolicy rules file (Starlark prefix_rule() entries). Codex writes here when you add a command to the allow list in the TUI.

Docs: ~/.codex/rules/default.rules
-no example
<repo>/.codex/rules/

Project-local .rules files; load only when the project .codex/ layer is trusted. Codex scans rules/ under every active config layer at startup.

Docs: <repo>/.codex/rules/
-no example
$CODEX_HOME/themes

Place a .tmTheme file here to add a custom syntax theme selectable from /theme.

Docs: $CODEX_HOME/themes
-no example
codex-tui.log

Opt-in plaintext TUI log written to the directory set by log_dir.

Docs: codex-tui.log
codex -c log_dir=./.codex-log
CODEX_HOME/packages/standalone

Standalone package cache used by the standalone installer.

Docs: CODEX_HOME/packages/standalone
-no example

More on Codex CLI

FAQ

How many commands and options does Codex CLI have?

The official Codex CLI docs list 778 items: 58 slash commands, 136 CLI flags, 54 subcommands, 14 keyboard shortcuts, 484 settings keys, 14 environment variables and 18 config files. The largest group is settings keys, with 484.

Where does Codex CLI keep its configuration?

Codex CLI documents 18 config files and locations, including ~/.codex/config.toml, .codex/config.toml and $CODEX_HOME/profile-name.config.toml. The docs describe ~/.codex/config.toml as: User-level configuration file; personal defaults live here. Precedence is below CLI flags, project config, and profile files.

Which environment variables does Codex CLI read?

The docs list 14 environment variables, such as CODEX_HOME, CODEX_SQLITE_HOME, CODEX_NON_INTERACTIVE and CODEX_INSTALL_DIR. Each one is in the environment variables table above with what it controls.

Sources

Last verified . Names and examples are copied verbatim from the 8 official pages below, and every row above links the exact section it came from.

Newsletter

Know when your tools change

One email per week. New coding agent releases, the flags and commands they add, and what they mean for how you work.