# Reference: https://developers.openai.com/codex/config-sample/
# Reference: https://developers.openai.com/codex/subagents
# Declared against official docs on 2026-06-23
# 通用设置: 模型、审批、认证和 UI 行为。
# 模型: 默认会话模型。
model = "gpt-5.5"
# 模型 Provider: 从 [model_providers] 里选择的 provider id。
model_provider = "openai"
# 审批策略: Codex 何时为工具操作请求审批。
approval_policy = "on-request"
# 允许登录 Shell: 需要时允许命令使用 login shell 语义运行。
allow_login_shell = true
# 沙箱模式: 文件系统和网络访问策略。
sandbox_mode = "read-only"
# Web Search: 使用 disabled、cached 或 live 网络搜索结果。
web_search = "cached"
# CLI 认证存储: CLI 登录凭据的存储位置。
cli_auth_credentials_store = "file"
# ChatGPT Base URL: ChatGPT 登录流程使用的基础 URL。
chatgpt_base_url = "https://chatgpt.com/backend-api/"
# MCP OAuth 存储: MCP OAuth 凭据的首选存储位置。
mcp_oauth_credentials_store = "auto"
# 项目文档最大字节数: 加载到上下文里的项目文档大小上限。
project_doc_max_bytes = 32768
# 文件打开器: 可点击引用使用的 URI scheme。
file_opener = "vscode"
# 启动时检查更新: 允许 Codex 启动时检查应用更新。
check_for_update_on_startup = true
[tui]
notifications = false
animations = true
show_tooltips = true
[analytics]
enabled = true
[feedback]
enabled = true
[otel]
log_user_prompt = false
environment = "dev"
exporter = "none"
trace_exporter = "none"
metrics_exporter = "statsig"
[windows]
sandbox = "unelevated"
# Agents: [agents] 下的 subagent 并发与运行时限制。
[agents.reviewer]
description = "Find correctness, security, and test risks in code."
config_file = "./agents/reviewer.toml"
nickname_candidates = [ "Athena", "Ada" ]
[[skills.config]]
path = "/path/to/skill/SKILL.md"
enabled = false
# 历史记录: 历史记录持久化与压缩控制。
[history]
# 持久化: save-all 或 none。
persistence = "save-all"
# Shell 环境: 环境继承以及 include/exclude 列表。
[shell_environment_policy]
# 继承方式: 继承哪种环境基线。
inherit = "all"