Primary navigation

Configuration Reference

Complete reference for Codex config.toml and requirements.toml

Use this page as a searchable reference for Codex configuration files. For conceptual guidance and examples, start with Config basics and Advanced Config.

config.toml

User-level configuration lives in ~/.codex/config.toml. You can also add project-scoped overrides in .codex/config.toml files. Codex loads project-scoped config files only when you trust the project.

For sandbox and approval keys (approval_policy, sandbox_mode, and sandbox_workspace_write.*), pair this reference with Sandbox and approvals, Protected paths in writable roots, and Network access.

Key
agents.<name>.config_file
Type / Values
string (path)
Details
Key
agents.<name>.description
Type / Values
string
Details
Key
agents.job_max_runtime_seconds
Type / Values
number
Details
Key
agents.max_depth
Type / Values
number
Details
Key
agents.max_threads
Type / Values
number
Details
Key
allow_login_shell
Type / Values
boolean
Details
Key
approval_policy
Type / Values
untrusted | on-request | never | { reject = { sandbox_approval = bool, rules = bool, mcp_elicitations = bool } }
Details
Key
approval_policy.reject.mcp_elicitations
Type / Values
boolean
Details
Key
approval_policy.reject.rules
Type / Values
boolean
Details
Key
approval_policy.reject.sandbox_approval
Type / Values
boolean
Details
Key
apps._default.destructive_enabled
Type / Values
boolean
Details
Key
apps._default.enabled
Type / Values
boolean
Details
Key
apps._default.open_world_enabled
Type / Values
boolean
Details
Key
apps.<id>.default_tools_approval_mode
Type / Values
auto | prompt | approve
Details
Key
apps.<id>.default_tools_enabled
Type / Values
boolean
Details
Key
apps.<id>.destructive_enabled
Type / Values
boolean
Details
Key
apps.<id>.enabled
Type / Values
boolean
Details
Key
apps.<id>.open_world_enabled
Type / Values
boolean
Details
Key
apps.<id>.tools.<tool>.approval_mode
Type / Values
auto | prompt | approve
Details
Key
apps.<id>.tools.<tool>.enabled
Type / Values
boolean
Details
Key
background_terminal_max_timeout
Type / Values
number
Details
Key
chatgpt_base_url
Type / Values
string
Details
Key
check_for_update_on_startup
Type / Values
boolean
Details
Key
cli_auth_credentials_store
Type / Values
file | keyring | auto
Details
Key
compact_prompt
Type / Values
string
Details
Key
developer_instructions
Type / Values
string
Details
Key
disable_paste_burst
Type / Values
boolean
Details
Key
experimental_compact_prompt_file
Type / Values
string (path)
Details
Key
experimental_use_freeform_apply_patch
Type / Values
boolean
Details
Key
experimental_use_unified_exec_tool
Type / Values
boolean
Details
Key
features.apply_patch_freeform
Type / Values
boolean
Details
Key
features.apps
Type / Values
boolean
Details
Key
features.apps_mcp_gateway
Type / Values
boolean
Details
Key
features.child_agents_md
Type / Values
boolean
Details
Key
features.collaboration_modes
Type / Values
boolean
Details
Key
features.multi_agent
Type / Values
boolean
Details
Key
features.personality
Type / Values
boolean
Details
Key
features.powershell_utf8
Type / Values
boolean
Details
Key
features.remote_models
Type / Values
boolean
Details
Key
features.request_rule
Type / Values
boolean
Details
Key
features.runtime_metrics
Type / Values
boolean
Details
Key
features.search_tool
Type / Values
boolean
Details
Key
features.shell_snapshot
Type / Values
boolean
Details
Key
features.shell_tool
Type / Values
boolean
Details
Key
features.unified_exec
Type / Values
boolean
Details
Key
features.use_linux_sandbox_bwrap
Type / Values
boolean
Details
Key
features.web_search
Type / Values
boolean
Details
Key
features.web_search_cached
Type / Values
boolean
Details
Key
features.web_search_request
Type / Values
boolean
Details
Key
feedback.enabled
Type / Values
boolean
Details
Key
file_opener
Type / Values
vscode | vscode-insiders | windsurf | cursor | none
Details
Key
forced_chatgpt_workspace_id
Type / Values
string (uuid)
Details
Key
forced_login_method
Type / Values
chatgpt | api
Details
Key
hide_agent_reasoning
Type / Values
boolean
Details
Key
history.max_bytes
Type / Values
number
Details
Key
history.persistence
Type / Values
save-all | none
Details
Key
include_apply_patch_tool
Type / Values
boolean
Details
Key
instructions
Type / Values
string
Details
Key
log_dir
Type / Values
string (path)
Details
Key
mcp_oauth_callback_port
Type / Values
integer
Details
Key
mcp_oauth_callback_url
Type / Values
string
Details
Key
mcp_oauth_credentials_store
Type / Values
auto | file | keyring
Details
Key
mcp_servers.<id>.args
Type / Values
array<string>
Details
Key
mcp_servers.<id>.bearer_token_env_var
Type / Values
string
Details
Key
mcp_servers.<id>.command
Type / Values
string
Details
Key
mcp_servers.<id>.cwd
Type / Values
string
Details
Key
mcp_servers.<id>.disabled_tools
Type / Values
array<string>
Details
Key
mcp_servers.<id>.enabled
Type / Values
boolean
Details
Key
mcp_servers.<id>.enabled_tools
Type / Values
array<string>
Details
Key
mcp_servers.<id>.env
Type / Values
map<string,string>
Details
Key
mcp_servers.<id>.env_http_headers
Type / Values
map<string,string>
Details
Key
mcp_servers.<id>.env_vars
Type / Values
array<string>
Details
Key
mcp_servers.<id>.http_headers
Type / Values
map<string,string>
Details
Key
mcp_servers.<id>.required
Type / Values
boolean
Details
Key
mcp_servers.<id>.startup_timeout_ms
Type / Values
number
Details
Key
mcp_servers.<id>.startup_timeout_sec
Type / Values
number
Details
Key
mcp_servers.<id>.tool_timeout_sec
Type / Values
number
Details
Key
mcp_servers.<id>.url
Type / Values
string
Details
Key
model
Type / Values
string
Details
Key
model_auto_compact_token_limit
Type / Values
number
Details
Key
model_catalog_json
Type / Values
string (path)
Details
Key
model_context_window
Type / Values
number
Details
Key
model_instructions_file
Type / Values
string (path)
Details
Key
model_provider
Type / Values
string
Details
Key
model_providers.<id>.base_url
Type / Values
string
Details
Key
model_providers.<id>.env_http_headers
Type / Values
map<string,string>
Details
Key
model_providers.<id>.env_key
Type / Values
string
Details
Key
model_providers.<id>.env_key_instructions
Type / Values
string
Details
Key
model_providers.<id>.experimental_bearer_token
Type / Values
string
Details
Key
model_providers.<id>.http_headers
Type / Values
map<string,string>
Details
Key
model_providers.<id>.name
Type / Values
string
Details
Key
model_providers.<id>.query_params
Type / Values
map<string,string>
Details
Key
model_providers.<id>.request_max_retries
Type / Values
number
Details
Key
model_providers.<id>.requires_openai_auth
Type / Values
boolean
Details
Key
model_providers.<id>.stream_idle_timeout_ms
Type / Values
number
Details
Key
model_providers.<id>.stream_max_retries
Type / Values
number
Details
Key
model_providers.<id>.wire_api
Type / Values
chat | responses
Details
Key
model_reasoning_effort
Type / Values
minimal | low | medium | high | xhigh
Details
Key
model_reasoning_summary
Type / Values
auto | concise | detailed | none
Details
Key
model_supports_reasoning_summaries
Type / Values
boolean
Details
Key
model_verbosity
Type / Values
low | medium | high
Details
Key
notice.hide_full_access_warning
Type / Values
boolean
Details
Key
notice.hide_gpt-5.1-codex-max_migration_prompt
Type / Values
boolean
Details
Key
notice.hide_gpt5_1_migration_prompt
Type / Values
boolean
Details
Key
notice.hide_rate_limit_model_nudge
Type / Values
boolean
Details
Key
notice.hide_world_writable_warning
Type / Values
boolean
Details
Key
notice.model_migrations
Type / Values
map<string,string>
Details
Key
notify
Type / Values
array<string>
Details
Key
oss_provider
Type / Values
lmstudio | ollama
Details
Key
otel.environment
Type / Values
string
Details
Key
otel.exporter
Type / Values
none | otlp-http | otlp-grpc
Details
Key
otel.exporter.<id>.endpoint
Type / Values
string
Details
Key
otel.exporter.<id>.headers
Type / Values
map<string,string>
Details
Key
otel.exporter.<id>.protocol
Type / Values
binary | json
Details
Key
otel.exporter.<id>.tls.ca-certificate
Type / Values
string
Details
Key
otel.exporter.<id>.tls.client-certificate
Type / Values
string
Details
Key
otel.exporter.<id>.tls.client-private-key
Type / Values
string
Details
Key
otel.log_user_prompt
Type / Values
boolean
Details
Key
otel.trace_exporter
Type / Values
none | otlp-http | otlp-grpc
Details
Key
otel.trace_exporter.<id>.endpoint
Type / Values
string
Details
Key
otel.trace_exporter.<id>.headers
Type / Values
map<string,string>
Details
Key
otel.trace_exporter.<id>.protocol
Type / Values
binary | json
Details
Key
otel.trace_exporter.<id>.tls.ca-certificate
Type / Values
string
Details
Key
otel.trace_exporter.<id>.tls.client-certificate
Type / Values
string
Details
Key
otel.trace_exporter.<id>.tls.client-private-key
Type / Values
string
Details
Key
personality
Type / Values
none | friendly | pragmatic
Details
Key
profile
Type / Values
string
Details
Key
profiles.<name>.*
Type / Values
various
Details
Key
profiles.<name>.experimental_use_freeform_apply_patch
Type / Values
boolean
Details
Key
profiles.<name>.experimental_use_unified_exec_tool
Type / Values
boolean
Details
Key
profiles.<name>.include_apply_patch_tool
Type / Values
boolean
Details
Key
profiles.<name>.model_catalog_json
Type / Values
string (path)
Details
Key
profiles.<name>.oss_provider
Type / Values
lmstudio | ollama
Details
Key
profiles.<name>.personality
Type / Values
none | friendly | pragmatic
Details
Key
profiles.<name>.web_search
Type / Values
disabled | cached | live
Details
Key
project_doc_fallback_filenames
Type / Values
array<string>
Details
Key
project_doc_max_bytes
Type / Values
number
Details
Key
project_root_markers
Type / Values
array<string>
Details
Key
projects.<path>.trust_level
Type / Values
string
Details
Key
review_model
Type / Values
string
Details
Key
sandbox_mode
Type / Values
read-only | workspace-write | danger-full-access
Details
Key
sandbox_workspace_write.exclude_slash_tmp
Type / Values
boolean
Details
Key
sandbox_workspace_write.exclude_tmpdir_env_var
Type / Values
boolean
Details
Key
sandbox_workspace_write.network_access
Type / Values
boolean
Details
Key
sandbox_workspace_write.writable_roots
Type / Values
array<string>
Details
Key
shell_environment_policy.exclude
Type / Values
array<string>
Details
Key
shell_environment_policy.experimental_use_profile
Type / Values
boolean
Details
Key
shell_environment_policy.ignore_default_excludes
Type / Values
boolean
Details
Key
shell_environment_policy.include_only
Type / Values
array<string>
Details
Key
shell_environment_policy.inherit
Type / Values
all | core | none
Details
Key
shell_environment_policy.set
Type / Values
map<string,string>
Details
Key
show_raw_agent_reasoning
Type / Values
boolean
Details
Key
skills.config
Type / Values
array<object>
Details
Key
skills.config.<index>.enabled
Type / Values
boolean
Details
Key
skills.config.<index>.path
Type / Values
string (path)
Details
Key
sqlite_home
Type / Values
string (path)
Details
Key
suppress_unstable_features_warning
Type / Values
boolean
Details
Key
tool_output_token_limit
Type / Values
number
Details
Key
tools.web_search
Type / Values
boolean
Details
Key
tui
Type / Values
table
Details
Key
tui.alternate_screen
Type / Values
auto | always | never
Details
Key
tui.animations
Type / Values
boolean
Details
Key
tui.notification_method
Type / Values
auto | osc9 | bel
Details
Key
tui.notifications
Type / Values
boolean | array<string>
Details
Key
tui.show_tooltips
Type / Values
boolean
Details
Key
tui.status_line
Type / Values
array<string> | null
Details
Key
web_search
Type / Values
disabled | cached | live
Details
Key
windows_wsl_setup_acknowledged
Type / Values
boolean
Details
Key
windows.sandbox
Type / Values
unelevated | elevated
Details

