Configuration Reference
此非核心页面暂未翻译。 正文保留当前快照中的官方英文 Markdown;你也可以访问官方原文。
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending
.mdto the page URL.
Use this page as a searchable reference for Codex configuration files. For conceptual guidance and examples, start with Config basics and Advanced Config.
Settings for Local computer access with Work Cloud
Section titled “Settings for Local computer access with Work Cloud”With Local computer access with Work Cloud enabled, OpenAI’s cloud coordinates the task while supported tools run in the cloud or on a connected computer. Requirements set limits; configuration values provide defaults.
Use the policy API to manage Global settings. To manage Local or Codex Cloud settings, use the Agent Security UI. Existing Global API workflows remain available after migration. Test your scripts and Terraform integrations, and confirm that policy assignments and ordering are unchanged. Support for a requirements.toml field does not by itself establish API compatibility.
| Setting or setting family | Scope in Local computer access with Work Cloud | Guidance |
|---|---|---|
| Approval policies and review requirements | Global orchestrator policy when managed policy is enabled | Keep approval and review controls in Global. Environment overrides cannot change orchestrator controls. Local execution and cloud-container execution have separate policy scopes. |
| Managed apps, MCP servers, plugins, marketplaces, and command rules | Global policy | Keep these controls global. Do not treat the field’s presence in a schema as proof that the field can be edited per environment. |
| File, sandbox, and portable network requirements | Local execution | For local execution, MDM and legacy managed-device requirements rank above Agent Security. The device’s system requirements file ranks below Agent Security. The new enterprise requirements.toml configuration does not apply to Work cloud containers, which retain existing Work Cloud policies. |
| Platform-specific executor controls | Computer running the step | Support depends on the executor and platform. |
| Managed hooks | Where enabled, admin-defined MCP hooks that run on the cloud coordinator (orchestrator) for supported lifecycle and tool events. | Before relying on these hooks, test the callback connection, confirm the events it receives, and check how failures affect the task. MCP hooks do not provide a complete Compliance API audit trail. Command, local-config, and plugin hooks are unsupported with cloud orchestration, even when tools execute locally. Existing supported hooks still apply to local-only Work and Codex threads where orchestration and execution are both local. |
| Proxy listener addresses, ports, and process settings | Not portable environment policy | Managed HTTP/SOCKS listener ports and non-loopback proxy listeners are unsupported by the cloud runtime; socket-rule support depends on the execution path. Custom proxy configuration is separate from supported destination restrictions. |
| App-only settings and ordinary local defaults | Not necessarily consumed by cloud coordination | App-enforced controls can remain effective even when Local computer access with Work Cloud does not consume them. Cloud delivery and cloud-browser behavior need separate validation. |
Agent Security requirements for Local computer access with Work Cloud
Section titled “Agent Security requirements for Local computer access with Work Cloud”For Work with local access and dots, supported Global policy applies to the shared cloud orchestrator when managed policy is enabled. Local execution requirements govern the connected computer. Work cloud containers and dots cloud computers use their own execution configuration and requirements. Test local and cloud controls separately.
Exposed in the Agent Security UI
Section titled “Exposed in the Agent Security UI”- Allowed approval policies
- Allowed web search modes
Configured through TOML
Section titled “Configured through TOML”allowed_approvals_reviewersauto_reviewguardian_policy_configappsmcp_serverspluginsrules
These orchestrator requirements stay in Global. They do not configure shared cloud capability permissions or make local execution settings portable to Work cloud containers or dots cloud computers.
Local computer access with Work Cloud compatibility limits
Section titled “Local computer access with Work Cloud compatibility limits”Support depends on the field, how the policy is delivered, and where the task runs. Check the member’s effective policy before enabling sync. Some controls need to be tested in your deployment, as noted in the table.
Within a policy, the order from highest to lowest is OS-specific environment override → all-OS environment override → Global. A higher-priority policy wins even when a lower-priority policy is more specific.
For local execution, MDM and legacy managed-device requirements take precedence over Agent Security, which takes precedence over the device’s system requirements file. Some requirements, including network requirements, have field-specific merge rules and runtime limits. See Managed configuration for examples.
| Setting or family | Local computer access with Work Cloud compatibility | Admin guidance |
|---|---|---|
sqlite_home, log_dir, model_catalog_json |
Not supported as managed cloud overrides. | Local paths cannot move cloud storage or logs. A local model catalog does not carry over. |
model_provider, model_providers |
Not supported in managed Local computer access with Work Cloud requirements or configuration. | Custom inference gateways and provider connections do not carry over through these fields. This is separate from model selection. |
enforce_residency |
Blocks Local computer access with Work Cloud when enabled in any cloud policy. | If enforce_residency is enabled in any cloud policy, Allow local computer access is disabled for both Work and dots. This safeguard does not configure workspace residency or, by itself, disable Work Cloud or dots. |
application.network.enabled and application.network.domains |
Not supported by Local computer access with Work Cloud. | Do not use these application-destination restrictions as Local computer access with Work Cloud command-networking controls. |
allow_browser_and_computer_use, in_app_browser, additional_developer_instructions |
Cloud policy delivery needs validation. Local computer access with Work Cloud rejects these managed requirement keys. | Browser restrictions have app-side checks. That does not prove cloud delivery or cloud-browser enforcement. additional_developer_instructions requires orchestrator support. |
experimental_network and permissions.<profile>.network |
Partial. Supported destination and executor restrictions differ from custom proxy configuration. | Managed HTTP/SOCKS listener ports and non-loopback proxy listeners are unsupported by the cloud runtime; socket-rule support depends on the execution path. Local-execution merge behavior is separate. Command-network restrictions do not disable hosted search, MCP, or app tools. |
features / feature_requirements, models, computer_use |
Partial. | Retired switches such as tool_search = false, tool_search_always_defer_mcp_tools = false, js_repl = true, and remote_control = true are rejected. Some computer-use settings still need end-to-end validation. |
browser_use, allow_appshots, feedback, allow_remote_control, marketplace source restrictions |
The app or app-server enforces these controls on some policy delivery paths. | App controls can still apply when Local computer access with Work Cloud ignores a field. Desktop browser site rules do not apply to Work cloud containers. Validate the actual surface and policy delivery path. |
The configuration schema includes keys that may not work with Local computer access with Work Cloud or support environment overrides. See Managed configuration for the global baseline and precedence.
config.toml
Section titled “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.
Project-scoped config can’t override machine-local provider, auth,
host-owned app request metadata, notification, configuration profile selection,
or telemetry routing keys. Codex ignores openai_base_url,
chatgpt_base_url, apps_mcp_product_sku, model_provider,
model_providers, notify, profile, profiles,
experimental_realtime_ws_base_url, and otel when they appear in a
project-local .codex/config.toml; put provider, notification, and telemetry
keys in user-level config instead. Config profile files live next to
config.toml as $CODEX_HOME/profile-name.config.toml; select one with
--profile profile-name.
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. For beta permission profiles, see Permissions.
Codex and ChatGPT Work no longer support approval_policy = "untrusted".
Remove the setting or choose a supported policy. Project entries with
trust_level = "untrusted" in user-level ~/.codex/config.toml remain supported. See
Migrate from the retired untrusted approval policy
for examples and approval tradeoffs.
Set model to one available to your signed-in account or workspace. See
GPT-6.1 Sol availability before using the example value.
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.jsonNote: Rename experimental_instructions_file to model_instructions_file. Codex deprecates the old key; update existing configs to the new name.
requirements.toml
Section titled “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 runtime feature flags by the same
canonical keys that config.toml uses. Requirements can also include documented
app-only keys that don’t belong in config.toml. Omitted keys remain
unconstrained.
Some managed requirements enforce an exact configuration value instead of an allowlist. Users can’t override an enforced path, update preference, login-shell policy, or feedback setting.
Managed permission-profile allowlists require Codex 0.138.0 or later. Codex
0.137.0 and earlier ignore allowed_permission_profiles and managed
default_permissions.
Use allowed_sandbox_modes with sandbox_mode. For permission-profile
deployments, use allowed_permission_profiles with managed
default_permissions.
An untrusted entry in allowed_approval_policies is still valid for the
stricter approval behavior Codex derives when a project uses
trust_level = "untrusted". It does not permit explicitly setting
approval_policy = "untrusted".
The [models.new_thread] table supplies managed defaults, not enforcement.
If you explicitly override the model or reasoning effort with --model,
--config, or --profile, Codex ignores both model and
model_reasoning_effort in [models.new_thread]. service_tier is independent.
The browser requirements cover three separate surfaces. in_app_browser
controls the browser pane that a person opens and uses directly. browser_use
controls agent-driven work in a browser. computer_use controls agent-driven
work in native desktop apps.
The nested Browser Use and Computer Use policy values do not grant access by
themselves. An origin- or app-specific allow can override the fallback for
the same policy source, but normal feature, approval, and other policy checks
still apply. Where managed requirements and config.toml both apply, a deny
from either one wins.