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
Slash commands58
Own page: Codex CLI slash commands| Command | Description | Example |
|---|---|---|
/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 | -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 | -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 | -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 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 | -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 /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 | -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 | -no example |
CLI flags136
Own page: Codex CLI CLI flags| Flag | Description | Example |
|---|---|---|
--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 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 feature Docs: --disable | -no example |
--enable | Force-enable a feature flag (translates to 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 lmstudio | ollama Docs: --local-provider | -no example |
--model, -m | Override the model set in configuration (for example string Docs: --model, -m | codex --model gpt-6.1-sol |
--no-alt-screen | Disable alternate screen mode for the TUI (overrides boolean Docs: --no-alt-screen | -no example |
--no-daemon | Run the interactive CLI without the shared background server. Can't be combined with boolean Docs: --no-daemon | -no example |
--oss | Use a local open source model provider. Codex uses boolean Docs: --oss | -no example |
--profile, -p | Layer string Docs: --profile, -p | codex --profile deep-review |
--remote | Connect to a remote app-server endpoint over WebSocket or a Unix socket. Supported for 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 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 |
--search | Enable live web search (sets boolean Docs: --search | -no example |
--strict-config | Error when boolean Docs: --strict-config | -no example |
--worktree | Start in a new managed Git worktree. Supports new interactive sessions, boolean Docs: --worktree | -no example |
PROMPT | Positional arg of string Docs: PROMPT | -no example |
--analytics-default-enabled |
boolean Docs: --analytics-default-enabled | -no example |
--code-mode-host |
ws://HOST/PATH | wss://HOST/PATH Docs: --code-mode-host | --code-mode-host wss://code-mode.example.com/host |
--listen |
stdio:// | ws://IP:PORT | unix:// | unix://PATH | off Docs: --listen | codex app-server --listen ws://IP:PORT |
--stdio |
boolean Docs: --stdio | -no example |
--ws-audience |
string Docs: --ws-audience | -no example |
--ws-auth |
capability-token | signed-bearer-token Docs: --ws-auth | -no example |
--ws-issuer |
string Docs: --ws-issuer | -no example |
--ws-max-clock-skew-seconds |
number Docs: --ws-max-clock-skew-seconds | -no example |
--ws-shared-secret-file |
absolute path Docs: --ws-shared-secret-file | -no example |
--ws-token-file |
absolute path Docs: --ws-token-file | -no example |
--ws-token-sha256 |
hexadecimal SHA-256 digest Docs: --ws-token-sha256 | -no example |
--download-url |
url Docs: --download-url | -no example |
PATH | Positional arg of path Docs: PATH | -no example |
USER_MESSAGE | Positional arg of string Docs: USER_MESSAGE | -no example |
--bundled |
boolean Docs: --bundled | -no example |
--image, -i |
path[,path...] Docs: --image, -i | -no example |
PROMPT | Positional arg of string Docs: PROMPT | -no example |
TASK_ID | Positional arg of string Docs: TASK_ID | -no example |
--base |
branch Docs: --base | -no example |
--commit |
SHA Docs: --commit | -no example |
--strict-config |
boolean Docs: --strict-config | -no example |
--title |
string Docs: --title | -no example |
--uncommitted |
boolean Docs: --uncommitted | -no example |
PROMPT | Positional arg of string | - (read stdin) Docs: PROMPT | -no example |
--remote |
ws://host:port | wss://host:port | unix:// | unix://PATH Docs: --remote | -no example |
--remote-auth-token-env |
ENV_VAR Docs: --remote-auth-token-env | -no example |
SESSION | Positional arg of session ID | session name Docs: SESSION | codex archive <SESSION>
codex unarchive <SESSION> |
--force |
boolean Docs: --force | codex delete <SESSION_UUID> --force |
--remote |
ws://host:port | wss://host:port | unix:// | unix://PATH Docs: --remote | -no example |
--remote-auth-token-env |
ENV_VAR Docs: --remote-auth-token-env | -no example |
SESSION | Positional arg of session ID | session name Docs: SESSION | codex delete <SESSION> |
--attempts |
1-4 Docs: --attempts | -no example |
--env |
ENV_ID Docs: --env | -no example |
QUERY | Positional arg of string Docs: QUERY | -no example |
--cursor |
string Docs: --cursor | -no example |
--env |
ENV_ID Docs: --env | -no example |
--json |
boolean Docs: --json | -no example |
--limit |
1-20 Docs: --limit | -no example |
SHELL | Positional arg of bash | zsh | fish | power-shell | elvish Docs: SHELL | codex completion zsh > "${fpath[1]}/_codex" |
--all |
boolean Docs: --all | -no example |
--ascii |
boolean Docs: --ascii | -no example |
--json |
boolean Docs: --json | -no example |
--no-color |
boolean Docs: --no-color | -no example |
--summary |
boolean Docs: --summary | -no example |
--approve-for-me, --not-so-yolo |
boolean Docs: --approve-for-me, --not-so-yolo | -no example |
--cd, -C |
path Docs: --cd, -C | -no example |
--color |
always | never | auto Docs: --color | -no example |
--dangerously-bypass-approvals-and-sandbox, --yolo |
boolean Docs: --dangerously-bypass-approvals-and-sandbox, --yolo | -no example |
--dangerously-bypass-hook-trust |
boolean Docs: --dangerously-bypass-hook-trust | -no example |
--ephemeral |
boolean Docs: --ephemeral | -no example |
--ignore-rules |
boolean Docs: --ignore-rules | -no example |
--ignore-user-config |
boolean Docs: --ignore-user-config | -no example |
--image, -i |
path[,path...] Docs: --image, -i | -no example |
--json, --experimental-json |
boolean Docs: --json, --experimental-json | -no example |
--local-provider |
lmstudio | ollama Docs: --local-provider | -no example |
--model, -m |
string Docs: --model, -m | -no example |
--oss |
boolean Docs: --oss | -no example |
--output-last-message, -o |
path Docs: --output-last-message, -o | -no example |
--output-schema |
path Docs: --output-schema | -no example |
--profile, -p |
string Docs: --profile, -p | codex exec --profile deep-review "review this change" |
--sandbox, -s |
read-only | workspace-write | danger-full-access Docs: --sandbox, -s | -no example |
--skip-git-repo-check |
boolean Docs: --skip-git-repo-check | -no example |
--worktree |
boolean Docs: --worktree | -no example |
-c, --config |
key=value Docs: -c, --config | -no example |
PROMPT | Positional arg of string | - (read stdin) Docs: PROMPT | -no example |
--all |
boolean Docs: --all | -no example |
--image, -i |
path[,path...] Docs: --image, -i | -no example |
--last |
boolean Docs: --last | -no example |
PROMPT | Positional arg of string | - (read stdin) Docs: PROMPT | -no example |
SESSION_ID | Positional arg of uuid | session name Docs: SESSION_ID | -no example |
--pretty |
boolean Docs: --pretty | codex execpolicy check --pretty \
--rules ~/.codex/rules/default.rules \
-- gh pr view 7888 --json title,body,comments |
--rules, -r |
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 var-args Docs: COMMAND... | -no example |
--device-auth |
boolean Docs: --device-auth | -no example |
--with-access-token |
boolean Docs: --with-access-token | printenv CODEX_ACCESS_TOKEN | codex login --with-access-token |
--with-api-key |
boolean Docs: --with-api-key | printenv OPENAI_API_KEY | codex login --with-api-key |
--bearer-token-env-var |
ENV_VAR Docs: --bearer-token-env-var | -no example |
--env KEY=VALUE |
repeatable Docs: --env KEY=VALUE | -no example |
--oauth-client-id |
CLIENT_ID Docs: --oauth-client-id | -no example |
--oauth-resource |
RESOURCE Docs: --oauth-resource | -no example |
--url |
https://… Docs: --url | -no example |
COMMAND... | Positional arg of stdio transport Docs: COMMAND... | -no example |
--all |
boolean Docs: --all | -no example |
--include-non-interactive |
boolean Docs: --include-non-interactive | -no example |
--last |
boolean Docs: --last | -no example |
SESSION_ID | Positional arg of uuid | session name Docs: SESSION_ID | -no example |
--all |
boolean Docs: --all | -no example |
--last |
boolean Docs: --last | -no example |
SESSION_ID | Positional arg of uuid Docs: SESSION_ID | -no example |
--allow-unix-socket |
path Docs: --allow-unix-socket | -no example |
--cd, -C |
DIR Docs: --cd, -C | -no example |
--config, -c |
key=value Docs: --config, -c | -no example |
--include-managed-config |
boolean Docs: --include-managed-config | -no example |
--log-denials |
boolean Docs: --log-denials | -no example |
--permission-profile, -P |
NAME Docs: --permission-profile, -P | -no example |
--profile, -p |
NAME Docs: --profile, -p | -no example |
COMMAND... | Positional arg of var-args Docs: COMMAND... | -no example |
--cd, -C |
DIR Docs: --cd, -C | -no example |
--config, -c |
key=value Docs: --config, -c | -no example |
--include-managed-config |
boolean Docs: --include-managed-config | -no example |
--permission-profile, -P |
NAME Docs: --permission-profile, -P | -no example |
--profile, -p |
NAME Docs: --profile, -p | -no example |
COMMAND... | Positional arg of var-args Docs: COMMAND... | -no example |
--cd, -C |
DIR Docs: --cd, -C | -no example |
--config, -c |
key=value Docs: --config, -c | -no example |
--include-managed-config |
boolean Docs: --include-managed-config | -no example |
--permission-profile, -P |
NAME Docs: --permission-profile, -P | -no example |
--profile, -p |
NAME Docs: --profile, -p | -no example |
COMMAND... | Positional arg of var-args Docs: COMMAND... | -no example |
--thread |
UUID | exact session name Docs: --thread | codex queue --thread <SESSION_ID> --message "Run the remaining checks" |
--message |
string Docs: --message | codex queue --thread <SESSION_ID> --message "Run the remaining checks" |
--json |
boolean Docs: --json | -no example |
--no-daemon |
boolean Docs: --no-daemon | codex remote-control --no-daemon |
Subcommands54
Own page: Codex CLI subcommands| Command | Description | Example |
|---|---|---|
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: 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: 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: 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 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 features disable <feature> Docs: codex features disable | -no example |
codex features enable | Persistently enable a feature flag in 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 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 add <name> -- <command...> | --url <value> Docs: codex mcp add | -no example |
codex mcp get | Show a specific server configuration. get <name> --json Docs: codex mcp get | -no example |
codex mcp list | List configured MCP servers. Add 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 add <plugin[@marketplace]> [--marketplace, -m NAME] [--json] Docs: codex plugin add | -no example |
codex plugin list | List installed plugins. With 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 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. 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 | -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 | -no example |
codex execpolicy check | Evaluate one or more [--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 |
| -no example |
Keyboard shortcuts14
Own page: Codex CLI keyboard shortcuts| Shortcut | Description |
|---|---|
@ | Type |
Up / Down | Press |
Ctrl+R | Search prompt history, then press |
Ctrl+O | Copy the latest completed Codex output from the main TUI (same as |
! | Prefix a line with |
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 |
Ctrl+C | Close the session (same as |
Ctrl+L | Clears only the terminal view and keeps the current chat (unlike |
Alt+R | Default binding to toggle raw scrollback mode (same as |
/ | Type |
Space (in /plugins) | Press |
Ctrl+G | Open the editor configured by |
Settings484
Own page: Codex CLI settings keys| Key | Description | Example |
|---|---|---|
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 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 boolean Docs: approval_policy.granular.mcp_elicitations | -no example |
approval_policy.granular.request_permissions | When boolean Docs: approval_policy.granular.request_permissions | -no example |
approval_policy.granular.rules | When boolean Docs: approval_policy.granular.rules | -no example |
approval_policy.granular.sandbox_approval | When boolean Docs: approval_policy.granular.sandbox_approval | -no example |
approval_policy.granular.skill_approval | When boolean Docs: approval_policy.granular.skill_approval | -no example |
approvals_reviewer | Who reviews eligible approval prompts under 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 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 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 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 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 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 number Docs: background_terminal_max_timeout | -no example |
browser_use.allow_history_access | Set to boolean Docs: browser_use.allow_history_access | -no example |
browser_use.default_origin_policy | Fallback browser-origin restrictions. Supports table Docs: browser_use.default_origin_policy | -no example |
browser_use.origins.<origin> | Per-origin browser restrictions with the same fields as 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 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 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 | 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: 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 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 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 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 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 ( 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 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 map<string, allow | deny> Docs: features.network_proxy.domains | -no example |
features.network_proxy.enable_socks5 | Expose SOCKS5 support. Defaults to boolean Docs: features.network_proxy.enable_socks5 | -no example |
features.network_proxy.enable_socks5_udp | Allow UDP over SOCKS5. Defaults to 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 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 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 | Deprecated legacy toggle; prefer the top-level boolean Docs: features.web_search | -no example |
features.web_search_cached | Deprecated legacy toggle. When boolean Docs: features.web_search_cached | -no example |
features.web_search_request | Deprecated legacy toggle. When boolean Docs: features.web_search_request | -no example |
feedback.enabled | Enable feedback submission via boolean Docs: feedback.enabled | -no example |
file_opener | URI scheme used to open citations from Codex output (default: 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 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 table Docs: hooks | -no example |
hooks.<Event> | Matcher groups for hook events such as 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 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 string Docs: instructions | -no example |
log_dir | Directory where Codex writes log files; defaults to 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 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 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 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 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 boolean Docs: memories.use_memories | -no example |
model | Model to use (e.g., 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 | 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 string (path) Docs: model_instructions_file | -no example |
model_provider | Provider id from string Docs: model_provider | -no example |
model_providers.<id> | Custom provider definition. Built-in provider IDs ( 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 | 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 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_standalone_web_search | Advertise support for a compatible standalone web search endpoint (default: false). boolean Docs: model_providers.<id>.supports_standalone_web_search | -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 Docs: model_providers.<id>.wire_api | -no example |
model_providers.amazon-bedrock.aws.profile | AWS profile name used by the built-in string Docs: model_providers.amazon-bedrock.aws.profile | -no example |
model_providers.amazon-bedrock.aws.region | AWS region used by the built-in string Docs: model_providers.amazon-bedrock.aws.region | -no example |
model_reasoning_effort | Reasoning effort advertised by the selected model, such as 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 string Docs: openai_base_url | openai_base_url = "https://us.api.openai.com/v1" |
oss_provider | Default local provider used when running with lmstudio | ollama Docs: oss_provider | -no example |
otel.environment | Environment tag applied to emitted OpenTelemetry events (default: 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 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 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 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 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 | deny Docs: permissions.<name>.network.unix_sockets.<path> | -no example |
permissions.<name>.workspace_roots | Profile-defined workspace roots that receive table Docs: permissions.<name>.workspace_roots | -no example |
permissions.<name>.workspace_roots.<path> | Opt a path into the profile's workspace root set when boolean Docs: permissions.<name>.workspace_roots.<path> | -no example |
personality | Deprecated compatibility setting. 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 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 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 array<string> Docs: project_doc_fallback_filenames | project_doc_fallback_filenames = ["TEAM_GUIDE.md", ".agents.md"] |
project_doc_max_bytes | Maximum bytes read from 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 ( string Docs: projects.<path>.trust_level | -no example |
review_model | Optional model override used by 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 boolean Docs: sandbox_workspace_write.exclude_slash_tmp | -no example |
sandbox_workspace_write.exclude_tmpdir_env_var | Exclude 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 array<string> Docs: sandbox_workspace_write.writable_roots | -no example |
service_tier | Preferred service tier for new turns. Use 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 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 boolean Docs: tools.view_image | -no example |
tools.web_search | Optional web search tool configuration. The object form can set search context size, allowed search domains, and approximate user location. boolean | { context_size = "low|medium|high", allowed_domains = [string], location = { country, region, city, timezone } } Docs: tools.web_search | -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 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 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. array<string> | null Docs: tui.status_line | -no example |
tui.terminal_title | Ordered list of terminal window/tab title item identifiers. Defaults to 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 boolean Docs: tui.vim_mode_default | -no example |
web_search | Web search mode (default: disabled | cached | indexed | live Docs: web_search | web_search = "cached" # default; serves results from the web search cache |
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 | 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 boolean Docs: allow_appshots | -no example |
allow_browser_and_computer_use | requirements.toml: Set to 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 boolean Docs: allow_managed_hooks_only | -no example |
allow_remote_control | requirements.toml: Set to boolean Docs: allow_remote_control | -no example |
allowed_approval_policies | requirements.toml: Allowed approval policies, such as array<string> Docs: allowed_approval_policies | -no example |
allowed_approvals_reviewers | requirements.toml: Allowed values for 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 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 array<string> Docs: allowed_sandbox_modes | -no example |
allowed_web_search_modes | requirements.toml: Allowed values for 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 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 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 boolean Docs: browser_use.allow_global_persistent_approval | -no example |
browser_use.allow_history_access | requirements.toml: Set to boolean Docs: browser_use.allow_history_access | -no example |
browser_use.allow_webmcp | requirements.toml: Set to 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 table Docs: browser_use.default_origin_policy | -no example |
browser_use.default_origin_policy.access | requirements.toml: Use 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 | thread Docs: browser_use.default_origin_policy.access_approval_lifetime | -no example |
browser_use.default_origin_policy.auto_review | requirements.toml: Use allow | deny Docs: browser_use.default_origin_policy.auto_review | -no example |
browser_use.default_origin_policy.downloads | requirements.toml: Use allow | deny Docs: browser_use.default_origin_policy.downloads | -no example |
browser_use.default_origin_policy.full_cdp_access | requirements.toml: Use allow | deny Docs: browser_use.default_origin_policy.full_cdp_access | -no example |
browser_use.default_origin_policy.persistent_approval | requirements.toml: Set to boolean Docs: browser_use.default_origin_policy.persistent_approval | -no example |
browser_use.default_origin_policy.uploads | requirements.toml: Use allow | deny Docs: browser_use.default_origin_policy.uploads | -no example |
browser_use.disable_auto_review | requirements.toml: Set to boolean Docs: browser_use.disable_auto_review | -no example |
browser_use.origins | requirements.toml: Origin-specific Browser Use policies. Keys use 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 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 | thread Docs: browser_use.origins.<pattern>.access_approval_lifetime | -no example |
browser_use.origins.<pattern>.auto_review | requirements.toml: Use allow | deny Docs: browser_use.origins.<pattern>.auto_review | -no example |
browser_use.origins.<pattern>.downloads | requirements.toml: Use allow | deny Docs: browser_use.origins.<pattern>.downloads | -no example |
browser_use.origins.<pattern>.full_cdp_access | requirements.toml: Use allow | deny Docs: browser_use.origins.<pattern>.full_cdp_access | -no example |
browser_use.origins.<pattern>.persistent_approval | requirements.toml: Set to boolean Docs: browser_use.origins.<pattern>.persistent_approval | -no example |
browser_use.origins.<pattern>.uploads | requirements.toml: Use 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 boolean Docs: computer_use.allow_locked_computer_use | -no example |
computer_use.allow_persistent_approval | requirements.toml: Set to 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 map<string, allow | deny> Docs: computer_use.macos.bundle_ids | -no example |
computer_use.macos.bundle_ids.<bundle-id> | requirements.toml: Use 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 map<string, allow | deny> Docs: computer_use.windows.aumids | -no example |
computer_use.windows.aumids.<aumid> | requirements.toml: Use 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 string Docs: computer_use.windows.exes[].binary_name | -no example |
computer_use.windows.exes[].product_name | requirements.toml: Required exact 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 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 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 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 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 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 | deny Docs: experimental_network.unix_sockets.<path> | -no example |
features | requirements.toml: Pinned feature values. Use canonical names from 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 boolean Docs: features.browser_use | -no example |
features.browser_use_external | requirements.toml: Set to boolean Docs: features.browser_use_external | -no example |
features.browser_use_full_cdp_access | requirements.toml: Set to boolean Docs: features.browser_use_full_cdp_access | -no example |
features.computer_use | requirements.toml: Set to boolean Docs: features.computer_use | -no example |
features.fast_mode | requirements.toml: Pin the canonical 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 boolean Docs: features.in_app_browser | -no example |
features.in_app_chat | requirements.toml: Set to boolean Docs: features.in_app_chat | -no example |
features.in_app_dictation | requirements.toml: Set to boolean Docs: features.in_app_dictation | -no example |
features.in_app_local_automation | requirements.toml: Set to boolean Docs: features.in_app_local_automation | -no example |
features.in_app_updates | requirements.toml: Set to 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 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 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 table Docs: hooks | -no example |
hooks.<Event> | requirements.toml: Matcher groups for a hook event such as 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 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 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 table Docs: marketplaces.allowed_sources.<name> | -no example |
marketplaces.allowed_sources.<name>.host_pattern | requirements.toml: Regular expression required when string Docs: marketplaces.allowed_sources.<name>.host_pattern | -no example |
marketplaces.allowed_sources.<name>.path | requirements.toml: Local marketplace directory required when string (absolute path) Docs: marketplaces.allowed_sources.<name>.path | -no example |
marketplaces.allowed_sources.<name>.ref | requirements.toml: Optional exact Git ref for a string Docs: marketplaces.allowed_sources.<name>.ref | -no example |
marketplaces.allowed_sources.<name>.source | requirements.toml: Marketplace source matcher type. Use git | host_pattern | local Docs: marketplaces.allowed_sources.<name>.source | -no example |
marketplaces.allowed_sources.<name>.url | requirements.toml: Git repository URL required when string Docs: marketplaces.allowed_sources.<name>.url | -no example |
marketplaces.restrict_to_allowed_sources | requirements.toml: When 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 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 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 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 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 string | table Docs: mcp_servers.<id>.identity.url | -no example |
mcp_servers.<id>.identity.url.expression | requirements.toml: Regular expression used by a 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 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 table Docs: model_providers.<id> | -no example |
models | requirements.toml: Contains the 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 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 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 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 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 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 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 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 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 array<string> Docs: remote_sandbox_config[].hostname_patterns | -no example |
rules | requirements.toml: Admin-enforced command rules merged with table Docs: rules | -no example |
rules.prefix_rules | requirements.toml: List of enforced prefix rules. Each rule must include 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 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 boolean Docs: windows.allow_mxc | -no example |
windows.allowed_sandbox_implementations | requirements.toml: Allowed legacy native Windows sandbox implementations ( array<string> Docs: windows.allowed_sandbox_implementations | -no example |
Environment variables14
Own page: Codex CLI environment variables| Variable | Description | Example |
|---|---|---|
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 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 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 | 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 | -no example |
SSL_CERT_FILE | Fallback PEM CA bundle path for HTTPS, login, and WebSocket clients when | -no example |
RUST_LOG | Controls Rust log filtering and verbosity for the CLI and app-server. 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 | -no example |
EDITOR | Editor opened by | -no example |
Config files18
Own page: Codex CLI config files| Path | Description | Example |
|---|---|---|
~/.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 | 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 | -no example |
~/.codex/hooks.json | User-level lifecycle hooks file; hooks can also be defined inline as | -no example |
<repo>/.codex/hooks.json | Project-local lifecycle hooks; load only when the project | -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 | -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 | -no example |
AGENTS.override.md | Per-directory override checked before | -no example |
~/.codex/rules/default.rules | User-layer execpolicy rules file (Starlark | -no example |
<repo>/.codex/rules/ | Project-local | -no example |
$CODEX_HOME/themes | Place a | -no example |
codex-tui.log | Opt-in plaintext TUI log written to the directory set by | 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
- Codex CLI in the tools directoryWhat it is, who makes it and how it fits next to other coding agents.
- Codex CLI errors and fixes14 error messages, quoted verbatim, with the documented fix for each.
- Codex and ChatGPT usage limitsPlan and tier limits for this tool, copied from the official docs.
Use other models in Codex CLI
Setup guides from the model-in-tool directory, each with the env vars and base URL from official docs.
Related reading
- Codex CLI 0.163: Instant Steering Is Now the DefaultCodex CLI 0.163.0 makes mid-response steering the default and adds searchable /config and a leader key. What changed and what to check before upgrading.
- Codex 'gpt-5.5 Model Is Not Supported' Error: The FixCodex says gpt-5.5 is not supported with a ChatGPT account because OpenAI retired it from ChatGPT sign-in on October 14. The fix and what still works.
- Agent Harness Lessons From a 500B-Token Decompile: Give Agents a PASS/FAIL OracleAgent harness lessons from a 500B+ token decompile: a byte-matching PASS/FAIL oracle beat the reviewer agent. How agents cheated it and what to copy.
- Codex CLI Background Daemon: How to Turn It OffCodex CLI starts a persistent, self-updating background daemon since 0.157.0. What it does, why it hit Hacker News and the reported workaround to turn it off.
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.
- learn.chatgpt.com/docs/developer-commands?surface=cli260 items
- learn.chatgpt.com/docs/config-file/config-reference486 items
- learn.chatgpt.com/docs/cli-customization4 items
- learn.chatgpt.com/docs/config-file/environment-variables13 items
- learn.chatgpt.com/docs/config-file/config-basic3 items
- learn.chatgpt.com/docs/config-file/config-advanced6 items
- learn.chatgpt.com/docs/agent-configuration/agents-md4 items
- learn.chatgpt.com/docs/agent-configuration/rules2 items
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.