Commit Graph
8002 Commits
Author SHA1 Message Date
Michael Bolin 8fba191a68 merge commit for archive created by Sapling 2025-04-29 19:00:28 -07:00
Michael Bolin cd58c2dd62 feat: codex-linux-sandbox standalone executable 2025-04-29 19:00:16 -07:00
Michael Bolin 462e17b313 Merge f590442903 into sapling-pr-archive-bolinfest 2025-04-29 18:51:45 -07:00
Michael Bolin f590442903 feat: codex-linux-sandbox standalone executable 2025-04-29 18:51:01 -07:00
Michael Bolin 27bc4516bf feat: bring back -s option to specify sandbox permissions (#739) 2025-04-29 18:42:52 -07:00
Michael Bolin af415a60c0 merge commit for archive created by Sapling 2025-04-29 16:59:57 -07:00
Michael Bolin e622ab400d feat: codex-linux-sandbox standalone executable 2025-04-29 16:59:48 -07:00
Michael Bolin f906dd6ee7 feat: bring back -s option to specify sandbox permissions 2025-04-29 16:48:27 -07:00
oai-ragona cb0b0259f4 [codex-rs] Add rust-release action (#671)
Taking a pass at building artifacts per platform so we can consider
different distribution strategies that don't require users to install
the full `cargo` toolchain.

Right now this grabs just the `codex-repl` and `codex-tui` bins for 5
different targets and bundles them into a draft release. I think a
clearly marked pre-release set of artifacts will unblock the next step
of testing.
2025-04-29 16:38:47 -07:00
Michael Bolin 86091a0189 merge commit for archive created by Sapling 2025-04-29 16:19:06 -07:00
Michael Bolin f5fa188cb0 feat: bring back -s option to specify sandbox permissions 2025-04-29 16:18:57 -07:00
Michael Bolin 0a00b5ed29 fix: overhaul SandboxPolicy and config loading in Rust (#732)
Previous to this PR, `SandboxPolicy` was a bit difficult to work with:


https://github.com/openai/codex/blob/237f8a11e11fdcc793a09e787e48215676d9b95b/codex-rs/core/src/protocol.rs#L98-L108

Specifically:

* It was an `enum` and therefore options were mutually exclusive as
opposed to additive.
* It defined things in terms of what the agent _could not_ do as opposed
to what they _could_ do. This made things hard to support because we
would prefer to build up a sandbox config by starting with something
extremely restrictive and only granting permissions for things the user
as explicitly allowed.

This PR changes things substantially by redefining the policy in terms
of two concepts:

* A `SandboxPermission` enum that defines permissions that can be
granted to the agent/sandbox.
* A `SandboxPolicy` that internally stores a `Vec<SandboxPermission>`,
but externally exposes a simpler API that can be used to configure
Seatbelt/Landlock.

Previous to this PR, we supported a `--sandbox` flag that effectively
mapped to an enum value in `SandboxPolicy`. Though now that
`SandboxPolicy` is a wrapper around `Vec<SandboxPermission>`, the single
`--sandbox` flag no longer makes sense. While I could have turned it
into a flag that the user can specify multiple times, I think the
current values to use with such a flag are long and potentially messy,
so for the moment, I have dropped support for `--sandbox` altogether and
we can bring it back once we have figured out the naming thing.

Since `--sandbox` is gone, users now have to specify `--full-auto` to
get a sandbox that allows writes in `cwd`. Admittedly, there is no clean
way to specify the equivalent of `--full-auto` in your `config.toml`
right now, so we will have to revisit that, as well.

Because `Config` presents a `SandboxPolicy` field and `SandboxPolicy`
changed considerably, I had to overhaul how config loading works, as
well. There are now two distinct concepts, `ConfigToml` and `Config`:

* `ConfigToml` is the deserialization of `~/.codex/config.toml`. As one
might expect, every field is `Optional` and it is `#[derive(Deserialize,
Default)]`. Consistent use of `Optional` makes it clear what the user
has specified explicitly.
* `Config` is the "normalized config" and is produced by merging
`ConfigToml` with `ConfigOverrides`. Where `ConfigToml` contains a raw
`Option<Vec<SandboxPermission>>`, `Config` presents only the final
`SandboxPolicy`.

The changes to `core/src/exec.rs` and `core/src/linux.rs` merit extra
special attention to ensure we are faithfully mapping the
`SandboxPolicy` to the Seatbelt and Landlock configs, respectively.

Also, take note that `core/src/seatbelt_readonly_policy.sbpl` has been
renamed to `codex-rs/core/src/seatbelt_base_policy.sbpl` and that
`(allow file-read*)` has been removed from the `.sbpl` file as now this
is added to the policy in `core/src/exec.rs` when
`sandbox_policy.has_full_disk_read_access()` is `true`.
2025-04-29 15:01:16 -07:00
Michael Bolin 27c086661c Merge 30c5314c54 into sapling-pr-archive-bolinfest 2025-04-29 14:32:23 -07:00
Michael Bolin 30c5314c54 feat: flip the sense of the --sandbox option 2025-04-29 14:32:19 -07:00
Michael Bolin a30b5ac59d merge commit for archive created by Sapling 2025-04-29 14:30:22 -07:00
Michael Bolin 80791a30a9 feat: flip the sense of the --sandbox option 2025-04-29 14:30:16 -07:00
Michael Bolin 197df59717 merge commit for archive created by Sapling 2025-04-29 14:24:18 -07:00
Michael Bolin 32991d2fcc feat: flip the sense of the --sandbox option 2025-04-29 14:24:12 -07:00
Michael Bolin 298685f856 Merge e1a15b13a9 into sapling-pr-archive-bolinfest 2025-04-29 14:01:52 -07:00
Michael Bolin e1a15b13a9 feat: flip the sense of the --sandbox option 2025-04-29 14:01:48 -07:00
Michael Bolin 8f88c54917 merge commit for archive created by Sapling 2025-04-29 13:57:59 -07:00
Michael Bolin 4c2abb2ed5 feat: flip the sense of the --sandbox option 2025-04-29 13:57:54 -07:00
Michael Bolin ad5e9e6899 merge commit for archive created by Sapling 2025-04-29 13:55:09 -07:00
Michael Bolin 1d198677c8 feat: flip the sense of the --sandbox option 2025-04-29 13:55:04 -07:00
Michael Bolin 33d0a8cf47 merge commit for archive created by Sapling 2025-04-29 13:52:51 -07:00
Michael Bolin f63e2bb776 feat: flip the sense of the --sandbox option 2025-04-29 13:52:44 -07:00
Michael Bolin a0e99e0866 merge commit for archive created by Sapling 2025-04-29 13:31:37 -07:00
Michael Bolin a1bac7afab feat: flip the sense of the --sandbox option 2025-04-29 13:31:31 -07:00
Michael Bolin dd75f98f18 merge commit for archive created by Sapling 2025-04-29 13:24:25 -07:00
Michael Bolin 32eb5e14e1 feat: flip the sense of the --sandbox option 2025-04-29 13:24:20 -07:00
Michael Bolin cd82749ec9 merge commit for archive created by Sapling 2025-04-29 13:21:17 -07:00
Michael Bolin f4e037db0a feat: flip the sense of the --sandbox option 2025-04-29 13:21:10 -07:00
Michael Bolin 9383f1c6fc merge commit for archive created by Sapling 2025-04-29 13:13:28 -07:00
Michael Bolin e92caeafac feat: flip the sense of the --sandbox option 2025-04-29 13:13:19 -07:00
Matan Yemini 237f8a11e1 feat: add common package registries domains to allowed-domains list (#414)
feat: add common package registries domains to allowed-domains list
2025-04-29 12:07:00 -07:00
Michael Bolin b6d6031ff7 Merge 1db0aeb787 into sapling-pr-archive-bolinfest 2025-04-29 11:09:20 -07:00
Michael Bolin 1db0aeb787 feat: flip the sense of the --sandbox option 2025-04-29 11:09:15 -07:00
Michael Bolin f0c0b77a9d merge commit for archive created by Sapling 2025-04-29 11:09:01 -07:00
Michael Bolin 566cd27a0e feat: flip the sense of the --sandbox option 2025-04-29 11:08:53 -07:00
Michael Bolin 99676c7506 Merge febc95ce1d into sapling-pr-archive-bolinfest 2025-04-29 11:01:02 -07:00
Michael Bolin febc95ce1d feat: flip the sense of the --sandbox option 2025-04-29 11:00:43 -07:00
Kevin Alwell a6ed7ff103 Fixes issue #726 by adding config to configToSave object (#728)
The saveConfig() function only includes a hardcoded subset of properties
when writing the config file. Any property not explicitly listed (like
disableResponseStorage) will be dropped.
I have added `disableResponseStorage` to the `configToSave` object as
the immediate fix.

[Linking Issue this fixes.](https://github.com/openai/codex/issues/726)
2025-04-29 13:10:16 -04:00
Michael Bolin 3b39964f81 feat: improve output of exec subcommand (#719) 2025-04-29 09:59:35 -07:00
892242ef7c feat: add --reasoning CLI flag (#314)
This PR adds a new CLI flag: `--reasoning`, which allows users to
customize the reasoning effort level (`low`, `medium`, or `high`) used
by OpenAI's `o` models.
By introducing the `--reasoning` flag, users gain more flexibility when
working with the models. It enables optimization for either speed or
depth of reasoning, depending on specific use cases.
This PR resolves #107

- **Flag**: `--reasoning`
- **Accepted Values**: `low`, `medium`, `high`
- **Default Behavior**: If not specified, the model uses the default
reasoning level.

## Example Usage

```bash
codex --reasoning=low "Write a simple function to calculate factorial"

---------

Co-authored-by: Fouad Matin <169186268+fouad-openai@users.noreply.github.com>
Co-authored-by: yashrwealthy <yash.rastogi@wealthy.in>
Co-authored-by: Thibault Sottiaux <tibo@openai.com>
2025-04-29 07:30:49 -07:00
Michael Bolin 212784dc8b merge commit for archive created by Sapling 2025-04-28 23:57:20 -07:00
Michael Bolin 493e1b477c feat: improve output of exec subcommand 2025-04-28 23:57:14 -07:00
Michael Bolin d362978afe merge commit for archive created by Sapling 2025-04-28 23:54:22 -07:00
Michael Bolin 65ec055195 feat: improve output of exec subcommand 2025-04-28 23:54:10 -07:00
Michael Bolin 7bb0f0045c merge commit for archive created by Sapling 2025-04-28 23:35:59 -07:00
Michael Bolin 9579f05363 feat: improve output of exec subcommand 2025-04-28 23:35:54 -07:00