Commit Graph
11463 Commits
Author SHA1 Message Date
Michael Bolin c0c3de9e84 Merge 2e08a09c20 into sapling-pr-archive-bolinfest 2026-04-15 09:31:40 -07:00
Michael Bolin 2e08a09c20 fix: remove support for codex/sandbox-state capability 2026-04-15 09:31:29 -07:00
jif-oai da86cedbd4 feat: reset memories button (#17937)
<img width="720" height="175" alt="Screenshot 2026-04-15 at 14 35 02"
src="https://github.com/user-attachments/assets/041d73ff-8c16-42a9-8e92-c245805084f0"
/>
2026-04-15 15:34:25 +01:00
jif-oai ec13aaac89 feat: sanitize rollouts before phase 1 (#17938) 2026-04-15 15:00:27 +01:00
jif-oai ea13527961 nit: doc (#17941) 2026-04-15 14:51:20 +01:00
sayan-oai 0df7e9a820 register all mcp tools with namespace (#17404)
stacked on #17402.

MCP tools returned by `tool_search` (deferred tools) get registered in
our `ToolRegistry` with a different format than directly available
tools. this leads to two different ways of accessing MCP tools from our
tool catalog, only one of which works for each. fix this by registering
all MCP tools with the namespace format, since this info is already
available.

also, direct MCP tools are registered to responsesapi without a
namespace, while deferred MCP tools have a namespace. this means we can
receive MCP `FunctionCall`s in both formats from namespaces. fix this by
always registering MCP tools with namespace, regardless of deferral
status.

make code mode track `ToolName` provenance of tools so it can map the
literal JS function name string to the correct `ToolName` for
invocation, rather than supporting both in core.

this lets us unify to a single canonical `ToolName` representation for
each MCP tool and force everywhere to use that one, without supporting
fallbacks.
2026-04-15 21:02:59 +08:00
jif-oai 9402347f34 feat: memories menu (#17632)
Add menu that:
1. If memories feature is not enabled, propose to enable it
2. Let you choose if you want to generate memories and to use memories
2026-04-15 14:02:35 +01:00
jif-oai 544b4e39e3 nit: stable test (#17924) 2026-04-15 12:05:50 +01:00
jif-oai 5e544be3c9 chore: do not disable memories for past rollouts on reset (#17919) 2026-04-15 12:05:39 +01:00
sayan-oai b99a62c526 [codex] Fix current main CI blockers (#17917)
## Summary
- Fix marketplace-add local path detection on Windows by using
`Path::is_absolute()`.
- Make marketplace-add local-source tests parse/write TOML through the
same helpers instead of raw string matching.
- Update `rand` 0.9.x to 0.9.3 and document the remaining audited `rand`
0.8.5 advisory exception.
- Refresh `MODULE.bazel.lock` after the Cargo.lock update.

## Why
Latest `main` had two independent CI blockers: marketplace-add tests
were not portable to Windows path/TOML escaping, and cargo-deny still
reported `RUSTSEC-2026-0097` after the recent rustls-webpki fix.

## Validation
- `cargo test -p codex-core marketplace_add -- --nocapture`
- `cargo deny --all-features check`
- `just bazel-lock-check`
- `just fix -p codex-core`
- `just fmt`
- `git diff --check`
2026-04-15 11:47:26 +01:00
jif-oai af9230d74d chore: exp flag (#17921) 2026-04-15 11:47:01 +01:00
jif-oai b6244f776d feat: cleaning of memories extension (#17844) 2026-04-15 10:38:11 +01:00
jif-oai 7579d5ad75 feat: add endpoint to delete memories (#17913) 2026-04-15 10:35:06 +01:00
jif-oai 13248008f9 fix: cargo deny (#17915) 2026-04-15 10:14:54 +01:00
aaronl-openai 2e1003728c Support Unix socket allowlists in macOS sandbox (#17654)
## Changes

Allows sandboxes to restrict overall network access while granting
access to specific unix sockets on mac.

## Details

- `codex sandbox macos`: adds a repeatable `--allow-unix-socket` option.
- `codex-sandboxing`: threads explicit Unix socket roots into the macOS
Seatbelt profile generation.
- Preserves restricted network behavior when only Unix socket IPC is
requested, and preserves full network behavior when full network is
already enabled.

## Verification

- `cargo test -p codex-cli -p codex-sandboxing`
- `cargo build -p codex-cli --bin codex`
- verified that `codex sandbox macos --allow-unix-socket /tmp/test.sock
-- test-client` grants access as expected
2026-04-15 00:53:24 -07:00
aaronl-openai 42528a905d Send sandbox state through MCP tool metadata (#17763)
## Changes

Allows MCPs to opt in to receiving sandbox config info through `_meta`
on model-initiated tool calls. This lets MCPs adhere to the thread's
sandbox if they choose to.

## Details

- Adds the `codex/sandbox-state-meta` experimental MCP capability.
- Tracks whether each MCP server advertises that capability.
- When a server opts in, `codex-core` injects the current `SandboxState`
into model-initiated MCP tool-call request `_meta`.

## Verification

- added an integration test for the capability
2026-04-15 00:49:15 -07:00
viyatb-oaiandCodex e4a3612f11 fix: add websocket capability token hash support (#17871)
## Summary
- Allow app-server websocket capability auth to accept a precomputed
SHA-256 digest via `--ws-token-sha256`.
- Keep token-file support and enforce exactly one capability token
source.
- Document the new auth flag.

## Testing
- `just fmt`
- `cargo test -p codex-app-server transport::auth::tests`
- `cargo test -p codex-app-server
websocket_capability_token_sha256_args_parse`
- `cargo test -p codex-cli app_server_capability_token_flags_parse`
- `cargo clippy -p codex-app-server --all-targets -- -D warnings`
- `just fix -p codex-cli`

---------

Co-authored-by: Codex <noreply@openai.com>
2026-04-14 22:06:39 -07:00
Michael Bolin c6defb1f0f fix: cleanup the contract of the general-purpose exec() function (#17870)
`exec()` had a number of arguments that were unused, making the function
signature misleading. This PR aims to clean things up to clarify the
role of this function and to clarify which fields of `ExecParams` are
unused and why.
2026-04-15 04:40:12 +00:00
Michael Bolin 3d32f2b2c4 Merge 343aa843d0 into sapling-pr-archive-bolinfest 2026-04-14 21:04:05 -07:00
Michael Bolin 343aa843d0 fix: cleanup the contract of the general-purpose exec() function 2026-04-14 21:04:01 -07:00
Michael Bolin 1620b8ae8a merge commit for archive created by Sapling 2026-04-14 21:03:54 -07:00
Michael Bolin 58604a1ba7 fix: cleanup the contract of the general-purpose exec() function 2026-04-14 21:03:48 -07:00
Michael Bolin 0905d53a12 merge commit for archive created by Sapling 2026-04-14 21:03:26 -07:00
Michael Bolin f184103b8f fix: cleanup the contract of the general-purpose exec() function 2026-04-14 21:03:13 -07:00
Michael Bolin 88ee450138 merge commit for archive created by Sapling 2026-04-14 21:00:16 -07:00
Michael Bolin 63b1143219 fix: cleanup the contract of the general-purpose exec() function 2026-04-14 21:00:08 -07:00
Michael Bolin 254cb6f19e merge commit for archive created by Sapling 2026-04-14 20:58:11 -07:00
Michael Bolin a1e75d28a1 fix: cleanup the contract of the general-purpose exec() function 2026-04-14 20:57:31 -07:00
Michael Bolin d34bc66466 sandbox: remove dead seatbelt helper and update tests (#17859)
## Why

`spawn_command_under_seatbelt()` in `codex-rs/core/src/seatbelt.rs` had
fallen out of production use and was only referenced by test-only
wrappers. That left us with sandbox tests that could stay green even if
the actual seatbelt exec path regressed, because production shell
execution now flows through `SandboxManager::transform()` and
`ExecRequest::from_sandbox_exec_request()` instead of that helper.

Removing the dead helper also exposed one downstream `codex-exec`
integration test that still imported it, which broke `just clippy`.

## What Changed

- Removed `codex-rs/core/src/seatbelt.rs` and stopped exporting
`codex_core::seatbelt`.
- Removed the redundant `codex-rs/core/tests/suite/seatbelt.rs` coverage
that only exercised the dead helper.
- Kept the `openpty` regression check, but moved it into
`codex-rs/core/tests/suite/exec.rs` so it now runs through
`process_exec_tool_call()`.
- Fixed the seatbelt denial test in `codex-rs/core/tests/suite/exec.rs`
to use `/usr/bin/touch`, so it actually exercises the sandbox instead of
a nonexistent path.
- Updated `codex-rs/exec/tests/suite/sandbox.rs` on macOS to build the
sandboxed command through `build_exec_request()` and spawn the
transformed command, instead of importing the removed helper.
- Left the lower-level seatbelt policy coverage in
`codex-rs/sandboxing/src/seatbelt_tests.rs`, where the policy generator
is still covered directly.

## Verification

- `cargo test -p codex-core suite::exec::`
- `cargo test -p codex-exec`
- `cargo clippy -p codex-exec --tests -- -D warnings`
2026-04-14 20:48:01 -07:00
starr-openai e063596c67 Reuse remote exec-server in core tests (#17837)
## Summary
- reuse a shared remote exec-server for remote-aware codex-core
integration tests within a test binary process
- keep per-test remote cwd creation and cleanup so tests retain
workspace isolation
- leave codex_self_exe, codex_linux_sandbox_exe, cwd_path(), and
workspace_path() behavior unchanged

## Validation
- rustfmt codex-rs/core/tests/common/test_codex.rs
- git diff --check
- CI is running on the updated branch
2026-04-14 20:42:03 -07:00
canvrno-oai 679f63ba06 Fix clippy warnings in external agent config migration (#17884)
Fix clippy warnings in external agent config migration

```
error: this expression creates a reference which is immediately dereferenced by the compiler
   --> core/src/external_agent_config.rs:188:55
    |
188 |             let migrated = build_config_from_external(&settings)?;
    |                                                       ^^^^^^^^^ help: change this to: `settings`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#needless_borrow
    = note: requested on the command line with `-D clippy::needless-borrow`

error: useless conversion to the same type: `codex_utils_absolute_path::AbsolutePathBuf`
   --> core/src/external_agent_config.rs:355:27
    |
355 |                       match AbsolutePathBuf::try_from(
    |  ___________________________^
356 | |                         add_marketplace_outcome
357 | |                             .installed_root
358 | |                             .join(INSTALLED_MARKETPLACE_MANIFEST_RELATIVE_PATH),
359 | |                     ) {
    | |_____________________^
    |
    = help: consider removing `AbsolutePathBuf::try_from()`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#useless_conversion
    = note: `-D clippy::useless-conversion` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::useless_conversion)]`

error: aborting due to 2 previous errors
```
2026-04-14 20:36:48 -07:00
guinness-oai 6f5ddd408b Wrap delegated input text (#17868)
## Summary
- wrap routed delegation text in a small XML envelope before submitting
it as a user turn
- escape XML text content so the envelope stays well formed
- update focused coverage for the wrapper and the affected routed-turn
expectations
2026-04-14 19:58:58 -07:00
AbhinavandCodex 130b047beb Disable hooks in guardian review sessions (#17872)
## What
Disable `Feature::CodexHooks` when building guardian review session
config

## Why
Guardian review sessions were respecting the Stop hook and could ingest
synthetic `<hook_prompt>` user turns Guardian should ignore hooks, while
the main session and regular subagents continue to respect them

In other words Guardian was getting ralph-looped

Co-authored-by: Codex <noreply@openai.com>
2026-04-14 19:47:50 -07:00
alexsong-oai ca650561d6 support plugins in external agent config migration (#17855) 2026-04-14 19:39:10 -07:00
Michael Bolin fe53d73042 Merge 0c5b443b42 into sapling-pr-archive-bolinfest 2026-04-14 19:02:26 -07:00
Michael Bolin 0c5b443b42 fix: cleanup the contract of the general-purpose exec() function 2026-04-14 19:02:15 -07:00
Michael Bolin d5675c4ed2 merge commit for archive created by Sapling 2026-04-14 18:35:12 -07:00
Michael Bolin 3ac24eb1b0 Merge a02dc2beb8 into sapling-pr-archive-bolinfest 2026-04-14 18:33:26 -07:00
Michael Bolin 60f1470f71 sandbox: remove dead seatbelt helper and update tests 2026-04-14 18:32:54 -07:00
Michael Bolin a02dc2beb8 fix: cleanup the contract of the general-purpose exec() function 2026-04-14 18:32:52 -07:00
Michael Bolin 1c32f98edc Merge a783d0fa6b into sapling-pr-archive-bolinfest 2026-04-14 18:23:19 -07:00
Michael Bolin a783d0fa6b sandbox: remove dead seatbelt helper and update tests 2026-04-14 18:23:12 -07:00
Won Park 2bfa627613 Fix for CI Tests failing from stack overflow (#17846)
### **Issue**
guardian_parallel_reviews_fork_from_last_committed_trunk_history was
failing on Windows/Bazel with a stack overflow:

`thread
'guardian::tests::guardian_parallel_reviews_fork_from_last_committed_trunk_history'
has overflowed its stack`

- This problem was a stack-headroom problem

### **Solution**

Reduced stack pressure in the guardian async path by boxing thin wrapper
futures, and run the affected test on a dedicated 2 MiB thread stack.

Concretely:
- added Box::pin(...) around thin async wrapper hops in the guardian
review/delegate path
- changed
guardian_parallel_reviews_fork_from_last_committed_trunk_history to run
inside an explicitly sized thread stack so it has enough headroom in
low-stack environments
2026-04-14 18:04:35 -07:00
Michael Bolin 0d284efc9a Merge ddb0b2df62 into sapling-pr-archive-bolinfest 2026-04-14 17:48:50 -07:00
Michael Bolin ddb0b2df62 sandbox: remove dead seatbelt helper and update tests 2026-04-14 17:48:15 -07:00
Michael Bolin a0e0c67dba merge commit for archive created by Sapling 2026-04-14 17:35:22 -07:00
Michael Bolin b1c161ae47 core: remove dead seatbelt helper 2026-04-14 17:34:23 -07:00
Michael Bolin ad1cf0da45 Merge 1ade38bc7b into sapling-pr-archive-bolinfest 2026-04-14 17:29:23 -07:00
Michael Bolin 1ade38bc7b core: remove dead seatbelt helper 2026-04-14 17:26:01 -07:00
xli-oai 3cc689fb23 [codex] Support local marketplace sources (#17756)
## Summary

- Port marketplace source support into the shared core marketplace-add
flow
- Support local marketplace directory sources
- Support direct `marketplace.json` URL sources
- Persist the new source types in config/schema and cover them in CLI
and app-server tests

## Validation

- `cargo test -p codex-core marketplace_add`
- `cargo test -p codex-cli marketplace_add`
- `cargo test -p codex-app-server marketplace_add`
- `just write-config-schema`
- `just fmt`
- `just fix -p codex-core`
- `just fix -p codex-cli`

## Context

Current `main` moved marketplace-add behavior into shared core code and
still assumed only git-backed sources. This change keeps that structure
but restores support for local directories and direct manifest URLs in
the shared path.
2026-04-14 15:58:14 -07:00