Commit Graph
8526 Commits
Author SHA1 Message Date
Michael Bolin 92f1723474 merge commit for archive created by Sapling 2026-02-25 19:57:04 -08:00
Michael Bolin 98a7aa4a87 feat: include sandbox config with escalation request 2026-02-25 19:56:58 -08:00
Michael Bolin 9e879fb1bf merge commit for archive created by Sapling 2026-02-25 19:49:37 -08:00
Michael Bolin ee1d595468 feat: include sandbox config with escalation request 2026-02-25 19:44:40 -08:00
pakrym-oai b65205fb3d Attempt 2 to fix release (#12856) 2026-02-25 19:12:19 -08:00
pakrym-oai ea621ae152 Try fixing windows pipeline (#12848)
# 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.
2026-02-25 18:18:00 -08:00
xl-openai 2c1f225427 Clarify device auth login hint (#12813)
Mention device auth for remote login
2026-02-25 18:15:27 -08:00
Michael Bolin dca40097e5 merge commit for archive created by Sapling 2026-02-25 17:16:17 -08:00
Michael Bolin 8379070097 feat: include sandbox config with escalation request 2026-02-25 17:16:12 -08:00
Curtis 'Fjord' Hawthorne 40ab71a985 Disable js_repl when Node is incompatible at startup (#12824)
## Summary
- validate `js_repl` Node compatibility during session startup when the
experiment is enabled
- if Node is missing or too old, disable `js_repl` and
`js_repl_tools_only` for the session before tools and instructions are
built
- surface that startup disablement to users through the existing startup
warning flow instead of only logging it
- reuse the same compatibility check in js_repl kernel startup so
startup gating and runtime behavior stay aligned
- add a regression test that verifies the warning is emitted and that
the first advertised tool list omits `js_repl` and `js_repl_reset` when
Node is incompatible

## Why
Today `js_repl` can be advertised based only on the feature flag, then
fail later when the kernel starts. That makes the available tool list
inaccurate at the start of a conversation, and users do not get a clear
explanation for why the tool is unavailable.

This change makes tool availability reflect real startup checks, keeps
the advertised tool set stable for the lifetime of the session, and
gives users a visible warning when `js_repl` is disabled.

## Testing
- `just fmt`
- `cargo test -p codex-core --test all
js_repl_is_not_advertised_when_startup_node_is_incompatible`
2026-02-26 01:14:51 +00:00
Michael Bolin 14116ade8d feat: include available decisions in command approval requests (#12758)
Command-approval clients currently infer which choices to show from
side-channel fields like `networkApprovalContext`,
`proposedExecpolicyAmendment`, and `additionalPermissions`. That makes
the request shape harder to evolve, and it forces each client to
replicate the server's heuristics instead of receiving the exact
decision list for the prompt.

This PR introduces a mapping between `CommandExecutionApprovalDecision`
and `codex_protocol::protocol::ReviewDecision`:

```rust
impl From<CoreReviewDecision> for CommandExecutionApprovalDecision {
    fn from(value: CoreReviewDecision) -> Self {
        match value {
            CoreReviewDecision::Approved => Self::Accept,
            CoreReviewDecision::ApprovedExecpolicyAmendment {
                proposed_execpolicy_amendment,
            } => Self::AcceptWithExecpolicyAmendment {
                execpolicy_amendment: proposed_execpolicy_amendment.into(),
            },
            CoreReviewDecision::ApprovedForSession => Self::AcceptForSession,
            CoreReviewDecision::NetworkPolicyAmendment {
                network_policy_amendment,
            } => Self::ApplyNetworkPolicyAmendment {
                network_policy_amendment: network_policy_amendment.into(),
            },
            CoreReviewDecision::Abort => Self::Cancel,
            CoreReviewDecision::Denied => Self::Decline,
        }
    }
}
```

And updates `CommandExecutionRequestApprovalParams` to have a new field:

```rust
available_decisions: Option<Vec<CommandExecutionApprovalDecision>>
```

when, if specified, should make it easier for clients to display an
appropriate list of options in the UI.

This makes it possible for `CoreShellActionProvider::prompt()` in
`unix_escalation.rs` to specify the `Vec<ReviewDecision>` directly,
adding support for `ApprovedForSession` when approving a skill script,
which was previously missing in the TUI.

Note this results in a significant change to `exec_options()` in
`approval_overlay.rs`, as the displayed options are now derived from
`available_decisions: &[ReviewDecision]`.

## What Changed

- Add `available_decisions` to
[`ExecApprovalRequestEvent`](https://github.com/openai/codex/blob/de00e932dd9801de0a4faac0519162099753f331/codex-rs/protocol/src/approvals.rs#L111-L175),
including helpers to derive the legacy default choices when older
senders omit the field.
- Map `codex_protocol::protocol::ReviewDecision` to app-server
`CommandExecutionApprovalDecision` and expose the ordered list as
experimental `availableDecisions` in
[`CommandExecutionRequestApprovalParams`](https://github.com/openai/codex/blob/de00e932dd9801de0a4faac0519162099753f331/codex-rs/app-server-protocol/src/protocol/v2.rs#L3798-L3807).
- Thread optional `available_decisions` through the core approval path
so Unix shell escalation can explicitly request `ApprovedForSession` for
session-scoped approvals instead of relying on client heuristics.
[`unix_escalation.rs`](https://github.com/openai/codex/blob/de00e932dd9801de0a4faac0519162099753f331/codex-rs/core/src/tools/runtimes/shell/unix_escalation.rs#L194-L214)
- Update the TUI approval overlay to build its buttons from the ordered
decision list, while preserving the legacy fallback when
`available_decisions` is missing.
- Update the app-server README, test client output, and generated schema
artifacts to document and surface the new field.

## Testing

- Add `approval_overlay.rs` coverage for explicit decision lists,
including the generic `ApprovedForSession` path and network approval
options.
- Update `chatwidget/tests.rs` and app-server protocol tests to populate
the new optional field and keep older event shapes working.

## Developers Docs

- If we document `item/commandExecution/requestApproval` on
[developers.openai.com/codex](https://developers.openai.com/codex), add
experimental `availableDecisions` as the preferred source of approval
choices and note that older servers may omit it.
2026-02-26 01:10:46 +00:00
Michael Bolin dfefefe752 merge commit for archive created by Sapling 2026-02-25 17:08:23 -08:00
Michael Bolin 0fa4b7f6cf feat: include sandbox config with escalation request 2026-02-25 17:08:15 -08:00
Celia Chen 4f45668106 Revert "Add skill approval event/response (#12633)" (#12811)
This reverts commit https://github.com/openai/codex/pull/12633. We no
longer need this PR, because we favor sending normal exec command
approval server request with `additional_permissions` of skill
permissions instead
2026-02-26 01:02:42 +00:00
Michael Bolin ee9938b9f7 merge commit for archive created by Sapling 2026-02-25 17:00:32 -08:00
Michael Bolin 878df1fec4 feat: include sandbox config with escalation request 2026-02-25 17:00:23 -08:00
Michael Bolin 3d30330abb merge commit for archive created by Sapling 2026-02-25 16:49:17 -08:00
Michael Bolin f7afbe695c feat: include sandbox config with escalation request 2026-02-25 16:49:07 -08:00
Michael Bolin 46963e49d8 Merge d6ab70b8bf into sapling-pr-archive-bolinfest 2026-02-25 16:39:36 -08:00
Michael Bolin d6ab70b8bf feat: include available decisions in command approval requests 2026-02-25 16:39:29 -08:00
pakrym-oai 4fedef88e0 Use websocket v2 as model-preferred websocket protocol (#12838) 2026-02-25 16:35:53 -08:00
EFRAZER-oai a1cd78c818 Add macOS and Linux direct install script (#12740)
## Summary
- add a direct install script for macOS and Linux at
`scripts/install/install.sh`
- stage `install.sh` into `dist/` during release so it is published as a
GitHub release asset
- reuse the existing platform npm payload so the installer includes both
`codex` and `rg`

## Testing
- `bash -n scripts/install/install.sh`
- local macOS `curl | sh` smoke test against a locally served copy of
the script
2026-02-26 00:33:50 +00:00
Michael Bolin d6d820006b Merge d584cd18c4 into sapling-pr-archive-bolinfest 2026-02-25 16:14:29 -08:00
Michael Bolin d584cd18c4 feat: include available decisions in command approval requests 2026-02-25 16:14:25 -08:00
Michael Bolin e0c31b06eb merge commit for archive created by Sapling 2026-02-25 16:12:48 -08:00
Michael Bolin 95e3f794e8 feat: include available decisions in command approval requests 2026-02-25 16:12:34 -08:00
Michael Bolin 90b935d3ac Merge 43b6e27c30 into sapling-pr-archive-bolinfest 2026-02-25 16:12:15 -08:00
Michael Bolin 43b6e27c30 feat: include sandbox config with escalation request 2026-02-25 16:11:46 -08:00
Ahmed IbrahimandCodex e76b1a2853 Remove steer feature flag (#12026)
All code should go in the direction that steer is enabled

---------

Co-authored-by: Codex <noreply@openai.com>
2026-02-25 15:41:42 -08:00
Michael Bolin a6a5976c5a feat: scope execve session approvals by approved skill metadata (#12814)
Previous to this change, `determine_action()` would

1. check if `program` is associated with a skill
2. if so, check if `program` is in `execve_session_approvals` to see
whether the user needs to be prompted

This PR flips the order of these checks to try to set us up so that
"session approvals" are always consulted first (which should soon extend
to include session approvals derived from `prefix_rule()`s, as well).

Though to make the new ordering work, we need to record any relevant
metadata to associate with the approval, which in the case of a
skill-based approval is the `SkillMetadata` so that we can derive the
`PermissionProfile` to include with the escalation. (Though as noted by
the `TODO`, this `PermissionProfile` is not honored yet.)

The new `ExecveSessionApproval` struct is used to retain the necessary
metadata.

## What Changed

- Replace the `execve_session_approvals` `HashSet` with a map that
stores an `ExecveSessionApproval` alongside each approved `program`.
- When a user chooses `ApprovedForSession` for a skill script, capture
the matched `SkillMetadata` in the session approval entry.
- Consult that cache before re-running `find_skill()`, and reuse the
originally approved skill metadata and permission profile when allowing
later execve callbacks in the same session.
2026-02-25 15:30:24 -08:00
Michael Bolin ce82db9fb2 merge commit for archive created by Sapling 2026-02-25 15:24:54 -08:00
Michael Bolin de00e932dd feat: include available decisions in command approval requests 2026-02-25 15:24:44 -08:00
Charley Cunningham 2f4d6ded1d Enable request_user_input in Default mode (#12735)
## Summary
- allow `request_user_input` in Default collaboration mode as well as
Plan
- update the Default-mode instructions to prefer assumptions first and
use `request_user_input` only when a question is unavoidable
- update request_user_input and app-server tests to match the new
Default-mode behavior
- refactor collaboration-mode availability plumbing into
`CollaborationModesConfig` for future mode-related flags

## Codex author
`codex resume 019c9124-ed28-7c13-96c6-b916b1c97d49`
2026-02-25 15:20:46 -08:00
Michael Bolin f94b394f15 Merge 30aee22fa7 into sapling-pr-archive-bolinfest 2026-02-25 15:07:48 -08:00
Michael Bolin 30aee22fa7 feat: scope execve session approvals by approved skill metadata 2026-02-25 15:07:43 -08:00
Michael Bolin cbee448ac4 merge commit for archive created by Sapling 2026-02-25 15:01:03 -08:00
Michael Bolin 56de2a411b feat: include available decisions in command approval requests 2026-02-25 15:00:54 -08:00
Ahmed Ibrahim 2bd87d1a75 only use preambles for realtime (#12831)
Reverts openai/codex#12830
2026-02-25 14:54:54 -08:00
Michael Bolin c88bdad675 Merge 0aa942c125 into sapling-pr-archive-bolinfest 2026-02-25 14:52:34 -08:00
Michael Bolin 0aa942c125 feat: include available decisions in command approval requests 2026-02-25 14:52:29 -08:00
Michael Bolin e4d21de6cb merge commit for archive created by Sapling 2026-02-25 14:51:52 -08:00
Michael Bolin b9887e2c0d feat: include available decisions in command approval requests 2026-02-25 14:51:46 -08:00
Michael Bolin c1ca7aad24 merge commit for archive created by Sapling 2026-02-25 14:51:09 -08:00
Michael Bolin a6e83ef28e feat: include available decisions in command approval requests 2026-02-25 14:50:51 -08:00
Celia Chen b6d20748e0 Revert "Ensure shell command skills trigger approval (#12697)" (#12721)
This reverts commit daf0f03ac8.

# 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.
2026-02-25 22:49:53 +00:00
Michael Bolin 2569ac2006 Merge 9f008e0faa into sapling-pr-archive-bolinfest 2026-02-25 14:40:55 -08:00
Michael Bolin 9f008e0faa feat: scope execve session approvals by approved skill metadata 2026-02-25 14:40:32 -08:00
Ahmed Ibrahim f86087eaa8 Revert "only use preambles for realtime" (#12830)
Reverts openai/codex#12806
2026-02-25 14:30:48 -08:00
Michael Bolin ad130d641b merge commit for archive created by Sapling 2026-02-25 14:29:03 -08:00
Michael Bolin 73224678bf feat: scope execve session approvals by approved skill metadata 2026-02-25 14:28:19 -08:00