Commit Graph
5413 Commits
Author SHA1 Message Date
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
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
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:


https://github.com/openai/codex/blob/2e4a40252157751765dff176b35c692df8a9fb4e/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 HurdandChase Naples 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 Krymetsandpakrym-oai 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
Michael Bolin e2f0cbfa70 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:03:14 -08:00
Ahmed Ibrahim d08efb1743 Wire with_remote_overrides to construct model families (#7621)
- This PR wires `with_remote_overrides` and make the
`construct_model_families` an async function
- Moves getting model family a level above to keep the function `sync`
- Updates the tests to local, offline, and `sync` helper for model
families
2025-12-05 10:40:15 -08:00
Michael Bolin 2a844f1d26 Merge b54a7c56be into sapling-pr-archive-bolinfest 2025-12-05 10:36:34 -08:00
Michael Bolin b54a7c56be fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-05 10:36:20 -08:00
jif-oai 5f80ad6da8 fix: chat completion with parallel tool call (#7634) 2025-12-05 10:20:36 -08:00
Michael Bolin 18e19a029f merge commit for archive created by Sapling 2025-12-05 09:08:31 -08:00
Michael Bolin 11082c5e26 fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-05 09:08:25 -08:00
Michael Bolin 09f5d23263 merge commit for archive created by Sapling 2025-12-05 09:05:25 -08:00
Michael Bolin 6429b3fe08 fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-05 09:05:20 -08:00
Michael Bolin 84ba26fe76 merge commit for archive created by Sapling 2025-12-05 09:01:20 -08:00
Michael Bolin 0905212151 fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-05 09:01:12 -08:00
Michael Bolin 06025d4298 Merge f4912215c8 into sapling-pr-archive-bolinfest 2025-12-05 08:42:24 -08:00
Michael Bolin f4912215c8 fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-05 08:42:18 -08:00
jif-oai e91bb6b947 fix: ignore ghost snapshots in token consumption (#7638) 2025-12-05 13:57:24 +00:00
Michael Bolin 93b17d16fc Merge b39f93ce44 into sapling-pr-archive-bolinfest 2025-12-05 00:52:40 -08:00
Michael Bolin b39f93ce44 fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-05 00:52:34 -08:00
Michael Bolin 395f786765 merge commit for archive created by Sapling 2025-12-05 00:49:11 -08:00
Michael Bolin b0caf2a71d fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-05 00:49:04 -08:00
Michael Bolin 3e36a4074c merge commit for archive created by Sapling 2025-12-05 00:26:01 -08:00
Michael Bolin 428bb1759f fix: add test that verifies that codex-exec-mcp-server starts up 2025-12-05 00:25:52 -08:00
Michael Bolin 65fba899f9 merge commit for archive created by Sapling 2025-12-05 00:19:24 -08:00