You can find the latest JSON schema for config.toml here.

To get autocompletion and diagnostics when editing config.toml in VS Code or Cursor, you can install the Even Better TOML extension and add this line to the top of your config.toml:

#:schema https://developers.openai.com/codex/config-schema.json

Note: Rename experimental_instructions_file to model_instructions_file. Codex deprecates the old key; update existing configs to the new name.

requirements.toml

requirements.toml is an admin-enforced configuration file that constrains security-sensitive settings users can’t override. For details, locations, and examples, see Admin-enforced requirements.

For ChatGPT Business and Enterprise users, Codex can also apply cloud-fetched requirements. See the security page for precedence details.

Use [features] in requirements.toml to pin feature flags by the same canonical keys that config.toml uses. Omitted keys remain unconstrained.

Key
allowed_approval_policies
Type / Values
array<string>
Details
Key
allowed_sandbox_modes
Type / Values
array<string>
Details
Key
allowed_web_search_modes
Type / Values
array<string>
Details
Key
features
Type / Values
table
Details
Key
features.<name>
Type / Values
boolean
Details
Key
mcp_servers
Type / Values
table
Details
Key
mcp_servers.<id>.identity
Type / Values
table
Details
Key
mcp_servers.<id>.identity.command
Type / Values
string
Details
Key
mcp_servers.<id>.identity.url
Type / Values
string
Details
Key
rules
Type / Values
table
Details
Key
rules.prefix_rules
Type / Values
array<table>
Details
Key
rules.prefix_rules[].decision
Type / Values
prompt | forbidden
Details
Key
rules.prefix_rules[].justification
Type / Values
string
Details
Key
rules.prefix_rules[].pattern
Type / Values
array<table>
Details
Key
rules.prefix_rules[].pattern[].any_of
Type / Values
array<string>
Details
Key
rules.prefix_rules[].pattern[].token
Type / Values
string
Details