419 419
420Requirements can also constrain [feature flags](https://learn.chatgpt.com/docs/config-file/config-basic#feature-flags) via the `[features]` table in `requirements.toml`. Note that features aren't always security-sensitive, but enterprises can pin values if desired. Omitted keys remain unconstrained.420Requirements can also constrain [feature flags](https://learn.chatgpt.com/docs/config-file/config-basic#feature-flags) via the `[features]` table in `requirements.toml`. Note that features aren't always security-sensitive, but enterprises can pin values if desired. Omitted keys remain unconstrained.
421 421
422For Codex 0.138.0 or later, prefer [permission profiles](https://learn.chatgpt.com/docs/permissions)422Prefer [permission profiles](https://learn.chatgpt.com/docs/permissions)
423with `allowed_permission_profiles` and managed `default_permissions`. Use423with `allowed_permission_profiles` and managed `default_permissions`. Use
424`allowed_sandbox_modes` only for legacy deployments that still configure424`allowed_sandbox_modes` only for legacy deployments that still configure
425`sandbox_mode`.425`sandbox_mode`.
551permission-profile counterpart to `allowed_sandbox_modes`; use the allowlist that551permission-profile counterpart to `allowed_sandbox_modes`; use the allowlist that
552matches how your users select permissions.552matches how your users select permissions.
553 553
554Permission-profile allowlists require Codex 0.138.0 or later. Codex 0.137.0 and
555earlier ignore `allowed_permission_profiles` and managed
556`default_permissions`.
557
558Use the permission-profile examples below only after every managed client runs a
559supporting release. Don't deploy managed custom profiles until the fleet upgrade
560is complete.
561
562When present, the table is the complete list of allowed profiles. It allows554When present, the table is the complete list of allowed profiles. It allows
563profiles set to `true` and denies profiles omitted or set to `false`, including555profiles set to `true` and denies profiles omitted or set to `false`, including
564built-ins added in future Codex versions.556built-ins added in future Codex versions.
583loaded config. Custom names can't start with `:` or use the reserved `filesystem`575loaded config. Custom names can't start with `:` or use the reserved `filesystem`
584name.576name.
585 577
586Don't deploy managed custom profiles to clients running Codex 0.137.0 or
587earlier. Those clients recognize the profile table but not the managed default
588that selects it.
589
590For example:578For example:
591 579
592```toml580```toml
836### Configure network access requirements824### Configure network access requirements
837 825
838<WarningTip>826<WarningTip>
839 Keep `[experimental_network]` in published policies until every client and827 If your policy validator strips `[network_proxy]`, use the
840 policy validation tool supports `[network_proxy]`. Older versions can ignore828 `[experimental_network]` alias. Support for managed command networking is
841 or strip the new name. Test enforcement on the client versions and operating829 limited on Windows.
842 systems you deploy, especially Windows, where support is limited.
843</WarningTip>830</WarningTip>
844 831
845Use **Requirements** > **Network use controls** to manage supported command832Use **Requirements** > **Network use controls** to manage supported command
871Global rules. Use **Edit as TOML** for advanced network fields or existing legacy858Global rules. Use **Edit as TOML** for advanced network fields or existing legacy
872domain lists that the visual editor can't represent.859domain lists that the visual editor can't represent.
873 860
874In Codex 0.166.0, `[network_proxy]` is the canonical table for managed861Use `[network_proxy]` or its alias `[experimental_network]` in
875command networking in `requirements.toml`. Codex also accepts the older862`requirements.toml`. Use one name per layer. If layers use different names,
876`[experimental_network]` name. Choose one table name per layer. If layers use863the usual requirements precedence applies.
877different names, Codex applies the usual requirements precedence.
878 864
879Set `enabled = true` in the managed table to start the proxy independently865Set `enabled = true` in the managed table to start the proxy independently
880of the user setting `features.network_proxy`. The active sandbox must also866of the user setting `features.network_proxy`. The active sandbox must also
881allow command network access. The example uses the name that older clients867allow command network access.
882and policy validation layers recognize.
883 868
884```toml869```toml
885[experimental_network]870[experimental_network]
1194]1179]
1195```1180```
1196 1181
1197Check that every managed client version supports the keys you select. Assign the policy to the intended users or groups and verify that it takes effect on their supported clients. Use1182Assign the policy to the intended users or groups.
1198the configuration reference for the current schema and the administration
1199surface for current assignment behavior.
1200 1183
1201The service selects the enterprise-managed requirement layers that apply to the1184The service selects the enterprise-managed requirement layers that apply to the
1202signed-in identity. The local client evaluates those layers with the other1185signed-in identity. The local client evaluates those layers with the other
1283 1266
1284### Enforce OpenTelemetry settings1267### Enforce OpenTelemetry settings
1285 1268
1286In Codex CLI 0.166.0, use `[otel]` in `requirements.toml` to set the log, trace, and metrics1269Use `[otel]` in `requirements.toml` to configure log, trace, and metrics
1287exporters independently, label the environment, and control which content Codex1270exporters independently for Codex CLI and the macOS desktop app. You can
1288exports. This example sends logs to an OTLP/HTTP collector and limits the1271label the environment and control which content Codex exports.
1289text logged for each tool result to 256 UTF-8 bytes. It omits prompt text, final response
1290text, and automatic approval assessments.
1291 1272
1292The macOS desktop app 26.1111.21308 bundles CLI `0.169.0-alpha.11.1` and1273Set `otel.log_sse_deltas` to `false` to skip successful streaming events whose
1293supports managed `[otel]` settings. Set `otel.log_sse_deltas` to `false` to1274names end in `.delta`. Codex still records errors, completion events, and metrics.
1294skip successful streaming events whose names end in `.delta`. Codex still1275
1295records errors, completion events, and metrics.1276This example sends logs to an OTLP/HTTP collector and limits the logged text
1296The older desktop build 26.1027.30824 bundles CLI `0.166.0-alpha.5.1` and1277of each tool result to 256 UTF-8 bytes. It omits prompt text, final response
1297can't enforce `[otel]` settings through `requirements.toml`.1278text, and automatic approval assessments.
1298 1279
1299```toml1280```toml
1300[otel]1281[otel]
1321See [Observability and telemetry](https://learn.chatgpt.com/docs/config-file/config-advanced#observability-and-telemetry)1302See [Observability and telemetry](https://learn.chatgpt.com/docs/config-file/config-advanced#observability-and-telemetry)
1322for exporter options and log contents.1303for exporter options and log contents.
1323 1304
1305### Managed collector credentials
1306
1307Use a managed header helper to refresh OTLP/HTTP collector credentials.
1308
1309Install the helper in an administrator-controlled directory and grant Codex
1310users permission to execute it. Codex runs it directly from that directory.
1311Set its absolute path and the exporters that use it in the same requirements
1312layer, either system `requirements.toml` or macOS MDM.
1313
1314```toml
1315[otel]
1316headers_helper = "/opt/company/bin/otel-auth"
1317exporter = { otlp-http = { endpoint = "https://otel.example.com/v1/logs", protocol = "binary" } }
1318```
1319
1320The helper can supply headers for `exporter`, `trace_exporter`, and
1321`metrics_exporter`. If another layer replaces an exporter, the replacement
1322uses its own headers. OTLP/gRPC exporters don't use the helper.
1323
1324See [Refresh collector credentials](https://learn.chatgpt.com/docs/config-file/config-advanced#refresh-collector-credentials)
1325for the helper's output format, refresh interval, and failure behavior.
1326
1324### Migrate SQLite databases on NFS1327### Migrate SQLite databases on NFS
1325 1328
1326On Linux, Codex creates new SQLite databases on NFS in `DELETE` journal mode.1329On Linux, Codex creates new SQLite databases on NFS in `DELETE` journal mode.