Files
codex/codex-rs/core/src
T
Michael Bolin 2f048f2063 feat: add support for /etc/codex/requirements.toml on UNIX (#8277)
This implements the new config design where config _requirements_ are
loaded separately (and with a special schema) as compared to config
_settings_. In particular, on UNIX, with this PR, you could define
`/etc/codex/requirements.toml` with:

```toml
allowed_approval_policies = ["never", "on-request"]
```

to enforce that `Config.approval_policy` must be one of those two values
when Codex runs.

We plan to expand the set of things that can be restricted by
`/etc/codex/requirements.toml` in short order.

Note that requirements can come from several sources:

- new MDM key on macOS (not implemented yet)
- `/etc/codex/requirements.toml`
- re-interpretation of legacy MDM key on macOS
(`com.openai.codex/config_toml_base64`)
- re-interpretation of legacy `/etc/codex/managed_config.toml`

So our resolution strategy is to load TOML data from those sources, in
order. Later TOMLs are "merged" into previous TOMLs, but any field that
is already set cannot be overwritten. See
`ConfigRequirementsToml::merge_unset_fields()`.
2f048f2063 ยท 2025-12-18 13:36:55 -08:00
History
..
2025-12-18 10:59:53 -08:00
2025-12-17 18:48:28 -08:00
2025-12-17 15:29:29 +00:00
2025-11-20 10:58:46 -08:00
2025-12-17 17:08:03 +00:00
2025-12-12 18:59:39 +00:00
2025-10-30 10:28:32 +00:00
2025-12-12 12:30:38 -08:00
2025-12-12 17:07:17 -08:00
2025-12-17 18:48:28 -08:00
2025-11-28 11:34:57 +00:00
2025-12-11 14:06:07 -08:00