Commit Graph

14681 Commits

Author SHA1 Message Date
Michael Bolin
7ced6be5c3 Merge 392863f7d6 into sapling-pr-archive-bolinfest 2026-05-01 10:35:20 -07:00
Michael Bolin
392863f7d6 ci: cross-compile Windows Bazel tests 2026-05-01 10:35:06 -07:00
Michael Bolin
751477c154 merge commit for archive created by Sapling 2026-05-01 10:32:53 -07:00
Michael Bolin
93b75f4263 config: add strict config parsing 2026-05-01 10:32:41 -07:00
Michael Bolin
b72bae063f merge commit for archive created by Sapling 2026-05-01 10:05:53 -07:00
Michael Bolin
c0adb174f9 config: add strict config parsing 2026-05-01 10:05:38 -07:00
Michael Bolin
702c5127ea Merge d4468d68df into sapling-pr-archive-bolinfest 2026-05-01 09:56:32 -07:00
Michael Bolin
d4468d68df ci: cross-compile Windows Bazel tests 2026-05-01 09:56:17 -07:00
Michael Bolin
9984cec7a5 merge commit for archive created by Sapling 2026-05-01 09:48:08 -07:00
Michael Bolin
bc41fe5536 config: add strict config parsing 2026-05-01 09:47:57 -07:00
Michael Bolin
6bb4add554 Merge 3cb7694c53 into sapling-pr-archive-bolinfest 2026-05-01 09:17:28 -07:00
Michael Bolin
3cb7694c53 config: add strict config parsing 2026-05-01 09:17:16 -07:00
Michael Bolin
cfe84695f6 Merge 167a3c19e1 into sapling-pr-archive-bolinfest 2026-05-01 09:16:33 -07:00
Michael Bolin
167a3c19e1 ci: cross-compile Windows Bazel tests 2026-05-01 09:16:24 -07:00
jif-oai
5744b85b9a fix: cargo deny (#20627)
Fix cargo deny by ack the `RUSTSEC` while a fix land
```
  RUSTSEC-2026-0118
  NSEC3 closest-encloser proof validation enters unbounded loop on cross-zone responses

  RUSTSEC-2026-0119
  CPU exhaustion during message encoding due to O(n²) name compression

  Dependency path:

  hickory-proto 0.25.2
  └── hickory-resolver 0.25.2
      └── rama-dns 0.3.0-alpha.4
          └── rama-tcp 0.3.0-alpha.4
              └── codex-network-proxy
```

Also upgrade some workers version to prevent this:
```
warning[license-not-encountered]: license was not encountered
    ┌─ ./codex-rs/deny.toml:131:6
    │
131 │     "OpenSSL",
    │      ━━━━━━━ unmatched license allowance

warning[duplicate]: found 2 duplicate entries for crate 'base64'
   ┌─ /github/workspace/codex-rs/Cargo.lock:79:1
   │
79 │ ╭ base64 0.21.7 registry+https://github.com/rust-lang/crates.io-index
80 │ │ base64 0.22.1 registry+https://github.com/rust-lang/crates.io-index
   │ ╰───────────────────────────────────────────────────────────────────┘ lock entries
```
2026-05-01 18:15:38 +02:00
Eric Traut
3d1d164aee Remove no-tool goal continuation suppression (#20523)
## Why

`/goal` is supposed to keep Codex working until the goal is actually
done. The previous continuation logic had two ways to stop early: the
continuation prompt told the model to wait for new input when it felt
blocked, and the runtime suppressed another continuation turn after a
continuation finished without any tool calls.

That made goals stop short even when the agent could still keep making
progress (I received a few reports of this from users). It also relied
on a brittle heuristic that treated "no registry tool calls" as
equivalent to "should stop."

## What changed

- removed the continuation prompt sentence that told the model to stop
and wait for new input when it could not continue productively
- removed the goal runtime suppression heuristic that stopped
auto-continuation after a no-tool continuation turn
- deleted the continuation-activity bookkeeping and left `tool_calls` as
telemetry only
- added focused regressions for the two intended behaviors: completed
no-tool continuation turns still continue, while `request_user_input`
keeps the existing turn open instead of spawning a new continuation
2026-05-01 09:09:55 -07:00
Eric Traut
227bee0445 Enforce animations = false for screen readers (#20564)
## Why

Issue #20489 calls out that animated TUI affordances can be noisy for
screen-reader users. Codex already has `tui.animations = false` as a
reduced-motion setting, but some live activity rows render spinner-style
prefixes in that mode. These were relatively recent regressions.

We have also regressed this pattern more than once by adding new
spinner/shimmer callsites that do not think through the reduced-motion
path, so this PR adds a small guardrail while fixing the current
surfaces.

## What changed

- Omit the live status-row spinner when animations are disabled, so the
row starts with stable text like `Working (...)`.
- Render running hook headers without the spinner prefix when animations
are disabled, while preserving shimmer/spinner behavior when animations
are enabled.
- Centralize TUI activity indicators in `tui/src/motion.rs`, with
explicit reduced-motion choices for hidden prefixes, static bullets, and
plain shimmer-text fallbacks.
- Route existing spinner/shimmer callsites through the central motion
helper, including exec rows, MCP/web-search/loading rows, hook rows,
plugin loading, and onboarding loading text.
- Add a source-scan regression test that rejects direct `spinner(...)`
or `shimmer_spans(...)` usage outside the central module and primitive
definition.
- Add focused coverage that reduced-motion active exec rows are stable,
status rows start without a spinner, running hooks omit the spinner, and
MCP inventory loading stays stable.
- Update the one affected status-indicator snapshot; the existing detail
tree prefix remains unchanged.

## Verification

- `cargo test -p codex-tui`
2026-05-01 09:07:56 -07:00
Michael Bolin
3d411ae143 merge commit for archive created by Sapling 2026-05-01 08:57:21 -07:00
Michael Bolin
49efb68ba2 config: add strict config parsing 2026-05-01 08:57:03 -07:00
Michael Bolin
3b4778103b Merge be4bf005fc into sapling-pr-archive-bolinfest 2026-05-01 08:48:00 -07:00
Michael Bolin
be4bf005fc ci: cross-compile Windows Bazel tests 2026-05-01 08:47:46 -07:00
pakrym-oai
f476338f93 Move apply-patch file changes into turn items (#20540)
## Why

Apply-patch file changes are now part of the core turn item stream, so
v2 clients can consume the same first-class item lifecycle path used by
other turn items instead of relying on app-server-specific remapping
from legacy patch events.

## What changed

- Added a core `TurnItem::FileChange` carrying apply-patch changes and
completion metadata.
- Updated the apply-patch tool emitter to send `ItemStarted` /
`ItemCompleted` with the new `FileChange` item while preserving legacy
`PatchApplyBegin` / `PatchApplyEnd` fan-out.
- Updated app-server v2 conversion to render the new core item directly
and stopped `event_mapping` from remapping old patch begin/end events
into item notifications.
- Kept thread history reconstruction based on the existing old
apply-patch events for rollout compatibility.

## Verification

- `cargo test -p codex-protocol -p codex-app-server-protocol`
- `cargo test -p codex-core --test all
apply_patch_tool_executes_and_emits_patch_events`
- `cargo test -p codex-app-server bespoke_event_handling`
2026-05-01 08:47:18 -07:00
jif-oai
0b04d1b3cc feat: export and replay effective config locks (#20405)
## Why

For reproducibility. A hand-written `config.toml` is not enough to
recreate what a Codex session actually ran with because layered config,
CLI overrides, defaults, feature aliases, resolved feature config,
prompt setup, and model-catalog/session values can all affect the final
runtime behavior.

This PR adds an effective config lockfile path: one run can export the
resolved session config, and a later run can replay that lockfile and
fail early if the regenerated effective config drifts.

## What Changed

- Add a dedicated `ConfigLockfileToml` wrapper with top-level lockfile
metadata plus the replayable config:

  ```toml
  version = 1
  codex_version = "..."

  [config]
  # effective ConfigToml fields
  ```

- Keep lockfile metadata out of regular `ConfigToml`; replay loads
`ConfigLockfileToml` and then uses its nested `config` as the
authoritative config layer.
- Add `debug.config_lockfile.export_dir` to write
`<thread_id>.config.lock.toml` when a root session starts.
- Add `debug.config_lockfile.load_path` to replay a saved lockfile and
validate the regenerated session lockfile against it.
- Add `debug.config_lockfile.allow_codex_version_mismatch` to optionally
tolerate Codex binary version drift while still comparing the rest of
the lockfile.
- Add `debug.config_lockfile.save_fields_resolved_from_model_catalog` so
lock creation can either save model-catalog/session-resolved fields or
intentionally leave those fields dynamic.
- Build lockfiles from the effective config plus resolved runtime values
such as model selection, reasoning settings, prompts, service tier, web
search mode, feature states/config, memories config, skill instructions,
and agent limits.
- Materialize feature aliases and custom feature config into the
lockfile so replay compares canonical resolved behavior instead of
user-authored alias shape.
- Strip profile/debug/file-include/environment-specific inputs from
generated lockfiles so they contain replayable values rather than the
inputs that produced those values.
- Surface JSON-RPC server error code/data in app-server client and TUI
bootstrap errors so config-lock replay failures include the actual TOML
diff.
- Regenerate the config schema for the new debug config keys.

## Review Notes

The main flow is split across these files:

- `config/src/config_toml.rs`: lockfile/debug TOML shapes.
- `core/src/config/mod.rs`: loading `debug.config_lockfile.*`, replaying
a lockfile as a config layer, and preserving the expected lockfile for
validation.
- `core/src/session/config_lock.rs`: exporting the current session
lockfile and materializing resolved session/config values.
- `core/src/config_lock.rs`: lockfile parsing, metadata/version checks,
replay comparison, and diff formatting.

## Usage

Export a lockfile from a normal session:

```sh
codex -c 'debug.config_lockfile.export_dir="/tmp/codex-locks"'
```

Export a lockfile without saving model-catalog/session-resolved fields:

```sh
codex -c 'debug.config_lockfile.export_dir="/tmp/codex-locks"' \
  -c 'debug.config_lockfile.save_fields_resolved_from_model_catalog=false'
```

Replay a saved lockfile in a later session:

```sh
codex -c 'debug.config_lockfile.load_path="/tmp/codex-locks/<thread_id>.config.lock.toml"'
```

If replay resolves to a different effective config, startup fails with a
TOML diff.

To tolerate Codex binary version drift during replay:

```sh
codex -c 'debug.config_lockfile.load_path="/tmp/codex-locks/<thread_id>.config.lock.toml"' \
  -c 'debug.config_lockfile.allow_codex_version_mismatch=true'
```

## Limitations

This does not support custom rules/network policies.

## Verification

- `cargo test -p codex-core config_lock`
- `cargo test -p codex-config`
- `cargo test -p codex-thread-manager-sample`
2026-05-01 17:46:02 +02:00
jif-oai
ff27d01676 feat: seed ad-hoc memory extension instructions (#20606)
## Summary

Ad-hoc memory notes are written under `memories/extensions/ad_hoc/`, but
the consolidation agent only knows how to interpret an extension when
the extension folder has an `instructions.md`. Seed those instructions
from the memories write pipeline so an enabled memories startup creates
the expected ad-hoc extension layout automatically.

This also moves extension-specific write behavior behind a dedicated
`memories/write/src/extensions/` module. `ad_hoc` owns the seeded
instructions template, while the existing resource-retention cleanup
lives in its own `prune` module so future memory extensions can add
their own write-side setup without growing a flat helper file.

## Changes

- Seed `memories/extensions/ad_hoc/instructions.md` during eligible
memory startup without overwriting an existing file.
- Store the ad-hoc instructions template under
`memories/write/templates/extensions/ad_hoc/`, keeping ownership in
`codex-memories-write`.
- Split memory extension support into `extensions::ad_hoc` and
`extensions::prune`.
- Keep the existing old-resource pruning behavior unchanged.

## Verification

- `cargo test -p codex-memories-write`
- `bazel build //codex-rs/memories/write:write`

---------

Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
2026-05-01 14:43:58 +02:00
jif-oai
70fc55b8f3 chore: improve remember prompt (#20610) 2026-05-01 14:38:07 +02:00
jif-oai
97aae46800 feat: ad-hoc instructions (#20602) 2026-05-01 13:42:54 +02:00
jif-oai
ad404c8400 chore: allow memories edition (#20600) 2026-05-01 13:27:37 +02:00
Michael Bolin
1671744288 merge commit for archive created by Sapling 2026-05-01 03:18:35 -07:00
Michael Bolin
5f05165906 ci: cross-compile Windows Bazel tests 2026-05-01 03:18:25 -07:00
Michael Bolin
334ff924fd merge commit for archive created by Sapling 2026-05-01 02:48:36 -07:00
Michael Bolin
bc4071064a ci: cross-compile Windows Bazel tests 2026-05-01 02:48:16 -07:00
Michael Bolin
4aa052e187 Merge d58ad839b4 into sapling-pr-archive-bolinfest 2026-05-01 02:14:34 -07:00
Michael Bolin
d58ad839b4 ci: add Windows cargo-xwin release PoC 2026-05-01 02:14:19 -07:00
Michael Bolin
6dffd20779 merge commit for archive created by Sapling 2026-05-01 02:13:09 -07:00
Michael Bolin
f9dd4e4075 ci: cross-compile Windows Bazel tests 2026-05-01 02:12:45 -07:00
Michael Bolin
8bedb7424a merge commit for archive created by Sapling 2026-05-01 02:00:44 -07:00
Michael Bolin
46dd952058 ci: add Windows cargo-xwin release PoC 2026-05-01 02:00:34 -07:00
Michael Bolin
b09e3fd0ac merge commit for archive created by Sapling 2026-05-01 01:50:44 -07:00
Michael Bolin
4e16a08e28 ci: add Windows cargo-xwin release PoC 2026-05-01 01:50:31 -07:00
Michael Bolin
3fde0159db merge commit for archive created by Sapling 2026-05-01 01:37:18 -07:00
Michael Bolin
6e1ebc7855 ci: add Windows cargo-xwin release PoC 2026-05-01 01:37:06 -07:00
Michael Bolin
9b8d607ac5 merge commit for archive created by Sapling 2026-05-01 01:22:14 -07:00
Michael Bolin
71f3181861 ci: add Windows cargo-xwin release PoC 2026-05-01 01:22:01 -07:00
Michael Bolin
2b43ce427a merge commit for archive created by Sapling 2026-05-01 01:05:56 -07:00
Michael Bolin
04ebd01415 ci: add Windows cargo-xwin release PoC 2026-05-01 01:05:43 -07:00
xl-openai
48791920a8 feat: Track local paths for shared plugins (#20560)
When a local plugin is shared, Codex now records the local plugin path
by remote plugin id under CODEX_HOME/.tmp.

plugin/share/list includes the remote share URL and the matching local
plugin path when available, and plugin/share/delete
clears the local mapping after deleting the remote share.

Also add sharedURL to plugin/share/list.
2026-05-01 00:50:12 -07:00
Michael Bolin
3557814b40 merge commit for archive created by Sapling 2026-05-01 00:47:22 -07:00
Michael Bolin
0be290558d ci: add Windows cargo-xwin release PoC 2026-05-01 00:47:10 -07:00
Michael Bolin
73c03912a7 merge commit for archive created by Sapling 2026-05-01 00:32:18 -07:00
Michael Bolin
33ef0d2380 ci: add Windows cargo-xwin release PoC 2026-05-01 00:32:06 -07:00