config-sample.md +289 −114
1# Sample Configuration1# Sample Configuration
2 2
33A complete example config.toml you can copy and adaptUse 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
5Use this example configuration as a starting point. It includes most keys Codex reads from `config.toml`, along with defaults and short notes.
6 4
7For explanations and guidance, see:5For explanations and guidance, see:
8 6
9- [Config basics](https://developers.openai.com/codex/config-basic)7- [Config basics](https://developers.openai.com/codex/config-basic)
10- [Advanced Config](https://developers.openai.com/codex/config-advanced)8- [Advanced Config](https://developers.openai.com/codex/config-advanced)
11- [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)
12 12
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.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.
14 14
15```toml15```toml
16# Codex example configuration (config.toml)16# Codex example configuration (config.toml)
17#17#
1818# 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
1919# and concise explanations. Values here mirror the effective defaults compiled# behaviors, recommended examples, and concise explanations. Adjust as needed.
20# into the CLI. Adjust as needed.
21#20#
22# Notes21# Notes
23# - Root keys must appear before tables in TOML.22# - Root keys must appear before tables in TOML.
28# Core Model Selection27# Core Model Selection
29################################################################################28################################################################################
30 29
3130# 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".
3231model = "gpt-5.2-codex"model = "gpt-5.5"
33 32
3433# Default communication style for supported models. Default: "friendly".# Communication style for supported models. Allowed values: none | friendly | pragmatic
3534# Allowed values: none | friendly | pragmatic# personality = "pragmatic"
36# personality = "friendly"
37 35
38# Optional model override for /review. Default: unset (uses current session model).36# Optional model override for /review. Default: unset (uses current session model).
3937# review_model = "gpt-5.2-codex"# review_model = "gpt-5.5"
40 38
41# Provider id selected from [model_providers]. Default: "openai".39# Provider id selected from [model_providers]. Default: "openai".
42model_provider = "openai"40model_provider = "openai"
44# 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.
45# oss_provider = "ollama"43# oss_provider = "ollama"
46 44
4745# Optional manual model metadata. When unset, Codex auto-detects from model.# Preferred service tier. `fast` is honored only when enabled in [features].
4846# Uncomment to force values.# service_tier = "flex" # fast | flex
47
48# Optional manual model metadata. When unset, Codex uses model or preset defaults.
49# model_context_window = 128000 # tokens; default: auto for model49# model_context_window = 128000 # tokens; default: auto for model
5050# model_auto_compact_token_limit = 0 # tokens; unset uses model defaults# model_auto_compact_token_limit = 64000 # tokens; unset uses model defaults
5151# 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)
52# 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
53 56
54################################################################################57################################################################################
55# Reasoning & Verbosity (Responses API capable models)58# Reasoning & Verbosity (Responses API capable models)
56################################################################################59################################################################################
57 60
5861# 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
5962model_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"
60 66
6167# Reasoning summary: auto | concise | detailed | none (default: auto)# Reasoning summary: auto | concise | detailed | none
62# model_reasoning_summary = "auto"68# model_reasoning_summary = "auto"
63 69
6470# Text verbosity for GPT-5 family (Responses API): low | medium | high (default: medium)# Text verbosity for GPT-5 family (Responses API): low | medium | high
65# model_verbosity = "medium"71# model_verbosity = "medium"
66 72
6773# Force enable or disable reasoning summaries for current model# Force enable or disable reasoning summaries for current model.
68# model_supports_reasoning_summaries = true74# model_supports_reasoning_summaries = true
69 75
70################################################################################76################################################################################
74# Additional user instructions are injected before AGENTS.md. Default: unset.80# Additional user instructions are injected before AGENTS.md. Default: unset.
75# developer_instructions = ""81# developer_instructions = ""
76 82
77# (Ignored) Optional legacy base instructions override (prefer AGENTS.md). Default: unset.
78# instructions = ""
79
80# Inline override for the history compaction prompt. Default: unset.83# Inline override for the history compaction prompt. Default: unset.
81# compact_prompt = ""84# compact_prompt = ""
82 85
86# Override the default commit co-author trailer. This only takes effect when
87# [features].codex_git_commit is enabled. When enabled and unset, Codex uses
88# "Codex <noreply@openai.com>". Set to "" to disable it.
89# commit_attribution = "Jane Doe <jane@example.com>"
90
83# Override built-in base instructions with a file path. Default: unset.91# Override built-in base instructions with a file path. Default: unset.
84# model_instructions_file = "/absolute/or/relative/path/to/instructions.txt"92# model_instructions_file = "/absolute/or/relative/path/to/instructions.txt"
85 93
86# Migration note: experimental_instructions_file was renamed to model_instructions_file (deprecated).
87
88# Load the compact prompt override from a file. Default: unset.94# Load the compact prompt override from a file. Default: unset.
89# experimental_compact_prompt_file = "/absolute/or/relative/path/to/compact_prompt.txt"95# experimental_compact_prompt_file = "/absolute/or/relative/path/to/compact_prompt.txt"
90 96
91# Legacy name for apply_patch_freeform. Default: false
92include_apply_patch_tool = false
93
94################################################################################97################################################################################
95# Notifications98# Notifications
96################################################################################99################################################################################
97 100
98# External notifier program (argv array). When unset: disabled.101# External notifier program (argv array). When unset: disabled.
99102# Example: notify = ["notify-send", "Codex"]# notify = ["notify-send", "Codex"]
100notify = [ ]
101 103
102################################################################################104################################################################################
103# Approval & Sandbox105# Approval & Sandbox
107# - untrusted: only known-safe read-only commands auto-run; others prompt109# - untrusted: only known-safe read-only commands auto-run; others prompt
108# - on-request: model decides when to ask (default)110# - on-request: model decides when to ask (default)
109# - never: never prompt (risky)111# - never: never prompt (risky)
112# - { granular = { ... } }: allow or auto-reject selected prompt categories
110approval_policy = "on-request"113approval_policy = "on-request"
114# Who reviews eligible approval prompts: user (default) | auto_review
115# approvals_reviewer = "user"
116
117# Example granular policy:
118# approval_policy = { granular = {
119# sandbox_approval = true,
120# rules = true,
121# mcp_elicitations = true,
122# request_permissions = false,
123# skill_approval = false
124# } }
125
126# Allow login-shell semantics for shell-based tools when they request `login = true`.
127# Default: true. Set false to force non-login shells and reject explicit login-shell requests.
128allow_login_shell = true
111 129
112# Filesystem/network sandbox policy for tool calls:130# Filesystem/network sandbox policy for tool calls:
113# - read-only (default)131# - read-only (default)
114# - workspace-write132# - workspace-write
115# - danger-full-access (no sandbox; extremely risky)133# - danger-full-access (no sandbox; extremely risky)
116sandbox_mode = "read-only"134sandbox_mode = "read-only"
135# Named permissions profile to apply by default. Built-ins:
136# :read-only | :workspace | :danger-no-sandbox
137# Use a custom name such as "workspace" only when you also define [permissions.workspace].
138# default_permissions = ":workspace"
139
140# Example filesystem profile. Use `"none"` to deny reads for exact paths or
141# glob patterns. On platforms that need pre-expanded glob matches, set
142# glob_scan_max_depth when using unbounded patterns such as `**`.
143# [permissions.workspace.filesystem]
144# glob_scan_max_depth = 3
145# ":project_roots" = { "." = "write", "**/*.env" = "none" }
146# "/absolute/path/to/secrets" = "none"
117 147
118################################################################################148################################################################################
119# Authentication & Login149# Authentication & Login
122# Where to persist CLI login credentials: file (default) | keyring | auto152# Where to persist CLI login credentials: file (default) | keyring | auto
123cli_auth_credentials_store = "file"153cli_auth_credentials_store = "file"
124 154
125155# Base URL for ChatGPT auth flow (not OpenAI API). Default:# Base URL for ChatGPT auth flow (not OpenAI API).
126chatgpt_base_url = "https://chatgpt.com/backend-api/"156chatgpt_base_url = "https://chatgpt.com/backend-api/"
127 157
158# Optional base URL override for the built-in OpenAI provider.
159# openai_base_url = "https://us.api.openai.com/v1"
160
128# Restrict ChatGPT login to a specific workspace id. Default: unset.161# Restrict ChatGPT login to a specific workspace id. Default: unset.
129162# forced_chatgpt_workspace_id = ""# forced_chatgpt_workspace_id = "00000000-0000-0000-0000-000000000000"
130 163
131# Force login mechanism when Codex would normally auto-select. Default: unset.164# Force login mechanism when Codex would normally auto-select. Default: unset.
132# Allowed values: chatgpt | api165# Allowed values: chatgpt | api
134 167
135# Preferred store for MCP OAuth credentials: auto (default) | file | keyring168# Preferred store for MCP OAuth credentials: auto (default) | file | keyring
136mcp_oauth_credentials_store = "auto"169mcp_oauth_credentials_store = "auto"
137
138# Optional fixed port for MCP OAuth callback: 1-65535. Default: unset.170# Optional fixed port for MCP OAuth callback: 1-65535. Default: unset.
139# mcp_oauth_callback_port = 4321171# mcp_oauth_callback_port = 4321
172# Optional redirect URI override for MCP OAuth login (for example, remote devbox ingress).
173# Custom callback paths are supported. `mcp_oauth_callback_port` still controls the listener port.
174# mcp_oauth_callback_url = "https://devbox.example.internal/callback"
140 175
141################################################################################176################################################################################
142# Project Documentation Controls177# Project Documentation Controls
187# If you use --yolo or another full access sandbox setting, web search defaults to live.222# If you use --yolo or another full access sandbox setting, web search defaults to live.
188web_search = "cached"223web_search = "cached"
189 224
225# Active profile name. When unset, no profile is applied.
226# profile = "default"
227
228# Suppress the warning shown when under-development feature flags are enabled.
229# suppress_unstable_features_warning = true
230
190################################################################################231################################################################################
191232# Profiles (named presets)# Agents (multi-agent roles and limits)
192################################################################################233################################################################################
193 234
194235# Active profile name. When unset, no profile is applied.[agents]
195236# profile = "default"# Maximum concurrently open agent threads. Default: 6
237# max_threads = 6
238# Maximum nested spawn depth. Root session starts at depth 0. Default: 1
239# max_depth = 1
240# Default timeout per worker for spawn_agents_on_csv jobs. When unset, the tool defaults to 1800 seconds.
241# job_max_runtime_seconds = 1800
242
243# [agents.reviewer]
244# description = "Find correctness, security, and test risks in code."
245# config_file = "./agents/reviewer.toml" # relative to the config.toml that defines it
246# nickname_candidates = ["Athena", "Ada"]
196 247
197################################################################################248################################################################################
198# Skills (per-skill overrides)249# Skills (per-skill overrides)
200 251
201# Disable or re-enable a specific skill without deleting it.252# Disable or re-enable a specific skill without deleting it.
202[[skills.config]]253[[skills.config]]
203254# path = "/path/to/skill"# path = "/path/to/skill/SKILL.md"
204# enabled = false255# enabled = false
205 256
206################################################################################
207# Experimental toggles (legacy; prefer [features])
208################################################################################
209
210experimental_use_unified_exec_tool = false
211
212# Include apply_patch via freeform editing path (affects default tool set). Default: false
213experimental_use_freeform_apply_patch = false
214
215################################################################################257################################################################################
216# Sandbox settings (tables)258# Sandbox settings (tables)
217################################################################################259################################################################################
234[shell_environment_policy]276[shell_environment_policy]
235# inherit: all (default) | core | none277# inherit: all (default) | core | none
236inherit = "all"278inherit = "all"
237279# 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
238280ignore_default_excludes = trueignore_default_excludes = false
239# Case-insensitive glob patterns to remove (e.g., "AWS_*", "AZURE_*"). Default: []281# Case-insensitive glob patterns to remove (e.g., "AWS_*", "AZURE_*"). Default: []
240exclude = []282exclude = []
241# Explicit key/value overrides (always win). Default: {}283# Explicit key/value overrides (always win). Default: {}
245# Experimental: run via user shell profile. Default: false287# Experimental: run via user shell profile. Default: false
246experimental_use_profile = false288experimental_use_profile = false
247 289
290################################################################################
291# Managed network proxy settings
292################################################################################
293
294# Set `default_permissions = "workspace"` before enabling this profile.
295# [permissions.workspace.network]
296# enabled = true
297# proxy_url = "http://127.0.0.1:43128"
298# admin_url = "http://127.0.0.1:43129"
299# enable_socks5 = false
300# socks_url = "http://127.0.0.1:43130"
301# enable_socks5_udp = false
302# allow_upstream_proxy = false
303# dangerously_allow_non_loopback_proxy = false
304# dangerously_allow_non_loopback_admin = false
305# dangerously_allow_all_unix_sockets = false
306# mode = "limited" # limited | full
307# allow_local_binding = false
308#
309# [permissions.workspace.network.domains]
310# "api.openai.com" = "allow"
311# "example.com" = "deny"
312#
313# [permissions.workspace.network.unix_sockets]
314# "/var/run/docker.sock" = "allow"
315
248################################################################################316################################################################################
249# History (table)317# History (table)
250################################################################################318################################################################################
253# save-all (default) | none321# save-all (default) | none
254persistence = "save-all"322persistence = "save-all"
255# Maximum bytes for history file; oldest entries are trimmed when exceeded. Example: 5242880323# Maximum bytes for history file; oldest entries are trimmed when exceeded. Example: 5242880
256324# max_bytes = 0# max_bytes = 5242880
257 325
258################################################################################326################################################################################
259# UI, Notifications, and Misc (tables)327# UI, Notifications, and Misc (tables)
267# Notification mechanism for terminal alerts: auto | osc9 | bel. Default: "auto"335# Notification mechanism for terminal alerts: auto | osc9 | bel. Default: "auto"
268# notification_method = "auto"336# notification_method = "auto"
269 337
338# When notifications fire: unfocused (default) | always
339# notification_condition = "unfocused"
340
270# Enables welcome/status/spinner animations. Default: true341# Enables welcome/status/spinner animations. Default: true
271animations = true342animations = true
272 343
276# Control alternate screen usage (auto skips it in Zellij to preserve scrollback).347# Control alternate screen usage (auto skips it in Zellij to preserve scrollback).
277# alternate_screen = "auto"348# alternate_screen = "auto"
278 349
279350# Ordered list of footer status-line item IDs. Default: null (disabled).# Ordered list of footer status-line item IDs. When unset, Codex uses:
351# ["model-with-reasoning", "context-remaining", "current-dir"].
352# Set to [] to hide the footer.
280# status_line = ["model", "context-remaining", "git-branch"]353# status_line = ["model", "context-remaining", "git-branch"]
281 354
355# Ordered list of terminal window/tab title item IDs. When unset, Codex uses:
356# ["spinner", "project"]. Set to [] to clear the title.
357# Available IDs include app-name, project, spinner, status, thread, git-branch, model,
358# and task-progress.
359# terminal_title = ["spinner", "project"]
360
361# Syntax-highlighting theme (kebab-case). Use /theme in the TUI to preview and save.
362# You can also add custom .tmTheme files under $CODEX_HOME/themes.
363# theme = "catppuccin-mocha"
364
365# Custom key bindings. Context-specific bindings override [tui.keymap.global].
366# Use [] to unbind an action.
367# [tui.keymap.global]
368# open_transcript = "ctrl-t"
369# open_external_editor = []
370#
371# [tui.keymap.composer]
372# submit = ["enter", "ctrl-m"]
373
374# Internal tooltip state keyed by model slug. Usually managed by Codex.
375# [tui.model_availability_nux]
376# "gpt-5.4" = 1
377
378# Enable or disable analytics for this machine. When unset, Codex uses its default behavior.
379[analytics]
380enabled = true
381
282# Control whether users can submit feedback from `/feedback`. Default: true382# Control whether users can submit feedback from `/feedback`. Default: true
283[feedback]383[feedback]
284enabled = true384enabled = true
290# hide_rate_limit_model_nudge = true390# hide_rate_limit_model_nudge = true
291# hide_gpt5_1_migration_prompt = true391# hide_gpt5_1_migration_prompt = true
292# "hide_gpt-5.1-codex-max_migration_prompt" = true392# "hide_gpt-5.1-codex-max_migration_prompt" = true
293393# model_migrations = { "gpt-4.1" = "gpt-5.1" }# model_migrations = { "gpt-5.3-codex" = "gpt-5.4" }
294
295# Suppress the warning shown when under-development feature flags are enabled.
296# suppress_unstable_features_warning = true
297 394
298################################################################################395################################################################################
299# Centralized Feature Flags (preferred)396# Centralized Feature Flags (preferred)
301 398
302[features]399[features]
303# Leave this table empty to accept defaults. Set explicit booleans to opt in/out.400# Leave this table empty to accept defaults. Set explicit booleans to opt in/out.
304401shell_tool = true# shell_tool = true
305# apps = false402# apps = false
306403# apps_mcp_gateway = false# codex_git_commit = false
307404# Deprecated legacy toggles; prefer the top-level `web_search` setting.# codex_hooks = false
308405# web_search = false# unified_exec = true
309406# web_search_cached = false# shell_snapshot = true
310407# web_search_request = false# multi_agent = true
311unified_exec = false
312shell_snapshot = false
313apply_patch_freeform = false
314# search_tool = false
315# personality = true408# personality = true
316409request_rule = true# fast_mode = true
317410collaboration_modes = true# enable_request_compression = true
318411use_linux_sandbox_bwrap = false# skill_mcp_dependency_install = true
319412experimental_windows_sandbox = false# prevent_idle_sleep = false
320413elevated_windows_sandbox = false
321414remote_models = false################################################################################
322415runtime_metrics = false# Memories (table)
323416powershell_utf8 = true################################################################################
324417child_agents_md = false
418# Enable memories with [features].memories, then tune memory behavior here.
419# [memories]
420# generate_memories = true
421# use_memories = true
422# disable_on_external_context = false # legacy alias: no_memories_if_mcp_or_web_search
423
424################################################################################
425# Lifecycle hooks can be configured here inline or in a sibling hooks.json.
426################################################################################
427
428# [hooks]
429# [[hooks.PreToolUse]]
430# matcher = "^Bash$"
431#
432# [[hooks.PreToolUse.hooks]]
433# type = "command"
434# command = 'python3 "/absolute/path/to/pre_tool_use_policy.py"'
435# timeout = 30
436# statusMessage = "Checking Bash command"
325 437
326################################################################################438################################################################################
327# Define MCP servers under this table. Leave empty to disable.439# Define MCP servers under this table. Leave empty to disable.
336# command = "docs-server" # required448# command = "docs-server" # required
337# args = ["--port", "4000"] # optional449# args = ["--port", "4000"] # optional
338# env = { "API_KEY" = "value" } # optional key/value pairs copied as-is450# env = { "API_KEY" = "value" } # optional key/value pairs copied as-is
339451# env_vars = ["ANOTHER_SECRET"] # optional: forward these from the parent env# env_vars = ["ANOTHER_SECRET"] # optional: forward local parent env vars
452# env_vars = ["LOCAL_TOKEN", { name = "REMOTE_TOKEN", source = "remote" }]
340# cwd = "/path/to/server" # optional working directory override453# cwd = "/path/to/server" # optional working directory override
454# experimental_environment = "remote" # experimental: run stdio via a remote executor
341# startup_timeout_sec = 10.0 # optional; default 10.0 seconds455# startup_timeout_sec = 10.0 # optional; default 10.0 seconds
342# # startup_timeout_ms = 10000 # optional alias for startup timeout (milliseconds)456# # startup_timeout_ms = 10000 # optional alias for startup timeout (milliseconds)
343# tool_timeout_sec = 60.0 # optional; default 60.0 seconds457# tool_timeout_sec = 60.0 # optional; default 60.0 seconds
344# enabled_tools = ["search", "summarize"] # optional allow-list458# enabled_tools = ["search", "summarize"] # optional allow-list
345# disabled_tools = ["slow-tool"] # optional deny-list (applied after allow-list)459# disabled_tools = ["slow-tool"] # optional deny-list (applied after allow-list)
460# scopes = ["read:docs"] # optional OAuth scopes
461# oauth_resource = "https://docs.example.com/" # optional OAuth resource
346 462
347# --- Example: Streamable HTTP transport ---463# --- Example: Streamable HTTP transport ---
348# [mcp_servers.github]464# [mcp_servers.github]
355# startup_timeout_sec = 10.0 # optional471# startup_timeout_sec = 10.0 # optional
356# tool_timeout_sec = 60.0 # optional472# tool_timeout_sec = 60.0 # optional
357# enabled_tools = ["list_issues"] # optional allow-list473# enabled_tools = ["list_issues"] # optional allow-list
474# disabled_tools = ["delete_issue"] # optional deny-list
475# scopes = ["repo"] # optional OAuth scopes
358 476
359################################################################################477################################################################################
360# Model Providers478# Model Providers
361################################################################################479################################################################################
362 480
363# Built-ins include:481# Built-ins include:
364482# - openai (Responses API; requires login or OPENAI_API_KEY via auth flow)# - openai
365483# - oss (Chat Completions API; defaults to http://localhost:11434/v1)# - ollama
484# - lmstudio
485# - amazon-bedrock
486# These IDs are reserved. Use a different ID for custom providers.
366 487
367[model_providers]488[model_providers]
368 489
490# --- Example: built-in Amazon Bedrock provider options ---
491# model_provider = "amazon-bedrock"
492# model = "<bedrock-model-id>"
493# [model_providers.amazon-bedrock.aws]
494# profile = "default"
495# region = "eu-central-1"
496
369# --- Example: OpenAI data residency with explicit base URL or headers ---497# --- Example: OpenAI data residency with explicit base URL or headers ---
370# [model_providers.openaidr]498# [model_providers.openaidr]
371# name = "OpenAI Data Residency"499# name = "OpenAI Data Residency"
372# base_url = "https://us.api.openai.com/v1" # example with 'us' domain prefix500# base_url = "https://us.api.openai.com/v1" # example with 'us' domain prefix
373501# wire_api = "responses" # "responses" | "chat" (default varies)# wire_api = "responses" # only supported value
374502# # requires_openai_auth = true # built-in OpenAI defaults to true# # requires_openai_auth = true # use only for providers backed by OpenAI auth
375# # request_max_retries = 4 # default 4; max 100503# # request_max_retries = 4 # default 4; max 100
376# # stream_max_retries = 5 # default 5; max 100504# # stream_max_retries = 5 # default 5; max 100
377# # stream_idle_timeout_ms = 300000 # default 300_000 (5m)505# # stream_idle_timeout_ms = 300000 # default 300_000 (5m)
506# # supports_websockets = true # optional
378# # experimental_bearer_token = "sk-example" # optional dev-only direct bearer token507# # experimental_bearer_token = "sk-example" # optional dev-only direct bearer token
379# # http_headers = { "X-Example" = "value" }508# # http_headers = { "X-Example" = "value" }
380# # env_http_headers = { "OpenAI-Organization" = "OPENAI_ORGANIZATION", "OpenAI-Project" = "OPENAI_PROJECT" }509# # env_http_headers = { "OpenAI-Organization" = "OPENAI_ORGANIZATION", "OpenAI-Project" = "OPENAI_PROJECT" }
381 510
382511# --- Example: Azure (Chat/Responses depending on endpoint) ---# --- Example: Azure/OpenAI-compatible provider ---
383# [model_providers.azure]512# [model_providers.azure]
384# name = "Azure"513# name = "Azure"
385# base_url = "https://YOUR_PROJECT_NAME.openai.azure.com/openai"514# base_url = "https://YOUR_PROJECT_NAME.openai.azure.com/openai"
386515# wire_api = "responses" # or "chat" per endpoint# wire_api = "responses"
387# query_params = { api-version = "2025-04-01-preview" }516# query_params = { api-version = "2025-04-01-preview" }
388# env_key = "AZURE_OPENAI_API_KEY"517# env_key = "AZURE_OPENAI_API_KEY"
389518# # env_key_instructions = "Set AZURE_OPENAI_API_KEY in your environment"# env_key_instructions = "Set AZURE_OPENAI_API_KEY in your environment"
519# # supports_websockets = false
520
521# --- Example: command-backed bearer token auth ---
522# [model_providers.proxy]
523# name = "OpenAI using LLM proxy"
524# base_url = "https://proxy.example.com/v1"
525# wire_api = "responses"
526#
527# [model_providers.proxy.auth]
528# command = "/usr/local/bin/fetch-codex-token"
529# args = ["--audience", "codex"]
530# timeout_ms = 5000
531# refresh_interval_ms = 300000
390 532
391# --- Example: Local OSS (e.g., Ollama-compatible) ---533# --- Example: Local OSS (e.g., Ollama-compatible) ---
392534# [model_providers.ollama]# [model_providers.local_ollama]
393# name = "Ollama"535# name = "Ollama"
394# base_url = "http://localhost:11434/v1"536# base_url = "http://localhost:11434/v1"
395537# wire_api = "chat"# wire_api = "responses"
538
539################################################################################
540# Apps / Connectors
541################################################################################
542
543# Optional per-app controls.
544[apps]
545# [_default] applies to all apps unless overridden per app.
546# [apps._default]
547# enabled = true
548# destructive_enabled = true
549# open_world_enabled = true
550#
551# [apps.google_drive]
552# enabled = false
553# destructive_enabled = false # block destructive-hint tools for this app
554# default_tools_enabled = true
555# default_tools_approval_mode = "prompt" # auto | prompt | approve
556#
557# [apps.google_drive.tools."files/delete"]
558# enabled = false
559# approval_mode = "approve"
560
561# Optional tool suggestion allowlist for connectors or plugins Codex can offer to install.
562# [tool_suggest]
563# discoverables = [
564# { type = "connector", id = "gmail" },
565# { type = "plugin", id = "figma@openai-curated" },
566# ]
567# disabled_tools = [
568# { type = "plugin", id = "slack@openai-curated" },
569# { type = "connector", id = "connector_googlecalendar" },
570# ]
396 571
397################################################################################572################################################################################
398# Profiles (named presets)573# Profiles (named presets)
401[profiles]576[profiles]
402 577
403# [profiles.default]578# [profiles.default]
404579# model = "gpt-5.2-codex"# model = "gpt-5.4"
405# model_provider = "openai"580# model_provider = "openai"
406# approval_policy = "on-request"581# approval_policy = "on-request"
407# sandbox_mode = "read-only"582# sandbox_mode = "read-only"
583# service_tier = "flex"
408# oss_provider = "ollama"584# oss_provider = "ollama"
409# model_reasoning_effort = "medium"585# model_reasoning_effort = "medium"
586# plan_mode_reasoning_effort = "high"
410# model_reasoning_summary = "auto"587# model_reasoning_summary = "auto"
411# model_verbosity = "medium"588# model_verbosity = "medium"
412589# personality = "friendly" # or "pragmatic" or "none"# personality = "pragmatic" # or "friendly" or "none"
413# chatgpt_base_url = "https://chatgpt.com/backend-api/"590# chatgpt_base_url = "https://chatgpt.com/backend-api/"
591# model_catalog_json = "./models.json"
592# model_instructions_file = "/absolute/or/relative/path/to/instructions.txt"
414# experimental_compact_prompt_file = "./compact_prompt.txt"593# experimental_compact_prompt_file = "./compact_prompt.txt"
415594# include_apply_patch_tool = false# tools_view_image = true
416# experimental_use_unified_exec_tool = false
417# experimental_use_freeform_apply_patch = false
418# tools.web_search = false # deprecated legacy alias; prefer top-level `web_search`
419# features = { unified_exec = false }595# features = { unified_exec = false }
420 596
421################################################################################
422# Apps / Connectors
423################################################################################
424
425# Optional per-app controls.
426[apps]
427# [apps.google_drive]
428# enabled = false
429# disabled_reason = "user" # or "unknown"
430
431################################################################################597################################################################################
432# Projects (trust levels)598# Projects (trust levels)
433################################################################################599################################################################################
434 600
435# Mark specific worktrees as trusted or untrusted.
436[projects]601[projects]
602# Mark specific worktrees as trusted or untrusted.
437# [projects."/absolute/path/to/project"]603# [projects."/absolute/path/to/project"]
438# trust_level = "trusted" # or "untrusted"604# trust_level = "trusted" # or "untrusted"
439 605
606################################################################################
607# Tools
608################################################################################
609
610[tools]
611# view_image = true
612
440################################################################################613################################################################################
441# OpenTelemetry (OTEL) - disabled by default614# OpenTelemetry (OTEL) - disabled by default
442################################################################################615################################################################################
450exporter = "none"623exporter = "none"
451# Trace exporter: none (default) | otlp-http | otlp-grpc624# Trace exporter: none (default) | otlp-http | otlp-grpc
452trace_exporter = "none"625trace_exporter = "none"
626# Metrics exporter: none | statsig | otlp-http | otlp-grpc
627metrics_exporter = "statsig"
453 628
454# Example OTLP/HTTP exporter configuration629# Example OTLP/HTTP exporter configuration
455# [otel.exporter."otlp-http"]630# [otel.exporter."otlp-http"]
459# [otel.exporter."otlp-http".headers]634# [otel.exporter."otlp-http".headers]
460# "x-otlp-api-key" = "${OTLP_TOKEN}"635# "x-otlp-api-key" = "${OTLP_TOKEN}"
461 636
462# Example OTLP/gRPC exporter configuration
463# [otel.exporter."otlp-grpc"]
464# endpoint = "https://otel.example.com:4317",
465# headers = { "x-otlp-meta" = "abc123" }
466
467# Example OTLP exporter with mutual TLS
468# [otel.exporter."otlp-http"]
469# endpoint = "https://otel.example.com/v1/logs"
470# protocol = "binary"
471
472# [otel.exporter."otlp-http".headers]
473# "x-otlp-api-key" = "${OTLP_TOKEN}"
474
475# [otel.exporter."otlp-http".tls]637# [otel.exporter."otlp-http".tls]
476# ca-certificate = "certs/otel-ca.pem"638# ca-certificate = "certs/otel-ca.pem"
477# client-certificate = "/etc/codex/certs/client.pem"639# client-certificate = "/etc/codex/certs/client.pem"
478# client-private-key = "/etc/codex/certs/client-key.pem"640# client-private-key = "/etc/codex/certs/client-key.pem"
641
642# Example OTLP/gRPC trace exporter configuration
643# [otel.trace_exporter."otlp-grpc"]
644# endpoint = "https://otel.example.com:4317"
645# headers = { "x-otlp-meta" = "abc123" }
646
647################################################################################
648# Windows
649################################################################################
650
651[windows]
652# Native Windows sandbox mode (Windows only): unelevated | elevated
653sandbox = "unelevated"
479```654```