Commit Graph
5773 Commits
Author SHA1 Message Date
Michael Bolin 36d5a08262 merge commit for archive created by Sapling 2025-12-18 00:13:45 -08:00
Michael Bolin 892ba0142f feat: migrate to new constraint-based loading strategy
This is a significant change to how layers of configuration are applied. In particular, the `ConfigLayerStack` now has two important fields:

- `layers: Vec<ConfigLayerEntry>`
- `requirements: ConfigRequirements`

We merge `TomlValue`s across the layers, but they are subject to `ConfigRequirements` before creating a `Config`.
2025-12-18 00:13:38 -08:00
Michael Bolin 4b54aac046 Merge b4349707af into sapling-pr-archive-bolinfest 2025-12-18 00:09:50 -08:00
Michael Bolin a284435e46 Merge ac66a9f6f1 into sapling-pr-archive-bolinfest 2025-12-18 00:06:47 -08:00
Michael Bolin b6de7f4d1d Merge 957bab89b1 into sapling-pr-archive-bolinfest 2025-12-18 00:05:53 -08:00
Michael Bolin b4349707af feat: migrate to new constraint-based loading strategy
This is a significant change to how layers of configuration are applied. In particular, the `ConfigLayerStack` now has two important fields:

- `layers: Vec<ConfigLayerEntry>`
- `requirements: ConfigRequirements`

We merge `TomlValue`s across the layers, but they are subject to `ConfigRequirements` before creating a `Config`.
2025-12-18 00:02:39 -08:00
Michael Bolin ac66a9f6f1 chore: simplify loading of Mac-specific logic in config_loader 2025-12-18 00:02:38 -08:00
Michael Bolin 957bab89b1 chore: simplify loading of Mac-specific logic in config_loader 2025-12-18 00:02:32 -08:00
Michael Bolin b81db2af8c Merge 0b6cf592b2 into sapling-pr-archive-bolinfest 2025-12-17 23:53:27 -08:00
Michael Bolin 0b6cf592b2 feat: migrate to new constraint-based loading strategy
This is a significant change to how layers of configuration are applied. In particular, the `ConfigLayerStack` now has two important fields:

- `layers: Vec<ConfigLayerEntry>`
- `requirements: ConfigRequirements`

