config-sample.md +17 −12
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
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 all 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.4".
3231model = "gpt-5.2-codex"model = "gpt-5.4"
33 32
34# Default communication style for supported models. Default: "friendly".33# Default communication style for supported models. Default: "friendly".
35# Allowed values: none | friendly | pragmatic34# Allowed values: none | friendly | pragmatic
36# personality = "friendly"35# personality = "friendly"
37 36
38# Optional model override for /review. Default: unset (uses current session model).37# Optional model override for /review. Default: unset (uses current session model).
3938# review_model = "gpt-5.2-codex"# review_model = "gpt-5.4"
40 39
41# Provider id selected from [model_providers]. Default: "openai".40# Provider id selected from [model_providers]. Default: "openai".
42model_provider = "openai"41model_provider = "openai"
48# Uncomment to force values.47# Uncomment to force values.
49# model_context_window = 128000 # tokens; default: auto for model48# model_context_window = 128000 # tokens; default: auto for model
50# model_auto_compact_token_limit = 0 # tokens; unset uses model defaults49# model_auto_compact_token_limit = 0 # tokens; unset uses model defaults
5150# tool_output_token_limit = 10000 # tokens stored per tool output; default: 10000 for gpt-5.2-codex# tool_output_token_limit = 10000 # tokens stored per tool output
52# model_catalog_json = "/absolute/path/to/models.json" # optional startup-only model catalog override51# 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# background_terminal_max_timeout = 300000 # ms; max empty write_stdin poll window (default 5m)
54# log_dir = "/absolute/path/to/codex-logs" # directory for Codex logs; default: "$CODEX_HOME/log"53# log_dir = "/absolute/path/to/codex-logs" # directory for Codex logs; default: "$CODEX_HOME/log"
58# Reasoning & Verbosity (Responses API capable models)57# Reasoning & Verbosity (Responses API capable models)
59################################################################################58################################################################################
60 59
6160# 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 (default: medium; `xhigh` availability is model-dependent)
62model_reasoning_effort = "medium"61model_reasoning_effort = "medium"
63 62
64# Reasoning summary: auto | concise | detailed | none (default: auto)63# Reasoning summary: auto | concise | detailed | none (default: auto)
125# - danger-full-access (no sandbox; extremely risky)124# - danger-full-access (no sandbox; extremely risky)
126sandbox_mode = "read-only"125sandbox_mode = "read-only"
127 126
127[windows]
128# Native Windows sandbox mode (Windows only): unelevated | elevated
129sandbox = "unelevated"
130
128################################################################################131################################################################################
129# Authentication & Login132# Authentication & Login
130################################################################################133################################################################################
434[profiles]437[profiles]
435 438
436# [profiles.default]439# [profiles.default]
437440# model = "gpt-5.2-codex"# model = "gpt-5.4"
438# model_provider = "openai"441# model_provider = "openai"
439# approval_policy = "on-request"442# approval_policy = "on-request"
440# sandbox_mode = "read-only"443# sandbox_mode = "read-only"
532 535
533[windows]536[windows]
534 537
535538# Native Windows sandbox mode (Windows only): unelevated | elevated# Native Windows sandbox mode (Windows only). The example below uses the
536 539
537540sandbox = "unelevated"# recommended elevated mode.
541
542sandbox = “elevated”