Configure Codex
This feature is in Beta. To use it, a workspace admin must turn on Unity Gateway Managed Configuration from the Previews page. See Manage Databricks previews.
Use agent_native_config.codex to set Codex requirements and defaults in your workspace's coding agent configuration. Codex CLI and the Codex agent in ChatGPT desktop read the same files on a device. Each setting takes effect where the client supports its feature.
After ug writes the system files, Codex applies its own configuration precedence to config.toml and its managed requirements to requirements.toml. The ownership table on this page describes how ug builds those files.
Choose the field that matches how you want a setting to apply:
Field | Generated file and effect | Official reference |
|---|---|---|
|
| |
|
|
Requirements
Use Codex 0.156.0 or above to enforce the gateway provider in requirements.toml.
The native-file rebuild described on this page applies to macOS and Linux. For Windows machine-wide configuration, see Roll out coding agents with mobile device management (MDM).
Add Codex settings
-
Open the coding agent configuration in your workspace.
-
Find the
CODING_AGENT_CODEXentry inenabled_agents. Addagent_native_configinside that entry'sconfigobject. For example, this entry enables fast mode, limits concurrent agent threads, and restricts locked computer use and browser history access:JSON{"agent": "CODING_AGENT_CODEX","config": {"models": { "sources": ["system.ai.gpt-5-5"] },"default_models": { "default_model": "system.ai.gpt-5-5" },"agent_native_config": {"codex": {"requirements": {"computer_use": { "allow_locked_computer_use": false },"browser_use": { "allow_history_access": false }},"config": {"features": { "fast_mode": true },"agents": { "max_concurrent_threads_per_session": 4 }}}}}}Merge these fields into the existing entry. Keep the model settings, Model Context Protocol (MCP) servers, and any other settings your team needs.
-
Save the configuration. Run
ug configure --globalon each managed device to apply the published settings. See Roll out coding agents with mobile device management (MDM).
Codex reads these files when it starts, including when a developer starts the CLI or Codex in ChatGPT desktop directly.
In the workspace configuration, represent the contents of each TOML file as a JSON object. ug converts nested JSON objects to TOML tables. It drops JSON null values because TOML has no null value and lists each dropped key in its report.
Use the coding agent configuration's models, default_models, and http_headers fields for gateway models, default models, and request headers. See the configuration schema for field paths.
Represent TOML settings as JSON
The config.toml defaults in the preceding example correspond to these TOML settings:
[features]
fast_mode = true
[agents]
max_concurrent_threads_per_session = 4
The requirements.toml restrictions correspond to these TOML settings:
[computer_use]
allow_locked_computer_use = false
[browser_use]
allow_history_access = false
Represent both files with this JSON object inside the CODING_AGENT_CODEX entry's config:
{
"agent_native_config": {
"codex": {
"requirements": {
"computer_use": { "allow_locked_computer_use": false },
"browser_use": { "allow_history_access": false }
},
"config": {
"features": { "fast_mode": true },
"agents": { "max_concurrent_threads_per_session": 4 }
}
}
}
}
How Unity Gateway builds Codex files
On each ug configure --global run, ug builds requirements.toml from your codex.requirements object, then adds the gateway provider lock. It builds config.toml from your codex.config object, then adds the model from default_models.default_model. For a static model list, it also writes /etc/codex/ug-model-catalog.json and /etc/codex/managed_config.toml. Run ug configure --global --dry-run to inspect the generated files and skipped keys.
Keys absent from the following table pass through as given. A reserved key in your JSON is skipped. A conditionally reserved key is skipped only while its feature is active. A shared table keeps your named entries except those that ug also registers.
Keys controlled by ug
Keys in config.toml come from codex.config. Keys in requirements.toml come from codex.requirements.
File | Key | What |
|---|---|---|
|
| Shared table: |
|
| Reserved: |
|
| Reserved: |
|
| Reserved: |
|
| Reserved: |
|
| Conditionally reserved: When Smart Routing is enabled, |
|
| Reserved: |
|
| Conditionally reserved: When Smart Routing is enabled, |
|
| Shared table: If you set an allowlist, |
|
| Reserved: |
|
| Reserved: |
|
| Reserved: |
|
| Reserved: |
|
| Conditionally reserved: When tracing is enabled, |