We merge `TomlValue`s across the layers, but they are subject to `ConfigRequirements` before creating a `Config`.
2025-12-17 23:52:25 -08:00
Michael Bolin cf13511e87 chore: simplify loading of Mac-specific logic in config_loader 2025-12-17 23:52:25 -08:00
Michael Bolin 580c59aa9a fix: introduce ConfigBuilder (#8235)
Introduce `ConfigBuilder` as an alternative to our existing `Config`
constructors.

I noticed that the existing constructors,
`Config::load_with_cli_overrides()` and
`Config::load_with_cli_overrides_and_harness_overrides()`, did not take
`codex_home` as a parameter, which can be a problem.

Historically, when Codex was purely a CLI, we wanted to be extra sure
that the creation of `codex_home` was always done via
`find_codex_home()`, so we did not expose `codex_home` as a parameter
when creating `Config` in business logic. But in integration tests,
`codex_home` nearly always needs to be configured (as a temp directory),
which is why callers would have to go through
`Config::load_from_base_config_with_overrides()` instead.

Now that the Codex harness also functions as an app server, which could
conceivably load multiple threads where `codex_home` is parameterized
differently in each one, I think it makes sense to make this
configurable. Going to a builder pattern makes it more flexible to
ensure an arbitrary permutation of options can be set when constructing
a `Config` while using the appropriate defaults for the options that
aren't set explicitly.

Ultimately, I think this should make it possible for us to make
`Config::load_from_base_config_with_overrides()` private because all
integration tests should be able to leverage `ConfigBuilder` instead.
Though there could be edge cases, so I'll pursue that migration after we
get through the current config overhaul.






---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/8235).
* #8237
* __->__ #8235
2025-12-17 23:45:09 -08:00
Gav Verma 50dafbc31b Make loading malformed skills fail-open (#8243)
Instead of failing to start Codex, clearly call out that N skills did
not load and provide warnings so that the user may fix them.

<img width="3548" height="874" alt="image"
src="https://github.com/user-attachments/assets/6ce041b2-1373-4007-a6dd-0194e58fafe4"
/>
2025-12-17 23:41:04 -08:00
Michael Bolin de2905e959 merge commit for archive created by Sapling 2025-12-17 23:19:13 -08:00
Michael Bolin ebaef21d54 feat: migrate to new constraint-based loading strategy 2025-12-17 23:18:50 -08:00
Michael Bolin aae4908ff8 merge commit for archive created by Sapling 2025-12-17 22:08:15 -08:00
Michael Bolin 1bd129e283 feat: migrate to new constraint-based loading strategy 2025-12-17 22:08:10 -08:00
Michael Bolin c8a8451741 merge commit for archive created by Sapling 2025-12-17 21:34:36 -08:00
Michael Bolin 419df7b881 feat: migrate to new constraint-based loading strategy 2025-12-17 21:34:29 -08:00
Michael Bolin 12b636282a Merge 845a44b11d into sapling-pr-archive-bolinfest 2025-12-17 20:56:46 -08:00
Michael Bolin 845a44b11d feat: migrate to new constraint-based loading strategy 2025-12-17 20:56:40 -08:00
Michael Bolin 64778fa39b merge commit for archive created by Sapling 2025-12-17 20:21:27 -08:00
Michael Bolin d6751cd3c3 feat: migrate to new constraint-based loading strategy 2025-12-17 20:21:19 -08:00
Michael Bolin 7f792c729a Merge 95c95de8ff into sapling-pr-archive-bolinfest 2025-12-17 20:20:29 -08:00
Michael Bolin 95c95de8ff feat: migrate to new constraint-based loading strategy 2025-12-17 20:20:22 -08:00
Michael Bolin 99209b5e3e merge commit for archive created by Sapling 2025-12-17 18:49:04 -08:00
Michael Bolin 02c4fcca80 fix: introduce ConfigBuilder 2025-12-17 18:48:40 -08:00
xl-openai da3869eeb6 Support SYSTEM skills. (#8220)
1. Remove PUBLIC skills and introduce SYSTEM skills embedded in the
binary and installed into $CODEX_HOME/skills/.system at startup.
2. Skills are now always enabled (feature flag removed).
3. Update skills/list to accept forceReload and plumb it through (not
used by clients yet).
2025-12-17 18:48:28 -08:00
Ahmed Ibrahim 6f102e18c4 Show migration link (#8228)
# External (non-OpenAI) Pull Request Requirements

Before opening this Pull Request, please read the dedicated
"Contributing" markdown file or your PR may be closed:
https://github.com/openai/codex/blob/main/docs/contributing.md

If your PR conforms to our contribution guidelines, replace this text
with a detailed and high quality description of your changes.

Include a link to a bug report or enhancement request.
2025-12-18 02:03:40 +00:00
Michael Bolin a8797019a1 chore: cleanup Config instantiation codepaths (#8226)
This PR does various types of cleanup before I can proceed with more
ambitious changes to config loading.

First, I noticed duplicated code across these two methods:


https://github.com/openai/codex/blob/774bd9e432fa2e0f4e059e97648cf92216912e19/codex-rs/core/src/config/mod.rs#L314-L324


https://github.com/openai/codex/blob/774bd9e432fa2e0f4e059e97648cf92216912e19/codex-rs/core/src/config/mod.rs#L334-L344

This has now been consolidated in
`load_config_as_toml_with_cli_overrides()`.

Further, I noticed that `Config::load_with_cli_overrides()` took two
similar arguments:


https://github.com/openai/codex/blob/774bd9e432fa2e0f4e059e97648cf92216912e19/codex-rs/core/src/config/mod.rs#L308-L311

The difference between `cli_overrides` and `overrides` was not
immediately obvious to me. At first glance, it appears that one should
be able to be expressed in terms of the other, but it turns out that
some fields of `ConfigOverrides` (such as `cwd` and
`codex_linux_sandbox_exe`) are, by design, not configurable via a
`.toml` file or a command-line `--config` flag.

That said, I discovered that many callers of
`Config::load_with_cli_overrides()` were passing
`ConfigOverrides::default()` for `overrides`, so I created two separate
methods:

- `Config::load_with_cli_overrides(cli_overrides: Vec<(String,
TomlValue)>)`
- `Config::load_with_cli_overrides_and_harness_overrides(cli_overrides:
Vec<(String, TomlValue)>, harness_overrides: ConfigOverrides)`

The latter has a long name, as it is _not_ what should be used in the
common case, so the extra typing is designed to draw attention to this
fact. I tried to update the existing callsites to use the shorter name,
where possible.

Further, in the cases where `ConfigOverrides` is used, usually only a
limited subset of fields are actually set, so I updated the declarations
to leverage `..Default::default()` where possible.
2025-12-17 18:01:17 -08:00
Michael Bolin 320337a45c merge commit for archive created by Sapling 2025-12-17 17:15:34 -08:00
Michael Bolin 2d851cbf21 chore: cleanup Config instantiation codepaths 2025-12-17 17:15:27 -08:00
Michael Bolin 8d6a9d77fb Merge 767fa74f82 into sapling-pr-archive-bolinfest 2025-12-17 17:14:11 -08:00
Michael Bolin 767fa74f82 chore: cleanup Config instantiation codepaths 2025-12-17 17:13:26 -08:00
Ahmed Ibrahim 774bd9e432 feat: model picker (#8209)
# External (non-OpenAI) Pull Request Requirements

Before opening this Pull Request, please read the dedicated
"Contributing" markdown file or your PR may be closed:
https://github.com/openai/codex/blob/main/docs/contributing.md

If your PR conforms to our contribution guidelines, replace this text
with a detailed and high quality description of your changes.

Include a link to a bug report or enhancement request.
2025-12-17 16:12:35 -08:00
iceweasel-oai 25ecd0c2e4 speed and reliability improvements for setting reads ACLs (#8216)
- Batch read ACL creation for online/offline sandbox user
- creates a new ACL helper process that is long-lived and runs in the
background
- uses a mutex so that only one helper process is running at a time.
2025-12-17 15:27:52 -08:00
Ahmed Ibrahim 927a6acbea Load models from static file (#8153)
- Load models from static file as a fallback
- Make API users use this file directly
- Add tests to make sure updates to the file always serialize
2025-12-17 14:34:13 -08:00
iceweasel-oai a9a7cf3488 download new windows binaries when staging npm package (#8203) 2025-12-17 13:34:32 -08:00
Shijie Rao df35189366 feat: make list_models non-blocking (#8198)
### Summary
* Make `app_server.list_models` to be non-blocking and consumers (i.e.
extension) can manage the flow themselves.
* Force config to use remote models and therefore fetch codex-auto model
list.
2025-12-17 12:13:16 -08:00
Michael Bolin 1e9babe178 fix: PathBuf -> AbsolutePathBuf in ConfigToml struct (#8205)
We should not have any `PathBuf` fields in `ConfigToml` or any of the
transitive structs we include, as we should use `AbsolutePathBuf`
instead so that we do not have to keep track of the file from which
`ConfigToml` was loaded such that we need it to resolve relative paths
later when the values of `ConfigToml` are used.

I only found two instances of this: `experimental_instructions_file` and
`experimental_compact_prompt_file`. Incidentally, when these were
specified as relative paths, they were resolved against `cwd` rather
than `config.toml`'s parent, which seems wrong to me. I changed the
behavior so they are resolved against the parent folder of the
`config.toml` being parsed, which we get "for free" due to the
introduction of `AbsolutePathBufGuard ` in
https://github.com/openai/codex/pull/7796.

While it is not great to change the behavior of a released feature,
these fields are prefixed with `experimental_`, which I interpret to
mean we have the liberty to change the contract.

For reference:

- `experimental_instructions_file` was introduced in
https://github.com/openai/codex/pull/1803
- `experimental_compact_prompt_file` was introduced in
https://github.com/openai/codex/pull/5959
2025-12-17 12:08:18 -08:00
Michael Bolin 2ebd4f0381 Merge 09c60155f1 into sapling-pr-archive-bolinfest 2025-12-17 11:42:03 -08:00
Michael Bolin 09c60155f1 fix: PathBuf -> AbsolutePathBuf in ConfigToml struct 2025-12-17 11:41:57 -08:00
Michael Bolin 5c6f82ab3c Merge ad879be117 into sapling-pr-archive-bolinfest 2025-12-17 11:37:52 -08:00
Michael Bolin ad879be117 fix: PathBuf -> AbsolutePathBuf in ConfigToml struct 2025-12-17 11:37:46 -08:00
jif-oai 3d92b443b0 feat: add config to disable warnings around ghost snapshot (#8178) 2025-12-17 18:50:22 +00:00
jif-oai 167553f00d fix: session downgrade (#8196)
The problem is that the `tokio` task own an `Arc` reference of the
session and that this task only exit with the broadcast channel get
closed. But this never get closed if the session is not dropped. So it's
a snake biting his tail basically

The most notable result was that non of the `Drop` implementation were
triggered (temporary files, shell snapshots, session cleaning etc etc)
when closing the session (through a `/new` for example)

The fix is just to weaken the `Arc` and upgrade it on the fly
2025-12-17 10:44:39 -08:00
jif-oai 9f28c6251d fix: proper skills dir cleanup (#8194) 2025-12-17 18:31:03 +00:00
Shijie Rao 3702793882 chore: update listMcpServerStatus to be non-blocking (#8151)
### Summary
* Update `listMcpServerStatus` to be non-blocking by wrapping it with
tokio:spawn.
2025-12-17 10:11:02 -08:00
jif-oai a2cc0032e0 chore: move back stuff out of beta program (#8199) 2025-12-17 17:58:47 +00:00
jif-oai f74e0cda92 feat: unified exec footer (#8117)
# With `unified_exec`
Known tools are correctly casted
<img width="1150" height="312" alt="Screenshot 2025-12-16 at 19 27 28"
src="https://github.com/user-attachments/assets/24150ee5-e88d-461b-a459-483c24784196"
/>
If a session exit the turn, we render it with the "Ran ..."
<img width="1168" height="355" alt="Screenshot 2025-12-16 at 19 27 58"
src="https://github.com/user-attachments/assets/3f00b60c-2d57-4f9d-a201-9cc8388957cb"
/>
If a session does not exit during the turn, it is closed at the end of
the turn but this is not rendered
<img width="642" height="342" alt="Screenshot 2025-12-16 at 19 34 37"
src="https://github.com/user-attachments/assets/c2bd9283-7017-4915-ba73-c52199b0b28e"
/>

# Without `unified_exec`
No changes
<img width="740" height="603" alt="Screenshot 2025-12-16 at 19 31 21"
src="https://github.com/user-attachments/assets/ca5d90fe-a9b2-42ba-bcd7-3e98c4ed22e8"
/>
2025-12-17 17:12:04 +00:00