Commit Graph

8634 Commits

Author SHA1 Message Date
Michael Bolin
8555622efd merge commit for archive created by Sapling 2025-12-06 22:20:12 -08:00
Michael Bolin
46d1524ca5 fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-06 22:11:16 -08:00
Michael Bolin
3c087e8fda fix: ensure macOS CI runners for Rust tests include recent Homebrew fixes (#7680)
As noted in the code comment, we introduced a key fix for `brew` in
https://github.com/Homebrew/brew/pull/21157 that Codex needs, but it has
not hit stable yet, so we update our CI job to use latest `brew` from
`origin/main`.

This is necessary for the new integration tests introduced in
https://github.com/openai/codex/pull/7617.
2025-12-06 22:11:07 -08:00
Michael Bolin
a283bdb619 merge commit for archive created by Sapling 2025-12-06 21:51:53 -08:00
Michael Bolin
6bcb64abc9 fix: ensure macOS CI runners for Rust tests include recent Homebrew fixes 2025-12-06 21:51:41 -08:00
Michael Bolin
7386e2efbc fix: clear out space on ubuntu runners before running Rust tests (#7678)
When I put up https://github.com/openai/codex/pull/7617 for review,
initially I started seeing failures on the `ubuntu-24.04` runner used
for Rust test runs for the `x86_64-unknown-linux-gnu` architecture. Chat
suggested a number of things that could be removed to save space, which
seems to help.
2025-12-06 21:46:07 -08:00
Michael Bolin
d258745b2b merge commit for archive created by Sapling 2025-12-06 21:21:40 -08:00
Michael Bolin
08b2512509 fix: clear out space on ubuntu runners before running Rust tests 2025-12-06 21:21:33 -08:00
Michael Bolin
b60aa4ced5 merge commit for archive created by Sapling 2025-12-06 21:07:48 -08:00
Michael Bolin
8bf96d912b fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-06 21:07:42 -08:00
Michael Bolin
045836def2 Merge 657d5e0df9 into sapling-pr-archive-bolinfest 2025-12-06 20:44:46 -08:00
Michael Bolin
657d5e0df9 fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-06 20:44:35 -08:00
Michael Bolin
2fc7488949 merge commit for archive created by Sapling 2025-12-06 20:13:51 -08:00
Michael Bolin
e0cdb7a6e6 fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-06 20:13:29 -08:00
Michael Bolin
d21921f01c merge commit for archive created by Sapling 2025-12-06 19:46:26 -08:00
Michael Bolin
c40509d488 fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-06 19:46:20 -08:00
Michael Bolin
9dcd79de52 merge commit for archive created by Sapling 2025-12-06 19:36:20 -08:00
Michael Bolin
ba7eb66559 fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-06 19:36:16 -08:00
Michael Bolin
5988dbd471 merge commit for archive created by Sapling 2025-12-06 19:35:19 -08:00
Michael Bolin
07b1dbecc8 fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-06 19:34:10 -08:00
Victor
b2cb05d562 docs: point dev checks to just (#7673)
Update install and contributing guides to use the root justfile helpers
(`just fmt`, `just fix -p <crate>`, and targeted tests) instead of the
older cargo fmt/clippy/test instructions that have been in place since
459363e17b. This matches the justfile relocation to the repo root in
952d6c946 and the current lint/test workflow for CI (see
`.github/workflows/rust-ci.yml`).
2025-12-06 18:57:08 -08:00
Jay Sabva
9a74228c66 docs: Remove experimental_use_rmcp_client from config (#7672)
Removed experimental Rust MCP client option from config.
2025-12-06 16:51:07 -08:00
Michael Bolin
f8bc97e0dd Merge ee7c160256 into sapling-pr-archive-bolinfest 2025-12-06 10:21:05 -08:00
Michael Bolin
ee7c160256 fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-06 10:19:35 -08:00
Jay Sabva
315b1e957d docs: fix documentation of rmcp client flag (#7665)
## Summary
- Updated the rmcp client flag's documentation in config.md file
- changed it from `experimental_use_rmcp_client` to `rmcp_client`
2025-12-06 10:17:18 -08:00
Michael Bolin
82090803d9 fix: exec-server stream was erroring for large requests (#7654)
Previous to this change, large `EscalateRequest` payloads exceeded the
kernel send buffer, causing our single `sendmsg(2)` call (with attached
FDs) to be split and retried without proper control handling; this led
to `EINVAL`/broken pipe in the
`handle_escalate_session_respects_run_in_sandbox_decision()` test when
using an `env` with large contents.

**Before:** `AsyncSocket::send_with_fds()` called `send_json_message()`,
which called `send_message_bytes()`, which made one `socket.sendmsg()`
call followed by additional `socket.send()` calls, as necessary:


2e4a402521/codex-rs/exec-server/src/posix/socket.rs (L198-L209)

**After:** `AsyncSocket::send_with_fds()` now calls
`send_stream_frame()`, which calls `send_stream_chunk()` one or more
times. Each call to `send_stream_chunk()` calls `socket.sendmsg()`.

In the previous implementation, the subsequent `socket.send()` writes
had no control information associated with them, whereas in the new
`send_stream_chunk()` implementation, a fresh `MsgHdr` (using
`with_control()`, as appropriate) is created for `socket.sendmsg()` each
time.

Additionally, with this PR, stream sending attaches `SCM_RIGHTS` only on
the first chunk, and omits control data when there are no FDs, allowing
oversized payloads to deliver correctly while preserving FD limits and
error checks.
2025-12-06 10:16:47 -08:00
Alexander
f521d29726 fix: OTEL HTTP exporter panic and mTLS support (#7651)
This fixes two issues with the OTEL HTTP exporter:

1. **Runtime panic with async reqwest client**

The `opentelemetry_sdk` `BatchLogProcessor` spawns a dedicated OS thread
that uses `futures_executor::block_on()` rather than tokio's runtime.
When the async reqwest client's timeout mechanism calls
`tokio::time::sleep()`, it panics with "there is no reactor running,
must be called from the context of a Tokio 1.x runtime".

The fix is to use `reqwest::blocking::Client` instead, which doesn't
depend on tokio for timeouts. However, the blocking client creates its
own internal tokio runtime during construction, which would panic if
built from within an async context. We wrap the construction in
`tokio::task::block_in_place()` to handle this.

2. **mTLS certificate handling**

The HTTP client wasn't properly configured for mTLS, matching the fixes
previously done for the model provider client:

- Added `.tls_built_in_root_certs(false)` when using a custom CA
certificate to ensure only our CA is trusted
- Added `.https_only(true)` when using client identity
- Added `rustls-tls` feature to ensure rustls is used (required for
`Identity::from_pem()` to work correctly)
2025-12-05 20:46:44 -08:00
xl-openai
93f61dbc5f Also load skills from repo root. (#7645)
Also load skills from /REPO_ROOT/codex/skills.
2025-12-05 18:01:49 -08:00
Dylan Hurd
6c9c563faf fix(apply-patch): preserve CRLF line endings on Windows (#7515)
## Summary
This PR is heavily based on #4017, which contains the core logic for the
fix. To reduce the risk, we are first introducing it only on windows. We
can then expand to wsl / other environments as needed, and then tackle
net new files.

## Testing
- [x] added unit tests in apply-patch
- [x] add integration tests to apply_patch_cli.rs

---------

Co-authored-by: Chase Naples <Cnaples79@gmail.com>
2025-12-05 16:43:27 -08:00
Josh McKinney
952d6c9465 Move justfile to repository root (#7652)
## Summary
- move the workspace justfile to the repository root for easier
discovery
- set the just working directory to codex-rs so existing recipes still
run in the Rust workspace

## Testing
- not run (not requested)


------
[Codex
Task](https://chatgpt.com/codex/tasks/task_i_69334db473108329b0cc253b7fd8218e)
2025-12-05 16:24:55 -08:00
Michael Bolin
da4b3ab55f merge commit for archive created by Sapling 2025-12-05 16:08:21 -08:00
Michael Bolin
30015e6d42 fix: handle EscalateRequest with large value 2025-12-05 16:08:16 -08:00
Michael Bolin
687bbf7049 merge commit for archive created by Sapling 2025-12-05 16:04:50 -08:00
Michael Bolin
0ab435a916 fix: handle EscalateRequest with large value 2025-12-05 16:04:44 -08:00
Michael Bolin
ee68714f9b Merge 35a2cfd967 into sapling-pr-archive-bolinfest 2025-12-05 15:35:29 -08:00
Michael Bolin
35a2cfd967 fix: handle EscalateRequest with large value 2025-12-05 15:35:19 -08:00
Michael Bolin
6f771499b3 Merge e00d977a1f into sapling-pr-archive-bolinfest 2025-12-05 15:06:28 -08:00
Michael Bolin
e00d977a1f fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-05 15:06:23 -08:00
Michael Bolin
c276210021 Merge f4cf6a7898 into sapling-pr-archive-bolinfest 2025-12-05 14:19:03 -08:00
Michael Bolin
f4cf6a7898 fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-05 14:18:59 -08:00
Jeremy Rose
2e4a402521 cloud: status, diff, apply (#7614)
Adds cli commands for getting the status of cloud tasks, and for
getting/applying the diffs from same.
2025-12-05 21:39:23 +00:00
Michael Bolin
8caa77e60e Merge c2885d75ff into sapling-pr-archive-bolinfest 2025-12-05 12:17:03 -08:00
Michael Bolin
c2885d75ff fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-05 12:16:53 -08:00
Pavel Krymets
f48d88067e Fix unified_exec on windows (#7620)
Fix unified_exec on windows

Requires removal of PSUEDOCONSOLE_INHERIT_CURSOR flag so child processed
don't attempt to wait for cursor position response (and timeout).


https://github.com/wezterm/wezterm/compare/main...pakrym:wezterm:PSUEDOCONSOLE_INHERIT_CURSOR?expand=1

---------

Co-authored-by: pakrym-oai <pakrym@openai.com>
2025-12-05 20:09:43 +00:00
Michael Bolin
684cdf4d2d merge commit for archive created by Sapling 2025-12-05 12:06:32 -08:00
Michael Bolin
eca4502f60 fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-05 12:06:21 -08:00
Michael Bolin
a475d2beea merge commit for archive created by Sapling 2025-12-05 11:07:06 -08:00
Michael Bolin
cce0d19075 fix: exec-server should drop oversized env vars when escalating
When trying to introduce an integration test for the `codex-shell-tool-mcp` in
https://github.com/openai/codex/pull/7617, macOS CI hit serde decode errors in
the escalation pipe when huge env vars inflated the `EscalateRequest` payload
past the stream frame, corrupting JSON. (I'm pretty sure `$GITHUB_EVENT` was the
offending env var.)

This PR updates `exec-server` to filter out oversized env entries and skip
reserved vars before serialization.

It also updates the code to avoid attaching empty `SCM_RIGHTS` control messages
so frames stay lean when no FDs are sent.
2025-12-05 11:06:52 -08:00
Michael Bolin
f1f532d4b8 merge commit for archive created by Sapling 2025-12-05 11:03:38 -08:00
Dylan Hurd
a8cbbdbc6e feat(core) Add login to shell_command tool (#6846)
## Summary
Adds the `login` parameter to the `shell_command` tool - optional,
defaults to true.

## Testing
- [x] Tested locally
2025-12-05 11:03:25 -08:00