Commit Graph
10334 Commits
Author SHA1 Message Date
Michael Bolin dfd7419b7d Merge 717f401772 into sapling-pr-archive-bolinfest 2026-03-27 12:48:56 -07:00
Michael Bolin 717f401772 fix: disable plugins in SDK integration tests 2026-03-27 12:48:43 -07:00
Michael Bolin 7e50531cf5 merge commit for archive created by Sapling 2026-03-27 12:43:42 -07:00
Michael Bolin 737ab29b1e codex-tools: extract responses API tool models 2026-03-27 12:43:30 -07:00
Michael Bolin 4f6b0fcec4 Merge e9de2c12db into sapling-pr-archive-bolinfest 2026-03-27 12:28:45 -07:00
Michael Bolin e9de2c12db codex-tools: extract responses API tool models 2026-03-27 12:27:50 -07:00
Michael Bolin d48bd2df2f merge commit for archive created by Sapling 2026-03-27 12:13:41 -07:00
Michael Bolin 97878b2fc4 ci: enable the Windows Bazel workflow path 2026-03-27 12:12:55 -07:00
Michael Bolin 15fbf9d4f5 fix: fix Windows CI regression introduced in #15999 (#16027)
#15999 introduced a Windows-only `\r\n` mismatch in review-exit template
handling. This PR normalizes those template newlines and separates that
fix from [#16014](https://github.com/openai/codex/pull/16014) so it can
be reviewed independently.
2026-03-27 12:06:07 -07:00
Michael Bolin caee620a53 codex-tools: introduce named tool definitions (#15953)
## Why

This continues the `codex-tools` migration by moving one more piece of
generic tool-definition bookkeeping out of `codex-core`.

The earlier extraction steps moved shared schema parsing into
`codex-tools`, but `core/src/tools/spec.rs` still had to supply tool
names separately and perform ad hoc rewrites for deferred MCP aliases.
That meant the crate boundary was still awkward: the parsed shape coming
back from `codex-tools` was missing part of the definition that
`codex-core` ultimately needs to assemble a `ResponsesApiTool`.

This change introduces a named `ToolDefinition` in `codex-tools` so both
MCP tools and dynamic tools cross the crate boundary in the same
reusable model. `codex-core` still owns the final `ResponsesApiTool`
assembly, but less of the generic tool-definition shaping logic stays
behind in `core`.

## What changed

- replaced `ParsedToolDefinition` with a named `ToolDefinition` in
`codex-rs/tools/src/tool_definition.rs`
- added `codex-rs/tools/src/tool_definition_tests.rs` for `renamed()`
and `into_deferred()`
- updated `parse_dynamic_tool()` and `parse_mcp_tool()` to return
`ToolDefinition`
- simplified `codex-rs/core/src/tools/spec.rs` so it adapts
`ToolDefinition` into `ResponsesApiTool` instead of rewriting names and
deferred fields inline
- updated parser tests and `codex-rs/tools/README.md` to reflect the
named tool-definition model

## Test plan

- `cargo test -p codex-tools`
- `cargo test -p codex-core --lib tools::spec::`
2026-03-27 12:02:55 -07:00
Michael Bolin 2616c7cf12 ci: add Bazel clippy workflow for codex-rs (#15955)
## Why
`bazel.yml` already builds and tests the Bazel graph, but `rust-ci.yml`
still runs `cargo clippy` separately. This PR starts the transition to a
Bazel-backed lint lane for `codex-rs` so we can eventually replace the
duplicate Rust build, test, and lint work with Bazel while explicitly
keeping the V8 Bazel path out of scope for now.

To make that lane practical, the workflow also needs to look like the
Bazel job we already trust. That means sharing the common Bazel setup
and invocation logic instead of hand-copying it, and covering the arm64
macOS path in addition to Linux.

Landing the workflow green also required fixing the first lint findings
that Bazel surfaced and adding the matching local entrypoint.

## What changed
- add a reusable `build:clippy` config to `.bazelrc` and export
`codex-rs/clippy.toml` from `codex-rs/BUILD.bazel` so Bazel can run the
repository's existing Clippy policy
- add `just bazel-clippy` so the local developer entrypoint matches the
new CI lane
- extend `.github/workflows/bazel.yml` with a dedicated Bazel clippy job
for `codex-rs`, scoped to `//codex-rs/... -//codex-rs/v8-poc:all`
- run that clippy job on Linux x64 and arm64 macOS
- factor the shared Bazel workflow setup into
`.github/actions/setup-bazel-ci/action.yml` and the shared Bazel
invocation logic into `.github/scripts/run-bazel-ci.sh` so the clippy
and build/test jobs stay aligned
- fix the first Bazel-clippy findings needed to keep the lane green,
including the cross-target `cmsghdr::cmsg_len` normalization in
`codex-rs/shell-escalation/src/unix/socket.rs` and the no-`voice-input`
dead-code warnings in `codex-rs/tui` and `codex-rs/tui_app_server`

## Verification
- `just bazel-clippy`
- `RUNNER_OS=macOS ./.github/scripts/run-bazel-ci.sh -- build
--config=clippy --build_metadata=COMMIT_SHA=local-check
--build_metadata=TAG_job=clippy -- //codex-rs/...
-//codex-rs/v8-poc:all`
- `bazel build --config=clippy
//codex-rs/shell-escalation:shell-escalation`
- `CARGO_TARGET_DIR=/tmp/codex4-shell-escalation-test cargo test -p
codex-shell-escalation`
- `ruby -e 'require "yaml";
YAML.load_file(".github/workflows/bazel.yml");
YAML.load_file(".github/actions/setup-bazel-ci/action.yml")'`

## Notes
- `CARGO_TARGET_DIR=/tmp/codex4-tui-app-server-test cargo test -p
codex-tui-app-server` still hits existing guardian-approvals test and
snapshot failures unrelated to this PR's Bazel-clippy changes.

Related: #15954
2026-03-27 12:02:41 -07:00
Michael Bolin 44af4527fc Merge 1094b771d6 into sapling-pr-archive-bolinfest 2026-03-27 11:59:08 -07:00
Michael Bolin 1094b771d6 fix: fix Windows CI regression introduced in #15999 2026-03-27 11:58:57 -07:00
Michael Bolin e4269cae21 merge commit for archive created by Sapling 2026-03-27 10:38:37 -07:00
Michael Bolin e5463fc549 ci: add Bazel clippy workflow for codex-rs 2026-03-27 10:38:31 -07:00
Michael Bolin f27cc63ff6 Merge fb4e76be98 into sapling-pr-archive-bolinfest 2026-03-27 09:23:49 -07:00
Michael Bolin fb4e76be98 ci: add Bazel clippy workflow for codex-rs 2026-03-27 09:23:45 -07:00
Michael Bolin 16f3697138 Merge 620f7a4f12 into sapling-pr-archive-bolinfest 2026-03-27 09:16:58 -07:00
Michael Bolin 620f7a4f12 ci: add Bazel clippy workflow for codex-rs 2026-03-27 09:16:49 -07:00
Michael Bolin 4c127facd9 Merge cf1368b80d into sapling-pr-archive-bolinfest 2026-03-27 09:13:06 -07:00
Michael Bolin cf1368b80d codex-tools: introduce named tool definitions 2026-03-27 09:12:42 -07:00
Michael Bolin 617475e54b codex-tools: extract dynamic tool adapters (#15944)
## Why

`codex-tools` already owned the shared JSON schema parser and the MCP
tool schema adapter, but `core/src/tools/spec.rs` still parsed dynamic
tools directly.

That left the tool-schema boundary split in two different ways:

- MCP tools flowed through `codex-tools`, while dynamic tools were still
parsed in `codex-core`
- the extracted dynamic-tool path initially introduced a
dynamic-specific parsed shape even though `codex-tools` already had very
similar MCP adapter output

This change finishes that extraction boundary in one step. `codex-core`
still owns `ResponsesApiTool` assembly, but both MCP tools and dynamic
tools now enter that layer through `codex-tools` using the same parsed
tool-definition shape.

## What changed

- added `tools/src/dynamic_tool.rs` and sibling
`tools/src/dynamic_tool_tests.rs`
- introduced `parse_dynamic_tool()` in `codex-tools` and switched
`core/src/tools/spec.rs` to use it for dynamic tools
- added `tools/src/parsed_tool_definition.rs` so both MCP and dynamic
adapters return the same `ParsedToolDefinition`
- updated `core/src/tools/spec.rs` to build `ResponsesApiTool` through a
shared local adapter helper instead of separate MCP and dynamic assembly
paths
- expanded `core/src/tools/spec_tests.rs` so the dynamic-tool adapter
test asserts the full converted `ResponsesApiTool`, including
`defer_loading`
- updated `codex-rs/tools/README.md` to reflect the shared parsed
tool-definition boundary

## Test plan

- `cargo test -p codex-tools`
- `cargo test -p codex-core --lib tools::spec::`

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/15944).
* #15953
* __->__ #15944
2026-03-27 09:12:36 -07:00
viyatb-oai ec089fd22a fix(sandbox): fix bwrap lookup for multi-entry PATH (#15973)
## Summary
- split the joined `PATH` before running system `bwrap` lookup
- keep the existing workspace-local `bwrap` skip behavior intact
- add regression tests that exercise real multi-entry search paths

## Why
The PATH-based lookup added in #15791 still wrapped the raw `PATH`
environment value as a single `PathBuf` before passing it through
`join_paths()`. On Unix, a normal multi-entry `PATH` contains `:`, so
that wrapper path is invalid as one path element and the lookup returns
`None`.

That made Codex behave as if no system `bwrap` was installed even when
`bwrap` was available on `PATH`, which is what users in #15340 were
still hitting on `0.117.0-alpha.25`.

## Impact
System `bwrap` discovery now works with normal multi-entry `PATH` values
instead of silently falling back to the vendored binary.

Fixes #15340.

## Validation
- `just fmt`
- `cargo test -p codex-sandboxing`
- `cargo test -p codex-linux-sandbox`
- `just fix -p codex-sandboxing`
- `just argument-comment-lint`
2026-03-27 08:41:06 -07:00
jif-oaiandCodex 426f28ca99 feat: spawn v2 as inter agent communication (#15985)
Co-authored-by: Codex <noreply@openai.com>
2026-03-27 15:45:19 +01:00
jif-oai 2b71717ccf Use codex-utils-template for review exit XML (#15999) 2026-03-27 15:30:28 +01:00
jif-oai f044ca64df Use codex-utils-template for search tool descriptions (#15996) 2026-03-27 15:08:24 +01:00
jif-oai 37b057f003 Use codex-utils-template for collaboration mode presets (#15995) 2026-03-27 14:51:07 +01:00
jif-oai 2c85ca6842 Use codex-utils-template for sandbox mode prompts (#15998) 2026-03-27 14:50:36 +01:00
jif-oai 7d5d9f041b Use codex-utils-template for review prompts (#16001) 2026-03-27 14:50:01 +01:00
jif-oai 270b7655cd Use codex-utils-template for login error page (#16000) 2026-03-27 14:49:45 +01:00
jif-oai 6a0c4709ca feat: spawn v2 make task name as mandatory (#15986) 2026-03-27 11:30:22 +01:00
Michael Bolin 568e932365 merge commit for archive created by Sapling 2026-03-27 02:31:42 -07:00
Michael Bolin 3253af8f45 ci: refactor Bazel workflow setup 2026-03-27 02:31:33 -07:00
Michael Bolin 7aaa0ace95 ci: add Bazel clippy workflow for codex-rs 2026-03-27 02:31:33 -07:00
Michael Bolin 2ef91b7140 chore: move pty and windows sandbox to Rust 2024 (#15954)
## Why

`codex-utils-pty` and `codex-windows-sandbox` were the remaining crates
in `codex-rs` that still overrode the workspace's Rust 2024 edition.
Moving them forward in a separate PR keeps the baseline edition update
isolated from the follow-on Bazel clippy workflow in #15955, while
making linting and formatting behavior consistent with the rest of the
workspace.

This PR also needs Cargo and Bazel to agree on the edition for
`codex-windows-sandbox`. Without the Bazel-side sync, the experimental
Bazel app-server builds fail once they compile `windows-sandbox-rs`.

## What changed

- switch `codex-rs/utils/pty` and `codex-rs/windows-sandbox-rs` to
`edition = "2024"`
- update `codex-utils-pty` callsites and tests to use the collapsed `if
let` form that Clippy expects under the new edition
- fix the Rust 2024 fallout in `windows-sandbox-rs`, including the
reserved `gen` identifier, `unsafe extern` requirements, and new Clippy
findings that surfaced under the edition bump
- keep the edition bump separate from a larger unsafe cleanup by
temporarily allowing `unsafe_op_in_unsafe_fn` in the Windows entrypoint
modules that now report it under Rust 2024
- update `codex-rs/windows-sandbox-rs/BUILD.bazel` to `crate_edition =
"2024"` so Bazel compiles the crate with the same edition as Cargo





---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/15954).
* #15976
* #15955
* __->__ #15954
2026-03-27 02:31:08 -07:00
Michael Bolin 3bb9b110e7 merge commit for archive created by Sapling 2026-03-27 02:13:14 -07:00
Michael Bolin df257bafda ci: enable the Windows Bazel workflow path 2026-03-27 02:13:08 -07:00
Michael Bolin 3cbe7e2e0b merge commit for archive created by Sapling 2026-03-27 02:05:01 -07:00
Michael Bolin c516e41b40 ci: enable the Windows Bazel workflow path 2026-03-27 02:04:45 -07:00
jif-oai 2e849703cd chore: drop useless stuff (#15876) 2026-03-27 09:41:47 +01:00
Michael Bolin be0e168682 merge commit for archive created by Sapling 2026-03-27 01:39:08 -07:00
Michael Bolin 092c2d3809 ci: enable the Windows Bazel workflow path 2026-03-27 01:38:58 -07:00
Michael Bolin bf1aadfca4 merge commit for archive created by Sapling 2026-03-27 01:34:45 -07:00
Michael Bolin ff33e9b67f ci: enable the Windows Bazel workflow path 2026-03-27 01:34:33 -07:00
Michael Bolin 8af74ad958 merge commit for archive created by Sapling 2026-03-27 01:25:44 -07:00
Michael Bolin e69fcac8c0 ci: enable the Windows Bazel workflow path 2026-03-27 01:25:38 -07:00
Michael Bolin 22776c69c5 merge commit for archive created by Sapling 2026-03-27 01:23:00 -07:00
Michael Bolin 5cde018c58 ci: enable the Windows Bazel workflow path 2026-03-27 01:22:54 -07:00
Michael Bolin 80057b5ec6 merge commit for archive created by Sapling 2026-03-27 01:17:42 -07:00
Michael Bolin c15f6c6bc3 ci: enable the Windows Bazel workflow path 2026-03-27 01:17:31 -07:00