config-sample.md +263 −112
1# Sample Configuration1# Sample Configuration
2 2
33Use this example configuration as a starting point. It includes most keys Codex reads from `config.toml`, along with defaults and short notes.Use this example configuration as a starting point. It includes most keys Codex reads from `config.toml`, along with default behaviors, recommended values where helpful, and short notes.
4 4
5For explanations and guidance, see:5For explanations and guidance, see:
6 6
7- [Config basics](https://developers.openai.com/codex/config-basic)7- [Config basics](https://developers.openai.com/codex/config-basic)
8- [Advanced Config](https://developers.openai.com/codex/config-advanced)8- [Advanced Config](https://developers.openai.com/codex/config-advanced)
9- [Config Reference](https://developers.openai.com/codex/config-reference)9- [Config Reference](https://developers.openai.com/codex/config-reference)
10- [Sandbox and approvals](https://developers.openai.com/codex/agent-approvals-security#sandbox-and-approvals)
11- [Managed configuration](https://developers.openai.com/codex/enterprise/managed-configuration)
10 12
11Use the snippet below as a reference. Copy only the keys and sections you need into `~/.codex/config.toml` (or into a project-scoped `.codex/config.toml`), then adjust values for your setup.13Use the snippet below as a reference. Copy only the keys and sections you need into `~/.codex/config.toml` (or into a project-scoped `.codex/config.toml`), then adjust values for your setup.
12 14
13```toml15```toml
14# Codex example configuration (config.toml)16# Codex example configuration (config.toml)
15#17#
1618# This file lists all keys Codex reads from config.toml, their default values,# This file lists the main keys Codex reads from config.toml, along with default
1719# and concise explanations. Values here mirror the effective defaults compiled# behaviors, recommended examples, and concise explanations. Adjust as needed.
18# into the CLI. Adjust as needed.
19#20#
20# Notes21# Notes
21# - Root keys must appear before tables in TOML.22# - Root keys must appear before tables in TOML.
26# Core Model Selection27# Core Model Selection
27################################################################################28################################################################################
28 29
2930# Primary model used by Codex. Default: "gpt-5.2-codex" on all platforms.# Primary model used by Codex. Recommended example for most users: "gpt-5.5".
3031model = "gpt-5.2-codex"model = "gpt-5.5"
31 32
3233# Default communication style for supported models. Default: "friendly".# Communication style for supported models. Allowed values: none | friendly | pragmatic
3334# Allowed values: none | friendly | pragmatic# personality = "pragmatic"
34# personality = "friendly"
35 35
36# Optional model override for /review. Default: unset (uses current session model).36# Optional model override for /review. Default: unset (uses current session model).
3737# review_model = "gpt-5.2-codex"# review_model = "gpt-5.5"
38 38
39# Provider id selected from [model_providers]. Default: "openai".39# Provider id selected from [model_providers]. Default: "openai".
40model_provider = "openai"40model_provider = "openai"
42# Default OSS provider for --oss sessions. When unset, Codex prompts. Default: unset.42# Default OSS provider for --oss sessions. When unset, Codex prompts. Default: unset.
43# oss_provider = "ollama"43# oss_provider = "ollama"
44 44
4545# Optional manual model metadata. When unset, Codex auto-detects from model.# Preferred service tier. `fast` is honored only when enabled in [features].
4646# Uncomment to force values.# service_tier = "flex" # fast | flex
47
48# Optional manual model metadata. When unset, Codex uses model or preset defaults.
47# model_context_window = 128000 # tokens; default: auto for model49# model_context_window = 128000 # tokens; default: auto for model
4850# model_auto_compact_token_limit = 0 # tokens; unset uses model defaults# model_auto_compact_token_limit = 64000 # tokens; unset uses model defaults
4951# tool_output_token_limit = 10000 # tokens stored per tool output; default: 10000 for gpt-5.2-codex# tool_output_token_limit = 12000 # tokens stored per tool output
52# model_catalog_json = "/absolute/path/to/models.json" # optional startup-only model catalog override
53# background_terminal_max_timeout = 300000 # ms; max empty write_stdin poll window (default 5m)
50# log_dir = "/absolute/path/to/codex-logs" # directory for Codex logs; default: "$CODEX_HOME/log"54# log_dir = "/absolute/path/to/codex-logs" # directory for Codex logs; default: "$CODEX_HOME/log"
55# sqlite_home = "/absolute/path/to/codex-state" # optional SQLite-backed runtime state directory
51 56
52################################################################################57################################################################################
53# Reasoning & Verbosity (Responses API capable models)58# Reasoning & Verbosity (Responses API capable models)
54################################################################################59################################################################################
55 60
5661# Reasoning effort: minimal | low | medium | high | xhigh (default: medium; xhigh on gpt-5.2-codex and gpt-5.2)# Reasoning effort: minimal | low | medium | high | xhigh
5762model_reasoning_effort = "medium"# model_reasoning_effort = "medium"
63
64# Optional override used when Codex runs in plan mode: none | minimal | low | medium | high | xhigh
65# plan_mode_reasoning_effort = "high"
58 66
5967# Reasoning summary: auto | concise | detailed | none (default: auto)# Reasoning summary: auto | concise | detailed | none
60# model_reasoning_summary = "auto"68# model_reasoning_summary = "auto"
61 69
6270# Text verbosity for GPT-5 family (Responses API): low | medium | high (default: medium)# Text verbosity for GPT-5 family (Responses API): low | medium | high
63# model_verbosity = "medium"71# model_verbosity = "medium"
64 72
6573# Force enable or disable reasoning summaries for current model# Force enable or disable reasoning summaries for current model.
66# model_supports_reasoning_summaries = true74# model_supports_reasoning_summaries = true
67 75
68################################################################################76################################################################################
72# Additional user instructions are injected before AGENTS.md. Default: unset.80# Additional user instructions are injected before AGENTS.md. Default: unset.
73# developer_instructions = ""81# developer_instructions = ""
74 82
75# (Ignored) Optional legacy base instructions override (prefer AGENTS.md). Default: unset.
76# instructions = ""
77
78# Inline override for the history compaction prompt. Default: unset.83# Inline override for the history compaction prompt. Default: unset.
79# compact_prompt = ""84# compact_prompt = ""
80 85
86# Override the default commit co-author trailer. Set to "" to disable it.
87# commit_attribution = "Jane Doe <jane@example.com>"
88
81# Override built-in base instructions with a file path. Default: unset.89# Override built-in base instructions with a file path. Default: unset.
82# model_instructions_file = "/absolute/or/relative/path/to/instructions.txt"90# model_instructions_file = "/absolute/or/relative/path/to/instructions.txt"
83 91
84# Migration note: experimental_instructions_file was renamed to model_instructions_file (deprecated).
85
86# Load the compact prompt override from a file. Default: unset.92# Load the compact prompt override from a file. Default: unset.
87# experimental_compact_prompt_file = "/absolute/or/relative/path/to/compact_prompt.txt"93# experimental_compact_prompt_file = "/absolute/or/relative/path/to/compact_prompt.txt"
88 94
89# Legacy name for apply_patch_freeform. Default: false
90include_apply_patch_tool = false
91
92################################################################################95################################################################################
93# Notifications96# Notifications
94################################################################################97################################################################################
95 98
96# External notifier program (argv array). When unset: disabled.99# External notifier program (argv array). When unset: disabled.
97100# Example: notify = ["notify-send", "Codex"]# notify = ["notify-send", "Codex"]
98notify = [ ]
99 101
100################################################################################102################################################################################
101# Approval & Sandbox103# Approval & Sandbox
105# - untrusted: only known-safe read-only commands auto-run; others prompt107# - untrusted: only known-safe read-only commands auto-run; others prompt
106# - on-request: model decides when to ask (default)108# - on-request: model decides when to ask (default)
107# - never: never prompt (risky)109# - never: never prompt (risky)
110# - { granular = { ... } }: allow or auto-reject selected prompt categories
108approval_policy = "on-request"111approval_policy = "on-request"
112# Who reviews eligible approval prompts: user (default) | auto_review
113# approvals_reviewer = "user"
114
115# Example granular policy:
116# approval_policy = { granular = {
117# sandbox_approval = true,
118# rules = true,
119# mcp_elicitations = true,
120# request_permissions = false,
121# skill_approval = false
122# } }
123
124# Allow login-shell semantics for shell-based tools when they request `login = true`.
125# Default: true. Set false to force non-login shells and reject explicit login-shell requests.
126allow_login_shell = true
109 127
110# Filesystem/network sandbox policy for tool calls:128# Filesystem/network sandbox policy for tool calls:
111# - read-only (default)129# - read-only (default)
112# - workspace-write130# - workspace-write
113# - danger-full-access (no sandbox; extremely risky)131# - danger-full-access (no sandbox; extremely risky)
114sandbox_mode = "read-only"132sandbox_mode = "read-only"
133# Named permissions profile to apply by default. Required before using [permissions.<name>].
134# default_permissions = "workspace"
135
136# Example filesystem profile. Use `"none"` to deny reads for exact paths or
137# glob patterns. On platforms that need pre-expanded glob matches, set
138# glob_scan_max_depth when using unbounded patterns such as `**`.
139# [permissions.workspace.filesystem]
140# glob_scan_max_depth = 3
141# ":project_roots" = { "." = "write", "**/*.env" = "none" }
142# "/absolute/path/to/secrets" = "none"
115 143
116################################################################################144################################################################################
117# Authentication & Login145# Authentication & Login
120# Where to persist CLI login credentials: file (default) | keyring | auto148# Where to persist CLI login credentials: file (default) | keyring | auto
121cli_auth_credentials_store = "file"149cli_auth_credentials_store = "file"
122 150
123151# Base URL for ChatGPT auth flow (not OpenAI API). Default:# Base URL for ChatGPT auth flow (not OpenAI API).
124chatgpt_base_url = "https://chatgpt.com/backend-api/"152chatgpt_base_url = "https://chatgpt.com/backend-api/"
125 153
154# Optional base URL override for the built-in OpenAI provider.
155# openai_base_url = "https://us.api.openai.com/v1"
156
126# Restrict ChatGPT login to a specific workspace id. Default: unset.157# Restrict ChatGPT login to a specific workspace id. Default: unset.
127158# forced_chatgpt_workspace_id = ""# forced_chatgpt_workspace_id = "00000000-0000-0000-0000-000000000000"
128 159
129# Force login mechanism when Codex would normally auto-select. Default: unset.160# Force login mechanism when Codex would normally auto-select. Default: unset.
130# Allowed values: chatgpt | api161# Allowed values: chatgpt | api
132 163
133# Preferred store for MCP OAuth credentials: auto (default) | file | keyring164# Preferred store for MCP OAuth credentials: auto (default) | file | keyring
134mcp_oauth_credentials_store = "auto"165mcp_oauth_credentials_store = "auto"
135
136# Optional fixed port for MCP OAuth callback: 1-65535. Default: unset.166# Optional fixed port for MCP OAuth callback: 1-65535. Default: unset.
137# mcp_oauth_callback_port = 4321167# mcp_oauth_callback_port = 4321
168# Optional redirect URI override for MCP OAuth login (for example, remote devbox ingress).
169# Custom callback paths are supported. `mcp_oauth_callback_port` still controls the listener port.
170# mcp_oauth_callback_url = "https://devbox.example.internal/callback"
138 171
139################################################################################172################################################################################
140# Project Documentation Controls173# Project Documentation Controls
185# If you use --yolo or another full access sandbox setting, web search defaults to live.218# If you use --yolo or another full access sandbox setting, web search defaults to live.
186web_search = "cached"219web_search = "cached"
187 220
221# Active profile name. When unset, no profile is applied.
222# profile = "default"
223
224# Suppress the warning shown when under-development feature flags are enabled.
225# suppress_unstable_features_warning = true
226
188################################################################################227################################################################################
189228# Profiles (named presets)# Agents (multi-agent roles and limits)
190################################################################################229################################################################################
191 230
192231# Active profile name. When unset, no profile is applied.[agents]
193232# profile = "default"# Maximum concurrently open agent threads. Default: 6
233# max_threads = 6
234# Maximum nested spawn depth. Root session starts at depth 0. Default: 1
235# max_depth = 1
236# Default timeout per worker for spawn_agents_on_csv jobs. When unset, the tool defaults to 1800 seconds.
237# job_max_runtime_seconds = 1800
238
239# [agents.reviewer]
240# description = "Find correctness, security, and test risks in code."
241# config_file = "./agents/reviewer.toml" # relative to the config.toml that defines it
242# nickname_candidates = ["Athena", "Ada"]
194 243
195################################################################################244################################################################################
196# Skills (per-skill overrides)245# Skills (per-skill overrides)
198 247
199# Disable or re-enable a specific skill without deleting it.248# Disable or re-enable a specific skill without deleting it.
200[[skills.config]]249[[skills.config]]
201250# path = "/path/to/skill"# path = "/path/to/skill/SKILL.md"
202# enabled = false251# enabled = false
203 252
204################################################################################
205# Experimental toggles (legacy; prefer [features])
206################################################################################
207
208experimental_use_unified_exec_tool = false
209
210# Include apply_patch via freeform editing path (affects default tool set). Default: false
211experimental_use_freeform_apply_patch = false
212
213################################################################################253################################################################################
214# Sandbox settings (tables)254# Sandbox settings (tables)
215################################################################################255################################################################################
232[shell_environment_policy]272[shell_environment_policy]
233# inherit: all (default) | core | none273# inherit: all (default) | core | none
234inherit = "all"274inherit = "all"
235275# Skip default excludes for names containing KEY/SECRET/TOKEN (case-insensitive). Default: true# Skip default excludes for names containing KEY/SECRET/TOKEN (case-insensitive). Default: false
236276ignore_default_excludes = trueignore_default_excludes = false
237# Case-insensitive glob patterns to remove (e.g., "AWS_*", "AZURE_*"). Default: []277# Case-insensitive glob patterns to remove (e.g., "AWS_*", "AZURE_*"). Default: []
238exclude = []278exclude = []
239# Explicit key/value overrides (always win). Default: {}279# Explicit key/value overrides (always win). Default: {}
243# Experimental: run via user shell profile. Default: false283# Experimental: run via user shell profile. Default: false
244experimental_use_profile = false284experimental_use_profile = false
245 285
286################################################################################
287# Managed network proxy settings
288################################################################################
289
290# Set `default_permissions = "workspace"` before enabling this profile.
291# [permissions.workspace.network]
292# enabled = true
293# proxy_url = "http://127.0.0.1:43128"
294# admin_url = "http://127.0.0.1:43129"
295# enable_socks5 = false
296# socks_url = "http://127.0.0.1:43130"
297# enable_socks5_udp = false
298# allow_upstream_proxy = false
299# dangerously_allow_non_loopback_proxy = false
300# dangerously_allow_non_loopback_admin = false
301# dangerously_allow_all_unix_sockets = false
302# mode = "limited" # limited | full
303# allow_local_binding = false
304#
305# [permissions.workspace.network.domains]
306# "api.openai.com" = "allow"
307# "example.com" = "deny"
308#
309# [permissions.workspace.network.unix_sockets]
310# "/var/run/docker.sock" = "allow"
311
246################################################################################312################################################################################
247# History (table)313# History (table)
248################################################################################314################################################################################
251# save-all (default) | none317# save-all (default) | none
252persistence = "save-all"318persistence = "save-all"
253# Maximum bytes for history file; oldest entries are trimmed when exceeded. Example: 5242880319# Maximum bytes for history file; oldest entries are trimmed when exceeded. Example: 5242880
254320# max_bytes = 0# max_bytes = 5242880
255 321
256################################################################################322################################################################################
257# UI, Notifications, and Misc (tables)323# UI, Notifications, and Misc (tables)
265# Notification mechanism for terminal alerts: auto | osc9 | bel. Default: "auto"331# Notification mechanism for terminal alerts: auto | osc9 | bel. Default: "auto"
266# notification_method = "auto"332# notification_method = "auto"
267 333
334# When notifications fire: unfocused (default) | always
335# notification_condition = "unfocused"
336
268# Enables welcome/status/spinner animations. Default: true337# Enables welcome/status/spinner animations. Default: true
269animations = true338animations = true
270 339
274# Control alternate screen usage (auto skips it in Zellij to preserve scrollback).343# Control alternate screen usage (auto skips it in Zellij to preserve scrollback).
275# alternate_screen = "auto"344# alternate_screen = "auto"
276 345
277346# Ordered list of footer status-line item IDs. Default: null (disabled).# Ordered list of footer status-line item IDs. When unset, Codex uses:
347# ["model-with-reasoning", "context-remaining", "current-dir"].
348# Set to [] to hide the footer.
278# status_line = ["model", "context-remaining", "git-branch"]349# status_line = ["model", "context-remaining", "git-branch"]
279 350
351# Ordered list of terminal window/tab title item IDs. When unset, Codex uses:
352# ["spinner", "project"]. Set to [] to clear the title.
353# Available IDs include app-name, project, spinner, status, thread, git-branch, model,
354# and task-progress.
355# terminal_title = ["spinner", "project"]
356
357# Syntax-highlighting theme (kebab-case). Use /theme in the TUI to preview and save.
358# You can also add custom .tmTheme files under $CODEX_HOME/themes.
359# theme = "catppuccin-mocha"
360
361# Internal tooltip state keyed by model slug. Usually managed by Codex.
362# [tui.model_availability_nux]
363# "gpt-5.4" = 1
364
365# Enable or disable analytics for this machine. When unset, Codex uses its default behavior.
366[analytics]
367enabled = true
368
280# Control whether users can submit feedback from `/feedback`. Default: true369# Control whether users can submit feedback from `/feedback`. Default: true
281[feedback]370[feedback]
282enabled = true371enabled = true
288# hide_rate_limit_model_nudge = true377# hide_rate_limit_model_nudge = true
289# hide_gpt5_1_migration_prompt = true378# hide_gpt5_1_migration_prompt = true
290# "hide_gpt-5.1-codex-max_migration_prompt" = true379# "hide_gpt-5.1-codex-max_migration_prompt" = true
291380# model_migrations = { "gpt-4.1" = "gpt-5.1" }# model_migrations = { "gpt-5.3-codex" = "gpt-5.4" }
292
293# Suppress the warning shown when under-development feature flags are enabled.
294# suppress_unstable_features_warning = true
295 381
296################################################################################382################################################################################
297# Centralized Feature Flags (preferred)383# Centralized Feature Flags (preferred)
299 385
300[features]386[features]
301# Leave this table empty to accept defaults. Set explicit booleans to opt in/out.387# Leave this table empty to accept defaults. Set explicit booleans to opt in/out.
302388shell_tool = true# shell_tool = true
303# apps = false389# apps = false
304390# apps_mcp_gateway = false# codex_hooks = false
305391# Deprecated legacy toggles; prefer the top-level `web_search` setting.# unified_exec = true
306392# web_search = false# shell_snapshot = true
307393# web_search_cached = false# multi_agent = true
308# web_search_request = false
309unified_exec = false
310shell_snapshot = false
311apply_patch_freeform = false
312# search_tool = false
313# personality = true394# personality = true
314395request_rule = true# fast_mode = true
315396collaboration_modes = true# enable_request_compression = true
316397use_linux_sandbox_bwrap = false# skill_mcp_dependency_install = true
317398experimental_windows_sandbox = false# prevent_idle_sleep = false
318399elevated_windows_sandbox = false
319400remote_models = false################################################################################
320401runtime_metrics = false# Memories (table)
321402powershell_utf8 = true################################################################################
322403child_agents_md = false
404# Enable memories with [features].memories, then tune memory behavior here.
405# [memories]
406# generate_memories = true
407# use_memories = true
408# disable_on_external_context = false # legacy alias: no_memories_if_mcp_or_web_search
409
410################################################################################
411# Lifecycle hooks can be configured here inline or in a sibling hooks.json.
412################################################################################
413
414# [hooks]
415# [[hooks.PreToolUse]]
416# matcher = "^Bash$"
417#
418# [[hooks.PreToolUse.hooks]]
419# type = "command"
420# command = 'python3 "/absolute/path/to/pre_tool_use_policy.py"'
421# timeout = 30
422# statusMessage = "Checking Bash command"
323 423
324################################################################################424################################################################################
325# Define MCP servers under this table. Leave empty to disable.425# Define MCP servers under this table. Leave empty to disable.
334# command = "docs-server" # required434# command = "docs-server" # required
335# args = ["--port", "4000"] # optional435# args = ["--port", "4000"] # optional
336# env = { "API_KEY" = "value" } # optional key/value pairs copied as-is436# env = { "API_KEY" = "value" } # optional key/value pairs copied as-is
337437# env_vars = ["ANOTHER_SECRET"] # optional: forward these from the parent env# env_vars = ["ANOTHER_SECRET"] # optional: forward local parent env vars
438# env_vars = ["LOCAL_TOKEN", { name = "REMOTE_TOKEN", source = "remote" }]
338# cwd = "/path/to/server" # optional working directory override439# cwd = "/path/to/server" # optional working directory override
440# experimental_environment = "remote" # experimental: run stdio via a remote executor
339# startup_timeout_sec = 10.0 # optional; default 10.0 seconds441# startup_timeout_sec = 10.0 # optional; default 10.0 seconds
340# # startup_timeout_ms = 10000 # optional alias for startup timeout (milliseconds)442# # startup_timeout_ms = 10000 # optional alias for startup timeout (milliseconds)
341# tool_timeout_sec = 60.0 # optional; default 60.0 seconds443# tool_timeout_sec = 60.0 # optional; default 60.0 seconds
342# enabled_tools = ["search", "summarize"] # optional allow-list444# enabled_tools = ["search", "summarize"] # optional allow-list
343# disabled_tools = ["slow-tool"] # optional deny-list (applied after allow-list)445# disabled_tools = ["slow-tool"] # optional deny-list (applied after allow-list)
446# scopes = ["read:docs"] # optional OAuth scopes
447# oauth_resource = "https://docs.example.com/" # optional OAuth resource
344 448
345# --- Example: Streamable HTTP transport ---449# --- Example: Streamable HTTP transport ---
346# [mcp_servers.github]450# [mcp_servers.github]
353# startup_timeout_sec = 10.0 # optional457# startup_timeout_sec = 10.0 # optional
354# tool_timeout_sec = 60.0 # optional458# tool_timeout_sec = 60.0 # optional
355# enabled_tools = ["list_issues"] # optional allow-list459# enabled_tools = ["list_issues"] # optional allow-list
460# disabled_tools = ["delete_issue"] # optional deny-list
461# scopes = ["repo"] # optional OAuth scopes
356 462
357################################################################################463################################################################################
358# Model Providers464# Model Providers
359################################################################################465################################################################################
360 466
361# Built-ins include:467# Built-ins include:
362468# - openai (Responses API; requires login or OPENAI_API_KEY via auth flow)# - openai
363469# - oss (Chat Completions API; defaults to http://localhost:11434/v1)# - ollama
470# - lmstudio
471# These IDs are reserved. Use a different ID for custom providers.
364 472
365[model_providers]473[model_providers]
366 474
368# [model_providers.openaidr]476# [model_providers.openaidr]
369# name = "OpenAI Data Residency"477# name = "OpenAI Data Residency"
370# base_url = "https://us.api.openai.com/v1" # example with 'us' domain prefix478# base_url = "https://us.api.openai.com/v1" # example with 'us' domain prefix
371479# wire_api = "responses" # "responses" | "chat" (default varies)# wire_api = "responses" # only supported value
372480# # requires_openai_auth = true # built-in OpenAI defaults to true# # requires_openai_auth = true # use only for providers backed by OpenAI auth
373# # request_max_retries = 4 # default 4; max 100481# # request_max_retries = 4 # default 4; max 100
374# # stream_max_retries = 5 # default 5; max 100482# # stream_max_retries = 5 # default 5; max 100
375# # stream_idle_timeout_ms = 300000 # default 300_000 (5m)483# # stream_idle_timeout_ms = 300000 # default 300_000 (5m)
484# # supports_websockets = true # optional
376# # experimental_bearer_token = "sk-example" # optional dev-only direct bearer token485# # experimental_bearer_token = "sk-example" # optional dev-only direct bearer token
377# # http_headers = { "X-Example" = "value" }486# # http_headers = { "X-Example" = "value" }
378# # env_http_headers = { "OpenAI-Organization" = "OPENAI_ORGANIZATION", "OpenAI-Project" = "OPENAI_PROJECT" }487# # env_http_headers = { "OpenAI-Organization" = "OPENAI_ORGANIZATION", "OpenAI-Project" = "OPENAI_PROJECT" }
379 488
380489# --- Example: Azure (Chat/Responses depending on endpoint) ---# --- Example: Azure/OpenAI-compatible provider ---
381# [model_providers.azure]490# [model_providers.azure]
382# name = "Azure"491# name = "Azure"
383# base_url = "https://YOUR_PROJECT_NAME.openai.azure.com/openai"492# base_url = "https://YOUR_PROJECT_NAME.openai.azure.com/openai"
384493# wire_api = "responses" # or "chat" per endpoint# wire_api = "responses"
385# query_params = { api-version = "2025-04-01-preview" }494# query_params = { api-version = "2025-04-01-preview" }
386# env_key = "AZURE_OPENAI_API_KEY"495# env_key = "AZURE_OPENAI_API_KEY"
387496# # env_key_instructions = "Set AZURE_OPENAI_API_KEY in your environment"# env_key_instructions = "Set AZURE_OPENAI_API_KEY in your environment"
497# # supports_websockets = false
498
499# --- Example: command-backed bearer token auth ---
500# [model_providers.proxy]
501# name = "OpenAI using LLM proxy"
502# base_url = "https://proxy.example.com/v1"
503# wire_api = "responses"
504#
505# [model_providers.proxy.auth]
506# command = "/usr/local/bin/fetch-codex-token"
507# args = ["--audience", "codex"]
508# timeout_ms = 5000
509# refresh_interval_ms = 300000
388 510
389# --- Example: Local OSS (e.g., Ollama-compatible) ---511# --- Example: Local OSS (e.g., Ollama-compatible) ---
390512# [model_providers.ollama]# [model_providers.local_ollama]
391# name = "Ollama"513# name = "Ollama"
392# base_url = "http://localhost:11434/v1"514# base_url = "http://localhost:11434/v1"
393515# wire_api = "chat"# wire_api = "responses"
516
517################################################################################
518# Apps / Connectors
519################################################################################
520
521# Optional per-app controls.
522[apps]
523# [_default] applies to all apps unless overridden per app.
524# [apps._default]
525# enabled = true
526# destructive_enabled = true
527# open_world_enabled = true
528#
529# [apps.google_drive]
530# enabled = false
531# destructive_enabled = false # block destructive-hint tools for this app
532# default_tools_enabled = true
533# default_tools_approval_mode = "prompt" # auto | prompt | approve
534#
535# [apps.google_drive.tools."files/delete"]
536# enabled = false
537# approval_mode = "approve"
538
539# Optional tool suggestion allowlist for connectors or plugins Codex can offer to install.
540# [tool_suggest]
541# discoverables = [
542# { type = "connector", id = "gmail" },
543# { type = "plugin", id = "figma@openai-curated" },
544# ]
394 545
395################################################################################546################################################################################
396# Profiles (named presets)547# Profiles (named presets)
399[profiles]550[profiles]
400 551
401# [profiles.default]552# [profiles.default]
402553# model = "gpt-5.2-codex"# model = "gpt-5.4"
403# model_provider = "openai"554# model_provider = "openai"
404# approval_policy = "on-request"555# approval_policy = "on-request"
405# sandbox_mode = "read-only"556# sandbox_mode = "read-only"
557# service_tier = "flex"
406# oss_provider = "ollama"558# oss_provider = "ollama"
407# model_reasoning_effort = "medium"559# model_reasoning_effort = "medium"
560# plan_mode_reasoning_effort = "high"
408# model_reasoning_summary = "auto"561# model_reasoning_summary = "auto"
409# model_verbosity = "medium"562# model_verbosity = "medium"
410563# personality = "friendly" # or "pragmatic" or "none"# personality = "pragmatic" # or "friendly" or "none"
411# chatgpt_base_url = "https://chatgpt.com/backend-api/"564# chatgpt_base_url = "https://chatgpt.com/backend-api/"
565# model_catalog_json = "./models.json"
566# model_instructions_file = "/absolute/or/relative/path/to/instructions.txt"
412# experimental_compact_prompt_file = "./compact_prompt.txt"567# experimental_compact_prompt_file = "./compact_prompt.txt"
413568# include_apply_patch_tool = false# tools_view_image = true
414# experimental_use_unified_exec_tool = false
415# experimental_use_freeform_apply_patch = false
416# tools.web_search = false # deprecated legacy alias; prefer top-level `web_search`
417# features = { unified_exec = false }569# features = { unified_exec = false }
418 570
419################################################################################
420# Apps / Connectors
421################################################################################
422
423# Optional per-app controls.
424[apps]
425# [apps.google_drive]
426# enabled = false
427# disabled_reason = "user" # or "unknown"
428
429################################################################################571################################################################################
430# Projects (trust levels)572# Projects (trust levels)
431################################################################################573################################################################################
432 574
433# Mark specific worktrees as trusted or untrusted.
434[projects]575[projects]
576# Mark specific worktrees as trusted or untrusted.
435# [projects."/absolute/path/to/project"]577# [projects."/absolute/path/to/project"]
436# trust_level = "trusted" # or "untrusted"578# trust_level = "trusted" # or "untrusted"
437 579
580################################################################################
581# Tools
582################################################################################
583
584[tools]
585# view_image = true
586
438################################################################################587################################################################################
439# OpenTelemetry (OTEL) - disabled by default588# OpenTelemetry (OTEL) - disabled by default
440################################################################################589################################################################################
448exporter = "none"597exporter = "none"
449# Trace exporter: none (default) | otlp-http | otlp-grpc598# Trace exporter: none (default) | otlp-http | otlp-grpc
450trace_exporter = "none"599trace_exporter = "none"
600# Metrics exporter: none | statsig | otlp-http | otlp-grpc
601metrics_exporter = "statsig"
451 602
452# Example OTLP/HTTP exporter configuration603# Example OTLP/HTTP exporter configuration
453# [otel.exporter."otlp-http"]604# [otel.exporter."otlp-http"]
457# [otel.exporter."otlp-http".headers]608# [otel.exporter."otlp-http".headers]
458# "x-otlp-api-key" = "${OTLP_TOKEN}"609# "x-otlp-api-key" = "${OTLP_TOKEN}"
459 610
460# Example OTLP/gRPC exporter configuration
461# [otel.exporter."otlp-grpc"]
462# endpoint = "https://otel.example.com:4317",
463# headers = { "x-otlp-meta" = "abc123" }
464
465# Example OTLP exporter with mutual TLS
466# [otel.exporter."otlp-http"]
467# endpoint = "https://otel.example.com/v1/logs"
468# protocol = "binary"
469
470# [otel.exporter."otlp-http".headers]
471# "x-otlp-api-key" = "${OTLP_TOKEN}"
472
473# [otel.exporter."otlp-http".tls]611# [otel.exporter."otlp-http".tls]
474# ca-certificate = "certs/otel-ca.pem"612# ca-certificate = "certs/otel-ca.pem"
475# client-certificate = "/etc/codex/certs/client.pem"613# client-certificate = "/etc/codex/certs/client.pem"
476# client-private-key = "/etc/codex/certs/client-key.pem"614# client-private-key = "/etc/codex/certs/client-key.pem"
615
616# Example OTLP/gRPC trace exporter configuration
617# [otel.trace_exporter."otlp-grpc"]
618# endpoint = "https://otel.example.com:4317"
619# headers = { "x-otlp-meta" = "abc123" }
620
621################################################################################
622# Windows
623################################################################################
624
625[windows]
626# Native Windows sandbox mode (Windows only): unelevated | elevated
627sandbox = "unelevated"
477```628```