Commit Graph
8145 Commits
Author SHA1 Message Date
Michael Bolin f69e44be48 ci: shard linux gnu nextest tests into 2 partitions 2026-02-21 12:47:34 -08:00
Michael Bolin d36680b87d merge commit for archive created by Sapling 2026-02-21 12:21:50 -08:00
Michael Bolin f8c1b11c04 ci: shard linux gnu nextest tests into 2 partitions 2026-02-21 12:21:36 -08:00
pakrym-oaiandCodex b17148f13a Prefer v2 websockets if available (#12428)
And also cleanup settings flow to avoid reading many separate flags.

---------

Co-authored-by: Codex <noreply@openai.com>
2026-02-21 20:08:04 +00:00
Eric Traut a6b2bacb5b Prevent replayed runtime events from forcing active status (#12420)
Fixes #11852

Resume replay was applying transient runtime events (`TurnStarted`,
`StreamError`) as if they were live, which could leave the TUI stuck in
a stale `Working` / `Reconnecting...` state after resuming an
interrupted reconnect.

This change makes replay transcript-oriented for these events by:
- skipping retry-status restoration for replayed non-stream events
- ignoring replayed `TurnStarted` for task-running state
- ignoring replayed `StreamError` for reconnect/status UI

Also adds TUI regression tests and snapshot coverage for the interrupted
reconnect replay case.
2026-02-21 11:55:03 -08:00
sayan-oai 5a635f3427 profile-level model_catalog_json overrie (#12410)
enable `model-catalog_json` config value on `ConfigProfile` as well
2026-02-21 19:39:02 +00:00
viyatb-oaiandCodex b3202cbd58 feat(linux-sandbox): implement proxy-only egress via TCP-UDS-TCP bridge (#11293)
## Summary
- Implement Linux proxy-only routing in `codex-rs/linux-sandbox` with a
two-stage bridge: host namespace `loopback TCP proxy endpoint -> UDS`,
then bwrap netns `loopback TCP listener -> host UDS`.
- Add hidden `--proxy-route-spec` plumbing for outer-to-inner stage
handoff.
- Fail closed in proxy mode when no valid loopback proxy endpoints can
be routed.
- Introduce explicit network seccomp modes: `Restricted` (legacy
restricted networking) and `ProxyRouted` (allow INET/INET6 for routed
proxy access, deny `AF_UNIX` and `socketpair`).
- Enforce that proxy bridge/routing is bwrap-only by validating
`--apply-seccomp-then-exec` requires `--use-bwrap-sandbox`.
- Keep landlock-only flows unchanged (no proxy bridge behavior outside
bwrap).

---------

Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
2026-02-21 18:16:34 +00:00
Michael Bolin 7c3edfc747 merge commit for archive created by Sapling 2026-02-21 00:52:27 -08:00
Michael Bolin 1487fa3127 ci: shard linux gnu nextest tests into 2 partitions 2026-02-21 00:52:18 -08:00
pakrym-oai e7b6f38b58 Delete AggregatedStream (#12441)
Used only in test
2026-02-21 08:50:27 +00:00
Michael Bolin 2e7614b126 merge commit for archive created by Sapling 2026-02-21 00:46:38 -08:00
Michael Bolin c8a64c0c19 ci: shard linux gnu nextest tests into 2 partitions 2026-02-21 00:46:29 -08:00
Michael Bolin f5d7a74568 chore: delete empty codex-rs/code file (#12440)
This file was added in https://github.com/openai/codex/pull/4195, but I
think it may have been a mistake?
2026-02-21 08:44:55 +00:00
Michael Bolin a5024f7c43 merge commit for archive created by Sapling 2026-02-21 00:43:26 -08:00
Michael Bolin 4e1831a04e ci: shard linux gnu nextest tests into 2 partitions 2026-02-21 00:43:19 -08:00
Michael Bolin f5f4f75dd6 merge commit for archive created by Sapling 2026-02-21 00:34:44 -08:00
Michael Bolin 64fd23bab4 ci: shard linux gnu nextest tests into 2 partitions 2026-02-21 00:34:31 -08:00
Michael Bolin 85ce91a5b3 refactor(core): move embedded system skills into codex-skills crate (#12435)
## Why

`codex-core` was carrying the embedded system-skill sample assets (and a
`build.rs` that walks those files to register rerun triggers). Those
assets change infrequently, but any change under `codex-core` still ties
them to `codex-core`'s build/cache lifecycle.

This change moves the embedded system-skills packaging into a dedicated
`codex-skills` crate so it can be cached independently. That reduces
unnecessary invalidation/rebuild pressure on `codex-core` when the
skills bundle is the only thing that changes.

## What Changed

- Added a new `codex-rs/skills` crate (`codex-skills`) with:
  - `Cargo.toml`
  - `BUILD.bazel`
  - `build.rs` to track skill asset file changes for Cargo rebuilds
- `src/lib.rs` containing the embedded system-skills install/cache logic
previously in `codex-core`
- Moved the embedded sample skill assets from
`codex-rs/core/src/skills/assets/samples` to
`codex-rs/skills/src/assets/samples`.
- Updated `codex-rs/core/Cargo.toml` to depend on `codex-skills` and
removed `codex-core`'s direct `include_dir` dependency.
- Removed `codex-core`'s `build.rs`.
- Replaced `codex-rs/core/src/skills/system.rs` implementation with a
thin re-export wrapper to keep existing `codex-core` call sites
unchanged.
- Updated workspace manifests/lockfile (`codex-rs/Cargo.toml`,
`codex-rs/Cargo.lock`) for the new crate.
2026-02-21 08:34:08 +00:00
Michael Bolin 7252d5f741 Merge de99ae9070 into sapling-pr-archive-bolinfest 2026-02-21 00:28:12 -08:00
Michael Bolin de99ae9070 chore: delete empty codex-rs/code file 2026-02-21 00:28:06 -08:00
Michael Bolin 2fe4be1aa9 fix: codex-arg0 no longer depends on codex-core (#12434)
## Why

`codex-rs/arg0` only needed two things from `codex-core`:

- the `find_codex_home()` wrapper
- the special argv flag used for the internal `apply_patch`
self-invocation path

That made `codex-arg0` depend on `codex-core` for a very small surface
area. This change removes that dependency edge and moves the shared
`apply_patch` invocation flag to a more natural boundary
(`codex-apply-patch`) while keeping the contract explicitly documented.

## What Changed

- Moved the internal `apply_patch` argv[1] flag constant out of
`codex-core` and into `codex-apply-patch`.
- Renamed the constant to `CODEX_CORE_APPLY_PATCH_ARG1` and documented
that it is part of the Codex core process-invocation contract (even
though it now lives in `codex-apply-patch`).
- Updated `arg0`, the core apply-patch runtime, and the `codex-exec`
apply-patch test to import the constant from `codex-apply-patch`.
- Updated `codex-rs/arg0` to call
`codex_utils_home_dir::find_codex_home()` directly instead of
`codex_core::config::find_codex_home()`.
- Removed the `codex-core` dependency from `codex-rs/arg0` and added the
needed direct dependency on `codex-utils-home-dir`.
- Added `codex-apply-patch` as a dev-dependency for `codex-rs/exec`
tests (the apply-patch test now imports the moved constant directly).

## Verification

- `cargo test -p codex-apply-patch`
- `cargo test -p codex-arg0`
- `cargo test -p codex-core --lib apply_patch`
- `cargo test -p codex-exec
test_standalone_exec_cli_can_use_apply_patch`
- `cargo shear`
2026-02-21 00:20:42 -08:00
Michael Bolin 8976a498bc merge commit for archive created by Sapling 2026-02-21 00:19:36 -08:00
Michael Bolin f714e73a58 ci: sample cargo timing artifacts by default 2026-02-21 00:19:08 -08:00
Michael Bolin 90f1e35bc7 ci: limit clippy --tests to one representative target 2026-02-21 00:18:26 -08:00
Michael Bolin 6575795777 ci: skip windows arm64 tests on PRs in rust-ci 2026-02-21 00:18:26 -08:00
Michael Bolin bc2bffdc23 Merge 01f4b4a146 into sapling-pr-archive-bolinfest 2026-02-21 00:14:01 -08:00
Michael Bolin 01f4b4a146 ci: sample cargo timing artifacts by default 2026-02-21 00:13:45 -08:00
Michael Bolin e1b4f8aa83 ci: limit clippy --tests to one representative target 2026-02-21 00:13:09 -08:00
Michael Bolin 110f83b61e ci: skip windows arm64 tests on PRs in rust-ci 2026-02-21 00:12:49 -08:00
Michael Bolin 06092faed2 Merge eddcfc1866 into sapling-pr-archive-bolinfest 2026-02-21 00:08:18 -08:00
Michael Bolin eddcfc1866 fix: introduce codex-skills crate 2026-02-21 00:08:02 -08:00
Michael Bolin c59eccc018 Merge 86d1ad97cc into sapling-pr-archive-bolinfest 2026-02-20 23:51:13 -08:00
Michael Bolin 86d1ad97cc fix: codex-arg0 no longer depends on codex-core 2026-02-20 23:51:05 -08:00
Michael Bolin 1af2a37ada chore: remove codex-core public protocol/shell re-exports (#12432)
## Why

`codex-rs/core/src/lib.rs` re-exported a broad set of types and modules
from `codex-protocol` and `codex-shell-command`. That made it easy for
workspace crates to import those APIs through `codex-core`, which in
turn hides dependency edges and makes it harder to reduce compile-time
coupling over time.

This change removes those public re-exports so call sites must import
from the source crates directly. Even when a crate still depends on
`codex-core` today, this makes dependency boundaries explicit and
unblocks future work to drop `codex-core` dependencies where possible.

## What Changed

- Removed public re-exports from `codex-rs/core/src/lib.rs` for:
- `codex_protocol::protocol` and related protocol/model types (including
`InitialHistory`)
  - `codex_protocol::config_types` (`protocol_config_types`)
- `codex_shell_command::{bash, is_dangerous_command, is_safe_command,
parse_command, powershell}`
- Migrated workspace Rust call sites to import directly from:
  - `codex_protocol::protocol`
  - `codex_protocol::config_types`
  - `codex_protocol::models`
  - `codex_shell_command`
- Added explicit `Cargo.toml` dependencies (`codex-protocol` /
`codex-shell-command`) in crates that now import those crates directly.
- Kept `codex-core` internal modules compiling by using `pub(crate)`
aliases in `core/src/lib.rs` (internal-only, not part of the public
API).
- Updated the two utility crates that can already drop a `codex-core`
dependency edge entirely:
  - `codex-utils-approval-presets`
  - `codex-utils-cli`

## Verification

- `cargo test -p codex-utils-approval-presets`
- `cargo test -p codex-utils-cli`
- `cargo check --workspace --all-targets`
- `just clippy`
2026-02-20 23:45:35 -08:00
pakrym-oai a87c9c3299 Collapse waited message (#12430)
<img width="1349" height="148" alt="image"
src="https://github.com/user-attachments/assets/98c96523-4cec-4bb1-9998-59d38e0bebb8"
/>
2026-02-20 23:32:59 -08:00
Michael Bolin dd360615ed Merge afd89b95ce into sapling-pr-archive-bolinfest 2026-02-20 23:31:28 -08:00
Michael Bolin afd89b95ce chore: eliminate re-exports in codex-rs/core/src/lib.rs 2026-02-20 23:31:23 -08:00
Michael Bolin c6acfd73f2 Merge 859181eed4 into sapling-pr-archive-bolinfest 2026-02-20 23:24:26 -08:00
Michael Bolin 859181eed4 chore: eliminate re-exports in codex-rs/core/src/lib.rs 2026-02-20 23:24:17 -08:00
Michael Bolin 1a220ad77d chore: move config diagnostics out of codex-core (#12427)
## Why

Compiling `codex-rs/core` is a bottleneck for local iteration, so this
change continues the ongoing extraction of config-related functionality
out of `codex-core` and into `codex-config`.

The goal is not just to move code, but to reduce `codex-core` ownership
and indirection so more code depends on `codex-config` directly.

## What Changed

- Moved config diagnostics logic from
`core/src/config_loader/diagnostics.rs` into
`config/src/diagnostics.rs`.
- Updated `codex-core` to use `codex-config` diagnostics types/functions
directly where possible.
- Removed the `core/src/config_loader/diagnostics.rs` shim module
entirely; the remaining `ConfigToml`-specific calls are in
`core/src/config_loader/mod.rs`.
- Moved `CONFIG_TOML_FILE` into `codex-config` and updated existing
references to use `codex_config::CONFIG_TOML_FILE` directly.
- Added a direct `codex-config` dependency to `codex-cli` for its
`CONFIG_TOML_FILE` use.
2026-02-20 23:19:29 -08:00
Charley Cunningham bb0ac5be70 Fix compaction context reinjection and model baselines (#12252)
## Summary
- move regular-turn context diff/full-context persistence into
`run_turn` so pre-turn compaction runs before incoming context updates
are recorded
- after successful pre-turn compaction, rely on a cleared
`reference_context_item` to trigger full context reinjection on the
follow-up regular turn (manual `/compact` keeps replacement history
summary-only and also clears the baseline)
- preserve `<model_switch>` when full context is reinjected, and inject
it *before* the rest of the full-context items
- scope `reference_context_item` and `previous_model` to regular user
turns only so standalone tasks (`/compact`, shell, review, undo) cannot
suppress future reinjection or `<model_switch>` behavior
- make context-diff persistence + `reference_context_item` updates
explicit in the regular-turn path, with clearer docs/comments around the
invariant
- stop persisting local `/compact` `RolloutItem::TurnContext` snapshots
(only regular turns persist `TurnContextItem` now)
- simplify resume/fork previous-model/reference-baseline hydration by
looking up the last surviving turn context from rollout lifecycle
events, including rollback and compaction-crossing handling
- remove the legacy fallback that guessed from bare `TurnContext`
rollouts without lifecycle events
- update compaction/remote-compaction/model-visible snapshots and
compact test assertions (including remote compaction mock response
shape)

## Why
We were persisting incoming context items before spawning the regular
turn task, which let pre-turn compaction requests accidentally include
incoming context diffs without the new user message. Fixing that exposed
follow-on baseline issues around `/compact`, resume/fork, and standalone
tasks that could cause duplicate context injection or suppress
`<model_switch>` instructions.

This PR re-centers the invariants around regular turns:
- regular turns persist model-visible context diffs/full reinjection and
update the `reference_context_item`
- standalone tasks do not advance those regular-turn baselines
- compaction clears the baseline when replacement history may have
stripped the referenced context diffs

## Follow-ups (TODOs left in code)
- `TODO(ccunningham)`: fix rollback/backtracking baseline handling more
comprehensively
- `TODO(ccunningham)`: include pending incoming context items in
pre-turn compaction threshold estimation
- `TODO(ccunningham)`: inject updated personality spec alongside
`<model_switch>` so some model-switch paths can avoid forced full
reinjection
- `TODO(ccunningham)`: review task turn lifecycle
(`TurnStarted`/`TurnComplete`) behavior and emit task-start context
diffs for task types that should have them (excluding `/compact`)

## Validation
- `just fmt`
- CI should cover the updated compaction/resume/model-visible snapshot
expectations and rollout-hydration behavior
- I did **not** rerun the full local test suite after the latest
resume-lookup / rollout-persistence simplifications
2026-02-20 23:13:08 -08:00
Michael Bolin 264fc444b6 feat: discourage the use of the --all-features flag (#12429)
## Why

Developers are frequently running low on disk space, and routine use of
`--all-features` contributes to larger Cargo build caches in `target/`
by compiling additional feature combinations.

This change updates local workflow guidance to avoid `--all-features` by
default and reserve it for cases where full feature coverage is
specifically needed.

## What Changed

- Updated `AGENTS.md` guidance for `codex-rs` to recommend `cargo test`
/ `just test` for full-suite local runs, and to call out the disk-usage
cost of routine `--all-features` usage.
- Updated the root `justfile` so `just fix` and `just clippy` no longer
pass `--all-features` by default.
- Updated `docs/install.md` to explicitly describe `cargo test
--all-features` as an optional heavier-weight run (more build time and
`target/` disk usage).

## Verification

- Confirmed the `justfile` parses and the recipes list successfully with
`just --list`.
2026-02-20 23:02:24 -08:00
Michael Bolin a467168437 Merge d64a928fa9 into sapling-pr-archive-bolinfest 2026-02-20 22:52:39 -08:00
Michael Bolin d64a928fa9 feat: discourage the use of the --all-features flag 2026-02-20 22:52:33 -08:00
Michael Bolin ff8ccedf53 Merge 3eb45b55db into sapling-pr-archive-bolinfest 2026-02-20 22:47:07 -08:00
Michael Bolin 3eb45b55db chore: move core/src/config_loader/diagnostics.rs to config/src/diagnostics.rs 2026-02-20 22:47:00 -08:00
Michael Bolin 8393f72d59 Merge 95060cf2b4 into sapling-pr-archive-bolinfest 2026-02-20 22:42:50 -08:00
Michael Bolin 95060cf2b4 chore: move core/src/config_loader/diagnostics.rs to config/src/diagnostics.rs 2026-02-20 22:42:42 -08:00
Michael Bolin c523dcadf7 Merge d022fb53fd into sapling-pr-archive-bolinfest 2026-02-20 22:30:42 -08:00
Michael Bolin d022fb53fd chore: move core/src/config_loader/diagnostics.rs to config/src/diagnostics.rs 2026-02-20 22:30:35 -08:00