Commit Graph
9551 Commits
Author SHA1 Message Date
Michael Bolin 42cc0afa11 merge commit for archive created by Sapling 2026-02-23 23:00:27 -08:00
Michael Bolin 47a0c16469 feat: run zsh fork shell tool via shell-escalation 2026-02-23 23:00:19 -08:00
pakrym-oaiandalexsong-oai 68a7d98363 Simplify skill tracking (#12652)
Remove a few layers of structs and store SkillMetadata.

---------

Co-authored-by: alexsong-oai <alexsong@openai.com>
2026-02-23 22:47:39 -08:00
Michael Bolin 89b8b870a9 merge commit for archive created by Sapling 2026-02-23 22:47:11 -08:00
Michael Bolin 3b3a260533 feat: run zsh fork shell tool via shell-escalation 2026-02-23 22:47:04 -08:00
Michael Bolin 5eed633e31 merge commit for archive created by Sapling 2026-02-23 22:41:42 -08:00
Michael Bolin 65c66db428 feat: run zsh fork shell tool via shell-escalation 2026-02-23 22:41:36 -08:00
Michael Bolin e129898c4a merge commit for archive created by Sapling 2026-02-23 22:39:27 -08:00
Michael Bolin 304dcae06c feat: run zsh fork shell tool via shell-escalation 2026-02-23 22:39:17 -08:00
sayan-oai 7e46e5b9c2 chore: rm hardcoded PRESETS list (#12650)
rm `PRESETS` list harcoded in `model_presets` as we now have bundled
`models.json` with equivalent info.

update logic to rely on bundled models instead, update tests.
2026-02-23 22:35:51 -08:00
pakrym-oai 58763afa0f Add skill approval event/response (#12633)
Set the stage for skill-level permission approval in addition to
command-level.

Behind a feature flag.
2026-02-23 22:28:58 -08:00
Eric Traut a4076ab4b1 Avoid AbsolutePathBuf::parent() panic under EMFILE by skipping re-absolutization (#12647)
Fixes #12216

Fixes a panic in `AbsolutePathBuf::parent()` when the process hits file
descriptor exhaustion (`EMFILE` / "Too many open files").

### Root cause

`AbsolutePathBuf::parent()` was re-validating the parent path via
`from_absolute_path(...).expect(...)`.

`from_absolute_path()` calls `path_absolutize::absolutize()`, which can
depend on `std::env::current_dir()`. Under `EMFILE`, that can fail,
causing `parent()` to panic even though the parent of an absolute path
is already known.

### Change

- Stop re-absolutizing the result of `self.0.parent()`
- Construct `AbsolutePathBuf` directly from the known parent path
- Keep an invariant check with `debug_assert!(p.is_absolute())`

### Why this is safe

`self` is already an `AbsolutePathBuf`, so `self.0` is
absolute/normalized. The parent of an absolute path is expected to be
absolute, so re-running fallible normalization here is unnecessary and
can introduce unrelated panics.
2026-02-23 21:59:33 -08:00
Michael Bolin 6418bcf909 merge commit for archive created by Sapling 2026-02-23 21:59:24 -08:00
Michael Bolin 349b4fd902 feat: run zsh fork shell tool via shell-escalation 2026-02-23 21:59:13 -08:00
alexsong-oai 09a82f364f Support implicit skill invocation analytics events (#12049)
- use `skills_for_cwd` lookup to scope allowed skills and build
invocation context for downstream processing
- add detection in `stream_events_utils` to classify tool calls as
implicit skill invocations per the proposal (script runners, extensions,
`scripts` dirs, and SKILL.md reads)
- deduplicate invocations per turn and emit analytics/OTEL events on the
same background queue as explicit invokes
2026-02-23 21:55:49 -08:00
Dylan Hurd fbeda61cc3 fix(exec) Patch resume test race condition (#12648)
## Summary
The test exec_resume_last_respects_cwd_filter_and_all_flag makes one
session “newest” by resuming it, but rollout updated_at is stored/sorted
at second precision. On fast CI (especially Windows), the touch could
land in the same second as initial session creation, making ordering
nondeterministic.

This change adds a short sleep before the recency-touch step so the
resumed session is guaranteed to have a later updated_at, preserving the
intended assertion without changing product behavior.
2026-02-23 21:54:25 -08:00
Michael Bolin 87ac014c3b merge commit for archive created by Sapling 2026-02-23 21:48:09 -08:00
Michael Bolin 4359a3563b feat: run zsh fork shell tool via shell-escalation 2026-02-23 21:47:59 -08:00
Michael Bolin 4d877f054b merge commit for archive created by Sapling 2026-02-23 21:43:02 -08:00
Michael Bolin 2b48f12d4c feat: run zsh fork shell tool via shell-escalation 2026-02-23 21:42:50 -08:00
viyatb-oai c3048ff90a feat(core): persist network approvals in execpolicy (#12357)
## Summary
Persist network approval allow/deny decisions as `network_rule(...)`
entries in execpolicy (not proxy config)

It adds `network_rule` parsing + append support in `codex-execpolicy`,
including `decision="prompt"` (parse-only; not compiled into proxy
allow/deny lists)
- compile execpolicy network rules into proxy allow/deny lists and
update the live proxy state on approval
- preserve requirements execpolicy `network_rule(...)` entries when
merging with file-based execpolicy
- reject broad wildcard hosts (for example `*`) for persisted
`network_rule(...)`
2026-02-23 21:37:46 -08:00
Michael Bolin 2a1f6b0534 Merge 9d4ed13fe8 into sapling-pr-archive-bolinfest 2026-02-23 21:34:18 -08:00
Michael Bolin 9d4ed13fe8 feat: run zsh fork shell tool via shell-escalation 2026-02-23 21:27:02 -08:00
Michael Bolin af215eb390 refactor: decouple shell-escalation from codex-core (#12638)
## Why

After removing `exec-server`, the next step is to wire a new shell tool
to `codex-rs/shell-escalation` directly.

That is blocked while `codex-shell-escalation` depends on `codex-core`,
because the new integration would require `codex-core` to depend on
`codex-shell-escalation` and create a dependency cycle.

This change ports the reusable pieces from the earlier prep work, but
drops the old compatibility shim because `exec-server`/MCP support is
already gone.

## What Changed

### Decouple `shell-escalation` from `codex-core`

- Introduce a crate-local `SandboxState` in `shell-escalation`
- Introduce a `ShellCommandExecutor` trait so callers provide process
execution/sandbox integration
- Update `EscalateServer::exec(...)` and `run_escalate_server(...)` to
use the injected executor
- Remove the direct `codex_core::exec::process_exec_tool_call(...)` call
from `shell-escalation`
- Remove the `codex-core` dependency from `codex-shell-escalation`

### Restore reusable policy adapter exports

- Re-enable `unix::core_shell_escalation`
- Export `ShellActionProvider` and `ShellPolicyFactory` from
`shell-escalation`
- Keep the crate root API simple (no `legacy_api` compatibility layer)

### Port socket fixes from the earlier prep commit

- Use `socket2::Socket::pair_raw(...)` for AF_UNIX socketpairs and
restore `CLOEXEC` explicitly on both endpoints
- Keep `CLOEXEC` cleared only on the single datagram client FD that is
intentionally passed across `exec`
- Clean up `tokio::AsyncFd::try_io(...)` error handling in the socket
helpers

## Verification

- `cargo shear`
- `cargo clippy -p codex-shell-escalation --tests`
- `cargo test -p codex-shell-escalation`
2026-02-23 20:58:24 -08:00
Michael Bolin d7a76a3b86 merge commit for archive created by Sapling 2026-02-23 20:27:36 -08:00
Michael Bolin db4b9073e8 codex: address PR review feedback (#12638) 2026-02-23 20:27:20 -08:00
Michael Bolin 389270381b merge commit for archive created by Sapling 2026-02-23 20:14:37 -08:00
Michael Bolin a7bfc7e58c refactor: decouple shell-escalation from codex-core 2026-02-23 20:14:15 -08:00
Michael Bolin 38f84b6b29 refactor: delete exec-server and move execve wrapper into shell-escalation (#12632)
## Why

We already plan to remove the shell-tool MCP path, and doing that
cleanup first makes the follow-on `shell-escalation` work much simpler.

This change removes the last remaining reason to keep
`codex-rs/exec-server` around by moving the `codex-execve-wrapper`
binary and shared shell test fixtures to the crates/tests that now own
that functionality.

## What Changed

### Delete `codex-rs/exec-server`

- Remove the `exec-server` crate, including the MCP server binary,
MCP-specific modules, and its test support/test suite
- Remove `exec-server` from the `codex-rs` workspace and update
`Cargo.lock`

### Move `codex-execve-wrapper` into `codex-rs/shell-escalation`

- Move the wrapper implementation into `shell-escalation`
(`src/unix/execve_wrapper.rs`)
- Add the `codex-execve-wrapper` binary entrypoint under
`shell-escalation/src/bin/`
- Update `shell-escalation` exports/module layout so the wrapper
entrypoint is hosted there
- Move the wrapper README content from `exec-server` to
`shell-escalation/README.md`

### Move shared shell test fixtures to `app-server`

- Move the DotSlash `bash`/`zsh` test fixtures from
`exec-server/tests/suite/` to `app-server/tests/suite/`
- Update `app-server` zsh-fork tests to reference the new fixture paths

### Keep `shell-tool-mcp` as a shell-assets package

- Update `.github/workflows/shell-tool-mcp.yml` packaging so the npm
artifact contains only patched Bash/Zsh payloads (no Rust binaries)
- Update `shell-tool-mcp/package.json`, `shell-tool-mcp/src/index.ts`,
and docs to reflect the shell-assets-only package shape
- `shell-tool-mcp-ci.yml` does not need changes because it is already
JS-only

## Verification

- `cargo shear`
- `cargo clippy -p codex-shell-escalation --tests`
- `just clippy`
2026-02-23 20:10:22 -08:00
Michael Bolin e075405903 merge commit for archive created by Sapling 2026-02-23 19:46:13 -08:00
Michael Bolin 4452a8dcc6 refactor: remove exec-server MCP shell tool support 2026-02-23 19:46:04 -08:00
Michael Bolin dd05ef913f Merge fcf0efa701 into sapling-pr-archive-bolinfest 2026-02-23 19:38:10 -08:00
Michael Bolin fcf0efa701 refactor: remove exec-server MCP shell tool support 2026-02-23 19:37:37 -08:00
Michael Bolin a00e85c008 merge commit for archive created by Sapling 2026-02-23 19:31:56 -08:00
Michael Bolin b1f51a204b refactor: remove exec-server MCP shell tool support 2026-02-23 19:31:47 -08:00
Michael Bolin a1cc382117 merge commit for archive created by Sapling 2026-02-23 19:20:27 -08:00
Michael Bolin 54cb0c67c4 refactor: remove exec-server MCP shell tool support 2026-02-23 19:20:08 -08:00
Michael Bolin e6569f81f8 Merge 9c3cbc35b4 into sapling-pr-archive-bolinfest 2026-02-23 19:13:29 -08:00
Michael Bolin 9c3cbc35b4 refactor: remove exec-server MCP shell tool support 2026-02-23 19:13:19 -08:00
Javi 5a3bdcb27b app-server: fix connecting via websockets with Sec-WebSocket-Extensions: permessage-deflate (#12629)
# 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-24 02:41:03 +00:00
Michael Bolin dd1589e8b5 Merge b8ff8d0b27 into sapling-pr-archive-bolinfest 2026-02-23 18:37:39 -08:00
d580995957 Update models.json (#11408)
Automated update of models.json.

---------

Co-authored-by: sayan-oai <244841968+sayan-oai@users.noreply.github.com>
Co-authored-by: sayan-oai <sayan@openai.com>
2026-02-23 18:37:31 -08:00
Michael Bolin b8ff8d0b27 refactor: remove exec-server MCP shell tool support 2026-02-23 18:37:24 -08:00
Michael Bolin bccdf77885 merge commit for archive created by Sapling 2026-02-23 18:31:49 -08:00
Michael Bolin a14abcb915 refactor: remove exec-server MCP shell tool support 2026-02-23 18:31:33 -08:00
Michael Bolin 7cc91939a6 Merge beaffad47e into sapling-pr-archive-bolinfest 2026-02-23 17:34:32 -08:00
Michael Bolin beaffad47e refactor: adapt exec-server to shell-escalation executor API 2026-02-23 17:34:21 -08:00
Michael Bolin b9fe46fb04 refactor: prepare shell-escalation for reusable executors 2026-02-23 17:34:21 -08:00
Michael Bolin b08c226878 merge commit for archive created by Sapling 2026-02-23 17:06:43 -08:00
Michael Bolin df088e0219 refactor: adapt exec-server to shell-escalation executor API 2026-02-23 17:06:31 -08:00