Commit Graph

6803 Commits

Author SHA1 Message Date
Eric Traut
1cf5fd347a Merge branch 'etraut/next-turn-state-app-server' into etraut/next-turn-state-tui 2026-05-18 20:42:30 -07:00
Eric Traut
90b245bb69 Merge remote-tracking branch 'origin/etraut/next-turn-state-core' into etraut/next-turn-state-app-server
# Conflicts:
#	codex-rs/app-server/src/request_processors/turn_processor.rs
2026-05-18 20:42:19 -07:00
Eric Traut
d20715c620 Merge branch 'etraut/next-turn-state-app-server' into etraut/next-turn-state-tui 2026-05-18 20:39:34 -07:00
Eric Traut
0db66bd6d6 Fix thread settings permissions tests 2026-05-18 20:39:07 -07:00
Eric Traut
f82e75c0de Merge branch 'etraut/next-turn-state-app-server' into etraut/next-turn-state-tui 2026-05-18 20:27:53 -07:00
Eric Traut
b00aa1ead1 Route thread settings notifications by thread 2026-05-18 20:27:40 -07:00
Eric Traut
e7d5ddc46e Defer running resume subscription to listener 2026-05-18 20:23:29 -07:00
Eric Traut
c8a56c1ce0 Wait for accepted thread settings notifications 2026-05-18 20:21:17 -07:00
Eric Traut
9d90b4214c Replace OverrideTurnContext with ThreadSettings 2026-05-18 20:07:42 -07:00
Eric Traut
2a3f524006 Serialize thread settings notifications 2026-05-18 20:04:52 -07:00
Eric Traut
1a25d8b6e5 [3 of 7] Remove UserTurn (#23075)
**Stack position:** [3 of 7]

## Summary

This PR finishes the input-op consolidation by moving the remaining
`Op::UserTurn` callers onto `Op::UserInput` and deleting `Op::UserTurn`.
This touches a lot of files, but it is a low-risk mechanical migration.

## Stack

1. [1 of 7] [Add thread settings to
UserInput](https://github.com/openai/codex/pull/23080)
2. [2 of 7] [Remove
UserInputWithTurnContext](https://github.com/openai/codex/pull/23081)
3. [3 of 7] [Remove
UserTurn](https://github.com/openai/codex/pull/23075) (this PR)
4. [4 of 7] [Placeholder for OverrideTurnContext
cleanup](https://github.com/openai/codex/pull/23087)
5. [5 of 7] [Replace OverrideTurnContext with
ThreadSettings](https://github.com/openai/codex/pull/22508)
6. [6 of 7] [Add app-server thread settings
API](https://github.com/openai/codex/pull/22509)
7. [7 of 7] [Sync TUI thread
settings](https://github.com/openai/codex/pull/22510)
2026-05-18 19:56:00 -07:00
Eric Traut
09c10ffb0c Merge branch 'etraut/next-turn-state-app-server' into etraut/next-turn-state-tui 2026-05-18 19:54:23 -07:00
Eric Traut
7287944484 Merge branch 'etraut/next-turn-state-core' into etraut/next-turn-state-app-server 2026-05-18 19:54:06 -07:00
Eric Traut
7a091b0fe2 Classify invalid thread settings as bad requests 2026-05-18 19:53:51 -07:00
Eric Traut
746d849921 Merge branch 'etraut/next-turn-state-app-server' into etraut/next-turn-state-tui 2026-05-18 19:45:06 -07:00
Eric Traut
240f34cab0 Merge branch 'etraut/next-turn-state-core' into etraut/next-turn-state-app-server 2026-05-18 19:44:54 -07:00
Eric Traut
87c91db57f Merge branch 'etraut/next-turn-state-remove-override-context' into etraut/next-turn-state-core 2026-05-18 19:44:41 -07:00
Eric Traut
981399d146 Merge branch 'etraut/next-turn-state-input-op-consolidation' into etraut/next-turn-state-remove-override-context 2026-05-18 19:44:31 -07:00
Eric Traut
e940365cc8 Remove UserTurn op 2026-05-18 19:43:44 -07:00
Eric Traut
e811234484 [2 of 7] Remove UserInputWithTurnContext (#23081)
**Stack position:** [2 of 7]

## Summary

This PR removes the overlapping `Op::UserInputWithTurnContext` variant
now that `Op::UserInput` can carry thread settings overrides directly.

## Stack

1. [1 of 7] [Add thread settings to
UserInput](https://github.com/openai/codex/pull/23080)
2. [2 of 7] [Remove
UserInputWithTurnContext](https://github.com/openai/codex/pull/23081)
(this PR)
3. [3 of 7] [Remove
UserTurn](https://github.com/openai/codex/pull/23075)
4. [4 of 7] [Placeholder for OverrideTurnContext
cleanup](https://github.com/openai/codex/pull/23087)
5. [5 of 7] [Replace OverrideTurnContext with
ThreadSettings](https://github.com/openai/codex/pull/22508)
6. [6 of 7] [Add app-server thread settings
API](https://github.com/openai/codex/pull/22509)
7. [7 of 7] [Sync TUI thread
settings](https://github.com/openai/codex/pull/22510)
2026-05-18 19:41:33 -07:00
Eric Traut
1e07001028 Merge branch 'etraut/next-turn-state-app-server' into etraut/next-turn-state-tui 2026-05-18 19:35:06 -07:00
Eric Traut
9403a72345 Document thread settings experimental opt-in 2026-05-18 19:34:48 -07:00
Eric Traut
862a5e0420 Merge branch 'etraut/next-turn-state-app-server' into etraut/next-turn-state-tui 2026-05-18 19:33:27 -07:00
Eric Traut
49860973c4 Merge branch 'etraut/next-turn-state-core' into etraut/next-turn-state-app-server
# Conflicts:
#	codex-rs/app-server-protocol/src/protocol/common.rs
#	codex-rs/app-server-protocol/src/protocol/v2/thread.rs
#	codex-rs/app-server/src/request_processors/turn_processor.rs
2026-05-18 19:26:52 -07:00
Eric Traut
ef2278bfdc Merge branch 'etraut/next-turn-state-remove-override-context' into etraut/next-turn-state-core 2026-05-18 19:23:13 -07:00
Eric Traut
154ef812a5 Merge branch 'etraut/next-turn-state-input-op-consolidation' into etraut/next-turn-state-remove-override-context 2026-05-18 19:23:01 -07:00
Eric Traut
45fe8ff8cc Merge branch 'etraut/next-turn-state-remove-user-input-with-context' into etraut/next-turn-state-input-op-consolidation
# Conflicts:
#	codex-rs/core/src/session/handlers.rs
#	codex-rs/core/tests/common/test_codex.rs
#	codex-rs/core/tests/suite/request_permissions.rs
#	codex-rs/core/tests/suite/unified_exec.rs
#	codex-rs/protocol/src/protocol.rs
2026-05-18 19:22:12 -07:00
Eric Traut
6927359c0c Simplify turn start context overrides 2026-05-18 18:51:31 -07:00
Eric Traut
e3fe029000 Remove UserInputWithTurnContext op 2026-05-18 18:51:06 -07:00
Eric Traut
84d941d07f [1 of 7] Add thread settings to UserInput (#23080)
**Stack position:** [1 of 7]

## Summary

The first three PRs in this stack are a cleanup pass before the actual
thread settings API work.

Today, core has several overlapping "user input" ops: `UserInput`,
`UserInputWithTurnContext`, and `UserTurn`. They differ mostly in how
much next-turn state they carry, which makes the later queued thread
settings update harder to reason about and review.

This PR starts that cleanup by adding the shared
`ThreadSettingsOverrides` payload and allowing `Op::UserInput` to carry
it. Existing variants remain in place here, so this layer is mostly a
behavior-preserving API shape change plus mechanical constructor
updates.

## End State After PR3

By the end of PR3, `Op::UserInput` is the only "user input" core op. It
can carry optional thread settings overrides for callers that need to
update stored defaults with a turn, while callers without updates use
empty settings. `Op::UserInputWithTurnContext` and `Op::UserTurn` are
deleted.

## End State After PR5

By the end of PR5, core will have only two ops for this area:

- `Op::UserInput` for user-input-bearing submissions.
- `Op::ThreadSettings` for settings-only updates.

## Stack

1. [1 of 7] [Add thread settings to
UserInput](https://github.com/openai/codex/pull/23080) (this PR)
2. [2 of 7] [Remove
UserInputWithTurnContext](https://github.com/openai/codex/pull/23081)
3. [3 of 7] [Remove
UserTurn](https://github.com/openai/codex/pull/23075)
4. [4 of 7] [Placeholder for OverrideTurnContext
cleanup](https://github.com/openai/codex/pull/23087)
5. [5 of 7] [Replace OverrideTurnContext with
ThreadSettings](https://github.com/openai/codex/pull/22508)
6. [6 of 7] [Add app-server thread settings
API](https://github.com/openai/codex/pull/22509)
7. [7 of 7] [Sync TUI thread
settings](https://github.com/openai/codex/pull/22510)
2026-05-18 18:48:35 -07:00
Eric Traut
052260a50b Absolutize thread settings cwd before queueing 2026-05-18 18:42:41 -07:00
Eric Traut
0fafab08ef Merge branch 'etraut/next-turn-state-app-server' into etraut/next-turn-state-tui
# Conflicts:
#	codex-rs/tui/src/chatwidget/protocol.rs
2026-05-18 18:33:10 -07:00
Eric Traut
654586eda6 Update TUI thread settings notification matches 2026-05-18 18:31:49 -07:00
Eric Traut
505a6dec64 Wait for accepted thread settings updates 2026-05-18 18:27:29 -07:00
sayan-oai
daa11820b0 Remove ToolSearch feature toggle (#23389)
## Summary
- mark `ToolSearch` as removed and ignore stale config writes for its
legacy key
- make search tool exposure depend only on model capability, not a
feature toggle
- remove app-server enablement support and prune now-obsolete test
coverage/setup

## Verification
- `cargo test -p codex-features`
- `cargo test -p codex-tools`
- `cargo test -p codex-core search_tool_requires_model_capability`
- `cargo test -p codex-app-server experimental_feature_enablement_set_`

## Notes
- This keeps the legacy config key as a no-op for compatibility while
removing the ability to toggle the behavior off cleanly.
- No developer-facing docs update outside the touched app-server README
was needed.
2026-05-19 01:24:39 +00:00
xl-openai
6b54ced108 cleanup: Remove skill env var dependency prompting (#22721)
Deletes the skill env var dependency prompt feature and its runtime
path. env_var entries in skill dependency metadata are now silently
ignored during skill loading.
2026-05-19 01:24:19 +00:00
Eric Traut
08fe94c092 Merge branch 'etraut/next-turn-state-app-server' into etraut/next-turn-state-tui 2026-05-18 18:20:35 -07:00
Eric Traut
2de6572138 Fix thread settings notification client match 2026-05-18 18:20:24 -07:00
pakrym-oai
17d552fb4d [codex] Remove external websocket session resets (#23384)
## Why

Compaction now installs replacement history inside the session, but the
turn and compaction callers were still reaching into
`ModelClientSession` to reset websocket transport state after that
install. That made a transport-level reset part of the compaction API
even though websocket incremental request selection already checks
whether the next request is a strict extension of the previous one and
falls back to a full `response.create` when it is not.

## What changed

- Removed the compaction-side calls to `reset_websocket_session` from
`compact.rs` and `session/turn.rs`.
- Simplified pre-sampling and mid-turn compaction helpers so they return
`CodexResult<()>` instead of carrying a reset flag.
- Made `ModelClientSession::reset_websocket_session` private to
`client.rs`, leaving only the websocket timeout recovery path inside the
client as a caller.

## Validation

- `cargo test -p codex-core --test all
responses_websocket_creates_on_non_prefix`
- `cargo test -p codex-core --test all
steered_user_input_waits_for_model_continuation_after_mid_turn_compact`
- `cargo test -p codex-core --test all
pre_sampling_compact_runs_on_switch_to_smaller_context_model`
2026-05-19 01:13:38 +00:00
Eric Traut
0d62edd2de Merge branch 'etraut/next-turn-state-app-server' into etraut/next-turn-state-tui 2026-05-18 17:43:58 -07:00
Eric Traut
0f422dd875 Merge branch 'etraut/next-turn-state-core' into etraut/next-turn-state-app-server
# Conflicts:
#	codex-rs/app-server/src/request_processors/turn_processor.rs
2026-05-18 17:43:41 -07:00
Eric Traut
0a2c9aa9d9 Simplify thread settings core helpers 2026-05-18 17:42:36 -07:00
Michael Bolin
3fd79b7986 app-server: use profile ids in v2 permission params (#23360)
## Why

The v2 app-server permission profile fields are experimental, but the
previous migration kept a legacy object payload for profile selection.
That made clients aware of server-owned `activePermissionProfile`
metadata such as `extends`, and it kept a
`legacy_additional_writable_roots` path even though
`runtimeWorkspaceRoots` now owns runtime workspace-root selection.

This PR makes the client contract match the intended model: clients
select a permission profile by id, and the server resolves and reports
active profile provenance in response payloads.

Follow-up to #22611.

## What Changed

- Changed `thread/start`, `thread/resume`, `thread/fork`, and
`turn/start` permission profile selection to plain profile id strings.
- Changed `command/exec.permissionProfile` to a plain profile id string
for the same client/server ownership split.
- Removed `PermissionProfileSelectionParams` and the legacy `{ type:
"profile", modifications: [...] }` compatibility deserializer.
- Updated app-server, TUI, and `codex exec` call sites to send only ids,
while keeping `activePermissionProfile` as server response metadata.
- Updated app-server docs and schema fixtures for the revised
`command/exec.permissionProfile` shape.

## Verification

- `cargo test -p codex-app-server-protocol`
- `RUST_MIN_STACK=8388608 cargo test -p codex-app-server`
- `cargo test -p codex-exec`
- `RUST_MIN_STACK=8388608 cargo test -p codex-tui`

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/23360).
* #23368
* __->__ #23360
2026-05-18 17:28:50 -07:00
Eric Traut
1d67ea0e0c Merge branch 'etraut/next-turn-state-app-server' into etraut/next-turn-state-tui 2026-05-18 17:15:46 -07:00
Eric Traut
ed2534f1c1 Merge branch 'etraut/next-turn-state-core' into etraut/next-turn-state-app-server 2026-05-18 17:15:30 -07:00
Eric Traut
5dc813bd16 Fix thread settings op kind test 2026-05-18 17:15:15 -07:00
marksteinbrick-oai
5696167fe8 [codex-analytics] preserve user thread source for exec threads (#23376)
## Why
- Follows #20949.
- The above moved `thread_source` attribution from the reducer to
explicit caller provided metadata
- The `codex exec` path still omitted this metadata, leaving
exec-created threads without `thread_source`


## What Changed
- Ensures exec threads are marked as user created (`thread_source =
"user"`)
- Preserves thread-source metadata in exec’s startup session event


## Verification
- Updated unit tests to validate exec `thread_source` propagation.
- `cargo +1.93.0 test -p codex-exec --manifest-path codex-rs/Cargo.toml`
- `cargo +1.93.1 build -p codex-cli --manifest-path codex-rs/Cargo.toml`
- Validated locally with a freshly built `codex exec` run:
  - Startup logs showed `thread_source: Some(User)`.
  - Rollout metadata recorded `"thread_source":"user"`.
2026-05-18 17:13:49 -07:00
Eric Traut
1ee62e6f31 Merge branch 'etraut/next-turn-state-app-server' into etraut/next-turn-state-tui 2026-05-18 16:47:07 -07:00
Eric Traut
78dc40ac5c Merge branch 'etraut/next-turn-state-core' into etraut/next-turn-state-app-server 2026-05-18 16:46:53 -07:00
Eric Traut
c230815119 Merge branch 'etraut/next-turn-state-remove-override-context' into etraut/next-turn-state-core 2026-05-18 16:46:41 -07:00